1 微信订单拒收状态维护 2 新版代理

This commit is contained in:
wule committed 2026-08-07 01:29:06 +08:00
1 parent 0773eaa9fd
commit 5f33d0dbd6
14 files changed
+269 -5

No files matched your search

@@ -1048,6 +1048,8 @@ namespace KJD_Web.BLL.BXX
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_json", Value = newProdJson, });
mySql.ExecuteNonQuery(sql, paramLst.ToArray());
prod.product_json = newProdJson;
//sql = "DELETE FROM " + tableName + " where is_del = 1 AND add_time < '" + DateTime.Now.AddDays(-10) + "' ORDER BY add_time DESC limit 1;";
}
catch
{
@@ -102,7 +102,7 @@ namespace KJD_Web.BLL.WXXD
id = row["id"].ParseToLong(),
aftersale_detail = row["aftersale_detail"].ParseToNullableString(),
audit_status = row["audit_status"].ParseToNullableInt(),
audit_time = row["audit_time"].ParseToNullableString().ParseToDateTime(),
//audit_time = row["audit_time"].ParseToNullableString().ParseToDateTime(),
city_name = row["city_name"].ParseToNullableString(),
colour_flag = row["colour_flag"].ParseToNullableInt(),
colour_flag_update_time = row["colour_flag_update_time"].ParseToNullableString().ParseToDateTime(),
@@ -110,7 +110,7 @@ namespace KJD_Web.BLL.WXXD
county_name = row["county_name"].ParseToNullableString(),
create_time = row["create_time"].ParseToInt(),
delivery_deadline = row["delivery_deadline"].ParseToNullableInt(),
delivery_product_info = row["delivery_product_info"].ParseToNullableString(),
//delivery_product_info = row["delivery_product_info"].ParseToNullableString(),
delivery_time = row["delivery_time"].ParseToNullableInt(),
detail_info = row["detail_info"].ParseToNullableString(),
discounted_price = row["discounted_price"].ParseToNullableInt(),
@@ -118,9 +118,9 @@ namespace KJD_Web.BLL.WXXD
erp_send_company = row["erp_send_company"].ParseToNullableString(),
erp_send_status = row["erp_send_status"].ParseToNullableInt(),
erp_send_time = row["erp_send_time"].ParseToNullableString().ParseToDateTime(),
ewaybill_order_code = row["ewaybill_order_code"].ParseToNullableString(),
//ewaybill_order_code = row["ewaybill_order_code"].ParseToNullableString(),
external_gift = row["external_gift"].ParseToNullableInt(),
ext_info = row["ext_info"].ParseToNullableString(),
//ext_info = row["ext_info"].ParseToNullableString(),
freight = row["freight"].ParseToNullableInt(),
freight_insurance_amount = row["freight_insurance_amount"].ParseToNullableInt(),
gift_order_status = row["gift_order_status"].ParseToNullableInt(),
@@ -140,7 +140,7 @@ namespace KJD_Web.BLL.WXXD
out_express_no = row["out_express_no"].ParseToNullableString(),
out_order_no = row["out_order_no"].ParseToNullableString(),
out_shipped = row["out_shipped_int"].ParseToNullableInt(),
pay_info = row["pay_info"].ParseToNullableString(),
//pay_info = row["pay_info"].ParseToNullableString(),
postal_code = row["postal_code"].ParseToNullableString(),
predict_commission_fee = row["predict_commission_fee"].ParseToNullableInt(),
product_price = row["product_price"].ParseToNullableInt(),
@@ -753,6 +753,7 @@ namespace KJD_Web.BLL.WXXD
warehouse_status = row["warehouse_status"].ParseToNullableInt(),
inbound_time = row["inbound_time"].ParseToNullableString().ParseToDateTimeNullable(),
outbound_time = row["outbound_time"].ParseToNullableString().ParseToDateTimeNullable(),
has_reject = row["has_reject"].ParseToInt(),
});
}
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
@@ -1670,6 +1671,60 @@ namespace KJD_Web.BLL.WXXD
}
/// <summary>
/// 订单拒收状态维护
/// </summary>
/// <param name="inputData"></param>
/// <returns></returns>
public string WXUpdateTransitOrderRejectStatus(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var order_no = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_no"))?.Replace("'", "\\'");
var order_sku_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_sku_id"))?.Replace("'", "\\'");
var order_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_code"))?.Replace("'", "\\'");
var has_reject = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "has_reject"))?.Replace("'", "\\'");
if (order_code.IsNullOrEmpty() && (order_no.IsNullOrEmpty() || order_sku_id.IsNullOrEmpty()))
{
return "{\"code\":500,\"msg\":\"拒收信息不完整\",\"affected_rows\":" + 0 + "}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn, true);
string sql;
sql = "UPDATE erp.oms_wei_external_procurement_log SET ";
sql += " has_reject=" + has_reject + ",";
sql = sql.TrimEnd(',');
if (!order_code.IsNullOrEmpty())
sql += " WHERE order_code='" + order_code + "' AND order_no='" + order_code + "';";
else
sql += " WHERE order_no='" + order_no + "' AND order_sku_id='" + order_sku_id + "';";
var rows = mySql.ExecuteAffectedRows(sql);
if (!mySql.Message.IsNullOrEmpty())
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + rows + "}";
}
if (rows == 0)
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"更新拒收状态失败,未找到记录\",\"affected_rows\":" + rows + "}";
}
mySql.Commit();
mySql.Close();
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + rows + "}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXAddOrderItemExtInfo(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
@@ -59,5 +59,9 @@ namespace KJD_Web.Model.WxModel
/// 中转出库时间
/// </summary>
public DateTime? outbound_time { get; set; }
/// <summary>
/// 申请拒收状态 0未申请 1申请成功 2申请失败
/// </summary>
public int has_reject { get; set; }
}
}
@@ -285,7 +285,18 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void wx_update_transit_order_reject_status()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXOrderManage().WXUpdateTransitOrderRejectStatus(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void wx_add_order_item_ext_info()