Merge remote-tracking branch 'origin/2.0-master' into 2.0-master

# Conflicts:
#	v1/src/main/resources/prod/application.yml
dev-discount
袁野 2 years ago
commit 57767f3b2a
  1. 7
      hai-bweb/src/main/java/com/bweb/controller/HighActivityInfoController.java
  2. 10
      hai-bweb/src/main/resources/dev/application.yml
  3. 6
      hai-bweb/src/main/resources/pre/application.yml
  4. 20
      hai-bweb/src/main/resources/prod/logback.xml
  5. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  6. 8
      hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java
  7. 10
      hai-cweb/src/main/resources/dev/application.yml
  8. 6
      hai-cweb/src/main/resources/pre/application.yml
  9. 21
      hai-cweb/src/main/resources/prod-9401/logback.xml
  10. 21
      hai-cweb/src/main/resources/prod/logback.xml
  11. 10
      hai-msg/src/main/resources/dev/application.yml
  12. 2
      hai-msg/src/main/resources/pre/application.yml
  13. 10
      hai-order/src/main/resources/dev/application.yml
  14. 20
      hai-order/src/main/resources/prod/logback.xml
  15. 10
      hai-schedule/src/main/resources/dev/application.yml
  16. 6
      hai-schedule/src/main/resources/pre/application.yml
  17. 2
      hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java
  18. 3
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  19. 8
      hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java
  20. 34
      hai-service/src/main/java/com/hai/config/StreamUtil.java
  21. 4
      hai-service/src/main/java/com/hai/service/impl/HighActivityInfoServiceImpl.java
  22. 1
      hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java
  23. 1
      hai-service/src/main/resources/dev/commonConfig.properties
  24. 1
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  25. 2
      hai-service/src/main/resources/prod/commonConfig.properties
  26. 55
      hai-user/src/main/java/com/web/controller/DiscountController.java
  27. 10
      hai-user/src/main/resources/dev/application.yml
  28. 10
      v1/src/main/resources/dev/application.yml
  29. 4
      v1/src/main/resources/pre/application.yml
  30. 1
      v1/src/main/resources/prod/application.yml

@ -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<String, Object> map = new HashMap<>();
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("title", title);
map.put("type", type);
map.put("status", status);

@ -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

@ -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
#密码

@ -109,6 +109,23 @@
</encoder>
</appender>
<appender name="chongQingCNPC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/chongQingCNPC.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPC/ChongQingCNPC.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
@ -134,4 +151,7 @@
<logger name="com.hai.service.impl.OutRechargeOrderServiceImpl" level="INFO">
<appender-ref ref="RechargeLog" />
</logger>
<logger name="com.hai.config.ChongQingCNPCService" level="INFO">
<appender-ref ref="chongQingCNPC" />
</logger>
</configuration>

@ -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/*")

@ -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<String, Object> map = new HashMap<>();

@ -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

@ -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
#密码

@ -57,6 +57,24 @@
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="chongQingCNPC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/chongQingCNPC.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPC/ChongQingCNPC.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
@ -69,4 +87,7 @@
<logger name="com.hai" level="ERROR">
<appender-ref ref="errorlog" />
</logger>
<logger name="com.hai.config.ChongQingCNPCService" level="INFO">
<appender-ref ref="chongQingCNPC" />
</logger>
</configuration>

@ -57,6 +57,24 @@
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="chongQingCNPC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/chongQingCNPC.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPC/ChongQingCNPC.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
@ -69,4 +87,7 @@
<logger name="com.hai" level="ERROR">
<appender-ref ref="errorlog" />
</logger>
<logger name="com.hai.config.ChongQingCNPCService" level="INFO">
<appender-ref ref="chongQingCNPC" />
</logger>
</configuration>

@ -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

@ -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

@ -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

@ -143,6 +143,22 @@
</encoder>
</appender>
<appender name="chongQingCNPC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/chongQingCNPC.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPC/ChongQingCNPC.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
@ -175,4 +191,8 @@
<appender-ref ref="wechatPayLog" />
</logger>
<logger name="com.hai.config.ChongQingCNPCService" level="INFO">
<appender-ref ref="chongQingCNPC" />
</logger>
</configuration>

@ -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

@ -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
#密码

@ -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"));
}
}

@ -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;

@ -57,7 +57,7 @@ public class HuiLianTongConfig {
public static JSONObject getHltFuelCoupList() throws Exception {
Map<String,Object> 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<String,Object> 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<String,Object> map = new HashMap<>();
map.put("rechargeOrderId", rechargeOrderId);
map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId());
map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongSinopecDistributorId());
log.info("============请求任务Start=============");

@ -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<T>
* @throws
*/
public static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) {
Map<Object,Boolean> seen = new ConcurrentHashMap<>();
return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null;
}
}

@ -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")+"%");
}

@ -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);
}

@ -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

@ -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

@ -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

@ -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<String, Object> 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<String, Object> 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);
}
}
}

@ -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

@ -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

@ -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
#密码

@ -27,7 +27,6 @@ spring:
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
redis:
database: 0
host: 127.0.0.1

Loading…
Cancel
Save