From fe729234647c83f8029beba4e31dc8d364a6427b Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 27 八月 2025 16:04:35 +0800
Subject: [PATCH] 修BUG
---
server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java b/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
index fb5d5b4..298a4fd 100644
--- a/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
+++ b/server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
@@ -11,12 +11,14 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.CategoryMapper;
import com.doumee.dao.business.IdentityInfoMapper;
import com.doumee.dao.business.MemberMapper;
import com.doumee.dao.business.model.IdentityInfo;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.dto.AuditDTO;
import com.doumee.dao.system.model.SystemUser;
+import com.doumee.service.business.AliSmsService;
import com.doumee.service.business.IdentityInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -51,7 +53,11 @@
@Autowired
private MemberMapper memberMapper;
@Autowired
+ private AliSmsService aliSmsService;
+ @Autowired
private SystemDictDataBiz systemDictDataBiz;
+ @Autowired
+ private CategoryMapper categoryMapper;
@Override
@Transactional(rollbackFor = {BusinessException.class,Exception.class})
@@ -73,9 +79,18 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- if(Objects.nonNull(identityInfo.getId())){
- this.updateById(identityInfo);
- }else{
+ IdentityInfo model = identityInfoMapper.selectOne(new QueryWrapper<IdentityInfo>().lambda()
+ .eq(IdentityInfo::getMemberId,identityInfo.getMemberId())
+ .eq(IdentityInfo::getType,identityInfo.getType())
+ .last("limit 1")
+ );
+ if(Objects.nonNull(model)){
+ identityInfo.setId(model.getId());
+ this.updateById(identityInfo);
+ return identityInfo.getId();
+ }
+
+
//鏌ヨ鐢ㄦ埛鏄惁宸插瓨鍦ㄥ綋鍓嶈韩浠�
if(identityInfoMapper.selectCount(new QueryWrapper<IdentityInfo>().lambda()
.eq(IdentityInfo::getDeleted,Constants.ZERO)
@@ -94,7 +109,6 @@
.set(Constants.equalsInteger(identityInfo.getType(),Constants.ONE),Member::getDriverIdentity,Constants.ONE)
.set(Constants.equalsInteger(identityInfo.getType(),Constants.TWO),Member::getChefIdentity,Constants.ONE)
.eq(Member::getId,identityInfo.getMemberId()));
- }
return identityInfo.getId();
}
@@ -459,22 +473,22 @@
memberMapper.update(new UpdateWrapper<Member>().lambda()
.set(Member::getUpdateUser,user.getId())
.set(Member::getUpdateTime,date)
+ .set(Constants.equalsInteger(auditDTO.getAuditStatus(),Constants.ZERO),Member::getAutoReceiveStatus,Constants.ONE)
.set(Constants.equalsInteger(identityInfo.getType(),Constants.ZERO),Member::getWorkerIdentity, auditDTO.getAuditStatus() )
.set(Constants.equalsInteger(identityInfo.getType(),Constants.ONE),Member::getDriverIdentity , auditDTO.getAuditStatus() )
.set(Constants.equalsInteger(identityInfo.getType(),Constants.TWO),Member::getChefIdentity , auditDTO.getAuditStatus() )
.eq(Member::getId,identityInfo.getMemberId())
);
- try{
- //鍙戦�佸井淇¢�氱煡
- if(StringUtils.isNotBlank(member.getOpenid())){
- sendWxMessage.identityInfoMessage(member.getOpenid(),identityInfo);
- }
- }catch (WxErrorException wxErrorException){
-
+ //鍙戦�佸井淇¢�氱煡
+ if(StringUtils.isNotBlank(member.getOpenid())){
+ sendWxMessage.identityInfoMessage(member.getOpenid(),identityInfo);
}
-
+ //鐭俊閫氱煡
+ aliSmsService.businessSendSms(Constants.smsContent.authentication.getKey(),
+ member.getTelephone(),null,null,
+ identityInfo,categoryMapper);
}
}
--
Gitblit v1.9.3