详情图使用随机ai图片
This commit is contained in:
1 parent
ec8736b8f9
commit
dc95bd8621
5 files changed
+184
-40
No files matched your search
@@ -1099,7 +1099,39 @@ namespace KJD_Web.BLL
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "update kjd.sku_img_base64 set img_url=\'" + img_url + "\' where id='" + id + "'";
|
||||
string sql = "update kjd.sku_img_base64 set img_url=\'" + img_url + "\' where id='" + id + "';";
|
||||
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
mySql.Close();
|
||||
if (rst)
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\"}";
|
||||
}
|
||||
else
|
||||
return "{\"code\":500,\"msg\":\"保存失败:" + mySql.Message + "\"}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string MdyBase64ImgUseCount(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
var ids = RegexUtils.GetStringQuery(ref inputData, "db_ids")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(ids))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"保存失败:缺少图片编号\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "update kjd.sku_img_base64 set use_count=use_count+1 where id in (" + ids + ");";
|
||||
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
mySql.Close();
|
||||
|
||||
@@ -273,5 +273,16 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void mdy_base64_img_use_count()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
var result = jsontext;
|
||||
result = new ProductManage().MdyBase64ImgUseCount(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user