修改代码

袁野 2 years ago
parent f6896767fe
commit 19351d49bb
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 23
      hai-cweb/src/main/java/com/cweb/controller/HighUserController.java
  3. 2
      hai-cweb/src/main/java/com/cweb/controller/SendSmsController.java
  4. 2
      hai-schedule/src/main/java/com/hai/schedule/ApiThirdProductSchedule.java
  5. 2
      hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java
  6. 3
      hai-service/src/main/java/com/hai/config/MessageConfig.java

File diff suppressed because one or more lines are too long

@ -171,8 +171,7 @@ public class HighUserController {
// 用户 // 用户
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
if (StringUtils.isBlank(body.getString("password")) if ( StringUtils.isBlank(body.getString("newPassword")) || StringUtils.isBlank(body.getString("code"))) {
|| StringUtils.isBlank(body.getString("newPassword"))) {
log.error("HighUserController --> setUserPayPwd() error!", ""); log.error("HighUserController --> setUserPayPwd() error!", "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }
@ -183,16 +182,20 @@ public class HighUserController {
log.error("HighUserController --> setUserPayPwd() error!", "修改失败,未设置支付密码"); log.error("HighUserController --> setUserPayPwd() error!", "修改失败,未设置支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, "");
} }
if (!AESEncodeUtil.aesEncrypt(body.getString("password")).equals(userPayPassword.getPassword())) {
log.error("HighUserController --> setUserPayPwd() error!", "修改失败,旧密码不一致"); VerifyCode verifyCode = VerifyCodeStorage.getDate(userInfoModel.getHighUser().getPhone());
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "修改失败,旧密码不一致"); if (verifyCode != null && verifyCode.getObject().equals(body.getString("code"))) {
// 清除记录,验证码只能验证一次
VerifyCodeStorage.remove(userInfoModel.getHighUser().getPhone());
userPayPassword.setPassword(AESEncodeUtil.aesEncrypt(body.getString("newPassword")));
highUserPayPasswordService.editUserPayPwd(userPayPassword);
return ResponseMsgUtil.success("操作成功");
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "操作失败");
} }
userPayPassword.setPassword(AESEncodeUtil.aesEncrypt(body.getString("newPassword")));
highUserPayPasswordService.editUserPayPwd(userPayPassword);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) { } catch (Exception e) {
log.error("HighUserController --> updateUserPayPwd() error!", e); log.error("HighUserController --> updateUserPayPwd() error!", e);
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);

@ -51,6 +51,8 @@ public class SendSmsController {
break; break;
case 5 : case 5 :
smsMsgId = MessageConfig.HWMSG_ID5; smsMsgId = MessageConfig.HWMSG_ID5;
case 6 :
smsMsgId = MessageConfig.HWMSG_ID6;
break; break;
default : default :
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂无当前模版"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂无当前模版");

@ -72,7 +72,7 @@ public class ApiThirdProductSchedule {
} }
} }
@Scheduled(cron = "0 0 1 * * ?") // 获取星巴克产品 每日凌晨1点执行一次 @Scheduled(cron = "0 0 1 * * ?") // 获取肯德基门店 每日凌晨1点执行一次
public void getKfcStore() throws Exception { public void getKfcStore() throws Exception {
JSONObject jsonObject = QianZhuConfig.getKfcStore(); JSONObject jsonObject = QianZhuConfig.getKfcStore();

@ -293,7 +293,7 @@ public class HuiLianTongUnionCardConfig {
* @return com.alibaba.fastjson.JSONObject * @return com.alibaba.fastjson.JSONObject
*/ */
public static JSONObject syncPayOrder(Map<String, Object> map) throws Exception { public static JSONObject syncPayOrder(Map<String, Object> map) throws Exception {
return request("fuelCouponsTest/syncPayOrder", map); return request("fuelCoupons/syncPayOrder", map);
} }

@ -44,6 +44,9 @@ public class MessageConfig {
// 嗨森逛账号登录 // 嗨森逛账号登录
public final static String HWMSG_ID5 = "SMS_22050700002"; public final static String HWMSG_ID5 = "SMS_22050700002";
// 嗨森逛账号登录支付密码修改
public final static String HWMSG_ID6 = "SMS_22072500001";
private static final String[] HEX_DIGITS = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"}; private static final String[] HEX_DIGITS = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
private static Logger log = LoggerFactory.getLogger(MessageConfig.class); private static Logger log = LoggerFactory.getLogger(MessageConfig.class);

Loading…
Cancel
Save