| | |
| | | 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; |
| | |
| | | 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){ |