Merge branch 'master' of https://github.com/KJD2025/KJD_WebService
This commit is contained in:
commit
6969782e34
6 files changed
+105
-6
No files matched your search
@@ -476,6 +476,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
string map_sku_id = RegexUtils.GetStringQuery(ref inputData, "map_sku_id")?.Replace("'", "\\'");
|
||||
string map_send_address = RegexUtils.GetStringQuery(ref inputData, "map_send_address")?.Replace("'", "\\'");
|
||||
string transit_warehouse_id = RegexUtils.GetStringQuery(ref inputData, "transit_warehouse_id")?.Replace("'", "\\'");
|
||||
string map_skus = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "map_skus"))?.Replace("'", "\\'");
|
||||
|
||||
if (string.IsNullOrEmpty(spu_code) || string.IsNullOrEmpty(sku_code))
|
||||
return "{\"code\":500,\"msg\":\"缺少系统商品或SKU编号\"}";
|
||||
@@ -792,6 +793,9 @@ namespace KJD_Web.BLL.WXXD
|
||||
has_reject = row["has_reject"].ParseToInt(),
|
||||
blocked_arrival_time = row["blocked_arrival_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
rejected_time = row["rejected_time"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
intercept_return_info = row["intercept_return_info"].ParseToNullableString(),
|
||||
intercept_return_status = row["intercept_return_status"].ParseToNullableInt(),
|
||||
intercept_return_time = row["intercept_return_status"].ParseToNullableString().ParseToDateTimeNullable(),
|
||||
});
|
||||
}
|
||||
return oms_wei_external_procurement_log_list;
|
||||
@@ -2167,6 +2171,9 @@ namespace KJD_Web.BLL.WXXD
|
||||
/// <returns></returns>
|
||||
public string GetWxTaskStatus(string inputData, bool isDetail = false)
|
||||
{
|
||||
// 暂时先拿掉
|
||||
//return "{\"code\":19999,\"msg\":\"参数为空\"}";
|
||||
|
||||
if (string.IsNullOrEmpty(inputData))
|
||||
return "{\"code\":19999,\"msg\":\"参数为空\"}";
|
||||
|
||||
@@ -2191,8 +2198,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
endTime = TimeUtils.StampMillisecondsToDateTime(end_Time.ParseToLong());
|
||||
if (endTime <= startTime)
|
||||
throw new ArgumentException("结束时间必须大于开始时间");
|
||||
//if (endTime > startTime.AddDays(10))
|
||||
// throw new ArgumentException("时间范围不能超过10天");
|
||||
if (endTime > startTime.AddDays(10))
|
||||
throw new ArgumentException("时间范围不能超过10天");
|
||||
int startTimestamp = TimeUtils.DateTimeToTimestampSeconds(startTime);
|
||||
int endTimestamp = TimeUtils.DateTimeToTimestampSeconds(endTime);
|
||||
|
||||
|
||||
@@ -648,6 +648,67 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
|
||||
public string GetOneShopCookieByAppId(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var shop_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "shop_id"))?.Replace("'", "\\'");
|
||||
var sign = RegexUtils.GetStringQuery(ref inputData, "sign");
|
||||
if (shop_id.IsNullOrEmpty())
|
||||
return "{\"code\":500,\"msg\":\"未指定店铺\"}";
|
||||
bool isSign = false;
|
||||
for (int i = 0; i <= 5; i++)
|
||||
{
|
||||
if (EncrypUtil.GetMd5(DateTime.Now.AddMinutes(i).ToString("yyyyMMddHHmm") + "wxxd").ToLower() == sign.ToLower())
|
||||
{
|
||||
isSign = true;
|
||||
break;
|
||||
}
|
||||
else if (i > 0 && EncrypUtil.GetMd5(DateTime.Now.AddMinutes(-i).ToString("yyyyMMddHHmm") + "wxxd").ToLower() == sign.ToLower())
|
||||
{
|
||||
isSign = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isSign)
|
||||
return "{\"code\":500,\"msg\":\"校验失败\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "select shop_id,cookie from wxxd.shop where shop_id in ('" + shop_id.Replace(",", "','") + "');";
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
if (dt != null)
|
||||
{
|
||||
//List<ShopParam> shopList = new List<ShopParam>();
|
||||
//foreach (DataRow row in dt.Rows)
|
||||
//{
|
||||
// ShopParam shop = new ShopParam
|
||||
// {
|
||||
// shop_id = row["shop_id"].ToString(),
|
||||
// cookie = row["cookie"].ToString(),
|
||||
// };
|
||||
// shopList.Add(shop);
|
||||
//}
|
||||
//var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
JArray jArr = new JArray();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
if (!jArr.Any(o => o["shop_id"].ParseToString() == row["shop_id"].ToString()))
|
||||
{
|
||||
JObject jObj = new JObject();
|
||||
jObj["shop_id"] = row["shop_id"].ToString();
|
||||
jObj["cookies"] = row["cookie"].ToString();
|
||||
jArr.Add(jObj);
|
||||
}
|
||||
}
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + JsonUtils.SerializeObject(jArr) + "}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
|
||||
public string AddShop(string inputData, bool isAdmin=false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
|
||||
@@ -1547,6 +1547,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var create_time_end = RegexUtils.GetStringQuery(ref inputData, "create_time_end")?.Replace("'", "\\'");
|
||||
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count")?.Replace("'", "\\'");
|
||||
var remark_fulltext = RegexUtils.GetStringQuery(ref inputData, "remark_fulltext")?.Replace("'", "\\'");
|
||||
var sort_mode = RegexUtils.GetStringQuery(ref inputData, "sort_mode")?.Replace("'", "\\'");
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(200);
|
||||
@@ -1610,7 +1611,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
" FROM wxxd.user_payment_record up " +
|
||||
" WHERE 1=1";
|
||||
sql += where;
|
||||
sql += " ORDER BY up.create_time desc ";
|
||||
if (sort_mode == "sort_mode")
|
||||
sql += " ORDER BY up.create_time asc, up.id asc ";
|
||||
else
|
||||
sql += " ORDER BY up.create_time desc, up.id desc ";
|
||||
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
@@ -1636,7 +1640,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
remark = row["remark"].ParseToString(),
|
||||
type = row["type"].ParseToInt(),
|
||||
update_by = row["update_by"].ParseToString(),
|
||||
update_time = row["update_time"].ParseToString().ParseToDateTime(),
|
||||
update_time = row["update_time"].ParseToString().ParseToDateTime(),
|
||||
oem_amount = row["oem_amount"].ParseToDecimal(),
|
||||
refund_flow_no = row["oem_amount"].ParseToString(),
|
||||
settlement = row["settlement"].ParseToNullableInt(),
|
||||
};
|
||||
userPaymentList.Add(userPayment);
|
||||
}
|
||||
|
||||
@@ -71,5 +71,17 @@ namespace KJD_Web.Model.WxModel
|
||||
/// 拒收时间
|
||||
/// </summary>
|
||||
public DateTime? rejected_time { get; set; }
|
||||
/// <summary>
|
||||
/// 拦截退回状态:0未处理,1已退回,2退回失败
|
||||
/// </summary>
|
||||
public int? intercept_return_status { get; set; }
|
||||
/// <summary>
|
||||
/// 拦截退回时间
|
||||
/// </summary>
|
||||
public DateTime? intercept_return_time { get; set; }
|
||||
/// <summary>
|
||||
/// 拦截退回操作信息/回调信息
|
||||
/// </summary>
|
||||
public string intercept_return_info { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -88,6 +88,18 @@ namespace KJD_Web
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_one_shop_cookie_by_app_id()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXShopManage().GetOneShopCookieByAppId(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void add_shop()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
-->
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<!--<add name="ConnKJD" connectionString="Max Pool Size=512;Database='kjd';Data Source='nj-cynosdbmysql-grp-hl51pkfr.sql.tencentcdb.com';Port=27660;User Id='kjd';Password='Temukjd0625';Charset=utf8mb4;"/>-->
|
||||
<add name="ConnKJD" connectionString="Server=localhost;Port=3306;Database=mysql;Uid=root;Pwd=123456;"/>
|
||||
<add name="ConnKJD" connectionString="Max Pool Size=512;Database='kjd';Data Source='nj-cynosdbmysql-grp-hl51pkfr.sql.tencentcdb.com';Port=27660;User Id='kjd';Password='Temukjd0625';Charset=utf8mb4;"/>
|
||||
<!--<add name="ConnKJD" connectionString="Server=localhost;Port=3306;Database=mysql;Uid=root;Pwd=123456;"/>-->
|
||||
<add name="ConnKJDBAK" connectionString="Max Pool Size=512;Database='kjd';Data Source='nj-cynosdbmysql-grp-9s7x16mt.sql.tencentcdb.com';Port=24049;User Id='kjdbak';Password='Temukjd0126';Charset=utf8mb4;"/>
|
||||
<add name="UpdateVersion" connectionString="99999"/>
|
||||
<add name="UpdateFileDir" connectionString="C:\inetpub\wwwroot\kjd_update"/>
|
||||
|
||||
Reference in new issue
Block a user