Commit 8404761b by duanhq

角色列表获取bug,修改密码发送短信提示 by duanht 2019/3/9

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18374 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent c7853b68
......@@ -19,8 +19,7 @@ public enum ResultCodeEnum {
TRY_AGAIN(102, "失败,请重试"),
NO_ACCESS_RIGHT(401, "没有访问权限"),
SMS_VERIFY_CODE_TIMEOUT(2005, "短信验证码已过期"),
SMS_VERIFY_CODE_NOT_RIGHT(2006, "短信验证码错误"),
SMS_VERIFY_CODE_NOT_RIGHT(2006, "短信验证码错误或已过期"),
;
/**
......
......@@ -126,9 +126,6 @@ public class CommonController {
public ResultObject checkVerifyCode(@RequestParam("phone")String phone, @RequestParam("verifyCode")String verifyCode) throws IOException {
String smsKey = Constants.SMS_VERIFY_CODE_PREFIX + ":" + phone;
String realVerifyCode = (String) redisCacheUtil.getCacheObject(smsKey);
if (org.springframework.util.StringUtils.isEmpty(realVerifyCode)) {
return new ResultObject(ResultCodeEnum.SMS_VERIFY_CODE_TIMEOUT.getCode(), ResultCodeEnum.SMS_VERIFY_CODE_TIMEOUT.getMsg());
}
if (!verifyCode.equals(realVerifyCode)) {
return new ResultObject(ResultCodeEnum.SMS_VERIFY_CODE_NOT_RIGHT.getCode(), ResultCodeEnum.SMS_VERIFY_CODE_NOT_RIGHT.getMsg());
}
......
......@@ -59,9 +59,6 @@ public class SysRoleController extends BaseController {
public ResultObject getRoleList(Page page, RoleQueryVo roleQueryVo) {
Map<String, Object> result = new HashMap<String, Object>(16);
PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true);
if (roleQueryVo.getId() == null) {
roleQueryVo.setId(ShiroUtil.getUserId());
}
List<SysRole> list = sysRoleService.getRoleList(roleQueryVo);
com.github.pagehelper.Page<SysRole> pages = (com.github.pagehelper.Page<SysRole>) list;
page.setTotalCount((int) pages.getTotal());
......
......@@ -43,7 +43,7 @@ public class SysRoleServiceImpl implements SysRoleService {
SysRoleExample sysRoleExample = new SysRoleExample();
SysRoleExample.Criteria criteria = sysRoleExample.createCriteria();
if (roleQueryVo.getId() != 0) {
if (roleQueryVo.getId() != null) {
criteria.andIdEqualTo(roleQueryVo.getId());
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!