修改校验

This commit is contained in:
haozq 2025-01-21 17:03:55 +08:00
parent 55985133af
commit 4826ae00c7
2 changed files with 7 additions and 8 deletions

View File

@ -13,10 +13,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -160,8 +157,7 @@ public class CarSupServiceImpl implements CarSupService{
if(StringHelper.isEmpty(data.getUserId())){
return ServerResponse.createErroe("至少选择一个用户进行绑定");
}
String user= UserUtil.getLoginUser().getUserId()+"";
String user= Objects.requireNonNull(UserUtil.getLoginUser()).getUserId()+"";
data.setCreator(user);
data.setUpdater(user);
String supId=data.getSupId();

View File

@ -63,9 +63,12 @@
select count(1)
from car_ma_type
where name=#{name} and level=#{level}
<if test="id!=null and id!=''">
<if test="parentId!=null and parentId!=''">
and parent_id=#{parentId}
</if>
<if test="id!=null and id!=''">
and id!=#{id}
</if>
</if>
</select>
<select id="getCarTypeById" resultType="com.bonus.gzcar.business.backstage.entity.CarTypeVo">
select if(cmt.id=1,0, cmt.id) id ,cmt.parent_id parentId,cmt.`name` title,cmt.is_active isActive,