提交2。0代码

dev-discount
袁野 2 years ago
parent 34c626ee8d
commit 94569a95f0
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 43
      hai-bweb/src/main/resources/prod/logback.xml
  3. 9
      hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java
  4. 4
      hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java
  5. 2
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java

File diff suppressed because one or more lines are too long

@ -74,6 +74,40 @@
<charset>UTF-8</charset> <!-- 此处设置字符集 --> <charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder> </encoder>
</appender> </appender>
<appender name="RechargeLog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/RechargeLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/RechargeLog/RechargeLog.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>
<appender name="HltCardLog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/HltCardLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/hlt/hltcard.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"> <root level="DEBUG">
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
@ -91,4 +125,13 @@
<logger name="com.hai.config.WxOrderConfig" level="INFO"> <logger name="com.hai.config.WxOrderConfig" level="INFO">
<appender-ref ref="wechatPayLog" /> <appender-ref ref="wechatPayLog" />
</logger> </logger>
<logger name="com.hai.config.HuiLianTongUnionCardConfig" level="INFO">
<appender-ref ref="HltCardLog" />
</logger>
<logger name="com.hai.config.RechargeConfig" level="INFO">
<appender-ref ref="RechargeLog" />
</logger>
<logger name="com.hai.service.impl.OutRechargeOrderServiceImpl" level="INFO">
<appender-ref ref="RechargeLog" />
</logger>
</configuration> </configuration>

@ -69,7 +69,6 @@ public class HighRechargeOrderSchedule {
List<OutRechargeChildOrder> childOrderList = rechargeChildOrderService.getListRechargeChildOrder(childOrderMap); List<OutRechargeChildOrder> childOrderList = rechargeChildOrderService.getListRechargeChildOrder(childOrderMap);
System.out.println("话费定时任务 -> 判断是否存在已支付订单:订单id:" + order.getId());
if (childOrderList.size() == 0) { if (childOrderList.size() == 0) {
Date rechargeTime = order.getCreateTimed(); Date rechargeTime = order.getCreateTimed();
Date currentTime = new Date(); Date currentTime = new Date();
@ -77,11 +76,9 @@ public class HighRechargeOrderSchedule {
// 充值时间小于72 // 充值时间小于72
if (hours < 72) { if (hours < 72) {
System.out.println("话费定时任务 -> 请求慢充:订单id:" + order.getId());
outRechargeOrderService.pollRequest(order); outRechargeOrderService.pollRequest(order);
continue; continue;
} }
System.out.println("话费定时任务 -> 退款任务" + order.getId());
outRechargeOrderService.refundOrder(order.getId() , childOrderList.get(0)); outRechargeOrderService.refundOrder(order.getId() , childOrderList.get(0));
} }
@ -139,7 +136,7 @@ public class HighRechargeOrderSchedule {
outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder); outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder);
} else { } else {
// -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 // -1取消,0充值中 ,1充值成功,2充值失败,3部分成功
if (objectData.getInteger("state") == 2) { if (objectData.getInteger("state") == 2 || objectData.getInteger("state") == -1) {
outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder); outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder);
} else if (objectData.getInteger("state") == 1) { } else if (objectData.getInteger("state") == 1) {
outRechargeOrderService.completeOrder(outRechargeOrder , childOrder); outRechargeOrderService.completeOrder(outRechargeOrder , childOrder);
@ -159,8 +156,8 @@ public class HighRechargeOrderSchedule {
JSONObject objectData; JSONObject objectData;
for (Object objects : objectJSONArray) { for (Object objects : objectJSONArray) {
objectData = (JSONObject) objects; objectData = (JSONObject) objects;
// -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 // 充值中1成功2失败3已取消4部分充值5缓存订单
if (objectData.getInteger("status") == 2) { if (objectData.getInteger("status") == 2 || objectData.getInteger("status") == 3) {
outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder); outRechargeOrderService.refundOrder(outRechargeOrder.getId() , childOrder);
} else if (objectData.getInteger("status") == 1) { } else if (objectData.getInteger("status") == 1) {
outRechargeOrderService.completeOrder(outRechargeOrder , childOrder); outRechargeOrderService.completeOrder(outRechargeOrder , childOrder);

@ -217,11 +217,11 @@ public class HuiLianTongUnionCardConfig {
log.info("============请求任务Start============="); log.info("============请求任务Start=============");
log.info("汇联通充值-请求参数: " + JSON.toJSONString(dataMap)); log.info("汇联通退款-请求参数: " + JSON.toJSONString(dataMap));
JSONObject returnObject = request("qtk/refund", dataMap); JSONObject returnObject = request("qtk/refund", dataMap);
log.info("汇联通充值-响应参数: " + returnObject.toJSONString()); log.info("汇联通退款-响应参数: " + returnObject.toJSONString());
log.info("============请求任务End=============="); log.info("============请求任务End==============");
return returnObject; return returnObject;
} }

@ -1224,7 +1224,7 @@ public interface HighOrderMapperExt {
List<ApiThirdOrderModel> getApiThirdOrderByList(@Param("map") Map<String,Object> map); List<ApiThirdOrderModel> getApiThirdOrderByList(@Param("map") Map<String,Object> map);
@Select("SELECT * FROM high_order WHERE create_time < NOW()-INTERVAL 3 day and product_type = 9 and order_status = 2 and pay_type = 4;") @Select("SELECT * FROM high_order WHERE create_time < NOW()-INTERVAL 3 day and product_type = 9 and order_status = 2 and pay_type = 4 group by create_time asc;")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),

Loading…
Cancel
Save