diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighActivityInfoController.java b/hai-bweb/src/main/java/com/bweb/controller/HighActivityInfoController.java index 497f0a7d..d4145b1c 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighActivityInfoController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighActivityInfoController.java @@ -208,8 +208,15 @@ public class HighActivityInfoController { @RequestParam(value = "pageSize", required = true) Integer pageSize) { { try { + //发布人员 + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + if (userInfoModel.getBsCompany() == null) { + log.error("HighActivityInfoController -> editActivityInfo() error!","该主角色没有权限"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); + } Map map = new HashMap<>(); + map.put("companyId", userInfoModel.getBsCompany().getId()); map.put("title", title); map.put("type", type); map.put("status", status); diff --git a/hai-bweb/src/main/resources/dev/application.yml b/hai-bweb/src/main/resources/dev/application.yml index 0d938fe0..43daefd7 100644 --- a/hai-bweb/src/main/resources/dev/application.yml +++ b/hai-bweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 36000000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -54,7 +54,7 @@ spring: # default: # topic: topic rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -78,7 +78,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/hai-bweb/src/main/resources/pre/application.yml b/hai-bweb/src/main/resources/pre/application.yml index 4be7791f..4c006c06 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://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 1 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 diff --git a/hai-bweb/src/main/resources/prod/logback.xml b/hai-bweb/src/main/resources/prod/logback.xml index 4526f38b..09b50572 100644 --- a/hai-bweb/src/main/resources/prod/logback.xml +++ b/hai-bweb/src/main/resources/prod/logback.xml @@ -109,6 +109,23 @@ + + log/chongQingCNPC.log + + log/ChongQingCNPC/ChongQingCNPC.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + @@ -134,4 +151,7 @@ + + + diff --git a/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java b/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java index 01a1ca7b..a13efa27 100644 --- a/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -128,6 +128,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/notify/*") .excludePathPatterns("/highOrder/getOrderByOrderNo") .excludePathPatterns("/coupon/getUserCouponByOrderNo") + .excludePathPatterns("/activity/getActivityByCoupon") .excludePathPatterns("/unionPay/*") .excludePathPatterns("/highGas/*") .excludePathPatterns("/common/*") diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java b/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java index 00dacaa0..eeb02db6 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java @@ -1,5 +1,6 @@ package com.cweb.controller; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.github.pagehelper.PageHelper; @@ -220,17 +221,12 @@ public class HighCouponController { @ApiOperation(value = "根据订单号 查询用户卡券") public ResponseData getUserCouponByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo, HttpServletRequest request) { try { - // 用户 - SessionObject sessionObject = userCenter.getSessionObject(request); - HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); - HighOrder order = orderService.getOrderByOrderNo(orderNo); if (order == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到订单"); } - // 查询最新一张可用的卡券 - HighUserCoupon newCoupon = highUserCouponService.getUserCouponByOrder(userInfoModel.getHighUser().getId(), order.getId()); + HighUserCoupon newCoupon = highUserCouponService.getUserCouponByOrder(order.getMemId(), order.getId()); if (newCoupon != null) { Map map = new HashMap<>(); diff --git a/hai-cweb/src/main/resources/dev/application.yml b/hai-cweb/src/main/resources/dev/application.yml index fcf33ab6..afd8f20a 100644 --- a/hai-cweb/src/main/resources/dev/application.yml +++ b/hai-cweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -59,7 +59,7 @@ spring: serialization: write-dates-as-timestamps: true rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -84,7 +84,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/hai-cweb/src/main/resources/pre/application.yml b/hai-cweb/src/main/resources/pre/application.yml index b33ccd34..0558f94d 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://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 1 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 diff --git a/hai-cweb/src/main/resources/prod-9401/logback.xml b/hai-cweb/src/main/resources/prod-9401/logback.xml index 516350df..cf80426f 100644 --- a/hai-cweb/src/main/resources/prod-9401/logback.xml +++ b/hai-cweb/src/main/resources/prod-9401/logback.xml @@ -57,6 +57,24 @@ UTF-8 + + + log/chongQingCNPC.log + + log/ChongQingCNPC/ChongQingCNPC.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + @@ -69,4 +87,7 @@ + + + diff --git a/hai-cweb/src/main/resources/prod/logback.xml b/hai-cweb/src/main/resources/prod/logback.xml index 516350df..cf80426f 100644 --- a/hai-cweb/src/main/resources/prod/logback.xml +++ b/hai-cweb/src/main/resources/prod/logback.xml @@ -57,6 +57,24 @@ UTF-8 + + + log/chongQingCNPC.log + + log/ChongQingCNPC/ChongQingCNPC.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + @@ -69,4 +87,7 @@ + + + diff --git a/hai-msg/src/main/resources/dev/application.yml b/hai-msg/src/main/resources/dev/application.yml index b0380cc4..704efb23 100644 --- a/hai-msg/src/main/resources/dev/application.yml +++ b/hai-msg/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 36000000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -54,7 +54,7 @@ spring: # default: # topic: topic rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -78,7 +78,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/hai-msg/src/main/resources/pre/application.yml b/hai-msg/src/main/resources/pre/application.yml index f77d597c..04fdad86 100644 --- a/hai-msg/src/main/resources/pre/application.yml +++ b/hai-msg/src/main/resources/pre/application.yml @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 1 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 diff --git a/hai-order/src/main/resources/dev/application.yml b/hai-order/src/main/resources/dev/application.yml index 461f5aa3..381a73cc 100644 --- a/hai-order/src/main/resources/dev/application.yml +++ b/hai-order/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: true #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -60,7 +60,7 @@ spring: write-dates-as-timestamps: true rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -81,7 +81,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/hai-order/src/main/resources/prod/logback.xml b/hai-order/src/main/resources/prod/logback.xml index f9435509..550c4194 100644 --- a/hai-order/src/main/resources/prod/logback.xml +++ b/hai-order/src/main/resources/prod/logback.xml @@ -143,6 +143,22 @@ + + log/chongQingCNPC.log + + log/ChongQingCNPC/ChongQingCNPC.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + @@ -175,4 +191,8 @@ + + + + diff --git a/hai-schedule/src/main/resources/dev/application.yml b/hai-schedule/src/main/resources/dev/application.yml index 6b9870f5..5e7e3f8f 100644 --- a/hai-schedule/src/main/resources/dev/application.yml +++ b/hai-schedule/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -59,7 +59,7 @@ spring: serialization: write-dates-as-timestamps: true rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -84,7 +84,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/hai-schedule/src/main/resources/pre/application.yml b/hai-schedule/src/main/resources/pre/application.yml index 557b43cf..3d54dc6f 100644 --- a/hai-schedule/src/main/resources/pre/application.yml +++ b/hai-schedule/src/main/resources/pre/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_prod?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://139.9.154.68:3306/hsg_prod?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -30,7 +30,7 @@ spring: redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -44,7 +44,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 diff --git a/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java b/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java index 0b258e85..ea2f58cc 100644 --- a/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java +++ b/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java @@ -144,7 +144,7 @@ public class ChongQingCNPCService { public static void main(String[] args) { //System.out.println(AESTool.Decrypt("A9D356D4614F874586EAF8678C8C3E7D8CD0EEF031ADA44DDAA3B342CE4BBE44F115AABE27324A6A1F049619139A1A889FCA0FB48EB6E1EA4B1B50F041961B2D686FE8B9696C02DF95BA99B342747D67ECC7847646C87993CF924F33C1308829","n2j30jxhl3rhuoci")); - System.out.println(AESTool.Decrypt("FD65F7651FF24F67FCCC2690F03650ABEEEFA7681C9C98A45BF82C7E17776A728B68E6E6C87A4C9F444A6D64CCB025604AC6E8CD4ACB2D2EF266857191370B205FFBAA95958C4801050E3B4AE2057220","n2j30jxhl3rhuoci")); + System.out.println(AESTool.Decrypt("0E14C37B5657B48857A7D3AEFB8E24BACCA40AFF00B073FC22B4116FC97BAED3CBF38FDC5196FDF595637701FDEC1CDDA0AE518707D91B16DA65A63848AF6DB117D2F6E31A09074EB0E42422C6B3B15B96D230680D9E97E4324A384AA8E60F6E","5ojd0nkdqb1ff84t")); //System.out.println(AESTool.Decrypt("3549AD565800370205265D7518D26E5F40C90A61FDEB5DD73966126A5D25F5E9","5ojldakiz343a6yk")); } } diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java index 2ecf6789..083a869a 100644 --- a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -13,6 +13,8 @@ public class CommonSysConfig { // 嗨森逛域名 private String hsgDomainName; + // 惠支付 + private String hzfDomainName; // 加油站默认图片 private String gasDefaultOilStationImg; @@ -61,6 +63,7 @@ public class CommonSysConfig { private String huiliantongAppNo; private String huiliantongAppkey; private String huiliantongAppsecret; + private String huiliantongSinopecDistributorId; private String huiliantongDistributorId; private String huiliantongSinopecUrl; diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java index 905e2b87..a8116b57 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java @@ -57,7 +57,7 @@ public class HuiLianTongConfig { public static JSONObject getHltFuelCoupList() throws Exception { Map map = new HashMap<>(); map.put("serviceType", "01"); - map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); + map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongSinopecDistributorId() ); return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl() + "/getHltFuelCoupList", map); } @@ -76,7 +76,7 @@ public class HuiLianTongConfig { map.put("distCouCount", distCouCount); map.put("couTypeCode", couTypeCode); map.put("phone", phone); - map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); + map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongSinopecDistributorId()); log.info("============请求任务Start============="); log.info("下单购买加油券-请求参数: " + JSON.toJSONString(map)); @@ -96,7 +96,7 @@ public class HuiLianTongConfig { public static JSONObject getPayOrderByCouNo(String couNo) throws Exception { Map map = new HashMap<>(); map.put("couNo", couNo); - map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); + map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongSinopecDistributorId()); log.info("============请求任务Start============="); log.info("购买加油券充值订单-请求参数: " + JSON.toJSONString(map)); @@ -116,7 +116,7 @@ public class HuiLianTongConfig { public static JSONObject costRechargeOrder(String rechargeOrderId) throws Exception { Map map = new HashMap<>(); map.put("rechargeOrderId", rechargeOrderId); - map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); + map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongSinopecDistributorId()); log.info("============请求任务Start============="); diff --git a/hai-service/src/main/java/com/hai/config/StreamUtil.java b/hai-service/src/main/java/com/hai/config/StreamUtil.java new file mode 100644 index 00000000..f2ddeede --- /dev/null +++ b/hai-service/src/main/java/com/hai/config/StreamUtil.java @@ -0,0 +1,34 @@ +package com.hai.config; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Predicate; + +/** + * + * @ClassName: StreamUtil + * @Description:TODO(List Steam) + * @author: 胡锐 + * @date: 2019年3月25日 下午4:14:00 + * + * @Copyright: 2019 www.shinwoten.com Inc. All rights reserved. + */ +public class StreamUtil { + + /** + * + * @Title: distinctByKey + * @Description: TODO(对象 去重) + * @author: 胡锐 + * @param: @param keyExtractor + * @param: @return + * @return: Predicate + * @throws + */ + public static Predicate distinctByKey(Function keyExtractor) { + Map seen = new ConcurrentHashMap<>(); + return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; + } + +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighActivityInfoServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighActivityInfoServiceImpl.java index 4106d999..259339bb 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighActivityInfoServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighActivityInfoServiceImpl.java @@ -86,6 +86,10 @@ public class HighActivityInfoServiceImpl implements HighActivityInfoService { HighActivityInfoExample example = new HighActivityInfoExample(); HighActivityInfoExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(ActivityInfoStatus.status0.getNumber()); + if (MapUtils.getLong(param, "companyId") != null) { + criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId")); + } + if (StringUtils.isNotBlank(MapUtils.getString(param, "title"))) { criteria.andTitleLike("%"+MapUtils.getString(param, "title")+"%"); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java index bfbd7ab7..f32466ac 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java @@ -72,7 +72,6 @@ public class HighDiscountAgentRelServiceImpl implements HighDiscountAgentRelServ // 生成二维码 String qrCodeUrl = CommonSysConst.getSysConfig().getHsgDomainName() + "/hsgH5?accountId=0000011&key=&code=" + Base64Util.encode(AESEncodeUtil.aesEncrypt(JSON.toJSONString(map))); code.setExt1(qrCodeUrl); - code.setExt2("2"); // 生成二维码地址 highDiscountAgentCodeService.updateCode(code); } diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 900a6109..ec3f971c 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -1,4 +1,5 @@ hsgDomainName=https://hsgcs.dctpay.com +hzfDomainName=https://gratia-pay.dctpay.com gasDefaultOilStationImg=https://hsgcs.dctpay.com/filesystem/default/default_oil_station.jpg # ChongQingCNPC configuration parameters diff --git a/hai-service/src/main/resources/prod-9401/commonConfig.properties b/hai-service/src/main/resources/prod-9401/commonConfig.properties index 5ac4e69b..05fb505c 100644 --- a/hai-service/src/main/resources/prod-9401/commonConfig.properties +++ b/hai-service/src/main/resources/prod-9401/commonConfig.properties @@ -1,4 +1,5 @@ hsgDomainName=https://hsg.dctpay.com +hzfDomainName=https://pay.dctpay.com gasDefaultOilStationImg=https://hsg.dctpay.com/filesystem/default/default_oil_station.jpg # ChongQingCNPC configuration parameters diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties index 2904c483..d17d2e30 100644 --- a/hai-service/src/main/resources/prod/commonConfig.properties +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -1,4 +1,5 @@ hsgDomainName=https://hsg.dctpay.com +hzfDomainName=https://pay.dctpay.com gasDefaultOilStationImg=https://hsg.dctpay.com/filesystem/default/default_oil_station.jpg gasDefaultOilStationImg2=https://hsg.dctpay.com/filesystem/default/default_oil_station2.jpg @@ -49,6 +50,7 @@ huiliantongUrl=https://gzapi.deepermobile.com.cn huiliantongAppNo=guizhouhuilt huiliantongAppkey=e0ja2Ex%2BmQ2hIPF6x%2BHA%3D huiliantongAppsecret=52662415DDCE55C7BA34223BCF53877A +huiliantongSinopecDistributorId=aNId4A3X huiliantongDistributorId=1JnL8YMV huiliantongSinopecUrl=fuelCoupons diff --git a/hai-user/src/main/java/com/web/controller/DiscountController.java b/hai-user/src/main/java/com/web/controller/DiscountController.java index e5328409..497f81a2 100644 --- a/hai-user/src/main/java/com/web/controller/DiscountController.java +++ b/hai-user/src/main/java/com/web/controller/DiscountController.java @@ -7,7 +7,9 @@ import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.UserCenter; +import com.hai.common.utils.HttpsUtils; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.config.CommonSysConst; import com.hai.entity.HighDiscountUserRel; import com.hai.model.HighUserModel; import com.hai.model.ResponseData; @@ -190,4 +192,57 @@ public class DiscountController { } } + @RequestMapping(value="/queryHzfDiscountList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询【惠支付】优惠列表") + public ResponseData queryHzfDiscountList(@RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + Map param = new HashMap<>(); + param.put("phone", userInfoModel.getHighUser().getPhone()); + param.put("status", status); + param.put("pageNum", pageNum); + param.put("pageSize", pageSize); + + JSONObject response = HttpsUtils.doGet(CommonSysConst.getSysConfig().getHzfDomainName()+"/crest/storeDiscountActivityPartakeUser/getDiscountListByPhone", param); + if (!response.getString("return_code").equals("000000")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("return_msg")); + } + return ResponseMsgUtil.success(response.getJSONObject("return_data")); + + } catch (Exception e) { + log.error("HighDiscountController -> queryHzfDiscountList() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryHzfDiscountTotalNum",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询【惠支付】优惠总次数") + public ResponseData queryHzfDiscountTotalNum() { + try { + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + Map param = new HashMap<>(); + param.put("phone", userInfoModel.getHighUser().getPhone()); + + JSONObject response = HttpsUtils.doGet(CommonSysConst.getSysConfig().getHzfDomainName() + "/crest/storeDiscountActivityPartakeUser/getDiscountSurplusTotalNum", param); + if (!response.getString("return_code").equals("000000")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("return_msg")); + } + return ResponseMsgUtil.success(response.getInteger("return_data")); + + } catch (Exception e) { + log.error("HighDiscountController -> queryHzfDiscountList() error!",e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-user/src/main/resources/dev/application.yml b/hai-user/src/main/resources/dev/application.yml index d1974ca2..ba307093 100644 --- a/hai-user/src/main/resources/dev/application.yml +++ b/hai-user/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -54,7 +54,7 @@ spring: # default: # topic: topic rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -83,7 +83,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/v1/src/main/resources/dev/application.yml b/v1/src/main/resources/dev/application.yml index 2bb187e4..57d3a763 100644 --- a/v1/src/main/resources/dev/application.yml +++ b/v1/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: true #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 0 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 @@ -54,7 +54,7 @@ spring: # default: # topic: topic rocketmq: - name-server: 139.159.177.244:9876 + name-server: 139.9.154.68:9876 producer: #必须指定group group: default-group @@ -83,7 +83,7 @@ jetcache: remote: default: type: redis - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis keyConvertor: fastjson diff --git a/v1/src/main/resources/pre/application.yml b/v1/src/main/resources/pre/application.yml index ef24999b..2dc5cc1a 100644 --- a/v1/src/main/resources/pre/application.yml +++ b/v1/src/main/resources/pre/application.yml @@ -29,7 +29,7 @@ spring: maxOpenPreparedStatements: 20 redis: database: 1 - host: 139.159.177.244 + host: 139.9.154.68 port: 36379 password: HF123456.Redis timeout: 1000 @@ -42,7 +42,7 @@ spring: #MQTT配置信息 mqtt: #MQTT服务地址 - url: ws://139.159.177.244:8083/mqtt + url: ws://139.9.154.68:8083/mqtt #用户名 username: printer_provider #密码 diff --git a/v1/src/main/resources/prod/application.yml b/v1/src/main/resources/prod/application.yml index 89cbbe97..345b8978 100644 --- a/v1/src/main/resources/prod/application.yml +++ b/v1/src/main/resources/prod/application.yml @@ -27,7 +27,6 @@ spring: testOnReturn: false poolPreparedStatements: true maxOpenPreparedStatements: 20 - redis: database: 0 host: 127.0.0.1