拼多多版权限管理 指定类目上传 ai图片上传权限管理
This commit is contained in:
1 parent
58798805ed
commit
ce23b0a49a
28 files changed
+1265
-483
No files matched your search
@@ -526,7 +526,7 @@ namespace KJD_Web.BLL.BXX
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
|
||||
string sql = " select count(*) from bxx.product p " +
|
||||
" FORCE INDEX (f_wx_safe_status) " +
|
||||
" FORCE INDEX (index_wx_safe_status) " +
|
||||
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
|
||||
" WHERE p.is_del=0";
|
||||
|
||||
@@ -793,7 +793,8 @@ namespace KJD_Web.BLL.BXX
|
||||
prod.size_json = row["size_json"].ToString();
|
||||
prod.sku_edit_json = row["sku_edit_json"].ToString();
|
||||
prod.sku_secret_json = row["sku_secret_json"].ToString();
|
||||
prod.has_wx_format = row["has_wx_format"].ParseToNullableString();
|
||||
prod.fission_imgs = row["fission_imgs"].ToString();
|
||||
prod.has_wx_format = row["has_wx_format"].ParseToNullableString(); // 微信回采
|
||||
prod.sku_img_replace_base64 = row["img_base64"].ToString();
|
||||
//prod.sku_img_replace_url = row["img_url"].ToString();
|
||||
prod.wx_img_map_json = row["wx_img_map_json"].ToString();
|
||||
@@ -1467,7 +1468,7 @@ namespace KJD_Web.BLL.BXX
|
||||
|
||||
string sql = " SELECT count(*)" +
|
||||
" FROM bxx.product p" +
|
||||
" FORCE INDEX (f_wx_safe_status)" +
|
||||
" FORCE INDEX (index_wx_safe_status)" +
|
||||
//" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
|
||||
" WHERE p.is_del=0";
|
||||
|
||||
@@ -1860,6 +1861,7 @@ namespace KJD_Web.BLL.BXX
|
||||
string group = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "group"))?.Replace("'", "\\'");
|
||||
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
|
||||
string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'");
|
||||
string fission_imgs = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_imgs"))?.Replace("'", "\\'");
|
||||
string fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'");
|
||||
string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'");
|
||||
string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'");
|
||||
@@ -1883,6 +1885,8 @@ namespace KJD_Web.BLL.BXX
|
||||
sql += " p.notes='" + notes + "',";
|
||||
if (ext_code != null)
|
||||
sql += " p.ext_code='" + ext_code + "',";
|
||||
if (fission_imgs != null)
|
||||
sql += " p.fission_imgs='" + fission_imgs + "',";
|
||||
if (fission_words != null)
|
||||
sql += " p.fission_words='" + fission_words + "',";
|
||||
if (head_words != null)
|
||||
@@ -3549,6 +3553,38 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string XJGetAiImage(string inputData)
|
||||
{
|
||||
if (string.IsNullOrEmpty(inputData))
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
string image_url = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "image_url"))?.ParseToString();
|
||||
string word = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "word"))?.ParseToString();
|
||||
if (image_url == null)
|
||||
return "{\"code\":500,\"msg\":\"缺少图片地址\"}";
|
||||
if (word == null)
|
||||
return "{\"code\":500,\"msg\":\"缺少图片文字\"}";
|
||||
|
||||
string secret = "sadhjufhe15c4fbvFBvcvds+5sdfds@#%$xsc";
|
||||
string time = TimeUtils.DateTimeToTimestampSeconds(DateTime.Now).ToString();
|
||||
string code = EncrypUtil.GetMd5(secret + time);
|
||||
|
||||
try
|
||||
{
|
||||
string url = "http://ai-bs.jiaotian.vip:" + RandomUtils.GetId(20010, 20021) + "/index.php?obj=public/image";
|
||||
string data = "time=" + time + "&code=" + code + "&image_url=" + image_url + "&word=" + word;
|
||||
string html = HttpUtils.e57GetResponse(url, "");
|
||||
return html;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"" + ex.Message + "\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace KJD_Web.BLL.BXX
|
||||
company_name = row["company_name"].ToString(),
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authority = row["authority"].ToString(),
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(user.company_name))
|
||||
@@ -76,6 +77,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -90,9 +92,9 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,add_time,mdy_time) " +
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -140,6 +142,7 @@ namespace KJD_Web.BLL.BXX
|
||||
parent_user_name = row["parent_user_name"].ToString(),
|
||||
company_name = row["company_name"].ToString(),
|
||||
notes = row["notes"].ToString(),
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -167,6 +170,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'");
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -190,6 +194,8 @@ namespace KJD_Web.BLL.BXX
|
||||
sql += " card_id='" + card_id + "',";
|
||||
if (!string.IsNullOrEmpty(notes))
|
||||
sql += " notes='" + notes + "',";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
@@ -277,6 +283,7 @@ namespace KJD_Web.BLL.BXX
|
||||
notes = row["notes"].ToString(),
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -304,6 +311,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -318,9 +326,9 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " +
|
||||
sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -347,6 +355,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -374,6 +383,8 @@ namespace KJD_Web.BLL.BXX
|
||||
sql += " notes='" + notes + "',";
|
||||
if (!string.IsNullOrEmpty(sa_level))
|
||||
sql += " sa_level=" + sa_level + ",";
|
||||
if (authority != null)
|
||||
sql += " authority='" + authority + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace KJD_Web.Model
|
||||
/// 被选中的总次数
|
||||
/// </summary>
|
||||
public int select_total_count { get; set; }
|
||||
public string fission_imgs { get; set; }
|
||||
public string fission_words { get; set; }
|
||||
public string head_words { get; set; }
|
||||
public string end_words { get; set; }
|
||||
|
||||
Reference in new issue
Block a user