From c68921be580479fc84b964a4ba58214c6bf5bc21 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 25 Nov 2021 15:16:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cweb/controller/HighUserController.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java index 821d39c5..efb82c4f 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java @@ -5,6 +5,7 @@ import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.*; +import com.hai.common.utils.RedisUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighOrder; import com.hai.entity.HighUser; @@ -57,6 +58,9 @@ public class HighUserController { @Resource private HighUserPayPasswordService highUserPayPasswordService; + @Resource + private RedisUtil redisUtil; + @RequestMapping(value = "/findUser", method = RequestMethod.GET) @ResponseBody @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); + } + } + } From 8e56d19c068fc94350d6c2c100d90682ca0e30b7 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Thu, 25 Nov 2021 22:54:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hai-bweb/src/main/resources/pre/application.yml | 2 +- hai-cweb/src/main/resources/pre/application.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hai-bweb/src/main/resources/pre/application.yml b/hai-bweb/src/main/resources/pre/application.yml index f945f8c0..4c2e5f66 100644 --- a/hai-bweb/src/main/resources/pre/application.yml +++ b/hai-bweb/src/main/resources/pre/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: 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 password: HF123456. type: com.alibaba.druid.pool.DruidDataSource diff --git a/hai-cweb/src/main/resources/pre/application.yml b/hai-cweb/src/main/resources/pre/application.yml index f425a243..1012ea5c 100644 --- a/hai-cweb/src/main/resources/pre/application.yml +++ b/hai-cweb/src/main/resources/pre/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: 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 password: HF123456. type: com.alibaba.druid.pool.DruidDataSource From 10bcf42ebd96cc032e2ae38aae7f303aceaee418 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 26 Nov 2021 23:49:55 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cweb/controller/OutRechargeOrderController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java index a97226a0..a9d50c1c 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java @@ -130,12 +130,13 @@ public class OutRechargeOrderController { } HighUserCard highUserCard = highUserCardService.getUserHtlCardNo(userInfoModel.getHighUser().getId()); - + if (highUserCard != null) { + outRechargeOrder.setIdCard(highUserCard.getCardNo()); + } outRechargeOrder.setRemarks(remarks); outRechargeOrder.setRechargeName(remarks); outRechargeOrder.setOrderNo("CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5)); outRechargeOrder.setUserId(userInfoModel.getHighUser().getId()); - outRechargeOrder.setIdCard(highUserCard.getCardNo()); outRechargeOrder.setUserName(userInfoModel.getHighUser().getName()); outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone());