1打包逻辑优化 2代理逻辑优化 3新的拼多多数据格式支持
This commit is contained in:
1 parent
f703e15f11
commit
554d1f4b4f
30 files changed
+1400
-82
No files matched your search
@@ -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
@@ -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)
|
||||
//{
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
locales/io.pak 代理码
|
||||
locales/na.pak 软件名称
|
||||
locales/lo.pak logo
|
||||
locales/im.pak 主窗口及登录窗口标题图片
|
||||
Reference in new issue
Block a user