|
|
@@ -1,14 +1,22 @@
|
|
|
package com.fs.company.controller;
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.fs.FSAdminApplication;
|
|
|
import com.fs.common.config.FSSysConfig;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
+import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.erp.domain.ErpOrder;
|
|
|
import com.fs.erp.domain.ErpOrderItem;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
import com.fs.erp.service.impl.ErpOrderServiceImpl;
|
|
|
+import com.fs.live.domain.LiveOrder;
|
|
|
+import com.fs.live.mapper.LiveOrderMapper;
|
|
|
+import com.fs.live.service.ILiveOrderService;
|
|
|
import com.fs.pay.pay.util.PayUtil;
|
|
|
import com.fs.store.domain.FsStoreOrder;
|
|
|
+import com.fs.store.domain.FsStoreProduct;
|
|
|
+import com.fs.store.domain.FsStoreProductAttrValue;
|
|
|
+import com.fs.store.mapper.FsStoreProductAttrValueMapper;
|
|
|
import com.fs.store.param.FsStoreOrderExpressEditParam;
|
|
|
import com.fs.store.service.IFsStoreOrderService;
|
|
|
import com.fs.wx.dto.*;
|
|
|
@@ -51,6 +59,71 @@ public class CompanyControllerTest {
|
|
|
@Autowired
|
|
|
private IFsStoreOrderService fsStoreOrderService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private LiveOrderMapper liveOrderMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICompanyService companyService;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void fixLiveCompanyMoney(){
|
|
|
+ List<String> orderCodeList = Arrays.asList(
|
|
|
+ "1975117133492572160",
|
|
|
+ "1973623181987860480",
|
|
|
+ "1972813398338752512",
|
|
|
+ "1972812466733502464",
|
|
|
+ "1972651669084491776",
|
|
|
+ "1972645025072074752",
|
|
|
+ "1972626286528221184",
|
|
|
+ "1972610619619987456",
|
|
|
+ "1972608203084320768",
|
|
|
+ "1972606667943890944"
|
|
|
+ );
|
|
|
+
|
|
|
+ for (String orderCode : orderCodeList) {
|
|
|
+ LiveOrder liveOrder = liveOrderMapper.selectLiveOrderByOrderCode(orderCode);
|
|
|
+ companyService.addCompanyMoney(liveOrder);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsStoreProductAttrValueMapper fsStoreProductAttrValueMapper;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void fixLiveCompanyTuiMoney(){
|
|
|
+
|
|
|
+// List<String> orderCodeList = Arrays.asList(
|
|
|
+// "1975117133492572160",
|
|
|
+// "1973623181987860480",
|
|
|
+// "1972813398338752512",
|
|
|
+// "1972812466733502464",
|
|
|
+// "1972651669084491776",
|
|
|
+// "1972645025072074752",
|
|
|
+// "1972626286528221184",
|
|
|
+// "1972610619619987456",
|
|
|
+// "1972608203084320768",
|
|
|
+// "1972606667943890944"
|
|
|
+// );
|
|
|
+//
|
|
|
+// for (String orderCode : orderCodeList) {
|
|
|
+// LiveOrder order = liveOrderMapper.selectLiveOrderByOrderCode(orderCode);
|
|
|
+// // 佣金处理
|
|
|
+// if (order.getCompanyUserId() == -1L) {
|
|
|
+// companyService.addCompanyTuiLiveMoney(order);
|
|
|
+// } else {
|
|
|
+// // 目前是一级佣金
|
|
|
+// FsStoreProduct product = JSONUtil.toBean(order.getItemJson(), FsStoreProduct.class);
|
|
|
+// List<FsStoreProductAttrValue> productAttrValues = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(product.getProductId());
|
|
|
+// if (productAttrValues != null && !productAttrValues.isEmpty()) {
|
|
|
+// userService.addTuiLiveMoney(order, productAttrValues);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Test
|
|
|
public void diver(){
|