he2802 преди 1 година
родител
ревизия
1d252dcca8
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

+ 4 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -149,11 +149,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
 
     @Override
     public String querCommitment(UserProfileQueryBo bo) {
-        if(Validator.isNotEmpty(bo.getOrderGoodsId())){
-            throw new CustomException("OrderGoodsId缺失");
+        if(Validator.isNotEmpty(bo.getUserId())||Validator.isNotEmpty(bo.getGoodsId())){
+            throw new CustomException("参数缺失");
         }
         UserProfile profile = getOne(new LambdaQueryWrapper<UserProfile>()
-                .eq(UserProfile::getOrderGoodsId, bo.getOrderGoodsId())
+                .eq(UserProfile::getUserId, bo.getUserId())
+                .eq(UserProfile::getGoodsId, bo.getGoodsId())
                 .eq(UserProfile::getTypeStatus, 1)
                 .eq(UserProfile::getCurrentStatus, 1)
                 .in(UserProfile::getStatus, new ArrayList<Integer>(Arrays.asList(1,2)))