|
|
@ -1,19 +1,19 @@
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller;
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysUserInfoService;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysUserService;
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISystemResourceService;
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISystemResourceService;
|
|
|
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
|
|
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SessionUser;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleLanguage;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleResource;
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
|
|
@ -220,4 +220,80 @@ public class DemoResourceController extends CoreBaseController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ISysUserService userService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ISysUserInfoService userInfoServicer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value="/dup-id1")
|
|
|
|
|
|
|
|
@ApiOperation(value="测试重复ID1",notes="测试重复ID1")
|
|
|
|
|
|
|
|
public ResultBean testDuplicatedIdOne(long key) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
LOGGER.info("获取:{}",key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysUser user = userService.getSysUserById(key);
|
|
|
|
|
|
|
|
System.out.println("1==="+user.toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("保存成功");
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value="/dup-id2")
|
|
|
|
|
|
|
|
@ApiOperation(value="测试重复ID2",notes="测试重复ID2")
|
|
|
|
|
|
|
|
public ResultBean testDuplicatedIdTwo(long key) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
LOGGER.info("获取:{}",key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysUserInfo userInfo = userInfoServicer.getSysUserInfoById(key);
|
|
|
|
|
|
|
|
System.out.println("2==="+userInfo.toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("保存成功");
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value="/dup-id")
|
|
|
|
|
|
|
|
@ApiOperation(value="测试重复ID",notes="测试重复ID")
|
|
|
|
|
|
|
|
public ResultBean testDuplicatedId(long key) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
LOGGER.info("获取:{}",key);
|
|
|
|
|
|
|
|
// SysUser u1 = new SysUser();
|
|
|
|
|
|
|
|
// u1.setId(key);
|
|
|
|
|
|
|
|
// SysUserInfo u2 = new SysUserInfo();
|
|
|
|
|
|
|
|
// u2.setId(key);
|
|
|
|
|
|
|
|
// System.out.println(u1.equals(u2));
|
|
|
|
|
|
|
|
// System.out.println("1====" + u1.hashCode());
|
|
|
|
|
|
|
|
// System.out.println("2====" + u2.hashCode());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysUser user = userService.getSysUserById(key);
|
|
|
|
|
|
|
|
// System.out.println("1==="+user);
|
|
|
|
|
|
|
|
SysUserInfo userInfo = userInfoServicer.getSysUserInfoById(key);
|
|
|
|
|
|
|
|
// System.out.println("2==="+userInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("保存成功");
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|