Browse Source

赤金回传,后台问题修复

master
qyhdd 2 years ago
parent
commit
08f7494ee4
  1. 5
      rights-client-controller/src/main/java/com/cyjd/rights/controller/AliPayController.java
  2. 3
      rights-entity/src/main/java/com/cyjd/rights/dto/AliPayInOrderDto.java
  3. 5
      rights-entity/src/main/java/com/cyjd/rights/dto/AliPaySignOrderDto.java
  4. 3
      rights-entity/src/main/java/com/cyjd/rights/dto/RightsOrderDto.java
  5. 6
      rights-entity/src/main/java/com/cyjd/rights/vo/AliPayOrderVo.java
  6. 3
      rights-entity/src/main/java/com/cyjd/rights/vo/AliPaySigningOrderVo.java
  7. 2
      rights-entity/src/main/java/com/cyjd/rights/vo/RightsOrderVo.java
  8. 15
      rights-server/src/main/java/com/cyjd/rights/business/service/impl/SendSuccessMobileServiceImpl.java
  9. 41
      rights-server/src/main/resources/mapper/business/AliPayOrderMapper.xml
  10. 41
      rights-server/src/main/resources/mapper/business/AliPaySigningOrderMapper.xml
  11. 2
      rights-server/src/main/resources/mapper/business/RightsOrderMapper.xml

5
rights-client-controller/src/main/java/com/cyjd/rights/controller/AliPayController.java

@ -480,6 +480,11 @@ public class AliPayController {
if (1160==aliPaySigningOrderEntity.getLinkId()){
sendSuccessMobileService.sendSuccessMobile(aliPaySigningOrderEntity.getSendApiData(),"tuia",outTradeNo);
}
//回传 1162赤金渠道
if (1162==aliPaySigningOrderEntity.getLinkId()){
sendSuccessMobileService.sendSuccessMobile(aliPaySigningOrderEntity.getSendApiData(),"cj",outTradeNo);
}
}
// if (b){
// log.info("支付订单保存成功"+aliPayEntity.getOrderId()+"=====status:"+aliPayEntity.getStatus());

3
rights-entity/src/main/java/com/cyjd/rights/dto/AliPayInOrderDto.java

@ -1,5 +1,6 @@
package com.cyjd.rights.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -34,9 +35,11 @@ public class AliPayInOrderDto extends BasePageDto{
private String status;
@ApiModelProperty(value = "查询开始时间")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime beginTime;
@ApiModelProperty(value = "查询结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;

5
rights-entity/src/main/java/com/cyjd/rights/dto/AliPaySignOrderDto.java

@ -1,5 +1,6 @@
package com.cyjd.rights.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -34,14 +35,18 @@ public class AliPaySignOrderDto extends BasePageDto{
private String status;
@ApiModelProperty(value = "查询订单时间(开始)")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime beginTime;
@ApiModelProperty(value = "查询订单时间(结束)")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
@ApiModelProperty(value = "查询下次支付的时间(开始)")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime beginSearchNextPayTime;
@ApiModelProperty(value = "查询下次支付的时间(结束)")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endSearchNextPayTime;
}

3
rights-entity/src/main/java/com/cyjd/rights/dto/RightsOrderDto.java

@ -1,5 +1,6 @@
package com.cyjd.rights.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -26,9 +27,11 @@ public class RightsOrderDto extends BasePageDto{
private String status;
@ApiModelProperty(value = "查询开始时间")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime beginTime;
@ApiModelProperty(value = "查询结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
@ApiModelProperty(value = "购买的产品编码")

6
rights-entity/src/main/java/com/cyjd/rights/vo/AliPayOrderVo.java

@ -1,8 +1,10 @@
package com.cyjd.rights.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@ -13,7 +15,7 @@ public class AliPayOrderVo {
private Integer id;
private String mobile;
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime orderTime;//订单创建时间
private Integer status;//1 成功 0失败 2支付接口返回成功未收到回调
@ -25,7 +27,7 @@ public class AliPayOrderVo {
private String otherOrderId; //businessType为1时存的签约号
private String aliUserId;//用户支付宝唯一id
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime unsubTime; //退订时间
private Integer businessType; //1 权益类业务

3
rights-entity/src/main/java/com/cyjd/rights/vo/AliPaySigningOrderVo.java

@ -1,5 +1,6 @@
package com.cyjd.rights.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@ -14,6 +15,7 @@ public class AliPaySigningOrderVo {
private String mobile;
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime orderTime;//订单创建时间
private Integer status;//1 成功 0失败 2发起签约成功
@ -26,6 +28,7 @@ public class AliPaySigningOrderVo {
private String aliUserId;//用户支付宝唯一id
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime unsubTime; //退订时间
private Integer businessType; //1 权益类业务

2
rights-entity/src/main/java/com/cyjd/rights/vo/RightsOrderVo.java

@ -1,5 +1,6 @@
package com.cyjd.rights.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@ -14,6 +15,7 @@ public class RightsOrderVo {
private String mobile;
@JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime orderTime;//订单创建时间
private Integer status;//1 成功 0失败 2支付接口返回成功未收到回调

15
rights-server/src/main/java/com/cyjd/rights/business/service/impl/SendSuccessMobileServiceImpl.java

@ -33,6 +33,21 @@ public class SendSuccessMobileServiceImpl implements SendSuccessMobileService {
} else if ("tuia".equals(channelName)) {
String url="https://activity.tuia.cn/log/effect/v2?a_oId="+mobile+"&advertKey=75FEC8A0D38E22BE3B9695460D1A2BB6&subType=3";
HttpUtils.sendGet(url);
} else if ("cj".equals(channelName)){
String url="https://analytics.oceanengine.com/api/v2/conversion";
long time = System.currentTimeMillis();
HashMap<String, Object> params = new HashMap<>();
params.put("event_type","form");
HashMap<String, Object> context = new HashMap<>();
HashMap<String, String> callback = new HashMap<>();
callback.put("callback",mobile);
context.put("ad",callback);
params.put("context",context);
params.put("timestamp",time);
System.out.println(params);
String res = HttpUtils.sendPostJSON(url, JSON.toJSONString(params));
System.out.println(res+"=====================================================");
log.info("clikckId"+mobile+"回传结果:"+res);
}
//设置一个签约号只能回传一次
redisUtil.set("sendSuccessMobile"+outTradeNo,1,172800);

41
rights-server/src/main/resources/mapper/business/AliPayOrderMapper.xml

@ -6,25 +6,28 @@
id,mobile,order_time,status,sign_code,price,other_order_id,ali_user_id,unsub_time,business_type,link_id
from tb_ali_pay_order
<where>
1=1
<if test="outTradeNo!=null and outTradeNo!=''">
and other_order_id = #{outTradeNo}
</if>
<if test="linkId!=null and linkId!=''">
and link_id = #{linkId}
</if>
<if test="linkName!=null and linkName!=''">
and link_name = #{linkName}
</if>
<if test="status!=null and status!=''">
and status = #{status}
</if>
<if test="beginTime!=null">
and order_time &gt; #{beginTime}
</if>
<if test="endTime!=null">
and order_time &lt; #{beginTime}
</if>
1=1
<if test="outTradeNo!=null and outTradeNo!=''">
and other_order_id = #{outTradeNo}
</if>
<if test="linkId!=null and linkId!=''">
and link_id = #{linkId}
</if>
<if test="linkName!=null and linkName!=''">
and link_name = #{linkName}
</if>
<if test="status!=null and status!=''">
and status = #{status}
</if>
<if test="mobile!=null and mobile!=''">
and mobile = #{mobile}
</if>
<if test="beginTime!=null">
and order_time &gt; #{beginTime}
</if>
<if test="endTime!=null">
and order_time &lt; #{endTime}
</if>
</where>
</select>
<select id="test"></select>

41
rights-server/src/main/resources/mapper/business/AliPaySigningOrderMapper.xml

@ -6,25 +6,28 @@
id,mobile,order_time,status,sign_code,price,other_order_id,ali_user_id,unsub_time,business_type,link_id,next_pay_time
from tb_ali_pay_signing_order
<where>
1=1
<if test="outTradeNo!=null and outTradeNo!=''">
and other_order_id = #{outTradeNo}
</if>
<if test="linkId!=null and linkId!=''">
and link_id = #{linkId}
</if>
<if test="linkName!=null and linkName!=''">
and link_name = #{linkName}
</if>
<if test="status!=null and status!=''">
and status = #{status}
</if>
<if test="beginTime!=null">
and order_time &gt; #{beginTime}
</if>
<if test="endTime!=null">
and order_time &lt; #{endTime}
</if>
1=1
<if test="outTradeNo!=null and outTradeNo!=''">
and other_order_id = #{outTradeNo}
</if>
<if test="linkId!=null and linkId!=''">
and link_id = #{linkId}
</if>
<if test="linkName!=null and linkName!=''">
and link_name = #{linkName}
</if>
<if test="status!=null and status!=''">
and status = #{status}
</if>
<if test="mobile!=null and mobile!=''">
and mobile = #{mobile}
</if>
<if test="beginTime!=null">
and order_time &gt; #{beginTime}
</if>
<if test="endTime!=null">
and order_time &lt; #{endTime}
</if>
<if test="beginSearchNextPayTime!=null">
and next_pay_time &gt; #{beginSearchNextPayTime}
</if>

2
rights-server/src/main/resources/mapper/business/RightsOrderMapper.xml

@ -20,7 +20,7 @@
and order_time &gt; #{beginTime}
</if>
<if test="endTime!=null">
and order_time &lt; #{beginTime}
and order_time &lt; #{endTime}
</if>
</where>
</select>

Loading…
Cancel
Save