记得上下班打卡 | git大法好,push需谨慎

Commit 8a894822 authored by jiangxiulong's avatar jiangxiulong

快递入库redis队列

parent 1565a4b8
...@@ -18,8 +18,9 @@ import java.util.LinkedList; ...@@ -18,8 +18,9 @@ import java.util.LinkedList;
@Data @Data
@ApiModel @ApiModel
public class KylinOrderExpressVo implements Serializable { public class KylinOrderExpressVo implements Serializable , Cloneable{
private static final long serialVersionUID = 1626827142646063350L;
@ApiModelProperty(value = "orderExpressId") @ApiModelProperty(value = "orderExpressId")
private String orderExpressId; private String orderExpressId;
@ApiModelProperty(value = "orderTicketsId") @ApiModelProperty(value = "orderTicketsId")
...@@ -33,4 +34,14 @@ public class KylinOrderExpressVo implements Serializable { ...@@ -33,4 +34,14 @@ public class KylinOrderExpressVo implements Serializable {
@ApiModelProperty(value = "物流数据") @ApiModelProperty(value = "物流数据")
LinkedList<KylinOrderExpressRouteVo> routeList; LinkedList<KylinOrderExpressRouteVo> routeList;
private static final KylinOrderExpressVo obj = new KylinOrderExpressVo();
public static KylinOrderExpressVo getNew() {
try {
return (KylinOrderExpressVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new KylinOrderExpressVo();
}
}
} }
...@@ -46,7 +46,7 @@ public interface IKylinOrderTicketsService { ...@@ -46,7 +46,7 @@ public interface IKylinOrderTicketsService {
* @param picList 证据截图 * @param picList 证据截图
* @return 是否成功 * @return 是否成功
*/ */
String sendOrderRefund(String orderId, String orderTicketEntitiesId, String reason, String picList, Integer sendExpressType, String sendExpressAddress, String appointmentTime, String expressNumber); String sendOrderRefund(String orderId, String orderTicketEntitiesId, String reason, String picList, Integer sendExpressType, String expressNumber, String expressContacts, String expressPhone, String sendExpressAddress, String appointmentTime);
//退款撤回 //退款撤回
ResponseDto<Boolean> orderRefundWithdraw(String orderRefundsId); ResponseDto<Boolean> orderRefundWithdraw(String orderRefundsId);
......
...@@ -42,6 +42,7 @@ public class MQConst { ...@@ -42,6 +42,7 @@ public class MQConst {
SQL_ORDER_CLOSE("kylin:stream:rk.order.close", "group.order.close", "订单关闭"), SQL_ORDER_CLOSE("kylin:stream:rk.order.close", "group.order.close", "订单关闭"),
SQL_ORDER_PAY("kylin:stream:rk.order.pay", "group.order.pay", "订单支付"), SQL_ORDER_PAY("kylin:stream:rk.order.pay", "group.order.pay", "订单支付"),
SQL_ORDER_REFUND("kylin:stream:rk.order.refund", "group.order.refund", "订单申请退款"), SQL_ORDER_REFUND("kylin:stream:rk.order.refund", "group.order.refund", "订单申请退款"),
SQL_ORDER_REFUND_EXPRESS("kylin:stream:rk.refundOrderExpress", "group.refundOrderExpress", "用户退款发快递"),
SQL_ORDER_WITHDRAW("kylin:stream:rk.order.withdraw", "group.order.withdraw", "订单申请撤回"), SQL_ORDER_WITHDRAW("kylin:stream:rk.order.withdraw", "group.order.withdraw", "订单申请撤回"),
SQL_ORDER_OVERTIME_REFUND("kylin:stream:rk.order.overtime.refund", "group.order.overtime.refund", "超时支付申请退款"), SQL_ORDER_OVERTIME_REFUND("kylin:stream:rk.order.overtime.refund", "group.order.overtime.refund", "超时支付申请退款"),
SQL_STATION("kylin:stream:rk.station", "group.station", "验票更新"), SQL_STATION("kylin:stream:rk.station", "group.station", "验票更新"),
......
...@@ -143,10 +143,10 @@ liquidnet: ...@@ -143,10 +143,10 @@ liquidnet:
client-secret: YXA6olr2qaW65xlkFixS81kiWnplrW4 client-secret: YXA6olr2qaW65xlkFixS81kiWnplrW4
express: express:
shunfeng: shunfeng:
url: ${liquidnet.client.admin.shunfeng.url} url: "https://butler-dev-ms.sf-express.com"
sk: ${liquidnet.client.admin.shunfeng.sk} sk: 21e9a70f677a2bf29dfa2b3bead4f018
appid: ${liquidnet.client.admin.shunfeng.appid} appid: 557104628450889728
custid: ${liquidnet.client.admin.shunfeng.custid} custid: 7551234567
jCompany: 北京正在映画互联网有限公司 jCompany: 北京正在映画互联网有限公司
jContact: 摩登天空票务部 jContact: 摩登天空票务部
jTel: 4001680650 jTel: 4001680650
......
...@@ -145,10 +145,10 @@ liquidnet: ...@@ -145,10 +145,10 @@ liquidnet:
client-secret: YXA6olr2qaW65xlkFixS81kiWnplrW4 client-secret: YXA6olr2qaW65xlkFixS81kiWnplrW4
express: express:
shunfeng: shunfeng:
url: ${liquidnet.client.admin.shunfeng.url} url: "https://butler-dev-ms.sf-express.com"
sk: ${liquidnet.client.admin.shunfeng.sk} sk: 21e9a70f677a2bf29dfa2b3bead4f018
appid: ${liquidnet.client.admin.shunfeng.appid} appid: 557104628450889728
custid: ${liquidnet.client.admin.shunfeng.custid} custid: 7551234567
jCompany: 北京正在映画互联网有限公司 jCompany: 北京正在映画互联网有限公司
jContact: 摩登天空票务部 jContact: 摩登天空票务部
jTel: 4001680650 jTel: 4001680650
......
...@@ -18,9 +18,9 @@ import java.math.BigDecimal; ...@@ -18,9 +18,9 @@ import java.math.BigDecimal;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class KylinOrderExpress implements Serializable ,Cloneable{ public class KylinOrderExpress implements Serializable, Cloneable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = -2070614388666759280L;
@TableId(value = "mid", type = IdType.AUTO) @TableId(value = "mid", type = IdType.AUTO)
private Integer mid; private Integer mid;
...@@ -41,6 +41,13 @@ public class KylinOrderExpress implements Serializable ,Cloneable{ ...@@ -41,6 +41,13 @@ public class KylinOrderExpress implements Serializable ,Cloneable{
private String printFlag; private String printFlag;
private BigDecimal freightPrice; private BigDecimal freightPrice;
private Integer sendType;
private Integer sendExpressType;
private String expressContacts;
private String expressPhone;
private String sendExpressAddress;
private String appointmentTime;
private String return_tracking_no; private String return_tracking_no;
private String sourceTransferCode; private String sourceTransferCode;
private String sourceCityCode; private String sourceCityCode;
...@@ -86,6 +93,7 @@ public class KylinOrderExpress implements Serializable ,Cloneable{ ...@@ -86,6 +93,7 @@ public class KylinOrderExpress implements Serializable ,Cloneable{
private String updatedAt; private String updatedAt;
private static final KylinOrderExpress obj = new KylinOrderExpress(); private static final KylinOrderExpress obj = new KylinOrderExpress();
public static KylinOrderExpress getNew() { public static KylinOrderExpress getNew() {
try { try {
return (KylinOrderExpress) obj.clone(); return (KylinOrderExpress) obj.clone();
......
package com.liquidnet.service.consumer.kylin.config;
import com.liquidnet.service.consumer.kylin.receiver.ConsumerKylinOrderRefundExpressRdsReceiver;
import lombok.var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.stream.Consumer;
import org.springframework.data.redis.connection.stream.MapRecord;
import org.springframework.data.redis.connection.stream.ReadOffset;
import org.springframework.data.redis.connection.stream.StreamOffset;
import org.springframework.data.redis.stream.StreamMessageListenerContainer;
import org.springframework.data.redis.stream.Subscription;
import java.time.Duration;
import static com.liquidnet.service.base.constant.MQConst.KylinQueue.SQL_ORDER_REFUND_EXPRESS;
@Configuration
public class ConsumerKylinOrderRefundExpressRedisStreamConfig {
@Autowired
ConsumerKylinOrderRefundExpressRdsReceiver consumerKylinOrderRefundExpressRdsReceiver;
private StreamMessageListenerContainer<String, MapRecord<String, String, String>> buildStreamMessageListenerContainer(RedisConnectionFactory factory) {
var options = StreamMessageListenerContainer
.StreamMessageListenerContainerOptions
.builder()
.pollTimeout(Duration.ofMillis(1))
.build();
return StreamMessageListenerContainer.create(factory, options);
}
/**
* 用户退款发快递
*
* @param listenerContainer
* @param t
* @return
*/
private Subscription receiveSqlOrderRefundExpress(StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer, int t) {
return listenerContainer.receiveAutoAck(
Consumer.from(SQL_ORDER_REFUND_EXPRESS.getGroup(), SQL_ORDER_REFUND_EXPRESS.name() + t),
StreamOffset.create(SQL_ORDER_REFUND_EXPRESS.getKey(), ReadOffset.lastConsumed()), consumerKylinOrderRefundExpressRdsReceiver
);
}
/* —————————————————————————— | —————————————————————————— | —————————————————————————— */
@Bean
public Subscription subscriptionOrderRefundExpress(RedisConnectionFactory factory) {
var listenerContainer = this.buildStreamMessageListenerContainer(factory);
var subscription = receiveSqlOrderRefundExpress(listenerContainer, 1);
listenerContainer.start();
return subscription;
}
@Bean
public Subscription subscriptionOrderRefundExpress2(RedisConnectionFactory factory) {
var listenerContainer = this.buildStreamMessageListenerContainer(factory);
var subscription = receiveSqlOrderRefundExpress(listenerContainer, 1);
listenerContainer.start();
return subscription;
}
@Bean
public Subscription subscriptionOrderRefundExpress3(RedisConnectionFactory factory) {
var listenerContainer = this.buildStreamMessageListenerContainer(factory);
var subscription = receiveSqlOrderRefundExpress(listenerContainer, 1);
listenerContainer.start();
return subscription;
}
/* -------------------------------------------------------- | */
}
\ No newline at end of file
package com.liquidnet.service.consumer.kylin.receiver;
import com.liquidnet.service.base.constant.MQConst;
import org.springframework.stereotype.Component;
@Component
public class ConsumerKylinOrderRefundExpressRdsReceiver extends AbstractSqlRedisReceiver {
@Override
protected String getRedisStreamKey() {
return MQConst.KylinQueue.SQL_ORDER_REFUND_EXPRESS.getKey();
}
@Override
protected String getRedisStreamGroup() {
return MQConst.KylinQueue.SQL_ORDER_REFUND_EXPRESS.getGroup();
}
}
\ No newline at end of file
...@@ -860,6 +860,13 @@ CREATE TABLE `kylin_order_express` ...@@ -860,6 +860,13 @@ CREATE TABLE `kylin_order_express`
DEFAULT CHARSET utf8mb4 DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci COMMENT '订单快递表'; COLLATE utf8mb4_unicode_ci COMMENT '订单快递表';
alter table kylin_order_express add send_type tinyint not null default 1 comment '发货类型 1发出 2用户退款发货' after freight_price;
alter table kylin_order_express add send_express_type tinyint not null default 0 comment '退票发货快递类型 1上门取件 2自主发货' after send_type;
alter table kylin_order_express add express_contacts varchar(255) not null default '' comment '退票发货快递人' after send_express_type;
alter table kylin_order_express add express_phone varchar(255) not null default '' comment '退票发货快递联系方式' after express_contacts;
alter table kylin_order_express add send_express_address varchar(255) not null default '' comment '退票发货快递地址' after express_phone;
alter table kylin_order_express add appointment_time varchar(255) not null default '' comment '退票发货快递预约取件时间' after send_express_address;
drop TABLE if exists `kylin_order_express_fee_info`; drop TABLE if exists `kylin_order_express_fee_info`;
CREATE TABLE `kylin_order_express_fee_info` CREATE TABLE `kylin_order_express_fee_info`
( (
......
...@@ -34,5 +34,9 @@ XGROUP CREATE kylin:stream:rk.transfer.result group.transfer.result 0 ...@@ -34,5 +34,9 @@ XGROUP CREATE kylin:stream:rk.transfer.result group.transfer.result 0
XADD kylin:stream:rk.transfer.overtime * 0 0 XADD kylin:stream:rk.transfer.overtime * 0 0
XGROUP CREATE kylin:stream:rk.transfer.overtime group.transfer.overtime 0 XGROUP CREATE kylin:stream:rk.transfer.overtime group.transfer.overtime 0
-- 用户退款发快递 --
XADD kylin:stream:rk.refundOrderExpress * 0 0
XGROUP CREATE kylin:stream:rk.refundOrderExpress group.refundOrderExpress 0
# ================================================== # ==================================================
# XGROUP DESTROY adam:stream:rk.sms.notice group.sms.sender 0 # XGROUP DESTROY adam:stream:rk.sms.notice group.sms.sender 0
...@@ -104,9 +104,11 @@ public class KylinOrderTicketsController { ...@@ -104,9 +104,11 @@ public class KylinOrderTicketsController {
@ApiImplicitParam(type = "form", dataType = "String", name = "reason", value = "退款申请备注", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "reason", value = "退款申请备注", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "picList", value = "图片"), @ApiImplicitParam(type = "form", dataType = "String", name = "picList", value = "图片"),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "sendExpressType", value = "快递方式 1上门取件 2自主发货"), @ApiImplicitParam(type = "form", dataType = "Integer", name = "sendExpressType", value = "快递方式 1上门取件 2自主发货"),
@ApiImplicitParam(type = "form", dataType = "String", name = "expressNumber", value = "自主发货的顺丰订单号"),
@ApiImplicitParam(type = "form", dataType = "String", name = "expressContacts", value = "发货人姓名"),
@ApiImplicitParam(type = "form", dataType = "String", name = "expressPhone", value = "发货人联系方式"),
@ApiImplicitParam(type = "form", dataType = "String", name = "sendExpressAddress", value = "取件地址"), @ApiImplicitParam(type = "form", dataType = "String", name = "sendExpressAddress", value = "取件地址"),
@ApiImplicitParam(type = "form", dataType = "String", name = "appointmentTime", value = "预约取件时间"), @ApiImplicitParam(type = "form", dataType = "String", name = "appointmentTime", value = "预约取件时间")
@ApiImplicitParam(type = "form", dataType = "String", name = "expressNumber", value = "自主发货的顺丰订单号")
}) })
public ResponseDto<HashMap<String, String>> sendOrderRefund( public ResponseDto<HashMap<String, String>> sendOrderRefund(
@RequestParam(value = "orderId", required = true) @NotNull(message = "订单ID不能为空") String orderId, @RequestParam(value = "orderId", required = true) @NotNull(message = "订单ID不能为空") String orderId,
...@@ -115,14 +117,17 @@ public class KylinOrderTicketsController { ...@@ -115,14 +117,17 @@ public class KylinOrderTicketsController {
@RequestParam(value = "picList", required = false) String picList, @RequestParam(value = "picList", required = false) String picList,
@RequestParam(value = "sendExpressType", required = false) Integer sendExpressType, @RequestParam(value = "sendExpressType", required = false) Integer sendExpressType,
@RequestParam(value = "expressNumber", required = false) String expressNumber,
@RequestParam(value = "expressContacts", required = false) String expressContacts,
@RequestParam(value = "expressPhone", required = false) String expressPhone,
@RequestParam(value = "sendExpressAddress", required = false) String sendExpressAddress, @RequestParam(value = "sendExpressAddress", required = false) String sendExpressAddress,
@RequestParam(value = "appointmentTime", required = false) String appointmentTime, @RequestParam(value = "appointmentTime", required = false) String appointmentTime
@RequestParam(value = "expressNumber", required = false) String expressNumber
) { ) {
// 退款 // 退款
String orderRefundId = orderTicketsService.sendOrderRefund( String orderRefundId = orderTicketsService.sendOrderRefund(
orderId, orderTicketEntitiesId, reason, picList, orderId, orderTicketEntitiesId, reason, picList,
sendExpressType, sendExpressAddress, appointmentTime, expressNumber sendExpressType, expressNumber, expressContacts, expressPhone, sendExpressAddress, appointmentTime
); );
if (orderRefundId.length() > 10) { if (orderRefundId.length() > 10) {
HashMap<String, String> map = CollectionUtil.mapStringString(); HashMap<String, String> map = CollectionUtil.mapStringString();
......
...@@ -415,7 +415,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -415,7 +415,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
} }
@Override @Override
public String sendOrderRefund(String orderId, String orderTicketEntitiesId, String reason, String picList, Integer sendExpressType, String sendExpressAddress, String appointmentTime, String expressNumber) { public String sendOrderRefund(String orderId, String orderTicketEntitiesId, String reason, String picList, Integer sendExpressType, String expressNumber, String expressContacts, String expressPhone, String sendExpressAddress, String appointmentTime) {
KylinOrderTicketEntitiesVo orderTicketEntitiesVo = null; KylinOrderTicketEntitiesVo orderTicketEntitiesVo = null;
try { try {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
...@@ -479,7 +479,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -479,7 +479,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
String result = refundsStatusService.userOrderTicketRefunding(orderTicketVo, refundSinglePrice.doubleValue(), orderTicketEntitiesId, reason, picList, uid, username, kylinOrderRefundsVoBaseList.size()); String result = refundsStatusService.userOrderTicketRefunding(orderTicketVo, refundSinglePrice.doubleValue(), orderTicketEntitiesId, reason, picList, uid, username, kylinOrderRefundsVoBaseList.size());
if (result != "") { if (result != "") {
// 退款申请成功 异步去快递下单 // 退款申请成功 异步去快递下单
expressPlace(sendExpressType, sendExpressAddress, appointmentTime, expressNumber, orderTicketVo); expressPlace(sendExpressType, expressNumber, expressContacts, expressPhone, sendExpressAddress, appointmentTime, orderTicketVo, performanceVo);
return result; return result;
} else { } else {
return "申请失败"; return "申请失败";
...@@ -491,38 +491,28 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -491,38 +491,28 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
} }
@Async @Async
public void expressPlace(Integer sendExpressType, String sendExpressAddress, String appointmentTime, String expressNumber, KylinOrderTicketVo orderTicketVo) { public void expressPlace(Integer sendExpressType, String expressNumber, String expressContacts, String expressPhone, String sendExpressAddress, String appointmentTime, KylinOrderTicketVo orderTicketVo, KylinPerformanceVo performanceVo) {
if (sendExpressType == 1) { // 上门取件 if (sendExpressType == 1) { // 上门取件
// 生成预快递单 防止因失败没办法再次发起也不能主动获取数据
KylinOrderExpress kylinOrderExpressPre = new KylinOrderExpress();
String orderExpressId = IDGenerator.nextSnowId();
kylinOrderExpressPre.setExpressStatus(KylinTableStatusConst.ORDER_EXPRESS_STATUS1);
kylinOrderExpressPre.setOrderExpressId(orderExpressId);
kylinOrderExpressPre.setOrderTicketsId(orderTicketVo.getOrderTicketsId());
// 防止重复前面加上 "NEW" 因取消后再发起订单号也不能一致所以直接使用orderExpressId
String OrderExpressCode = "NEW" + orderExpressId;
kylinOrderExpressPre.setOrderExpressCode(OrderExpressCode);
kylinOrderExpressPre.setExpressType(expressType);
kylinOrderExpressPre.setCreatedAt(DateUtil.getNowTime());
kylinOrderExpressPre.setPerformancesId(orderTicketVo.getPerformanceId());
// TODO: 2021/8/26 jxl 队列入库
// kylinOrderExpressMapper.insert(kylinOrderExpressPre);
// 请求下单数据 // 请求下单数据
Map<String, String> hBody = new HashMap<>(); Map<String, String> hBody = new HashMap<>();
hBody.put("custid", custid); hBody.put("custid", custid);
// TODO: 2021/8/26 jxl 发货人 hBody.put("jContact", expressContacts);
hBody.put("jContact", "发货人"); hBody.put("jMobile", expressPhone);
hBody.put("jMobile", "15888889999");
hBody.put("jAddress", sendExpressAddress); hBody.put("jAddress", sendExpressAddress);
hBody.put("sendStartTime", appointmentTime); hBody.put("sendStartTime", appointmentTime);
// TODO: 2021/8/26 jxl 判断方式 Integer isRefundExpress = performanceVo.getIsRefundExpress();
hBody.put("payMethod", "2");// 运费付款方式:0-寄付月结;1-寄付现结;2-收方付;3-第三方付; if (isRefundExpress == 1) { // 1用户承担 0无 公司月结
hBody.put("payMethod", "1");// 运费付款方式:0-寄付月结;1-寄付现结;2-收方付;3-第三方付;
} else {
hBody.put("payMethod", "2");// 运费付款方式:0-寄付月结;1-寄付现结;2-收方付;3-第三方付;
}
hBody.put("expressType", expressType.toString());// 顺丰特快 hBody.put("expressType", expressType.toString());// 顺丰特快
hBody.put("depositumInfo", depositumInfo); hBody.put("depositumInfo", depositumInfo);
hBody.put("isDoCall", "1"); // 是否通过手持终端通知顺丰收派员上门收件,支持以下值:1-要求;0-不要求
String orderExpressId = IDGenerator.nextSnowId();
String OrderExpressCode = "NEWUR" + orderExpressId;
hBody.put("orderId", OrderExpressCode); hBody.put("orderId", OrderExpressCode);
hBody.put("depositumNo", orderTicketVo.getNumber().toString()); hBody.put("depositumNo", orderTicketVo.getNumber().toString());
...@@ -547,66 +537,33 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -547,66 +537,33 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
} else { } else {
msg = (String) hashMap.get("msg"); msg = (String) hashMap.get("msg");
} }
log.info("expressPlaceExceptionInfo sendExpressType:[{}], sendExpressAddress:[{}], appointmentTime:[{}], expressNumber:[{}], orderTicketVo:[{}]", sendExpressType, sendExpressAddress, appointmentTime, expressNumber, orderTicketVo);
log.error("expressPlaceResultError", msg); log.error("expressPlaceResultError", msg);
} else { } else {
HashMap hashMapResult = (HashMap) hashMap.get("result"); HashMap hashMapResult = (HashMap) hashMap.get("result");
KylinOrderExpress kylinOrderExpress = new KylinOrderExpress(); // 生成预快递单 REDIS 队列入数据库
kylinOrderExpress.setExpressStatus(KylinTableStatusConst.ORDER_EXPRESS_STATUS2); LocalDateTime now = LocalDateTime.now();
kylinOrderExpress.setMailno((String) hashMapResult.get("mailno")); LinkedList<String> sqls = CollectionUtil.linkedListString();
kylinOrderExpress.setFilterResult(hashMapResult.get("filter_result").toString()); sqls.add(SqlMapping.get("kylin_order_refund.refundOrderExpress"));
kylinOrderExpress.setRemark((String) hashMapResult.get("remark")); LinkedList<Object[]> sqlsDataA = CollectionUtil.linkedListObjectArr();
kylinOrderExpress.setOrigincode((String) hashMapResult.get("origincode")); sqlsDataA.add(new Object[]{
kylinOrderExpress.setDestcode((String) hashMapResult.get("destcode")); orderExpressId, orderTicketVo.getPerformanceId(), orderTicketVo.getOrderTicketsId(), OrderExpressCode, hashMapResult.get("mailno"), expressType, hashMapResult.get("filter_result"), hashMapResult.get("remark"), KylinTableStatusConst.ORDER_EXPRESS_STATUS2
kylinOrderExpress.setTwoDimensionCode((String) hashMapResult.get("twoDimensionCode")); , 2, sendExpressType, expressContacts, expressPhone, sendExpressAddress, appointmentTime
, hashMapResult.get("proName"), hashMapResult.get("cargoTypeCode"), hashMapResult.get("limitTypeCode"), hashMapResult.get("expressTypeCode"), hashMapResult.get("goodsValueTotal"), hashMapResult.get("goodsNumber")
kylinOrderExpress.setReturn_tracking_no((String) hashMapResult.get("return_tracking_no")); , now
kylinOrderExpress.setSourceTransferCode((String) hashMapResult.get("sourceTransferCode")); });
kylinOrderExpress.setSourceCityCode((String) hashMapResult.get("sourceCityCode")); queueUtils.sendMsgByRedis(MQConst.KylinQueue.SQL_ORDER_REFUND_EXPRESS.getKey(),
kylinOrderExpress.setSourceDeptCode((String) hashMapResult.get("sourceDeptCode")); SqlMapping.gets(sqls, sqlsDataA));
kylinOrderExpress.setSourceTeamCode((String) hashMapResult.get("sourceTeamCode"));
kylinOrderExpress.setDestCityCode((String) hashMapResult.get("destCityCode")); KylinOrderExpressVo kylinOrderExpressVo = KylinOrderExpressVo.getNew();
kylinOrderExpress.setDestDeptCode((String) hashMapResult.get("destDeptCode")); kylinOrderExpressVo.setOrderExpressId(orderExpressId);
kylinOrderExpress.setDestDeptCodeMapping((String) hashMapResult.get("destDeptCodeMapping")); kylinOrderExpressVo.setOrderTicketsId(orderTicketVo.getOrderTicketsId());
kylinOrderExpress.setDestTeamCode((String) hashMapResult.get("destTeamCode")); kylinOrderExpressVo.setOrderExpressCode(OrderExpressCode);
kylinOrderExpress.setDestTeamCodeMapping((String) hashMapResult.get("destTeamCodeMapping")); kylinOrderExpressVo.setMailno((String) hashMapResult.get("mailno"));
kylinOrderExpress.setDestTransferCode((String) hashMapResult.get("destTransferCode")); kylinOrderExpressVo.setExpressStatus(KylinTableStatusConst.ORDER_EXPRESS_STATUS2);
kylinOrderExpress.setDestRouteLabel((String) hashMapResult.get("destRouteLabel"));
kylinOrderExpress.setProName((String) hashMapResult.get("proName"));
kylinOrderExpress.setCargoTypeCode((String) hashMapResult.get("cargoTypeCode"));
kylinOrderExpress.setLimitTypeCode((String) hashMapResult.get("limitTypeCode"));
kylinOrderExpress.setExpressTypeCode((String) hashMapResult.get("expressTypeCode"));
kylinOrderExpress.setCodingMapping((String) hashMapResult.get("codingMapping"));
kylinOrderExpress.setCodingMappingOut((String) hashMapResult.get("codingMappingOut"));
kylinOrderExpress.setXbFlag((String) hashMapResult.get("xbFlag"));
kylinOrderExpress.setPrintFlag((String) hashMapResult.get("printFlag"));
kylinOrderExpress.setProCode((String) hashMapResult.get("proCode"));
kylinOrderExpress.setPrintIcon((String) hashMapResult.get("printIcon"));
kylinOrderExpress.setAbFlag((String) hashMapResult.get("abFlag"));
kylinOrderExpress.setDestPortCode((String) hashMapResult.get("destPortCode"));
kylinOrderExpress.setDestPortCode((String) hashMapResult.get("destPortCode"));
kylinOrderExpress.setDestCountry((String) hashMapResult.get("destCountry"));
kylinOrderExpress.setDestPostCode((String) hashMapResult.get("destPostCode"));
kylinOrderExpress.setGoodsValueTotal((String) hashMapResult.get("goodsValueTotal"));
kylinOrderExpress.setCurrencySymbol((String) hashMapResult.get("currencySymbol"));
kylinOrderExpress.setGoodsNumber((String) hashMapResult.get("goodsNumber"));
kylinOrderExpress.setTwoDimensionCode2((String) hashMapResult.get("twoDimensionCode2"));
kylinOrderExpress.setNewIcon((String) hashMapResult.get("newIcon"));
kylinOrderExpress.setNewAbflag((String) hashMapResult.get("newAbflag"));
kylinOrderExpress.setUpdatedAt(DateUtil.getNowTime());
// TODO: 2021/8/26 jxl 队列入库
/*kylinOrderExpressMapper.update(
kylinOrderExpress
, new UpdateWrapper<KylinOrderExpress>().in("order_express_id", orderExpressId)
);*/
KylinOrderExpressVo kylinOrderExpressVo = new KylinOrderExpressVo();
BeanUtils.copyProperties(kylinOrderExpressPre, kylinOrderExpressVo);
kylinOrderExpressVo.setMailno(kylinOrderExpress.getMailno());
kylinOrderExpressVo.setExpressStatus(kylinOrderExpress.getExpressStatus());
dataUtils.setOrderExpressInfo(orderTicketVo.getOrderTicketsId(), kylinOrderExpressVo); dataUtils.setOrderExpressInfo(orderTicketVo.getOrderTicketsId(), kylinOrderExpressVo);
} }
} else if(sendExpressType == 2) { // 自主发货 } else if (sendExpressType == 2) { // 自主发货
} }
} }
...@@ -982,7 +939,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -982,7 +939,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
for (AdamEntersVo item : adamEnters) { for (AdamEntersVo item : adamEnters) {
entersVoList.add(item); entersVoList.add(item);
if (ticketData.getIsStudent() == 1) { if (ticketData.getIsStudent() == 1) {
if(!item.getType().equals(1)){ if (!item.getType().equals(1)) {
return ResponseDto.failure("学生票优惠核验失败,无法转票"); return ResponseDto.failure("学生票优惠核验失败,无法转票");
} }
int age = IDCard.getAgeByIdCard(item.getIdCard()); int age = IDCard.getAgeByIdCard(item.getIdCard());
......
...@@ -31,6 +31,7 @@ kylin_order_ticket_entities.refund=UPDATE kylin_order_ticket_entities SET is_pay ...@@ -31,6 +31,7 @@ kylin_order_ticket_entities.refund=UPDATE kylin_order_ticket_entities SET is_pay
kylin_order_refund.refund=INSERT INTO kylin_order_refunds (order_refunds_id,order_tickets_id,order_refund_code,price,price_express,status,type,applicant_id,applicant_name,applicant_at,reason,refund_cate,created_at) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?) kylin_order_refund.refund=INSERT INTO kylin_order_refunds (order_refunds_id,order_tickets_id,order_refund_code,price,price_express,status,type,applicant_id,applicant_name,applicant_at,reason,refund_cate,created_at) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_refund_entities.refund=INSERT INTO kylin_order_refund_entities (order_refunds_entities_id,order_refunds_id,refund_price,order_ticket_entities_id,created_at) VALUES(?,?,?,?,?) kylin_order_refund_entities.refund=INSERT INTO kylin_order_refund_entities (order_refunds_entities_id,order_refunds_id,refund_price,order_ticket_entities_id,created_at) VALUES(?,?,?,?,?)
kylin_order_refund_pic.refund=INSERT INTO kylin_order_refund_pic (refund_pic_id,order_refunds_id,pic_url,created_at) VALUES (?,?,?,?) kylin_order_refund_pic.refund=INSERT INTO kylin_order_refund_pic (refund_pic_id,order_refunds_id,pic_url,created_at) VALUES (?,?,?,?)
kylin_order_refund.refundOrderExpress=INSERT INTO kylin_order_express (order_express_id,performances_id,order_tickets_id,order_express_code,mailno,express_type,filter_result,remark,express_status,send_type,send_express_type,express_contacts,express_phone,send_express_address,appointment_time,pro_name,cargo_type_code,limit_type_code,express_type_code,goods_value_total,goods_number,created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ------------------------用户发起订单退款撤回---------------------------- # ------------------------用户发起订单退款撤回----------------------------
kylin_order_ticket_status.withDraw=UPDATE kylin_order_ticket_status SET status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null) kylin_order_ticket_status.withDraw=UPDATE kylin_order_ticket_status SET status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment