|
|
@@ -46,6 +46,9 @@ public class FosterwxCashOasBoxServiceImpl extends ServiceImpl<FosterwxCashOasBo
|
|
|
public FosterwxCashMobileGroupService fosterwxCashMobileGroupService;
|
|
|
|
|
|
@Autowired
|
|
|
+ public FosterwxCashWorkwxMobileGroupService fosterwxCashWorkwxMobileGroupService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
public FosterwxCashOasBoxMobileGroupService fosterwxCashOasBoxMobileGroupService;
|
|
|
|
|
|
@Autowired
|
|
|
@@ -143,7 +146,7 @@ public class FosterwxCashOasBoxServiceImpl extends ServiceImpl<FosterwxCashOasBo
|
|
|
* @return
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public VoltaHandle<Boolean> importData(List<Map<String, String>> row, User authUser) throws Exception {
|
|
|
+ public VoltaHandle<Boolean> importData(List<Map<String, String>> row, User authUser,Integer wxType) throws Exception {
|
|
|
VoltaHandle<Boolean> res = new VoltaHandle<>();
|
|
|
if (row.size() <= 0) {
|
|
|
throw new Exception("表格读取完成后,没有获取到任何数据");
|
|
|
@@ -158,10 +161,20 @@ public class FosterwxCashOasBoxServiceImpl extends ServiceImpl<FosterwxCashOasBo
|
|
|
if (stationInfo == null) {
|
|
|
throw new Exception("站点编号不存在");
|
|
|
}
|
|
|
- FosterwxCashMobileGroup fosterwxCashMobileGroup = fosterwxCashMobileGroupService.getOne(new QueryWrapper<FosterwxCashMobileGroup>().eq("id",Integer.parseInt(row.get(i).get("mobileGroupId"))));
|
|
|
- if (fosterwxCashMobileGroup == null){
|
|
|
- throw new Exception("第"+i+"行:账号分组ID不存在");
|
|
|
+ if (wxType == 1){
|
|
|
+ //.个微
|
|
|
+ FosterwxCashMobileGroup fosterwxCashMobileGroup = fosterwxCashMobileGroupService.getOne(new QueryWrapper<FosterwxCashMobileGroup>().eq("id",Integer.parseInt(row.get(i).get("mobileGroupId"))));
|
|
|
+ if (fosterwxCashMobileGroup == null){
|
|
|
+ throw new Exception("第"+i+"行:账号分组ID不存在");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //.企微
|
|
|
+ FosterwxCashWorkwxMobileGroup fosterwxCashWorkwxMobileGroup = fosterwxCashWorkwxMobileGroupService.getOne(new QueryWrapper<FosterwxCashWorkwxMobileGroup>().eq("id",Integer.parseInt(row.get(i).get("mobileGroupId"))));
|
|
|
+ if (fosterwxCashWorkwxMobileGroup == null){
|
|
|
+ throw new Exception("第"+i+"行:账号分组ID不存在");
|
|
|
+ }
|
|
|
}
|
|
|
+ fosterwxCashOasBox.setWxType(wxType);
|
|
|
fosterwxCashOasBox.setStationId(stationInfo.getId());
|
|
|
fosterwxCashOasBox.setGroupId(Integer.parseInt(row.get(i).get("groupId")));
|
|
|
fosterwxCashOasBox.setType(Integer.parseInt(row.get(i).get("type")));
|
|
|
@@ -177,6 +190,7 @@ public class FosterwxCashOasBoxServiceImpl extends ServiceImpl<FosterwxCashOasBo
|
|
|
this.save(fosterwxCashOasBox);
|
|
|
|
|
|
FosterwxCashOasBoxMobileGroup fosterwxCashOasBoxMobileGroup = fosterwxCashOasBoxMobileGroupService.getOne(new QueryWrapper<FosterwxCashOasBoxMobileGroup>()
|
|
|
+ .eq("wx_type",wxType)
|
|
|
.eq("oas_box_id",fosterwxCashOasBox.getId())
|
|
|
.eq("cash_mobile_group_id",Integer.parseInt(row.get(i).get("mobileGroupId"))));
|
|
|
if (fosterwxCashOasBoxMobileGroup != null){
|