liude 1 год назад
Родитель
Сommit
e3d4e1bd38

+ 0 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/entity/Category.java

@@ -38,7 +38,6 @@ public class Category extends ModifyEntity<Long> {
     /**
     /**
      * 分类名称
      * 分类名称
      */
      */
-    @Unique(message = "分类名称已存在")
     private String name;
     private String name;
 
 
     /**
     /**

+ 4 - 0
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantAuthServiceImpl.java

@@ -4,6 +4,7 @@ import java.util.Date;
 
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.chelvc.cloud.uc.api.service.UserService;
 import com.chelvc.cloud.vehicle.api.dto.MerchantAuthDTO;
 import com.chelvc.cloud.vehicle.api.dto.MerchantAuthDTO;
 import com.chelvc.cloud.vehicle.api.param.MerchantAuthModifyParam;
 import com.chelvc.cloud.vehicle.api.param.MerchantAuthModifyParam;
 import com.chelvc.cloud.vehicle.api.param.MerchantAuthPagingParam;
 import com.chelvc.cloud.vehicle.api.param.MerchantAuthPagingParam;
@@ -33,6 +34,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, MerchantAuth> implements MerchantAuthService,
 public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, MerchantAuth> implements MerchantAuthService,
         com.chelvc.cloud.vehicle.api.service.MerchantAuthService {
         com.chelvc.cloud.vehicle.api.service.MerchantAuthService {
     private final MerchantService merchantService;
     private final MerchantService merchantService;
+
+    private final UserService userService;
     @Override
     @Override
     public Long addMerchantAuth(@NonNull MerchantAuthModifyParam param) {
     public Long addMerchantAuth(@NonNull MerchantAuthModifyParam param) {
         Long userId = SessionContextHolder.getId();
         Long userId = SessionContextHolder.getId();
@@ -82,5 +85,6 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
         merchantAuth.setReviewer(userId.toString());
         merchantAuth.setReviewer(userId.toString());
         merchantAuth.setMessage(message);
         merchantAuth.setMessage(message);
         this.updateById(merchantAuth);
         this.updateById(merchantAuth);
+        this.userService.updateUserRole(merchantAuth.getApplicant());
     }
     }
 }
 }

+ 2 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/ProfitRatioConfigServiceImpl.java

@@ -54,7 +54,8 @@ public class ProfitRatioConfigServiceImpl extends ServiceImpl<ProfitRatioConfigM
         profitRatioConfig.setStatus(params.getStatus());
         profitRatioConfig.setStatus(params.getStatus());
         profitRatioConfig.setUpdateTime(new Date());
         profitRatioConfig.setUpdateTime(new Date());
         profitRatioConfig.setUpdater(params.getUserId());
         profitRatioConfig.setUpdater(params.getUserId());
-        baseMapper.update(profitRatioConfig, null);
+//        baseMapper.update(profitRatioConfig, null);
+        this.updateById(profitRatioConfig);
     }
     }
 
 
     @Override
     @Override