1. fix bugs

topo_dev
xueqingkun 9 months ago
parent a3ce43c26c
commit 44987b4178

@ -6,7 +6,7 @@ import com.supervision.police.dto.DictionaryByTypeParam;
import com.supervision.police.service.ComDictionaryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -21,10 +21,10 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/comDictionary")
@Api(tags = "字典表接口")
@RequiredArgsConstructor
public class ComDictionaryController {
@Autowired
private ComDictionaryService dictionaryService;
private final ComDictionaryService dictionaryService;
@GetMapping
@ApiOperation(value = "查询字典", httpMethod = "GET")

@ -9,6 +9,7 @@ import com.supervision.police.dto.ModelCaseDTO;
import com.supervision.police.service.ModelCaseService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -19,10 +20,10 @@ import java.util.List;
@RestController
@Slf4j
@RequestMapping("/modelCase")
@RequiredArgsConstructor
public class ModelCaseController {
@Autowired
private ModelCaseService modelCaseService;
private final ModelCaseService modelCaseService;
/**
*

@ -112,6 +112,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
.set(SystemUser::getUserName, userInfoReqVo.getUserName())
.set(SystemUser::getAccount, userInfoReqVo.getAccount())
.set(SystemUser::getPhoneNum, userInfoReqVo.getPhoneNum())
.set(StrUtil.isNotEmpty(userInfoReqVo.getPassword()),SystemUser::getUserPd, UserUtil.signPassword(userInfoReqVo.getPassword()))
.set(Objects.nonNull(userInfoReqVo.getStatus()),SystemUser::getStatus, userInfoReqVo.getStatus())
.set(SystemUser::getRemark, userInfoReqVo.getRemark())
.eq(SystemUser::getId, userInfoReqVo.getId())
@ -174,17 +175,17 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
@Override
public boolean changePassWord(String account, String password) {
Assert.notEmpty(account, "账号不能为空");
UserInfoDTO user = UserUtil.getUser();
Assert.notEmpty(password, "密码不能为空");
Long count = super.lambdaQuery().eq(SystemUser::getAccount, account).count();
Long count = super.lambdaQuery().eq(SystemUser::getId, user.getId()).count();
if (count == 0){
log.info("账号:{}不存在", account);
return false;
}
return super.lambdaUpdate().set(SystemUser::getUserPd, UserUtil.signPassword(password))
.eq(SystemUser::getAccount, account).update();
.eq(SystemUser::getId, user.getId()).update();
}
}

Loading…
Cancel
Save