jiaosong
2023-10-13 e40a072541e1b31add7ed345e47adf61c49ecf4f
server/services/src/main/java/com/doumee/service/business/impl/BaseParamServiceImpl.java
@@ -14,6 +14,7 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -38,11 +39,16 @@
    public String create(BaseParam baseParam) {
        LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if (Objects.isNull(baseParam.getType()) || StringUtils.isEmpty(baseParam.getName())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"参数错误");
        }
        QueryWrapper<BaseParam> wrapper = new QueryWrapper<>();
        wrapper.lambda()
                .eq(BaseParam::getType,baseParam.getType())
                .eq(BaseParam::getIsdeleted,Constants.ZERO)
                .eq(BaseParam::getType,baseParam.getName());
                .eq(BaseParam::getName,baseParam.getName());
        Integer count = baseParamMapper.selectCount(wrapper);
        if (count > 0){