merge
This commit is contained in:
@@ -72,7 +72,7 @@ public class SysUserService {
|
||||
boolean send = sendEmail(sysUser, res[0]);
|
||||
// 发送邮件结束
|
||||
if (!send) {
|
||||
throw new BusinessException("发送密码邮件错误");
|
||||
throw new BusinessException("发送密码邮件失败");
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setId(id);
|
||||
@@ -222,7 +222,7 @@ public class SysUserService {
|
||||
}
|
||||
boolean send = sendEmail(old, str[0]);
|
||||
if (!send) {
|
||||
throw new BusinessException("发送密码邮件错误");
|
||||
throw new BusinessException("发送密码邮件失败");
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setMessage("重置密码成功");
|
||||
@@ -271,7 +271,6 @@ public class SysUserService {
|
||||
*/
|
||||
public RestMessage login(HttpServletRequest request, String userName, String passWord, String checkCode) {
|
||||
RestMessage restMessage = new RestMessage();
|
||||
// String imgCode = (String) CommonDataUtil.getData(CommonConstant.KEY_CAPTCHA);
|
||||
HttpSession session = request.getSession();
|
||||
String imgCode = (String) session.getAttribute(CommonConstant.KEY_CAPTCHA);
|
||||
//验证验证码
|
||||
@@ -281,11 +280,11 @@ public class SysUserService {
|
||||
//验证账号,密码
|
||||
SysUser user = getByUserName(userName);
|
||||
if (user == null) {
|
||||
throw new BusinessException("账号错误");
|
||||
throw new BusinessException("账号或密码错误");
|
||||
}
|
||||
boolean flag = checkPassWord(passWord, user.getPassword(), user.getSalt());
|
||||
if (!flag) {
|
||||
throw new BusinessException("密码错误");
|
||||
throw new BusinessException("账号或密码错误");
|
||||
}
|
||||
//保存登录信息
|
||||
SysUserLoginInOut loginInOut = new SysUserLoginInOut();
|
||||
@@ -299,11 +298,10 @@ public class SysUserService {
|
||||
throw new BusinessException("保存用户登录日志失败");
|
||||
}
|
||||
//保存登录数据
|
||||
//rsa加密后密文是多行的,所以再次url编码
|
||||
String token = EncodeUtils.urlEncode(RSAUtil.encrypt(userName + "_" + ip));
|
||||
String token = EncodeUtils.urlEncode(RSAUtil.encrypt(userName + "_" + ip));//rsa加密后密文是多行的,所以再次url编码
|
||||
CommonDataUtil.setData(token, userName);
|
||||
restMessage.setData(token);
|
||||
restMessage.setSuccess(true);
|
||||
restMessage.setData(token);
|
||||
restMessage.setMessage("登录成功");
|
||||
return restMessage;
|
||||
}
|
||||
|
||||
@@ -60,22 +60,4 @@ public class ApplicationContextConfig {
|
||||
poolTaskExecutor.setQueueCapacity(200);//队列最大长度
|
||||
return poolTaskExecutor;
|
||||
}
|
||||
|
||||
// @Bean(name = "cloudQueryRunner")
|
||||
// @Primary
|
||||
// public CloudQueryRunner getCloudQueryRunner() {
|
||||
// return getQueryRunner("y.drore.com", control_appId, control_appSecret);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private static CloudQueryRunner getQueryRunner(String cloud_host, String config_appId, String control_appSecret) {
|
||||
// CloudBasicConnection cloudBasicConnection = new CloudBasicConnection(cloud_host, 80, config_appId, control_appSecret);
|
||||
// CloudPoolingConnectionManager cloudPoolingConnectionManager = new CloudPoolingConnectionManager();
|
||||
// cloudPoolingConnectionManager.setConnection(cloudBasicConnection);
|
||||
// CloudBasicDataSource cloudBasicDataSource = new CloudBasicDataSource();
|
||||
// cloudBasicDataSource.setCloudPoolingConnectionManager(cloudPoolingConnectionManager);
|
||||
// CloudQueryRunner cloudQueryRunner = new CloudQueryRunner();
|
||||
// cloudQueryRunner.setDataSource(cloudBasicDataSource);
|
||||
// return cloudQueryRunner;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -71,11 +71,9 @@ public class DataDictionaryControl {
|
||||
@ApiImplicitParam(name = "id", value = "主键", paramType = "query", dataType = "string")
|
||||
@PostMapping("uniqueCode")
|
||||
public JSONObject uniqueCode(@RequestParam String code, String id) {
|
||||
boolean b = dataDictionaryService.uniqueCode(code, id);
|
||||
RestMessage result = new RestMessage();
|
||||
if (b) {
|
||||
result.setSuccess(true);
|
||||
}
|
||||
boolean b = dataDictionaryService.uniqueCode(code, id);
|
||||
result.setSuccess(b);
|
||||
return JsonResult.toJSONObj(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.xwbing.controller.sys;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.xwbing.annotation.LogInfo;
|
||||
import com.xwbing.domain.entity.sys.SysConfig;
|
||||
import com.xwbing.domain.entity.vo.ListSysConfigVo;
|
||||
import com.xwbing.domain.entity.vo.RestMessageVo;
|
||||
@@ -34,7 +33,6 @@ public class SysConfigControl {
|
||||
@Resource
|
||||
private SysConfigService sysConfigService;
|
||||
|
||||
@LogInfo("新增系统配置信息")
|
||||
@ApiOperation(value = "新增", notes = "新增系统配置信息", response = RestMessageVo.class)
|
||||
@PostMapping("save")
|
||||
public JSONObject save(@RequestBody @Valid SysConfig sysConfig) {
|
||||
@@ -44,11 +42,10 @@ public class SysConfigControl {
|
||||
return JsonResult.toJSONObj(result);
|
||||
}
|
||||
|
||||
@LogInfo("根据code删除系统配置信息")
|
||||
@ApiOperation(value = "删除", notes = "根据code删除系统配置信息", response = RestMessageVo.class)
|
||||
@GetMapping("removeByCode")
|
||||
public JSONObject removeByCode(@RequestParam String code) {
|
||||
String logMsg = "删除系统配置信息";
|
||||
String logMsg = "根据code删除系统配置信息";
|
||||
logger.info(logMsg + " code:{}", code);
|
||||
if (StringUtils.isEmpty(code)) {
|
||||
return JsonResult.toJSONObj("code不能为空");
|
||||
@@ -57,7 +54,6 @@ public class SysConfigControl {
|
||||
return JsonResult.toJSONObj(result);
|
||||
}
|
||||
|
||||
@LogInfo("修改系统配置信息")
|
||||
@ApiOperation(value = "修改", notes = "修改系统配置信息", response = RestMessageVo.class)
|
||||
@PostMapping("update")
|
||||
public JSONObject update(@RequestBody @Valid SysConfig sysConfig) {
|
||||
@@ -70,7 +66,6 @@ public class SysConfigControl {
|
||||
return JsonResult.toJSONObj(result);
|
||||
}
|
||||
|
||||
@LogInfo("根据key查找系统配置信息")
|
||||
@ApiOperation(value = "查找", notes = "根据key查找系统配置信息", response = SysConfigVo.class)
|
||||
@GetMapping("getByCode")
|
||||
public JSONObject getByCode(@RequestParam String code) {
|
||||
@@ -86,7 +81,6 @@ public class SysConfigControl {
|
||||
return JsonResult.toJSONObj(one, "");
|
||||
}
|
||||
|
||||
@LogInfo("根据是否启用查找配置列表")
|
||||
@ApiOperation(value = "查找列表", notes = "根据是否启用查找配置列表", response = ListSysConfigVo.class)
|
||||
@GetMapping("listByEnable")
|
||||
public JSONObject listByEnable(@RequestParam String enable) {
|
||||
|
||||
Reference in New Issue
Block a user