|
|
@@ -149,11 +149,15 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
|
|
|
@Override
|
|
|
public String querCommitment(UserProfileQueryBo bo) {
|
|
|
- if(Validator.isEmpty(bo.getUserId())||Validator.isEmpty(bo.getGoodsId())){
|
|
|
+ if(Validator.isEmpty(bo.getIdCard())||Validator.isEmpty(bo.getGoodsId())){
|
|
|
throw new CustomException("参数缺失");
|
|
|
}
|
|
|
+ User user = iUserService.getOne(new LambdaQueryWrapper<User>().eq(User::getIdCard, EncryptHandler.encrypt(bo.getIdCard())).last("limit 1"));
|
|
|
+ if (ObjectUtils.isNull(user)){
|
|
|
+ throw new CustomException("用户信息获取有误!");
|
|
|
+ }
|
|
|
UserProfile profile = getOne(new LambdaQueryWrapper<UserProfile>()
|
|
|
- .eq(UserProfile::getUserId, bo.getUserId())
|
|
|
+ .eq(UserProfile::getUserId, user.getUserId())
|
|
|
.eq(UserProfile::getGoodsId, bo.getGoodsId())
|
|
|
.eq(UserProfile::getTypeStatus, 1)
|
|
|
.eq(UserProfile::getCurrentStatus, 1)
|