|
@@ -13,10 +13,15 @@ import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.logic.admin.ew.EnterpriseWechatWorkerLogic;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.logic.common.WorkWechatLogic;
|
|
|
+import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
|
|
|
+import com.gree.mall.manager.plus.entity.AdminCompanyWechatPayConfig;
|
|
|
import com.gree.mall.manager.plus.entity.AdminWebsit;
|
|
|
import com.gree.mall.manager.plus.entity.AdminZone;
|
|
|
+import com.gree.mall.manager.plus.service.AdminCompanyWechatPayConfigService;
|
|
|
+import com.gree.mall.manager.plus.service.AdminCompanyWechatService;
|
|
|
import com.gree.mall.manager.plus.service.AdminWebsitService;
|
|
|
import com.gree.mall.manager.plus.service.AdminZoneService;
|
|
|
+import com.gree.mall.manager.utils.CommonUtils;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -49,6 +54,9 @@ public class AdminWebsitLogic {
|
|
|
@Autowired
|
|
|
AdminMapper adminMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ AdminCompanyWechatPayConfigService adminCompanyWechatPayConfigService;
|
|
|
+
|
|
|
/**
|
|
|
* 区域列表
|
|
|
*/
|
|
@@ -227,4 +235,49 @@ public class AdminWebsitLogic {
|
|
|
IPage<AdminWebsitVO> adminDeptWebsitVOIPage = adminMapper.listWebsit(page, zfireParam);
|
|
|
return adminDeptWebsitVOIPage;
|
|
|
}
|
|
|
+
|
|
|
+ public void importData(List<Object> objects) {
|
|
|
+
|
|
|
+ List<AdminWebsit> adminWebsits = new ArrayList<>();
|
|
|
+
|
|
|
+ for (int i = 0; i < objects.size(); i++) {
|
|
|
+ int rowIndex = i + 2;
|
|
|
+ List<Object> row = (List<Object>) objects.get(i);
|
|
|
+
|
|
|
+ AdminWebsit adminWebsit = new AdminWebsit();
|
|
|
+
|
|
|
+ adminWebsit.setWebsitId((String) row.get(0));
|
|
|
+ adminWebsit.setWebsitNumber((String) row.get(0));
|
|
|
+ adminWebsit.setName((String) row.get(1));
|
|
|
+ adminWebsit.setMobile((String) row.get(2));
|
|
|
+ adminWebsit.setPerson((String) row.get(3));
|
|
|
+ adminWebsit.setPersonMobile((String) row.get(4));
|
|
|
+ adminWebsit.setType((String) row.get(5));
|
|
|
+ adminWebsit.setAddress((String) row.get(6));
|
|
|
+ AdminCompanyWechatPayConfig one = adminCompanyWechatPayConfigService.lambdaQuery()
|
|
|
+ .eq(AdminCompanyWechatPayConfig::getCompanyName, (String) row.get(7))
|
|
|
+
|
|
|
+ .last("limit 1").one();
|
|
|
+
|
|
|
+ if (one == null)
|
|
|
+ throw new RemoteServiceException("第"+rowIndex+"行,找不到支付商户");
|
|
|
+ adminWebsit.setPayWorkerCodeName((String) row.get(7));
|
|
|
+ adminWebsit.setPayWorkerCodeId(one.getId());
|
|
|
+ if (row.size() > 7) {
|
|
|
+ adminWebsit.setYunAppid((String) row.get(8));
|
|
|
+ adminWebsit.setYunAppkey((String) row.get(9));
|
|
|
+ adminWebsit.setYunCompany((String) row.get(10));
|
|
|
+ adminWebsit.setYunNumber((String) row.get(11));
|
|
|
+ adminWebsit.setYunSystem((String) row.get(12));
|
|
|
+ adminWebsit.setYunTax((String) row.get(13));
|
|
|
+ adminWebsit.setYunName((String) row.get(14));
|
|
|
+ adminWebsit.setYunTwo((((String) row.get(15)).equals("是"))?"YES":"NO");
|
|
|
+ }
|
|
|
+
|
|
|
+ adminWebsits.add(adminWebsit);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ adminWebsitService.saveBatch(adminWebsits);
|
|
|
+ }
|
|
|
}
|