拼多多版权限管理 指定类目上传 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 + "\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user