Merge branch 'pre' into dev

dev-discount
胡锐 3 years ago
commit 747b27ad62
  1. 2
      hai-bweb/src/main/resources/pre/application.yml
  2. 39
      hai-cweb/src/main/java/com/cweb/controller/HighUserController.java
  3. 7
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  4. 2
      hai-cweb/src/main/resources/pre/application.yml

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: datasource:
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -5,6 +5,7 @@ import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.security.*; import com.hai.common.security.*;
import com.hai.common.utils.RedisUtil;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighOrder; import com.hai.entity.HighOrder;
import com.hai.entity.HighUser; import com.hai.entity.HighUser;
@ -57,6 +58,9 @@ public class HighUserController {
@Resource @Resource
private HighUserPayPasswordService highUserPayPasswordService; private HighUserPayPasswordService highUserPayPasswordService;
@Resource
private RedisUtil redisUtil;
@RequestMapping(value = "/findUser", method = RequestMethod.GET) @RequestMapping(value = "/findUser", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "根据id查询详情") @ApiOperation(value = "根据id查询详情")
@ -201,5 +205,40 @@ public class HighUserController {
} }
} }
@RequestMapping(value="/setUserParam",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "设置用户参数")
public ResponseData setUserParam(@RequestParam(name = "param", required = true) String param,HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
redisUtil.hset("USER_PARAM", userInfoModel.getHighUser().getPhone(), param, 60*60*60);
return ResponseMsgUtil.success(redisUtil.hget("USER_PARAM", userInfoModel.getHighUser().getPhone()));
} catch (Exception e) {
log.error("CommonController --> getDictionaryByCodeTypeAndValue() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getUserParam",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取设置用户参数")
public ResponseData getUserParam(HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
return ResponseMsgUtil.success(redisUtil.hget("USER_PARAM", userInfoModel.getHighUser().getPhone()));
} catch (Exception e) {
log.error("CommonController --> getDictionaryByCodeTypeAndValue() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -130,14 +130,13 @@ public class OutRechargeOrderController {
} }
HighUserCard highUserCard = highUserCardService.getUserHtlCardNo(userInfoModel.getHighUser().getId()); HighUserCard highUserCard = highUserCardService.getUserHtlCardNo(userInfoModel.getHighUser().getId());
if (highUserCard != null) {
outRechargeOrder.setIdCard(highUserCard.getCardNo());
}
outRechargeOrder.setRemarks(remarks); outRechargeOrder.setRemarks(remarks);
outRechargeOrder.setRechargeName(remarks); outRechargeOrder.setRechargeName(remarks);
outRechargeOrder.setOrderNo("CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5)); outRechargeOrder.setOrderNo("CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5));
outRechargeOrder.setUserId(userInfoModel.getHighUser().getId()); outRechargeOrder.setUserId(userInfoModel.getHighUser().getId());
if (highUserCard != null) {
outRechargeOrder.setIdCard(highUserCard.getCardNo());
}
outRechargeOrder.setUserName(userInfoModel.getHighUser().getName()); outRechargeOrder.setUserName(userInfoModel.getHighUser().getName());
outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone()); outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone());

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: datasource:
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

Loading…
Cancel
Save