1打包逻辑优化 2代理逻辑优化 3新的拼多多数据格式支持

This commit is contained in:
wule committed 2026-07-08 12:17:47 +08:00
1 parent f703e15f11
commit 554d1f4b4f
30 files changed
+1400 -82

No files matched your search

+2
View File
@@ -187,6 +187,7 @@
<Compile Include="Model\Config\WxShopUploadInfo.cs" />
<Compile Include="Model\Data\WXBuyUrlNotesInfo.cs" />
<Compile Include="Model\Data\WXOrderDecryptAddressInfo.cs" />
<Compile Include="Model\DBModel\user_payment_record.cs" />
<Compile Include="Model\Param\CollectManage\FissionSettingParam.cs" />
<Compile Include="Model\Param\OrderManage\FreightTemplateParam.cs" />
<Compile Include="Model\Param\DyProductManage\DyCategoryParam.cs" />
@@ -226,6 +227,7 @@
<Compile Include="Model\Result\PDDResult\PddCatInfo.cs" />
<Compile Include="Model\Result\PDDResult\PddClientInfo.cs" />
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo2.cs" />
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo3.cs" />
<Compile Include="Model\Result\VDianShopLoginInfo.cs" />
<Compile Include="Model\Result\WXResult\DSRShopScoreInfo.cs" />
<Compile Include="Model\Result\WXResult\WxActivityData.cs" />
+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 1210;
public static int VersionCount = 1215;
public static string MainPath = "29wx";
//public static string MainPath = "29wx";
//public static string MainPath = "29pdd";
@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.DBModel
{
public class user_payment_record
{
public long id { get; set; }
/// <summary>
/// 变动类型,1:充值,2:采购花费,3:产品退款到账,4:运费退款到账,5:采购收款,6:产品退款扣除,7:运费退款扣除, 16:礼物单话费
/// </summary>
public int? type { get; set; }
/// <summary>
/// 充值或花费的金额(元)
/// </summary>
public decimal amount { get; set; }
/// <summary>
/// 充值或花费后的当前账户余额(元)
/// </summary>
public decimal balance { get; set; }
/// <summary>
/// 账户名
/// </summary>
public string user_name { get; set; }
/// <summary>
/// 平台编码
/// </summary>
public string platform_code { get; set; }
/// <summary>
/// 订单id
/// </summary>
public string order_id { get; set; }
/// <summary>
/// 售后单id
/// </summary>
public long? after_sale_id { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string create_by { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime create_time { get; set; }
/// <summary>
/// 修改人
/// </summary>
public string update_by { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime update_time { get; set; }
/// <summary>
/// 是否已删除
/// </summary>
public int? is_deleted { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
/// <summary>
/// 扣款的对方账户名称
/// </summary>
public string counterparty_account_name { get; set; }
}
}
@@ -0,0 +1,219 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.Result.PDDResult
{
public class PDDFrontProductInfo3
{
public storeInfo store { get; set; }
}
public class storeInfo
{
public initDataObjInfo initDataObj { get; set; }
}
public class initDataObjInfo
{
public frontGoods3 goods { get; set; }
public frontMall3 mall { get; set; }
}
public class frontMall3
{
public string mallId { get; set; } // "525159017",
public string mallName { get; set; } // "丰润粮行",
public string mallNameBeforeTrans { get; set; } //"丰润粮行",
public string commonMallSn { get; set; } // "CgI2WRIIS0xJNU5SeWUaEIyvRPN5kXSIHgLRzO8cKQQiEG3MCMAvMxkfdCTD6cGcpysoAjAC",
public int? mallShowType { get; set; } // 0,
public int? mallTransferType { get; set; } // 0,
public string salesTip { get; set; } // "本店已拼2.9万件",
public string salesTipV2 { get; set; } //"本店已拼2.9万件",
public int? mallSales { get; set; } // 29000,
public string mallLogo { get; set; } //"http://t16img.yangkeduo.com/pdd_ims/b8a22d4f0a836f1092a5ca4616ae504a.jpg",
public int? goodsNum { get; set; } // 32,
public string goodsNumDesc { get; set; } //"商品数量: 32",
public string pddRoute { get; set; } // "mall_page.html?mall_sn=CgI2WRIIS0xJNU5SeWUaEMo5%2BOQRk5ds3pAKdvP7h%2B0iENx7YPKmJOuOHBOXqFh6WWYoAjAC&decrypt_mall_sn=1&msn=2msllrrezqz342rqxtnapi5pya_axbuy&_sop_rcto=YWInBFuzqa5GZuTI3XrNpg03TuXTx_3fIjo&mall_info=%7B%22mall_name%22%3A%22%E4%B8%B0%E6%B6%A6%E7%B2%AE%E8%A1%8C%22%7D",
public string pddRouteName { get; set; } // "进店逛逛",
public string mallServiceTag { get; set; } // "客服",
public bool? isFlagShip { get; set; } // false,
}
public class frontGoods3
{
public string sold_count = null;
public string sold_count_str = null;
public long? serverTime { get; set; } // 1782836359,
public long? serverTimeTen { get; set; } // 17828363609,
public long? weakenGoodsName { get; set; } // 0,
public long? catID { get; set; } // 7575,
public long? goodsID { get; set; } // 1661424397,
public string brandId { get; set; } // "",
public string goodsName { get; set; } // "红薏仁5斤装 红薏仁米小薏米仁农家自产新红薏米1斤2斤苡仁糙薏米",
public string shareDesc { get; set; } // "红薏仁5斤装 红薏仁米小薏米仁农家自产新红薏米1斤2斤苡仁糙薏米",
public string goodsType { get; set; } // 1,
public List<topGalleryInfo> topGallery { get; set; }
public List<string> viewImageData { get; set; } // [ "https://t00img.yangkeduo.com/goods/images/2019-12-14/3d66ace6-62cd-4d82-bfff-65c84b268361.jpg", ... ],
public List<detailGalleryInfo> detailGallery { get; set; }
public long? mallID { get; set; } // 525159017
public List<frontSkuInfo3> skus { get; set; }
public string thumbUrl { get; set; } // "https://img.pddpic.com/gaudit-image/2022-01-25/b5b0aa45a8ce7a59ef8eb0798fb537a4.jpeg",
public string hdThumbUrl { get; set; } // "https://img.pddpic.com/gaudit-image/2022-01-25/76e52ff7ff407a6d5c1753e40294bcb7.jpeg",
public int? eventType { get; set; } // 0,
public int? isApp { get; set; } // 0,
public int? isFreshmanApp { get; set; } // 0,
public string sideSalesTip { get; set; } // "热销4652斤",
public int? catID1 { get; set; } // 6630,
public int? catID2 { get; set; } // 6654,
public int? catID3 { get; set; } // 6655,
public int? catID4 { get; set; } // 7575,
public int? spuID { get; set; } // 0,
public bool? eventComing { get; set; } // false,
public bool? isSpike { get; set; } // false,
public bool? isTodaySpike { get; set; } // false,
public bool? isTomorrowSpike { get; set; } // false,
public bool? isSpikeComing { get; set; } // false,
public int? overseaType { get; set; } // 0,
public object gpv { get; set; } // null,
public bool? quickRefund { get; set; } // false,
public bool? rv { get; set; } // true,
public string maxNormalPrice { get; set; } // "42.5",
public string minNormalPrice { get; set; } // "14.5",
public string maxGroupPrice { get; set; } // "38.8",
public string minGroupPrice { get; set; } // "13.5",
public string maxOnSaleGroupPrice { get; set; } // "38.8",
public string minOnSaleGroupPrice { get; set; } // "13.5",
public int? maxOnSaleGroupPriceInCent { get; set; } // 3880,
public int? minOnSaleGroupPriceInCent { get; set; } // 1350,
public string maxOnSaleNormalPrice { get; set; } // "42.5",
public string minOnSaleNormalPrice { get; set; } // "14.5",
public string unselectNormalSavePrice { get; set; } // "1",
public int? oldMinOnSaleGroupPriceInCent { get; set; } // 1350,
public List<string> skipGoodsIDs { get; set; } // ["0"]
public object tag { get; set; } // null,
public object icon { get; set; } // null,
public List<object> tagIcon { get; set; } // [ ],
public int? isSecondHand { get; set; } // 0,
public int? appClientOnly { get; set; } // 0,
public int? isColdGoods { get; set; } // 1,
public List<frontGoodsPropertyInfo3> goodsProperty { get; set; }
public List<object> skuProperty { get; set; }
public int? propertyShowNum { get; set; } // 5,
public string linePrice { get; set; } // "68",
public int? priceStyle { get; set; } // 2,
public string priceSuffix { get; set; } // "起",
public string shareTitle { get; set; } // "13.5元 红薏仁5斤装 红薏仁米小薏米仁农家自产新红薏米1斤2斤苡仁糙薏米 拼多多",
public newShareTitleInfo newShareTitl { get; set; }
public object bottomBanner { get; set; } // null,
public bool? isAppFlow { get; set; } // true,
public int? isPersonalFav { get; set; } // 0,
public bool? groupNumFull { get; set; } // false,
public int? showHistoryGroup { get; set; } // 1,
public string shareLink { get; set; } // "goods1.html?goods_id=1661424397&page_from=23&pxq_secret_key=QWQMWFJMVA74GIIMHFUXALB5ZCBNJCYV5ANINMD7UOMJYEXK4KNA&_oak_share_snapshot_num=1350&_oak_share_time=1782836359&share_oak_rcto=YWL2oNqXCEvRIUlyReRrcF7njWrmpZN8wWj_KHekAqSbEFuQ1MTDsd0RrYEQyfFHBnA",
public string promptExplain { get; set; } // "",
public bool? isAbnormalStatus { get; set; } // false,
public string statusExplain { get; set; } // "",
public int? checkQuantity { get; set; } // 1,
public string destinationUrl { get; set; } // "order_checkout.html",
public bool? hideMall { get; set; } // false,
public bool? isMallRec { get; set; } // false,
public int? status { get; set; } // 1,
public bool? isGoodsOnSale { get; set; } // true,
public bool? isSkuOnSale { get; set; } // true,
public bool? isOnSale { get; set; } // true,
public int? quantity { get; set; } // 1000,
public int? propertyCardClick { get; set; } // 0,
public int? showRecTitle { get; set; } // 1,
public int? showRec { get; set; } // 1,
}
public class newShareTitleInfo
{
public string price { get; set; } // "13.5元 ",
public string suf { get; set; } // "红薏仁5斤装 红薏仁米小薏米仁农家自产新红薏米1斤2斤苡仁糙薏米 拼多多",
public string not_null { get; set; } // true
}
public class frontGoodsPropertyInfo3
{
public string key { get; set; } // "包装方式",
public List<string> values { get; set; } // [ "食用农产品" ],
public long? ref_pid { get; set; } // 677,
public long? reference_id { get; set; } // 0
}
public class frontSkuInfo3
{
public long? skuId { get; set; } // 28790184768,
public long? goodsId { get; set; } // 1661424397,
public string thumbUrl { get; set; } // "https://t00img.yangkeduo.com/t10img/images/2018-06-09/5c7746a3608e75a2b65926f4ed0f34cb.jpeg",
public int? initQuantity { get; set; } // 0,
public int? quantity { get; set; } // 1000,
public int? limitQuantity { get; set; } // 999999,
public int? soldQuantity { get; set; } // 0,
public int? hotSale { get; set; } // 1,
public int? defaultQuantity { get; set; } // 100,
public int? isOnsale { get; set; } // 1,
public string spec { get; set; } // "677094835",
public List<frontSpecInfo3> specs { get; set; }
public int? price { get; set; } // 0,
public string normalPrice { get; set; } // "14.5",
public string groupPrice { get; set; } // "13.5",
public int? oldGroupPrice { get; set; } // 1350,
public int? marketPrice { get; set; } // 0,
public int? weight { get; set; } // 2500,
public List<yellowLabelListInfo> yellowLabelList { get; set; }
public int? previewPriority { get; set; } // 0,
public int? startTime { get; set; } // 0,
public int? endTime { get; set; } // 0,
public int? staticLimitQuantity { get; set; } // 999999,
public string attribute { get; set; } // "{\"skuPreSaleTime\":0}",
public string normalSavePrice { get; set; } // "1",
public long? skuID { get; set; } // 28790184768,
public string skuExpansionPrice { get; set; } // "0"
}
public class yellowLabelListInfo
{
public string labelText { get; set; } // "2件9.9折",
public string labelType { get; set; } // "single_goods_percentage_event"
}
public class frontSpecInfo3
{
public string spec_key { get; set; } // "重量",
public string spec_value { get; set; } // "红薏仁米1斤装",
public long? spec_key_id { get; set; } // 1253,
public long? spec_value_id { get; set; } // 677094835,
public bool? custom { get; set; } // false
}
public class detailGalleryInfo
{
public string url { get; set; } // "https://img.pddpic.com/goods/images/2019-12-14/3d66ace6-62cd-4d82-bfff-65c84b268361.jpg",
public int? width { get; set; } // 800,
public int? height { get; set; } // 800
}
public class topGalleryInfo
{
public string url { get; set; } // "https://img.pddpic.com/goods/images/2019-12-14/3d66ace6-62cd-4d82-bfff-65c84b268361.jpg",
public long? id { get; set; } // 20969775049,
public int? aspectRatio { get; set; } // 1
}
}
+4
View File
@@ -293,6 +293,10 @@ namespace AllBase.Model.Result
/// </summary>
public int points { get; set; }
/// <summary>
/// 用户余额
/// </summary>
public decimal balance { get; set; }
/// <summary>
/// 店铺每续费一个月需要的积分
/// </summary>
public int shop_points_per_month { get; set; }
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

+22
View File
@@ -0,0 +1,22 @@
授权协议
  1.知识产权保护
  本软件受中华人民共和国著作权法和有关著作权国际公约和其它知识产权相关法律及国际公约的保护,其所有知识产权,包括但不限于著作权,归软件作者所有。
  2.软件的使用
  本软件产品用户需经过合法授权才可下载和安装本软件产品,请根据该协议条款使用该软件。
  你不可以:
  (1)对本软件进行逆向工程、反汇编、解体拆卸或任何试图发现该软件工作程序获源代码的行为;
  (2)未经软件作者的书面许可,进行商业性的销售、复制、散发和租赁该程序;以及与其他软件进行捆绑的行为。
  (3)创造派生性产品包括含有该系统的更大的系统或另外的程序和包裹;
  (4)使用和拷贝没有作者本人授权的包含在软件之中的icons,控件,图片等行为;
  (5)使用该软件改进其他产品和服务;
  (6)在任何图像中使用该软件在任何情况下以任何方式对任何个人和商业实体的诋毁行为;或暗示由软件、软件供应商、软件许可商或其他在该软件中描绘的实体任何形式的认可;
 
  3.条款
  只要你使用该软件,该授权协议就持续有效,除非由于你不遵守该协议的条款而被终止使用权利。一旦协议终止,你必须同意毁掉你所有的该软件的所有拷贝。
  4.本软件经过详细的测试,但鉴于计算机软硬件环境的差异性和复杂性,以及不同机器显示器的分辨率不同等原因,本软件不承诺所有运行环境都达到最佳的显示效果。
  5.本协议及软件最终解释权归本软件作者所有。
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+12 -10
View File
@@ -8,8 +8,9 @@
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
;!define PRODUCT_UNINST_ROOT_KEY "HKLM" ;需要管理员权限
!define PRODUCT_UNINST_ROOT_KEY "HKCU"
!define BUILD_PATH "D:\Project\TEMU跨境达后台管理\KJD Cef138\PackTools"
!define BIN_PATH "D:\Project\TEMU跨境达后台管理\KJD Cef138\Bin"
!define UTILS_PATH ".\Utils"
!define SOURCE_PATH "..\Bin.Oem"
!define OUT_PUT_PATH ".\Bin"
SetCompressor lzma
@@ -18,8 +19,9 @@ SetCompressor lzma
; MUI 预定义常量
!define MUI_ABORTWARNING
!define MUI_ICON "${BUILD_PATH}\favicon.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_ICON "${SOURCE_PATH}\favicon.ico"
;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNICON "${UTILS_PATH}\uninstall.ico"
; 语言选择窗口常量设置
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
@@ -30,7 +32,7 @@ SetCompressor lzma
!insertmacro MUI_PAGE_WELCOME
; 许可协议页面
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "${BUILD_PATH}\Licence.txt"
!insertmacro MUI_PAGE_LICENSE "${UTILS_PATH}\Licence.txt"
; 安装目录选择页面
!insertmacro MUI_PAGE_DIRECTORY
; 安装过程页面
@@ -71,7 +73,7 @@ SetCompressor lzma
; ------ MUI 现代界面定义结束 ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${PRODUCT_NAME} ${PRODUCT_VERSION}.exe"
OutFile "${OUT_PUT_PATH}\${PRODUCT_NAME} ${PRODUCT_VERSION}.exe"
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
;InstallDir "D:\${PRODUCT_NAME}"
;InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
@@ -85,14 +87,14 @@ Section "MainSection" SEC01
;SetOverwrite on|off|try|ifnewer ;强制覆盖|不覆盖|仅覆盖可写文件|仅覆盖旧文件
SetOverwrite on
;/x 排除的目录或文件
;File /r /x "Config.xml" /x "choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "AllBase.pdb" /x "Work.pdb" /x "29供应链.pdb" /x "data" "${BIN_PATH}\*.*"
File /r /x "BaseClass.cs" /x "Config.xml" /x "choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "*.pdb" /x "*.zip" /x "data" /x "Cache" /x "29wx.lnk" /x "29wx.ico" /x "29pdd.lnk" /x "29pdd.ico" "${BIN_PATH}\*.*"
;File /r /x "Config.xml" /x "choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "AllBase.pdb" /x "Work.pdb" /x "29供应链.pdb" /x "data" "${SOURCE_PATH}\*.*"
File /r /x "BaseClass.cs" /x "Config.xml" /x "choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "*.pdb" /x "*.zip" /x "data" /x "Cache" /x "29wx.lnk" /x "29wx.ico" /x "29pdd.lnk" /x "29pdd.ico" "${SOURCE_PATH}\*.*"
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\29供应链.exe" "" "$INSTDIR\favicon.ico"
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\29供应链.exe" "" "$INSTDIR\favicon.ico"
File "${BIN_PATH}\29供应链.exe"
File "${SOURCE_PATH}\29供应链.exe"
;SetOutPath "$TEMP"
;File "${BUILD_PATH}\bin\VC_redist_2015_2022.x64.exe"
;File "${UTILS_PATH}\VC_redist_2015_2022.x64.exe"
;ExecWait '$TEMP\vc_redist.x86.exe' # 一般(非静默)VC的安装
;ExecWait '"$TEMP\vc_redist.x86.exe" /q' # silent install 静默安装
SectionEnd
File renamed without changes.
@@ -24,9 +24,10 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var erp_shop_id_in = RegexUtils.GetStringQuery(ref inputData, "erp_shop_id_in")?.Replace("'", "\\'");
if (erp_shop_id_in.IsNullOrEmpty())
var erp_order_id_in = RegexUtils.GetStringQuery(ref inputData, "erp_order_id_in")?.Replace("'", "\\'");
if (erp_shop_id_in.IsNullOrEmpty() && erp_order_id_in.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"未指定店铺\"}";
return "{\"code\":500,\"msg\":\"未指定店铺和订单\"}";
}
var query_status = RegexUtils.GetStringQuery(ref inputData, "query_status")?.Replace("'", "\\'");
var purchase_status = RegexUtils.GetStringQuery(ref inputData, "purchase_status")?.Replace("'", "\\'");
@@ -46,6 +47,8 @@ namespace KJD_Web.BLL.WXXD
string where = "";
if (!string.IsNullOrWhiteSpace(erp_shop_id_in))
where += " and o.shop_id in (" + erp_shop_id_in + ")";
if (!string.IsNullOrWhiteSpace(erp_order_id_in))
where += " and o.order_id in ('" + erp_order_id_in.Replace(",", "','") + "')";
if (!string.IsNullOrWhiteSpace(query_status))
where += " and o.status = " + query_status;
if (!string.IsNullOrWhiteSpace(purchase_status))
@@ -825,5 +828,42 @@ namespace KJD_Web.BLL.WXXD
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXUpdateErpSoftRemark(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var timeCalc = DateTime.Now;
string order_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_id"))?.Replace("'", "\\'");
string soft_remark = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "soft_remark"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(order_id))
return "{\"code\":500,\"msg\":\"订单ID不能为空\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
var count = -1;
sql = " update `erp`.`oms_wei_order` set ";
if (!string.IsNullOrEmpty(soft_remark))
sql += " soft_remark=" + soft_remark + ",";
sql = sql.TrimEnd(',');
sql += " where order_id = '" + order_id + "';";
count = mySql.ExecuteAffectedRows(sql);
mySql.Close();
if (!string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + count + "}";
}
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + count + "}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}
@@ -100,6 +100,8 @@ namespace KJD_Web.BLL.WXXD
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
parent_user_name = row["parent_user_name"].ToString(),
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
balance = row.Table.Columns.Contains("balance") ? row["balance"].ParseToDecimal() : 0,
recharge_amount_total = row.Table.Columns.Contains("recharge_amount_total") ? row["recharge_amount_total"].ParseToDecimal() : 0,
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
};
var main_authority = row.Table.Columns.Contains("main_authority") ? row["main_authority"].ParseToString() : "";
@@ -344,6 +346,7 @@ namespace KJD_Web.BLL.WXXD
var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'");
var search = RegexUtils.GetStringQuery(ref inputData, "search")?.Replace("'", "\\'");
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
var user_name_in = RegexUtils.GetStringQuery(ref inputData, "user_name_in")?.Replace("'", "\\'");
var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name")?.Replace("'", "\\'");
var search_nick_name = RegexUtils.GetStringQuery(ref inputData, "search_nick_name")?.Replace("'", "\\'");
var search_company_name = RegexUtils.GetStringQuery(ref inputData, "search_company_name")?.Replace("'", "\\'");
@@ -362,6 +365,8 @@ namespace KJD_Web.BLL.WXXD
where += " AND u.group_id=" + group_id;
if (!string.IsNullOrEmpty(sa_level))
where += " AND u.sa_level=" + sa_level;
if (!string.IsNullOrEmpty(user_name_in))
where += " AND u.user_name in ('" + user_name_in.Replace(",", "','") + "')";
if (!string.IsNullOrEmpty(search_user_name))
where += " AND u.user_name like '%" + search_user_name + "%'";
if (!string.IsNullOrEmpty(search_nick_name))
@@ -424,6 +429,8 @@ namespace KJD_Web.BLL.WXXD
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
balance = row.Table.Columns.Contains("balance") ? row["balance"].ParseToDecimal() : 0,
recharge_amount_total = row.Table.Columns.Contains("recharge_amount_total") ? row["recharge_amount_total"].ParseToDecimal() : 0,
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
};
var main_authority = row.Table.Columns.Contains("main_authority") ? row["main_authority"].ParseToString() : "";
@@ -821,6 +828,215 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
/// <summary>
/// 增加或减少用户积分
/// </summary>
/// <param name="inputData"></param>
/// <returns></returns>
public string UpdateUserBalance(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
if (!GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "update_user_name"))?.Replace("'", "\\'");
var user_nick = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "update_user_nick"))?.Replace("'", "\\'");
var delta_balance = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "delta_balance")).ParseToDecimal();
var option_type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "option_type"))?.Replace("'", "\\'");
var operator_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "operator_name"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name) || string.IsNullOrEmpty(user_nick))
{
return "{\"code\":500,\"msg\":\"操作对象不能为空\"}";
}
if (delta_balance <= 0 && option_type == "消费")
{
return "{\"code\":500,\"msg\":\"消费金额错误,需大于0\"}";
}
if (delta_balance == 0)
{
return "{\"code\":500,\"msg\":\"操作金额错误,不能等于0\"}";
}
if (string.IsNullOrEmpty(option_type) || string.IsNullOrEmpty(operator_name))
{
return "{\"code\":500,\"msg\":\"操作或操作者信息错误\"}";
}
if (option_type != "充值" && option_type != "消费")
{
return "{\"code\":500,\"msg\":\"操作类型错误\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn, true);
string sql;
decimal balance = 0;
decimal recharge_amount_total = 0;
decimal newBalance = 0;
decimal newRechargeAmountTotal = 0;
int shopPointsPerMonth = 30;
#region 计算是否余额不足
sql = "SELECT balance,recharge_amount_total FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
var dataRow = mySql.ExecuteDataTableRow(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.RollBack();
mySql.Close();
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
}
if (dataRow == null)
{
mySql.RollBack();
mySql.Close();
return "{\"code\":501,\"msg\":\"用户不存在\"}";
}
try
{
balance = dataRow["balance"].ParseToDecimal();
newBalance = balance;
recharge_amount_total = dataRow["recharge_amount_total"].ParseToDecimal();
newRechargeAmountTotal = recharge_amount_total;
}
catch
{
}
//if (option_type == "消费")
//{
// sql = "SELECT shop_points_per_month FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
// shopPointsPerMonth = mySql.ExecuteFirstInt(sql); // 店铺消费一个月的点数,默认30,可以设置为其他值
// if (!string.IsNullOrEmpty(mySql.Message))
// {
// mySql.RollBack();
// mySql.Close();
// return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
// }
// shopPointsPerMonth = Math.Max(30, shopPointsPerMonth);
// if (delta_balance <= 0 || delta_balance % shopPointsPerMonth > 0)
// {
// mySql.RollBack();
// mySql.Close();
// return "{\"code\":501,\"msg\":\"消费点数必须是" + shopPointsPerMonth + "的整倍数\"}";
// }
// else if (balance < delta_balance)
// {
// mySql.RollBack();
// mySql.Close();
// return "{\"code\":500,\"msg\":\"余额不足\"}";
// }
//}
#endregion
sql = "UPDATE `wxxd`.`user` SET";
if (option_type == "充值")
{
newBalance = balance + delta_balance;
sql += " balance=" + newBalance + ",";
newRechargeAmountTotal = recharge_amount_total + delta_balance;
sql += " recharge_amount_total=" + newRechargeAmountTotal + ",";
}
else
{
newBalance = balance - delta_balance.ParseToInt();
sql += " balance=" + newBalance + ",";
}
sql = sql.TrimEnd(',');
sql += " WHERE user_name='" + user_name + "' AND balance=" + balance + " AND recharge_amount_total=" + recharge_amount_total + ";";
var changePointsRst = mySql.ExecuteAffectedRows(sql);
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.RollBack();
mySql.Close();
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
}
else if (changePointsRst <= 0)
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"" + option_type + "失败,账户余额已发生改变,请刷新账户后重新操作\"}";
}
sql = " INSERT INTO wxxd.user_payment_record(type,amount,balance,user_name,create_by,create_time,update_by,update_time,counterparty_account_name)";
sql += " VALUES(@type,@amount,@balance,@user_name,@create_by,@create_time,@update_by,@update_time,@counterparty_account_name);";
List<MySqlParameter> paramLst = new List<MySqlParameter>();
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_name", Value = user_name, });
paramLst.Add(new MySqlParameter() { DbType = DbType.Decimal, ParameterName = "amount", Value = delta_balance, });
paramLst.Add(new MySqlParameter() { DbType = DbType.Decimal, ParameterName = "balance", Value = newBalance, });
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "type", Value = option_type == "充值" ? 1 : 0, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "create_by", Value = operator_name, });
paramLst.Add(new MySqlParameter() { DbType = DbType.DateTime, ParameterName = "create_time", Value = DateTime.Now, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "update_by", Value = operator_name, });
paramLst.Add(new MySqlParameter() { DbType = DbType.DateTime, ParameterName = "update_time", Value = DateTime.Now, });
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "counterparty_account_name", Value = operator_name, });
var addOptionRst = mySql.ExecuteAffectedRows(sql, paramLst.ToArray());
if (!string.IsNullOrEmpty(mySql.Message))
{
mySql.RollBack();
mySql.Close();
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
}
else if (addOptionRst <= 0)
{
mySql.RollBack();
mySql.Close();
return "{\"code\":500,\"msg\":\"新增操作记录失败,请稍候重试\"}";
}
//int expireTime = 0;
//int newExpireTime = 0;
//if (option_type == "消费")
//{
// sql = "SELECT expire_time‌ FROM `wxxd`.`user_points_shop_expire` WHERE shop_id='" + shop_id + "';";
// expireTime = mySql.ExecuteFirstInt(sql);
// if (!string.IsNullOrEmpty(mySql.Message))
// {
// mySql.RollBack();
// mySql.Close();
// return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
// }
// if (expireTime == 0)
// {
// newExpireTime = TimeUtils.DateTimeToTimestampSeconds(DateTime.Now.AddMonths(delta_balance.ParseToInt() / shopPointsPerMonth));
// sql = " INSERT INTO `wxxd`.`user_points_shop_expire` (shop_id,expire_time‌)" +
// " VALUES ('" + shop_id + "'," + newExpireTime + ");";
// }
// else
// {
// DateTime expireDateTime = TimeUtils.StampToDateTime(expireTime);
// if (expireDateTime < DateTime.Now)
// expireDateTime = DateTime.Now.AddMonths(delta_balance.ParseToInt() / shopPointsPerMonth);
// else
// expireDateTime = expireDateTime.AddMonths(delta_balance.ParseToInt() / shopPointsPerMonth);
// newExpireTime = TimeUtils.DateTimeToTimestampSeconds(expireDateTime);
// sql = "UPDATE `wxxd`.`user_points_shop_expire` set expire_time‌=" + newExpireTime + " WHERE shop_id='" + shop_id + "' AND expire_time‌=" + expireTime;
// }
// var renewalRst = mySql.ExecuteAffectedRows(sql);
// if (!string.IsNullOrEmpty(mySql.Message))
// {
// mySql.RollBack();
// mySql.Close();
// return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
// }
// else if (renewalRst <= 0)
// {
// mySql.RollBack();
// mySql.Close();
// return "{\"code\":500,\"msg\":\"店铺已发生改变,请刷新店铺后重新操作\"}";
// }
//}
mySql.Commit();
mySql.Close();
return "{\"code\":200,\"msg\":\"success\",\"newRechargeAmountTotal\":" + newRechargeAmountTotal + ",\"newBalance\":" + newBalance + "}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string ChangePassword(string inputData)
{
if (!GetSign(inputData))
@@ -135,6 +135,7 @@
<Compile Include="Model\WxModel\oms_wei_order.cs" />
<Compile Include="Model\WxModel\oms_wei_order_item.cs" />
<Compile Include="Model\WxModel\oms_wei_refund.cs" />
<Compile Include="Model\WxModel\user_payment_record.cs" />
<Compile Include="Model\WxModel\WXBuyUrlNotesInfo.cs" />
<Compile Include="Model\WxModel\WXClientProductInfoLite.cs" />
<Compile Include="Model\WxModel\WXGetEditProductInfoLite.cs" />
@@ -70,6 +70,8 @@ namespace KJD_Web.Model
/// 用户积分点数
/// </summary>
public int points { get; set; }
public decimal balance { get; set; }
public decimal recharge_amount_total { get; set; }
/// <summary>
/// 单店铺续费1个月消耗的点数
/// </summary>
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace KJD_Web.Model.WxModel
{
public class user_payment_record
{
public long id { get; set; }
public int? type { get; set; }
/// <summary>
/// 充值或花费的金额(元)
/// </summary>
public decimal amount { get; set; }
/// <summary>
/// 充值或花费后的当前账户余额(元)
/// </summary>
public decimal balance { get; set; }
/// <summary>
/// 账户名
/// </summary>
public string user_name { get; set; }
/// <summary>
/// 平台编码
/// </summary>
public string platform_code { get; set; }
/// <summary>
/// 订单id
/// </summary>
public string order_id { get; set; }
/// <summary>
/// 售后单id
/// </summary>
public long? after_sale_id { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string create_by { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime create_time { get; set; }
/// <summary>
/// 修改人
/// </summary>
public string update_by { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime update_time { get; set; }
/// <summary>
/// 是否已删除
/// </summary>
public int? is_deleted { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
/// <summary>
/// 扣款的对方账户名称
/// </summary>
public string counterparty_account_name { get; set; }
}
}
@@ -49,6 +49,11 @@ namespace KJD_Web
}
}
[WebMethod]
public void get_erp_order_list()
{
get_order_list();
}
[WebMethod]
public void get_order_list()
{
@@ -61,8 +66,11 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void get_erp_order_item_list()
{
get_order_item_list();
}
[WebMethod]
public void get_order_item_list()
{
@@ -75,6 +83,11 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void get_erp_refund_list()
{
get_refund_list();
}
[WebMethod]
public void get_refund_list()
{
@@ -142,7 +155,7 @@ namespace KJD_Web
Context.Response.End();
}
/// <summary>
/// 修改中转仓取号状态
/// 修改中转仓取号状态 临时补救
/// </summary>
[WebMethod]
public void wx_update_erp_allocated_order_no()
@@ -155,5 +168,18 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void wx_update_erp_soft_remark()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXOrderManage().WXUpdateErpSoftRemark(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
}
}
@@ -186,6 +186,18 @@ namespace KJD_Web
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void update_user_balance()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXUserManage().UpdateUserBalance(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void get_wx_sale_assistant_cookie()
+392 -1
View File
@@ -722,7 +722,7 @@ namespace TemuKJD.BLL
sku69_code = "",
};
if ((int)frontSku.sku_price.ParseToDecimal() > 0)
skuInfo.multi_price = Math.Min(skuInfo.multi_price.ParseToInt(), (int)frontSku.group_price.ParseToDecimal());
skuInfo.multi_price = Math.Min(skuInfo.multi_price.ParseToInt(), (int)frontSku.sku_price.ParseToDecimal());
//List<string> specIds = frontSku.spec.Split(',').ToList();
//List<string> specKeys = frontSku.spec_keys.Split(';').ToList();
@@ -824,6 +824,397 @@ namespace TemuKJD.BLL
var data = Work.UserLogin.GetSignaturex() +
"&from_shop_id=" + frontProdInfo.goods?.mall_id +
"&from_shop_name=" + prodInfo.detail.mall_info.mall_name +
"&spu_id=" + prodInfo.detail.goods_id.ParseToString() + collectAuthorityTag +
"&skc_id=" + prodInfo.detail.goods_id.ParseToString() +
"&price_text=" + prodInfo.detail.sku.Min(s => s.multi_price).ParseToInt() * 0.01m + "-" + prodInfo.detail.sku.Max(s => s.multi_price).ParseToInt() * 0.01m +
"&main_cat_id=" + (prodInfo.detail.cat_ids?.FirstOrDefault(c => c != null)).ParseToString() +
"&main_cat_name=" + HttpUtility.UrlEncode((prodInfo.detail.cat_ids?.FirstOrDefault(c => c != null)).ParseToString(), Encoding.UTF8) + // 取不到catname直接用catid,上货时候再取
"&cat_id=" + prodInfo.detail.cat_id.ParseToString() +
"&cat_name=" + HttpUtility.UrlEncode(prodInfo.detail.cat_id.ParseToString(), Encoding.UTF8) + // 取不到catname直接用catid,上货时候再取
"&ext_code=" + HttpUtility.UrlEncode(prodInfo.detail.out_goods_sn, Encoding.UTF8) +
"&product_name=" + HttpUtility.UrlEncode(prodInfo.detail.goods_name, Encoding.UTF8) +
"&product_json=" + HttpUtility.UrlEncode(dbProd.product_json, Encoding.UTF8) +
"&size_json=" + HttpUtility.UrlEncode(dbProd.size_json, Encoding.UTF8) +
"&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) +
"&sale_count=" + HttpUtility.UrlEncode(prodInfo.sale_count, Encoding.UTF8) +
"&sale_count_text=" + HttpUtility.UrlEncode(prodInfo.sale_count_text, Encoding.UTF8) +
"&product_get_type=" + HttpUtility.UrlEncode("多多外部数据", Encoding.UTF8);
if (!string.IsNullOrEmpty(specialProdType))
data += "&special_prod_type=" + HttpUtility.UrlEncode(specialProdType, Encoding.UTF8);
if (IsCollectAuthorityUser)
{
data += "&add_user_name=" + BaseClass.UserName;
data += "&group=用户" + BaseClass.UserName;
}
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
return "商品采集保存失败!请检查网络连接:" + BaseRegex.GetStringJson(ref html, "msg");
}
return "";
}
/// <summary>
/// 驼峰命名的一种新的拼多多格式
/// </summary>
/// <param name="outProdJson"></param>
/// <param name="UpdateOldData"></param>
/// <param name="specialProdType"></param>
/// <param name="IsCollectAuthorityUser"></param>
/// <returns></returns>
public string PddFrontToPddBackConvert3(string outProdJson3, bool UpdateOldData = true, string specialProdType = null, bool IsCollectAuthorityUser = false)
{
initDataObjInfo frontProdInfo = null;
try
{
frontProdInfo = JsonHelper.DeserializeJsonToObject<PDDFrontProductInfo3>(outProdJson3)?.store?.initDataObj;
}
catch (Exception ex)
{
return "转换错误" + ex.Message;
}
if (frontProdInfo == null || frontProdInfo.goods?.goodsID == null || frontProdInfo.mall?.mallId == null || frontProdInfo.mall?.mallName == null)
{
return "商品数据信息为空";
}
KJDDBProduct dbProd = new KJDDBProduct() { size_json = "{}" };
PDDProductInfo prodInfo = new PDDProductInfo()
{
//source_json = JsonHelper.JObjectParse(outProdJson),
source_json = null,
sale_count = BaseRegex.GetStringJson(ref outProdJson3, "sold_quantity").ParseToLong().ParseToString(),
sale_count_text = BaseRegex.GetStringJson(ref outProdJson3, "sales_tip"),
};
prodInfo.chance_id = null;
prodInfo.chance_refere = null;
prodInfo.chance_tab = null;
prodInfo.decoration = new PDDProductDecorationInfo() { floor_list = new List<PDDProdfloorItem>() };
// 商品详情
prodInfo.detail = new PDDProductDetailInfo();
prodInfo.detail.allergy_refund = 0;
prodInfo.detail.allowed_region = new List<object>();
//prodInfo.detail.appeal_status = null;
//prodInfo.detail.app_id = null;
//prodInfo.detail.app_name = null;
//prodInfo.detail.bad_claim_text = null;
prodInfo.detail.bad_fruit_claim = 0;
//prodInfo.detail.business_source_type = null;
prodInfo.detail.can_appeal = null;
prodInfo.detail.card_verification_list = null;
prodInfo.detail.cats = new List<string>();
prodInfo.detail.cat_id = frontProdInfo.goods.catID.ParseToInt();
prodInfo.detail.cat_ids = new List<int?>() { frontProdInfo.goods.catID1.ParseToInt(), frontProdInfo.goods.catID2.ParseToInt(), frontProdInfo.goods.catID3.ParseToInt(), frontProdInfo.goods.catID4.ParseToInt() };
prodInfo.detail.check_status = 9;
//prodInfo.detail.check_type = null;
//prodInfo.detail.client_id = null;
prodInfo.detail.commit_deleted = 0;
//prodInfo.detail.commit_extension = null;
//prodInfo.detail.community_group_buying = null;
prodInfo.detail.cost_template_id = 0;
//prodInfo.detail.country = null;
prodInfo.detail.country_id = 0;
//prodInfo.detail.created_at = null;
//prodInfo.detail.creator_name = null;
prodInfo.detail.customizable = 0;
prodInfo.detail.customs = "";
prodInfo.detail.damage_claim = 0;
prodInfo.detail.delivery_one_day = 0;
//prodInfo.detail.delivery_type = null;
//prodInfo.detail.elec_goods_attributes = null;
prodInfo.detail.estimate_quantity = 0;
prodInfo.detail.event_type = 0;
prodInfo.detail.extend_warranty_dto = new extend_warranty_dto_item() { extend_warranty = 0 };
//prodInfo.detail.fabric = null;
//prodInfo.detail.fabric_content = null;
prodInfo.detail.galleries = new List<gallery_item>();
int galleryIndex = 0;
foreach (var topGallery in frontProdInfo.goods.topGallery)
{
prodInfo.detail.galleries.Add(new gallery_item()
{
url = topGallery.url,
type = 1,
//width = image.Width,
//height = image.Height,
});
galleryIndex++;
}
foreach (var detailGallery in frontProdInfo.goods.detailGallery)
{
prodInfo.detail.galleries.Add(new gallery_item()
{
url = detailGallery.url,
type = 2,
//width = image.Width,
//height = image.Height,
});
galleryIndex++;
}
prodInfo.detail.gold_price_template_id = null;
prodInfo.detail.gold_price_type = null;
prodInfo.detail.goods_certificate = null;
prodInfo.detail.goods_commit_check = new List<object>();
prodInfo.detail.goods_desc = frontProdInfo.goods.shareDesc;
prodInfo.detail.goods_id = frontProdInfo.goods.goodsID;
prodInfo.detail.goods_name = frontProdInfo.goods.goodsName;
prodInfo.detail.goods_name_prefix = "";
prodInfo.detail.goods_pattern = 8;
prodInfo.detail.goods_property_list = null;
prodInfo.detail.goods_sn = null;
prodInfo.detail.goods_srv_templates = new List<object>();
prodInfo.detail.goods_trade_attr = null;
prodInfo.detail.goods_travel_attr = null;
prodInfo.detail.goods_type = 1;
prodInfo.detail.groups = new group_item() { single_price = 0, group_price = 0, customer_num = 2, buy_limit = 999999, order_limit = 999999 };
prodInfo.detail.hd_thumb_url = frontProdInfo.goods.hdThumbUrl;
prodInfo.detail.id = 0; // 编辑id,随意填写
prodInfo.detail.image_url = frontProdInfo.goods.topGallery.FirstOrDefault()?.url; // frontProdInfo.goods.image_url;
prodInfo.detail.instruction_vo = new instruction_vo_item() { template_status = -1 };
prodInfo.detail.invoice_mode = null;
prodInfo.detail.invoice_mode_sub_type = null;
prodInfo.detail.invoice_status = 0;
prodInfo.detail.is_all_weight_same = true;
prodInfo.detail.is_app = 0;
prodInfo.detail.is_bangdan = 0;
prodInfo.detail.is_card_secret = false;
prodInfo.detail.is_certificate_provide = 0;
prodInfo.detail.is_customized = 0;
prodInfo.detail.is_customs = 0;
prodInfo.detail.is_deposit = false;
prodInfo.detail.is_draft = false;
prodInfo.detail.is_folt = 0;
prodInfo.detail.is_general_trade = 0;
prodInfo.detail.is_gold_price_matched = null;
prodInfo.detail.is_goods_copy = null;
prodInfo.detail.is_goods_decoration = 1;
prodInfo.detail.is_group_pre_sale = 0;
prodInfo.detail.is_only_for_remote_area = false;
prodInfo.detail.is_pre_sale = 0;
prodInfo.detail.is_refundable = 1;
prodInfo.detail.is_refundable_fifteen_day = 0;
prodInfo.detail.is_shop = 1;
prodInfo.detail.is_size_change_casually = 0;
prodInfo.detail.is_sku_pre_sale = 0;
prodInfo.detail.is_sku_shipment = 0;
prodInfo.detail.is_small_group = null;
prodInfo.detail.is_spring_festival_open_tag = false;
prodInfo.detail.is_two_num_group = false;
prodInfo.detail.is_warranty_one_year = 0;
prodInfo.detail.is_wms = 0;
prodInfo.detail.is_wp_service = 0;
prodInfo.detail.lack_of_weight_claim = 0;
prodInfo.detail.last_commit_check_status = 2;
prodInfo.detail.list_desc = new List<object>();
prodInfo.detail.local_service_id_list = null;
prodInfo.detail.mai_jia_zi_ti = null;
prodInfo.detail.mall_id = frontProdInfo.mall.mallId.ParseToLong();
prodInfo.detail.mall_info = new mall_info_item() { mall_name = frontProdInfo.mall.mallName };
prodInfo.detail.market_price = (frontProdInfo.goods.linePrice.ParseToDecimal() * 100).ParseToInt();
prodInfo.detail.max_group_price = frontProdInfo.goods.maxOnSaleGroupPriceInCent;
prodInfo.detail.min_group_price = frontProdInfo.goods.minOnSaleGroupPriceInCent;
prodInfo.detail.must_check_type = 0;
prodInfo.detail.name_prefix = "";
prodInfo.detail.origin_country_id = 0;
prodInfo.detail.origin_country_name = "";
prodInfo.detail.out_goods_sn = "";
prodInfo.detail.out_source_goods_id = null;
prodInfo.detail.out_source_type = null;
prodInfo.detail.oversea_goods = null;
prodInfo.detail.oversea_type = 0;
prodInfo.detail.owner = "主账号";
prodInfo.detail.owner_name = "";
prodInfo.detail.paper_length = null;
prodInfo.detail.paper_net_weight = null;
prodInfo.detail.paper_plies_num = null;
prodInfo.detail.paper_width = null;
prodInfo.detail.pre_sale_time = 0;
prodInfo.detail.privacy_delivery = 0;
prodInfo.detail.processing_charges = null;
prodInfo.detail.processing_charges_type = null;
prodInfo.detail.promised_delivery_seconds = null;
prodInfo.detail.purchase_info_supply = 0;
prodInfo.detail.qualification_id_list = new List<object>();
prodInfo.detail.quan_guo_lian_bao = 0;
prodInfo.detail.quick_refund = 0;
prodInfo.detail.reason = null;
prodInfo.detail.region_limit = 1;
prodInfo.detail.reject_reason = null;
prodInfo.detail.reject_status = null;
prodInfo.detail.same_city_template_id = 0;
prodInfo.detail.schedule_sale = new schedule_sale_item() { sale_type = 0 };
prodInfo.detail.second_hand = 0;
prodInfo.detail.sf_markup_template_sn = null;
prodInfo.detail.shang_men_an_zhuang = null;
prodInfo.detail.share_desc = frontProdInfo.goods.shareDesc;
prodInfo.detail.shipment_limit_second = 172800;
prodInfo.detail.shoes_template_id = null;
prodInfo.detail.shop_group_id = null;
prodInfo.detail.shop_group_name = null;
prodInfo.detail.show_activity_price = false;
prodInfo.detail.size_parent_spec_id = null;
prodInfo.detail.size_spec_id = null;
prodInfo.detail.sku = new List<sku_item>();
foreach (var frontSku in frontProdInfo.goods.skus)
{
sku_item skuInfo = new sku_item()
{
id = 0,
sku_id = frontSku.skuId,
sku_sn = null,
carnival_price = 0,
init_quantity = 0,
is_onsale = 1,
limit_quantity = 999999,
multi_price = (int)(frontSku.groupPrice.ParseToDecimal() * 100),
multi_price_in_yuan = null,
price = (int)(frontSku.normalPrice.ParseToDecimal() * 100),
price_in_yuan = null,
quantity = 0,
reserve_quantity = 0,
weight = 0,
thumb_url = frontSku.thumbUrl,
thumb_url_file_id = null,
thumb_url_status = null,
thumb_url_is_deleted = null,
quantity_delta = frontSku.quantity,
spec = new List<spec_item>(),
out_sku_sn = "",
batch_id = null,
priority = 1,
ware_id = 0,
ware_biz_type = null,
advice_price = null,
length = null,
oversea_sku = null,
cspu_id = null,
child_skus = null,
ref_sku_commit_id = 0,
start_time = null,
end_time = null,
sku_srv_templates = null,
calendar_rule_id = null,
hot_live_group = null,
pre_sale_time = 0,
out_source_sku_id = null,
dd_grocery_sku_params = null,
sku_extended_attribute_dtos = null,
sku_basic_property_dtos = null,
spec_note_map = null,
delivery_schedule_dtos = null,
shipment_limit_second_list = null,
sku69_code = "",
};
if ((int)(frontSku.groupPrice.ParseToDecimal() * 100) > 0)
skuInfo.multi_price = Math.Min(skuInfo.multi_price.ParseToInt(), (int)(frontSku.groupPrice.ParseToDecimal() * 100));
//List<string> specIds = frontSku.spec.Split(',').ToList();
//List<string> specKeys = frontSku.spec_keys.Split(';').ToList();
//List<string> specValues = frontSku.spec_values.Split(';').ToList();
//for (int i = 0; i < specIds.Count; i++)
//{
// skuInfo.spec.Add(new spec_item()
// {
// parent_name = specKeys[i],
// spec_id = specIds[i].ParseToLong(),
// spec_name = specValues[i],
// });
//}
foreach (var frontSpec in frontSku.specs)
{
skuInfo.spec.Add(new spec_item()
{
parent_id = frontSpec.spec_key_id,
parent_name = frontSpec.spec_key,
spec_id = frontSpec.spec_value_id,
spec_name = frontSpec.spec_value,
});
}
prodInfo.detail.sku.Add(skuInfo);
}
prodInfo.detail.sku_type = null;
prodInfo.detail.song_huo_an_zhuang = null;
prodInfo.detail.song_huo_ru_hu = null;
prodInfo.detail.source = 0;
prodInfo.detail.spu_id = null;
prodInfo.detail.spu_version = null;
prodInfo.detail.submit_time = 0;
prodInfo.detail.thawed_refund = 0;
prodInfo.detail.third_type = 0;
prodInfo.detail.thumb_url = frontProdInfo.goods.thumbUrl;
prodInfo.detail.tiny_name = "";
prodInfo.detail.transport_type_list = null;
prodInfo.detail.two_pieces_discount = 99;
prodInfo.detail.user_source = 1;
prodInfo.detail.warehouse = "";
prodInfo.detail.warm_tips = "";
prodInfo.detail.zhi_huan_bu_xiu = 0;
prodInfo.size = null;
prodInfo.material1 = null;
prodInfo.material3 = null;
prodInfo.property = new PDDProductPropertyInfo();
prodInfo.property.sku_properties = new object();
prodInfo.property.goods_properties = new List<goods_propertie_item>();
foreach (var frontProp in frontProdInfo.goods.goodsProperty)
{
goods_propertie_item propInfo = new goods_propertie_item();
propInfo.name = frontProp.key;
propInfo.values = new List<value_item>();
foreach (var frontPropValue in frontProp.values)
{
propInfo.values.Add(new value_item() { value = frontPropValue, raw_value = frontPropValue, unit = "" });
}
prodInfo.property.goods_properties.Add(propInfo);
}
dbProd.main_img = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1).url;
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
string collectAuthorityTag = "";
if (IsCollectAuthorityUser)
collectAuthorityTag = "-" + BaseClass.UserName;
bool isExist = false;
var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list");
string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prodInfo.detail.goods_id + collectAuthorityTag;
string html = GetHtml.PostUtf8(existUrl, existData);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(existUrl, existData);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(existUrl, existData);
if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200"))
{
if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]"))
isExist = true;
}
else
{
return "入库失败,产品数据库已存在商品查询失败";
}
var url = BaseClass.BuildPDDObjString("product/add_product");
if (isExist)
{
if (UpdateOldData)
{
url = BaseClass.BuildPDDObjString("product/mdy_product");
}
else
{
return "已存在相同id商品,跳过";
}
}
var data = Work.UserLogin.GetSignaturex() +
"&from_shop_id=" + frontProdInfo.mall?.mallId +
"&from_shop_name=" + frontProdInfo.mall?.mallName +
"&spu_id=" + prodInfo.detail.goods_id.ParseToString() + collectAuthorityTag +
"&skc_id=" + prodInfo.detail.goods_id.ParseToString() +
"&price_text=" + prodInfo.detail.sku.Min(s => s.multi_price).ParseToInt() * 0.01m + "-" + prodInfo.detail.sku.Max(s => s.multi_price).ParseToInt() * 0.01m +
@@ -256,7 +256,8 @@ namespace TemuKJD.BLL.Wx
// string prodId = recommendProd.product_id;
// string coid = normalJstProd?.skc_id;
// string real_coid = string.IsNullOrEmpty(normalJstProd?.real_coid) ? coid : normalJstProd?.real_coid;
// string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "安全商品" : "违规商品";
// //string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "安全商品" : "违规商品";
// string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "未校验" : "违规商品";
// int? view_uv = recommendProd.product_view_uv.IsNullOrEmpty() ? (int?)null : recommendProd.product_view_uv.ParseToInt();
// var rst2 = new WXShopBrowserObject()
// .SaveWxProd(shop, prodId, wxProdInfoLite, false, "爆款数据", coid, real_coid, view_uv, wx_safe_status);
@@ -584,7 +585,8 @@ namespace TemuKJD.BLL.Wx
string prodId = recommendProd.product_id;
string coid = normalJstProd?.skc_id;
string real_coid = string.IsNullOrEmpty(normalJstProd?.real_coid) ? coid : normalJstProd?.real_coid;
string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "安全商品" : "违规商品";
//string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "安全商品" : "违规商品";
string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "未校验" : "违规商品";
int? view_uv = recommendProd.product_view_uv.IsNullOrEmpty() ? (int?)null : recommendProd.product_view_uv.ParseToInt();
var rst2 = new WXShopBrowserObject()
.SaveWxProd(shop, prodId, wxProdInfoLite, false, "爆款数据", coid, real_coid, view_uv, wx_safe_status);
@@ -1183,6 +1183,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content);
}
else if (content.Contains("\"mallId\"") && content.Contains("\"mallName\"") && content.Contains("\"goodsId\"") && content.Contains("\"goodsName\"") &&
content.Contains("\"catID\"") && content.Contains("\"catID4\"") && content.Contains("\"topGallery\"") && content.Contains("\"detailGallery\"") &&
content.Contains("\"shareDesc\"") && content.Contains("\"maxOnSaleGroupPriceInCent\"") && content.Contains("\"shareDesc\"") &&
content.Contains("\"specs\"") && content.Contains("\"spec_key\"") && content.Contains("\"spec_value\"") &&
content.Contains("\"groupPrice\"") && content.Contains("img.pddpic.com"))
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert3(content);
}
}
catch (Exception ex)
{
+223 -48
View File
@@ -34,6 +34,7 @@ namespace TemuKJD.WXForms.AdminForms
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
this.chkTraineeData = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.line2 = new DevComponents.DotNetBar.Controls.Line();
this.btnFilter = new DevComponents.DotNetBar.PanelEx();
this.txtAuth = new System.Windows.Forms.TextBox();
@@ -80,6 +81,14 @@ namespace TemuKJD.WXForms.AdminForms
this.label40 = new System.Windows.Forms.Label();
this.line1 = new DevComponents.DotNetBar.Controls.Line();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.pnlBalance = new System.Windows.Forms.Panel();
this.label13 = new System.Windows.Forms.Label();
this.lblUserBalanceInfo = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.numAddBalance = new System.Windows.Forms.NumericUpDown();
this.label12 = new System.Windows.Forms.Label();
this.btnChangeBalanceCancel = new DevComponents.DotNetBar.PanelEx();
this.btnChangeBalanceOK = new DevComponents.DotNetBar.PanelEx();
this.pnlShopPointsPerMonth = new System.Windows.Forms.Panel();
this.lblShopPointsPerMonthUserId = new System.Windows.Forms.Label();
this.lblShopPointsPerMonthUserInfo = new System.Windows.Forms.Label();
@@ -89,6 +98,7 @@ namespace TemuKJD.WXForms.AdminForms
this.btnShopPointsPerMonthCancel = new DevComponents.DotNetBar.PanelEx();
this.btnShopPointsPerMonth = new DevComponents.DotNetBar.PanelEx();
this.pnlTopUp = new System.Windows.Forms.Panel();
this.label14 = new System.Windows.Forms.Label();
this.lblUserInfo = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.numAddTopUp = new System.Windows.Forms.NumericUpDown();
@@ -96,6 +106,7 @@ namespace TemuKJD.WXForms.AdminForms
this.btnTopUpCancel = new DevComponents.DotNetBar.PanelEx();
this.btnTopUpOK = new DevComponents.DotNetBar.PanelEx();
this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx();
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.mobileColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -111,11 +122,11 @@ namespace TemuKJD.WXForms.AdminForms
this.colChangePointsPerMonth = new System.Windows.Forms.DataGridViewLinkColumn();
this.colPoints = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBalance = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBalancePlus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn();
this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn();
this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx();
this.chkTraineeData = new TemuKJD.UserComponent.UcCheckBox(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
this.splitContainer5.Panel1.SuspendLayout();
this.splitContainer5.Panel2.SuspendLayout();
@@ -124,6 +135,9 @@ namespace TemuKJD.WXForms.AdminForms
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.pnlBalance.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddBalance)).BeginInit();
this.pnlShopPointsPerMonth.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numShopPointsPerMonth)).BeginInit();
@@ -200,6 +214,15 @@ namespace TemuKJD.WXForms.AdminForms
this.splitContainer5.SplitterWidth = 1;
this.splitContainer5.TabIndex = 3;
//
// chkTraineeData
//
this.chkTraineeData.Location = new System.Drawing.Point(192, 453);
this.chkTraineeData.Name = "chkTraineeData";
this.chkTraineeData.Size = new System.Drawing.Size(68, 21);
this.chkTraineeData.TabIndex = 829;
this.chkTraineeData.Text = "学员数据";
this.chkTraineeData.UseVisualStyleBackColor = true;
//
// line2
//
this.line2.Location = new System.Drawing.Point(12, 98);
@@ -677,6 +700,7 @@ namespace TemuKJD.WXForms.AdminForms
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.pnlBalance);
this.splitContainer1.Panel1.Controls.Add(this.pnlShopPointsPerMonth);
this.splitContainer1.Panel1.Controls.Add(this.pnlTopUp);
this.splitContainer1.Panel1.Controls.Add(this.dgvUser);
@@ -688,6 +712,124 @@ namespace TemuKJD.WXForms.AdminForms
this.splitContainer1.SplitterDistance = 593;
this.splitContainer1.TabIndex = 2;
//
// pnlBalance
//
this.pnlBalance.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pnlBalance.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlBalance.Controls.Add(this.label13);
this.pnlBalance.Controls.Add(this.lblUserBalanceInfo);
this.pnlBalance.Controls.Add(this.panel4);
this.pnlBalance.Location = new System.Drawing.Point(269, 64);
this.pnlBalance.Name = "pnlBalance";
this.pnlBalance.Size = new System.Drawing.Size(474, 146);
this.pnlBalance.TabIndex = 10;
this.pnlBalance.Visible = false;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(388, 5);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(80, 17);
this.label13.TabIndex = 456;
this.label13.Text = "快递余额充值";
//
// lblUserBalanceInfo
//
this.lblUserBalanceInfo.AutoSize = true;
this.lblUserBalanceInfo.Location = new System.Drawing.Point(20, 19);
this.lblUserBalanceInfo.Name = "lblUserBalanceInfo";
this.lblUserBalanceInfo.Size = new System.Drawing.Size(58, 17);
this.lblUserBalanceInfo.TabIndex = 455;
this.lblUserBalanceInfo.Text = "UserInfo";
//
// panel4
//
this.panel4.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.panel4.Controls.Add(this.numAddBalance);
this.panel4.Controls.Add(this.label12);
this.panel4.Controls.Add(this.btnChangeBalanceCancel);
this.panel4.Controls.Add(this.btnChangeBalanceOK);
this.panel4.Location = new System.Drawing.Point(23, 52);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(424, 57);
this.panel4.TabIndex = 454;
//
// numAddBalance
//
this.numAddBalance.DecimalPlaces = 2;
this.numAddBalance.Location = new System.Drawing.Point(180, 16);
this.numAddBalance.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.numAddBalance.Minimum = new decimal(new int[] {
10000,
0,
0,
-2147483648});
this.numAddBalance.Name = "numAddBalance";
this.numAddBalance.Size = new System.Drawing.Size(56, 23);
this.numAddBalance.TabIndex = 1;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(74, 19);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(116, 17);
this.label12.TabIndex = 456;
this.label12.Text = "快递余额充值金额:";
//
// btnChangeBalanceCancel
//
this.btnChangeBalanceCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnChangeBalanceCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnChangeBalanceCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnChangeBalanceCancel.Location = new System.Drawing.Point(299, 16);
this.btnChangeBalanceCancel.Name = "btnChangeBalanceCancel";
this.btnChangeBalanceCancel.Size = new System.Drawing.Size(56, 23);
this.btnChangeBalanceCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnChangeBalanceCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnChangeBalanceCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnChangeBalanceCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnChangeBalanceCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnChangeBalanceCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnChangeBalanceCancel.Style.GradientAngle = 90;
this.btnChangeBalanceCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnChangeBalanceCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnChangeBalanceCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnChangeBalanceCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnChangeBalanceCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnChangeBalanceCancel.TabIndex = 458;
this.btnChangeBalanceCancel.Text = "取消";
this.btnChangeBalanceCancel.Click += new System.EventHandler(this.btnChangeBalanceCancel_Click);
//
// btnChangeBalanceOK
//
this.btnChangeBalanceOK.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnChangeBalanceOK.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnChangeBalanceOK.DisabledBackColor = System.Drawing.Color.Empty;
this.btnChangeBalanceOK.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnChangeBalanceOK.Location = new System.Drawing.Point(240, 16);
this.btnChangeBalanceOK.Name = "btnChangeBalanceOK";
this.btnChangeBalanceOK.Size = new System.Drawing.Size(56, 23);
this.btnChangeBalanceOK.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnChangeBalanceOK.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnChangeBalanceOK.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnChangeBalanceOK.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnChangeBalanceOK.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnChangeBalanceOK.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnChangeBalanceOK.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnChangeBalanceOK.Style.GradientAngle = 90;
this.btnChangeBalanceOK.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnChangeBalanceOK.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnChangeBalanceOK.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnChangeBalanceOK.TabIndex = 453;
this.btnChangeBalanceOK.Text = "确定";
this.btnChangeBalanceOK.Click += new System.EventHandler(this.btnChangeBalanceOK_Click);
//
// pnlShopPointsPerMonth
//
this.pnlShopPointsPerMonth.Anchor = System.Windows.Forms.AnchorStyles.None;
@@ -815,6 +957,7 @@ namespace TemuKJD.WXForms.AdminForms
//
this.pnlTopUp.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pnlTopUp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlTopUp.Controls.Add(this.label14);
this.pnlTopUp.Controls.Add(this.lblUserInfo);
this.pnlTopUp.Controls.Add(this.panel2);
this.pnlTopUp.Location = new System.Drawing.Point(269, 223);
@@ -823,6 +966,15 @@ namespace TemuKJD.WXForms.AdminForms
this.pnlTopUp.TabIndex = 8;
this.pnlTopUp.Visible = false;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(388, 5);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(80, 17);
this.label14.TabIndex = 457;
this.label14.Text = "账户积分充值";
//
// lblUserInfo
//
this.lblUserInfo.AutoSize = true;
@@ -864,11 +1016,11 @@ namespace TemuKJD.WXForms.AdminForms
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(98, 19);
this.label8.Location = new System.Drawing.Point(50, 19);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(68, 17);
this.label8.Size = new System.Drawing.Size(116, 17);
this.label8.TabIndex = 456;
this.label8.Text = "充值金额:";
this.label8.Text = "积分账户充值金额:";
//
// btnTopUpCancel
//
@@ -953,6 +1105,8 @@ namespace TemuKJD.WXForms.AdminForms
this.colChangePointsPerMonth,
this.colPoints,
this.colPlus,
this.colBalance,
this.colBalancePlus,
this.colAddShop,
this.editColumn,
this.deleteColumn});
@@ -967,6 +1121,31 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvUser.TabIndex = 1;
this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick);
//
// btnExportShopErp
//
this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExportShopErp.Location = new System.Drawing.Point(0, 1);
this.btnExportShopErp.Name = "btnExportShopErp";
this.btnExportShopErp.Size = new System.Drawing.Size(140, 25);
this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnExportShopErp.Style.GradientAngle = 90;
this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.TabIndex = 439;
this.btnExportShopErp.Text = "导出用户到后台系统";
this.btnExportShopErp.Visible = false;
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
//
// UserIdColumn
//
this.UserIdColumn.HeaderText = "id";
@@ -1069,6 +1248,20 @@ namespace TemuKJD.WXForms.AdminForms
this.colPlus.Name = "colPlus";
this.colPlus.ReadOnly = true;
//
// colBalance
//
this.colBalance.FillWeight = 60F;
this.colBalance.HeaderText = "快递余额";
this.colBalance.Name = "colBalance";
this.colBalance.ReadOnly = true;
//
// colBalancePlus
//
this.colBalancePlus.FillWeight = 22F;
this.colBalancePlus.HeaderText = "+";
this.colBalancePlus.Name = "colBalancePlus";
this.colBalancePlus.ReadOnly = true;
//
// colAddShop
//
this.colAddShop.FillWeight = 70F;
@@ -1094,40 +1287,6 @@ namespace TemuKJD.WXForms.AdminForms
this.deleteColumn.Name = "deleteColumn";
this.deleteColumn.ReadOnly = true;
//
// btnExportShopErp
//
this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty;
this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExportShopErp.Location = new System.Drawing.Point(0, 1);
this.btnExportShopErp.Name = "btnExportShopErp";
this.btnExportShopErp.Size = new System.Drawing.Size(140, 25);
this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnExportShopErp.Style.GradientAngle = 90;
this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnExportShopErp.TabIndex = 439;
this.btnExportShopErp.Text = "导出用户到后台系统";
this.btnExportShopErp.Visible = false;
this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click);
//
// chkTraineeData
//
this.chkTraineeData.Location = new System.Drawing.Point(192, 453);
this.chkTraineeData.Name = "chkTraineeData";
this.chkTraineeData.Size = new System.Drawing.Size(68, 21);
this.chkTraineeData.TabIndex = 829;
this.chkTraineeData.Text = "学员数据";
this.chkTraineeData.UseVisualStyleBackColor = true;
//
// WXAdminAccountForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1148,6 +1307,11 @@ namespace TemuKJD.WXForms.AdminForms
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.pnlBalance.ResumeLayout(false);
this.pnlBalance.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numAddBalance)).EndInit();
this.pnlShopPointsPerMonth.ResumeLayout(false);
this.pnlShopPointsPerMonth.PerformLayout();
this.panel3.ResumeLayout(false);
@@ -1221,6 +1385,24 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.Label label9;
private DevComponents.DotNetBar.Controls.Line line1;
private DevComponents.DotNetBar.Controls.Line line2;
private System.Windows.Forms.Panel pnlShopPointsPerMonth;
private System.Windows.Forms.Label lblShopPointsPerMonthUserInfo;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.NumericUpDown numShopPointsPerMonth;
private System.Windows.Forms.Label label11;
private DevComponents.DotNetBar.PanelEx btnShopPointsPerMonthCancel;
private DevComponents.DotNetBar.PanelEx btnShopPointsPerMonth;
private System.Windows.Forms.Label lblShopPointsPerMonthUserId;
private UserComponent.UcCheckBox chkTraineeData;
private System.Windows.Forms.Panel pnlBalance;
private System.Windows.Forms.Label lblUserBalanceInfo;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.NumericUpDown numAddBalance;
private System.Windows.Forms.Label label12;
private DevComponents.DotNetBar.PanelEx btnChangeBalanceCancel;
private DevComponents.DotNetBar.PanelEx btnChangeBalanceOK;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn mobileColumn;
@@ -1236,17 +1418,10 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.DataGridViewLinkColumn colChangePointsPerMonth;
private System.Windows.Forms.DataGridViewTextBoxColumn colPoints;
private System.Windows.Forms.DataGridViewTextBoxColumn colPlus;
private System.Windows.Forms.DataGridViewTextBoxColumn colBalance;
private System.Windows.Forms.DataGridViewTextBoxColumn colBalancePlus;
private System.Windows.Forms.DataGridViewLinkColumn colAddShop;
private System.Windows.Forms.DataGridViewLinkColumn editColumn;
private System.Windows.Forms.DataGridViewLinkColumn deleteColumn;
private System.Windows.Forms.Panel pnlShopPointsPerMonth;
private System.Windows.Forms.Label lblShopPointsPerMonthUserInfo;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.NumericUpDown numShopPointsPerMonth;
private System.Windows.Forms.Label label11;
private DevComponents.DotNetBar.PanelEx btnShopPointsPerMonthCancel;
private DevComponents.DotNetBar.PanelEx btnShopPointsPerMonth;
private System.Windows.Forms.Label lblShopPointsPerMonthUserId;
private UserComponent.UcCheckBox chkTraineeData;
}
}
@@ -163,8 +163,8 @@ namespace TemuKJD.WXForms.AdminForms
user.company_name = BaseRegex.GetStringJson(ref oStr, "company_name");
user.sa_level = BaseRegex.GetIntJson(ref oStr, "sa_level");
user.authority = BaseRegex.GetStringJson(ref oStr, "authority");
user.group_id = BaseRegex.GetStringJson(ref oStr, "group_id");
user.points = BaseRegex.GetIntJson(ref oStr, "points");
user.balance = BaseRegex.GetDecimalJson(ref oStr, "balance");
user.shop_points_per_month = BaseRegex.GetIntJson(ref oStr, "shop_points_per_month");
var parent_user_name = BaseRegex.GetStringJson(ref oStr, "parent_user_name");
@@ -185,6 +185,8 @@ namespace TemuKJD.WXForms.AdminForms
(user.authority.Contains("充值用户") && user.group_id == "3") ? "改" : null,
(user.authority.Contains("充值用户") && user.group_id == "3") ? (int?)user.points : null,
(user.authority.Contains("充值用户") && user.group_id == "3") ? "+" : null,
user.balance.ParseToDecimal(),
"+",
user.group_id == "3" ? "添加店铺" : "",
"编辑",
"删除");
@@ -230,7 +232,8 @@ namespace TemuKJD.WXForms.AdminForms
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string columname = dgvUser.Columns[e.ColumnIndex].HeaderText;
string columText = dgvUser.Columns[e.ColumnIndex].HeaderText;
string columName = dgvUser.Columns[e.ColumnIndex].Name;
string uid = dgvUser.Rows[e.RowIndex].Cells["UseridColumn"].Value.ToString();
string nickName = dgvUser.Rows[e.RowIndex].Cells["UserNickNameColumn"].Value.ToString();
string mobile = dgvUser.Rows[e.RowIndex].Cells["mobileColumn"].Value.ToString();
@@ -240,7 +243,7 @@ namespace TemuKJD.WXForms.AdminForms
string authority = dgvUser.Rows[e.RowIndex].Cells["colAuthority"].Value.ParseToString();
int shopPointsPerMonth = dgvUser.Rows[e.RowIndex].Cells["colShopPointsPerMonth"].Value.ParseToInt();
var row = dgvUser.Rows[e.RowIndex];
if (columname == "编辑")
if (columText == "编辑")
{
Uid = uid;
txtNickName.Text = nickName;
@@ -263,14 +266,14 @@ namespace TemuKJD.WXForms.AdminForms
chkHot.Checked = authority.Contains(chkHot.Text);
chkWXShowProdGetFromType.Checked = authority.Contains(chkWXShowProdGetFromType.Text);
}
if (columname == "删除")
if (columText == "删除")
{
if (BaseMsgForm.ShowConfirm("是否删除,删除后无法再次添加", "提示").DialogResult == DialogResult.OK)
{
Delete(uid);
}
}
if (columname == "添加店铺")
if (columText == "添加店铺")
{
WXAdminShopListForm shopListForm = new WXAdminShopListForm();
shopListForm.UserAccountInfo = AllUsers.FirstOrDefault(u => u.user_name == mobile);
@@ -278,14 +281,24 @@ namespace TemuKJD.WXForms.AdminForms
shopListForm.btnAddToAccount.Visible = true;
shopListForm.ShowDialog();
}
if (columname == "+")
if (columText == "+")
{
this.lblUserInfo.Text = mobile + " - " + nickName;
this.numAddTopUp.Value = 0;
this.pnlTopUp.Tag = row;
this.pnlTopUp.Visible = true;
if (columName == "colPlus")
{
this.lblUserInfo.Text = mobile + " - " + nickName;
this.numAddTopUp.Value = 0;
this.pnlTopUp.Tag = row;
this.pnlTopUp.Visible = true;
}
if (columName == "colBalancePlus")
{
this.lblUserBalanceInfo.Text = mobile + " - " + nickName;
this.numAddBalance.Value = 0;
this.pnlBalance.Tag = row;
this.pnlBalance.Visible = true;
}
}
if (columname == "改")
if (columText == "改")
{
this.lblShopPointsPerMonthUserInfo.Text = mobile + " - " + nickName;
this.numShopPointsPerMonth.Value = shopPointsPerMonth;
@@ -330,6 +343,7 @@ namespace TemuKJD.WXForms.AdminForms
private void MainAccountForm_Load(object sender, EventArgs e)
{
pnlShopPointsPerMonth.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
pnlBalance.Location = new Point(pnlTopUp.Location.X, pnlTopUp.Location.Y);
this.cmbGroup.Items.Clear();
this.cmbGroup.Items.Add("主账户");
@@ -347,6 +361,8 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvUser.AddMergeColumnHeader(new List<string> { "colShopPointsPerMonth", "colChangePointsPerMonth" }, "月费耗点");
this.dgvUser.AddMergeColumn(new List<string> { "colPoints", "colPlus" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colPoints", "colPlus" }, "积分点数");
this.dgvUser.AddMergeColumn(new List<string> { "colBalance", "colBalancePlus" });
this.dgvUser.AddMergeColumnHeader(new List<string> { "colBalance", "colBalancePlus" }, "快递余额");
}
private void TxtSearch_LostFocus(object sender, EventArgs e)
@@ -457,5 +473,36 @@ namespace TemuKJD.WXForms.AdminForms
pnlShopPointsPerMonth.Visible = false;
BaseMsgForm.ShowInfo("修改充值用户店铺月费金额成功");
}
private void btnChangeBalanceOK_Click(object sender, EventArgs e)
{
string url = BaseClass.BuildObjString("user/update_user_balance");
string data = UserLogin.GetSignaturex();
data += "&update_user_name=" + lblUserBalanceInfo.Text.Split('-')[0].Trim();
data += "&update_user_nick=" + lblUserBalanceInfo.Text.Split('-')[1].Trim();
data += "&option_type=" + "充值";
data += "&operator_name=" + BaseClass.UserName;
data += "&delta_balance=" + numAddBalance.Value;
string html = GetHtml.PostUtf8(url, data.ToString()).Trim();
if (!html.Contains("\"code\":200"))
{
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
BaseMsgForm.ShowError(msg);
return;
}
var row = pnlBalance.Tag as DataGridViewRow;
if (row != null)
{
row.Cells["colBalance"].Value = row.Cells["colBalance"].Value.ParseToDecimal() + numAddBalance.Value;
}
pnlBalance.Visible = false;
BaseMsgForm.ShowInfo("充值成功");
}
private void btnChangeBalanceCancel_Click(object sender, EventArgs e)
{
pnlBalance.Visible = false;
}
}
}
@@ -162,6 +162,12 @@
<metadata name="colPlus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colBalance.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colBalancePlus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAddShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -1397,7 +1397,7 @@ namespace TemuKJD.WXForms.ProductForms
data += "&wx_safe_status=安全商品,未校验";
if (noBanWx)
data += "&ban_wx=0";
if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("爆款数据"))
if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("爆款数据") || BaseClass.UserAuthority.Contains("学员数据"))
data += "&special_prod_type=普通商品,爆款数据";
var html = GetHtml.PostUtf8(url, data);
@@ -1127,6 +1127,14 @@ namespace TemuKJD.WXForms.ProductForms
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert2(content, true, null, true);
}
else if (content.Contains("\"mallId\"") && content.Contains("\"mallName\"") && content.Contains("\"goodsId\"") && content.Contains("\"goodsName\"") &&
content.Contains("\"catID\"") && content.Contains("\"catID4\"") && content.Contains("\"topGallery\"") && content.Contains("\"detailGallery\"") &&
content.Contains("\"shareDesc\"") && content.Contains("\"maxOnSaleGroupPriceInCent\"") && content.Contains("\"shareDesc\"") &&
content.Contains("\"specs\"") && content.Contains("\"spec_key\"") && content.Contains("\"spec_value\"") &&
content.Contains("\"groupPrice\"") && content.Contains("img.pddpic.com"))
{
rst = new PDDProdFormConverter().PddFrontToPddBackConvert3(content, true, null, true);
}
}
catch (Exception ex)
{
@@ -1504,7 +1504,7 @@ namespace TemuKJD.WXForms.TalkForms
pictureBox1.Visible = true;
Task.Run(() =>
{
MakeWxToPddAfterSale(order);
PddAutoAfterSale(order);
Invoke(new Action(() => { pictureBox1.Visible = false; }));
});
break;
@@ -1713,7 +1713,7 @@ namespace TemuKJD.WXForms.TalkForms
}));
if (chkAutoAfterSale.Checked)
{
MakeWxToPddAfterSale(order);
PddAutoAfterSale(order);
}
}
}
@@ -1726,7 +1726,7 @@ namespace TemuKJD.WXForms.TalkForms
}
// 通过服务端读取微信售后并触发拼多多售后或显示提示供买手手动退货
public string MakeWxToPddAfterSale(PddBuyerOrderLiteInfo order)
public string PddAutoAfterSale(PddBuyerOrderLiteInfo order)
{
//if (isReadOrder)
//{