gx
This commit is contained in:
1 parent
0a3e5af6a9
commit
c2dcedd238
59 files changed
+2053
-1274
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using AllBase;
|
||||
using AllBase.Extension;
|
||||
using NaiBa.Util.Extension;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Config;
|
||||
using AllBase.Model.DBModel;
|
||||
@@ -20,7 +21,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Work;
|
||||
|
||||
namespace Store.Product.Publish.Steps.Wx;
|
||||
@@ -34,15 +34,16 @@ public sealed class SetProductExtCodeStep : WxProductPublishStepBase
|
||||
|
||||
protected override Task ExecuteProvider(WXPublishContext context, CancellationToken cancellationToken)
|
||||
{
|
||||
extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code;
|
||||
if (extCode.IsNullOrEmpty() || extCode.Length <= 10)
|
||||
context.Product.ExtCode = context.Product.ExtCode.IsNullOrEmpty() ? context.Parameters.ProdInfo.detail.out_goods_sn : context.Product.ExtCode;
|
||||
if (context.Product.ExtCode.IsNullOrEmpty() || context.Product.ExtCode.Length <= 10)
|
||||
{
|
||||
//extCode = "EC" + Randomx.GetId(1000).ToString().PadLeft(3, '0') + dbProd.spu_id + "C";
|
||||
extCode = GetEC1ExtCode(dbProd.spu_id);
|
||||
//extCode = "EC" + Randomx.GetId(1000).ToString().PadLeft(3, '0') + context.Product.SpuId + "C";
|
||||
context.Product.ExtCode = GetEC1ExtCode(context.Product.SpuId);
|
||||
}
|
||||
upProdParam.product.info.spuCode = extCode;
|
||||
upProdParam.product.info.outProductId = extCode;
|
||||
upProdParam.product.info.out_product_id = extCode;
|
||||
upProdParam.product.productKey.outProductId = extCode;
|
||||
context.Parameters.ProductParameter.product.info.spuCode = context.Product.ExtCode;
|
||||
context.Parameters.ProductParameter.product.info.outProductId = context.Product.ExtCode;
|
||||
context.Parameters.ProductParameter.product.info.out_product_id = context.Product.ExtCode;
|
||||
context.Parameters.ProductParameter.product.productKey.outProductId = context.Product.ExtCode;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user