|
|
@@ -1,6 +1,7 @@
|
|
|
package com.mokamrp.privates.tast.pangu;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.mokamrp.privates.constant.RedisKey;
|
|
|
import com.mokamrp.privates.entity.pangu.AddFosterwxMobileHandle;
|
|
|
@@ -59,7 +60,12 @@ public class SyncFosterwxEdit {
|
|
|
}
|
|
|
if (fosterwxMobile.getId().equals(0)) {
|
|
|
//.新增
|
|
|
- // TODO 新增手机唯一编码
|
|
|
+ // 判断手机编码是否存在
|
|
|
+ LambdaQueryWrapper<FosterwxMobile> fosterwxMobileLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ fosterwxMobileLambdaQueryWrapper.eq(FosterwxMobile::getStationId, fosterwxMobile.getStationId());
|
|
|
+ fosterwxMobileLambdaQueryWrapper.eq(FosterwxMobile::getMobileCode, fosterwxMobile.getMobileCode());
|
|
|
+ if (fosterwxMobileService.count(fosterwxMobileLambdaQueryWrapper) > 0) continue;
|
|
|
+
|
|
|
fosterwxMobile.setMobileUnioCode(String.format("%02d", fosterwxMobile.getStationId()) + String.format("%02d", fosterwxMobile.getMobileCode()));
|
|
|
fosterwxMobileService.save(fosterwxMobile);
|
|
|
} else {
|