he2802 1 год назад
Родитель
Сommit
491c9e8028

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/UserProfileQueryBo.java

@@ -127,4 +127,7 @@ public class UserProfileQueryBo extends BaseEntity implements Serializable {
 
 
 	@ApiModelProperty("公司名称")
 	@ApiModelProperty("公司名称")
 	private String companyName;
 	private String companyName;
+
+	@ApiModelProperty("身份证")
+	private String idCard;
 }
 }

+ 6 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fasterxml.jackson.databind.exc.InvalidFormatException;
 import com.fasterxml.jackson.databind.exc.InvalidFormatException;
 import com.openhtmltopdf.swing.Java2DRenderer;
 import com.openhtmltopdf.swing.Java2DRenderer;
 import com.openhtmltopdf.util.FSImageWriter;
 import com.openhtmltopdf.util.FSImageWriter;
@@ -148,9 +149,13 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
 
 
     @Override
     @Override
     public String querCommitment(UserProfileQueryBo bo) {
     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("参数缺失");
             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>()
         UserProfile profile = getOne(new LambdaQueryWrapper<UserProfile>()
                 .eq(UserProfile::getUserId, bo.getUserId())
                 .eq(UserProfile::getUserId, bo.getUserId())
                 .eq(UserProfile::getGoodsId, bo.getGoodsId())
                 .eq(UserProfile::getGoodsId, bo.getGoodsId())