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

Commit 64fc185b authored by jiangxiulong's avatar jiangxiulong

Merge branch 'test'

parents d889a411 3d4a3cf7
...@@ -13,9 +13,7 @@ import java.io.Serializable; ...@@ -13,9 +13,7 @@ import java.io.Serializable;
public class AdamMemberOrderCodeParam implements Serializable { public class AdamMemberOrderCodeParam implements Serializable {
private static final long serialVersionUID = 2500742355642406263L; private static final long serialVersionUID = 2500742355642406263L;
@ApiModelProperty(position = 10, required = true, value = "类型:2-会员码,3-礼包码", example = "3") @ApiModelProperty(position = 10, required = true, value = "类型:2-会员码,3-礼包码", example = "3")
@NotNull(message = "兑换码类型不能位空") @Pattern(regexp = "^[2-3]$", message = "类型无效")
@Min(value = 2, message = "兑换码类型无效")
@Max(value = 3, message = "兑换码类型无效")
private Integer mode; private Integer mode;
@ApiModelProperty(position = 11, required = true, value = "兑换码") @ApiModelProperty(position = 11, required = true, value = "兑换码")
@NotBlank(message = "兑换码不能为空") @NotBlank(message = "兑换码不能为空")
......
...@@ -19,10 +19,8 @@ public class AdamMemberOrderParam implements Serializable { ...@@ -19,10 +19,8 @@ public class AdamMemberOrderParam implements Serializable {
@ApiModelProperty(position = 11, required = true, value = "会员价格ID", example = "1") @ApiModelProperty(position = 11, required = true, value = "会员价格ID", example = "1")
@NotBlank(message = "会员价格ID不能为空") @NotBlank(message = "会员价格ID不能为空")
private String memberPriceId; private String memberPriceId;
@ApiModelProperty(position = 12, required = true, value = "购买方式:0-购买会员,1-购买会员码", allowableValues = "0,1") @ApiModelProperty(position = 12, required = true, value = "类型:0-购买会员,1-购买会员码", allowableValues = "0,1")
@NotNull(message = "购买方式不能为空") @Pattern(regexp = "^[0-1]$", message = "类型无效")
@Min(value = 0, message = "购买方式无效")
@Max(value = 1, message = "购买方式无效")
private Integer mode; private Integer mode;
@ApiModelProperty(position = 13, required = true, value = "应付金额", example = "0.01") @ApiModelProperty(position = 13, required = true, value = "应付金额", example = "0.01")
@DecimalMin(value = "0.01", message = "应付金额有误") @DecimalMin(value = "0.01", message = "应付金额有误")
...@@ -34,10 +32,10 @@ public class AdamMemberOrderParam implements Serializable { ...@@ -34,10 +32,10 @@ public class AdamMemberOrderParam implements Serializable {
@Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "生日格式有误") @Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "生日格式有误")
private String birthday; private String birthday;
@ApiModelProperty(position = 16, required = true, value = "支付终端", allowableValues = "app,wap,js,applet") @ApiModelProperty(position = 16, required = true, value = "支付终端", allowableValues = "app,wap,js,applet")
@NotBlank(message = "支付终端不能为空") @Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY_TERMINAL, message = "支付终端类型无效")
private String deviceFrom; private String deviceFrom;
@ApiModelProperty(position = 17, required = true, value = "支付方式", allowableValues = "alipay,wepay") @ApiModelProperty(position = 17, required = true, value = "支付方式", allowableValues = "alipay,wepay")
@NotBlank(message = "支付方式不能为空") @Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY, message = "支付方式无效")
private String payType; private String payType;
@ApiModelProperty(position = 18, required = false, value = "App内Apple支付必传") @ApiModelProperty(position = 18, required = false, value = "App内Apple支付必传")
private String productId; private String productId;
......
...@@ -22,9 +22,7 @@ public class AdamMemberPriceParam implements Serializable { ...@@ -22,9 +22,7 @@ public class AdamMemberPriceParam implements Serializable {
@NotBlank(message = "会员类型ID不能为空") @NotBlank(message = "会员类型ID不能为空")
private String memberId; private String memberId;
@ApiModelProperty(position = 3, value = "状态:0-不可用,1-上线中,2-已下线", allowableValues = "0,1,2") @ApiModelProperty(position = 3, value = "状态:0-不可用,1-上线中,2-已下线", allowableValues = "0,1,2")
@NotNull(message = "状态不能为空") @Pattern(regexp = "^[0-2]$", message = "状态无效")
@Min(value = 1, message = "状态无效")
@Max(value = 2, message = "状态无效")
private Integer state; private Integer state;
@ApiModelProperty(position = 4, value = "会员价格包名称", example = "年卡") @ApiModelProperty(position = 4, value = "会员价格包名称", example = "年卡")
@Size(min = 1, max = 30, message = "会员价格包名称长度限制1-30位") @Size(min = 1, max = 30, message = "会员价格包名称长度限制1-30位")
......
package com.liquidnet.service.adam.dto; package com.liquidnet.service.adam.dto;
import com.liquidnet.commons.lang.constant.LnsRegex;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
...@@ -21,11 +23,11 @@ public class AdamThirdPartParam implements Serializable { ...@@ -21,11 +23,11 @@ public class AdamThirdPartParam implements Serializable {
@Size(max = 255, message = "已超出头像链接长度限制") @Size(max = 255, message = "已超出头像链接长度限制")
private String avatar; private String avatar;
@ApiModelProperty(position = 14, required = true, value = "平台类型[255]", allowableValues = "WEIBO,WECHAT,QQ") @ApiModelProperty(position = 14, required = true, value = "平台类型[255]", allowableValues = "WEIBO,WECHAT,QQ")
//@Pattern(regexp = "\\b(WEIBO,WECHAT,QQ)\\b", message = "平台类型无效") @Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_ULGOIN, message = "平台类型无效")
private String platform; private String platform;
@ApiModelProperty(position = 15, required = false, value = "手机号[新账号时必传]", example = "13111111111") @ApiModelProperty(position = 15, required = false, value = "手机号[新账号时必传]")
private String mobile; private String mobile;
@ApiModelProperty(position = 16, required = false, value = "验证码[新账号时必传]", example = "111111") @ApiModelProperty(position = 16, required = false, value = "验证码[新账号时必传]")
private String code; private String code;
@ApiModelProperty(position = 17, required = false, value = "强制绑定[第三方账号已绑定其他手机号时]", example = "false") @ApiModelProperty(position = 17, required = false, value = "强制绑定[第三方账号已绑定其他手机号时]", example = "false")
private Boolean force; private Boolean force;
......
package com.liquidnet.service.dragon.dto;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayAlipayAppReqDto
* @Package com.liquidnet.service.dragon.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/9 11:00
*/
public class DragonPayAlipayAppReqDto {
}
package com.liquidnet.service.dragon.dto;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayAlipayAppReqDto
* @Package com.liquidnet.service.dragon.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/9 11:00
*/
public class DragonPayAlipayAppRespDto {
}
package com.liquidnet.service.dragon.dto;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayBaseReqDto
* @Package com.liquidnet.service.dragon.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/9 10:56
*/
public class DragonPayBaseReqDto {
@ApiModelProperty(position = 14, required = true, value = "性别[32]", example = "{\"val\":\"MS00\",\"desc\":\"其他性别\"}")
@NotNull(message = "性别不能为空")
private String type;
private String price;
private String name;
private String detail;
private String orderCode;
private String clientIp;
private String notifyUrl;
private String code;
private String createDate;
private String expireTime;
}
package com.liquidnet.service.dragon.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: DragonPayBaseReqDto
* @Package com.liquidnet.service.dragon.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/7/9 10:56
*/
@Data
public class DragonPayBaseRespDto {
private String code;
private String order_code;
private Integer status;
private String order_id;
private String showUrl;
private String returnUrl;
private BigDecimal price;
private PayData pay_data;
public static class PayData{
@JsonProperty("appId")
private String appId;
@JsonProperty("nonceStr")
private String nonceStr;
@JsonProperty("timeStamp")
private String timeStamp;
@JsonProperty("package")
private String packages;
private String partnerId;
private String prepayId;
private String sign;
private String mwebUrl;
private String paySign;
private String signType;
private String redirectUrl;
private String orderStr;
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getNonceStr() {
return nonceStr;
}
public void setNonceStr(String nonceStr) {
this.nonceStr = nonceStr;
}
public String getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(String timeStamp) {
this.timeStamp = timeStamp;
}
public String getPackages() {
return packages;
}
public void setPackages(String packages) {
this.packages = packages;
}
public String getPartnerId() {
return partnerId;
}
public void setPartnerId(String partnerId) {
this.partnerId = partnerId;
}
public String getPrepayId() {
return prepayId;
}
public void setPrepayId(String prepayId) {
this.prepayId = prepayId;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getMwebUrl() {
return mwebUrl;
}
public void setMwebUrl(String mwebUrl) {
this.mwebUrl = mwebUrl;
}
public String getPaySign() {
return paySign;
}
public void setPaySign(String paySign) {
this.paySign = paySign;
}
public String getSignType() {
return signType;
}
public void setSignType(String signType) {
this.signType = signType;
}
public String getRedirectUrl() {
return redirectUrl;
}
public void setRedirectUrl(String redirectUrl) {
this.redirectUrl = redirectUrl;
}
public String getOrderStr() {
return orderStr;
}
public void setOrderStr(String orderStr) {
this.orderStr = orderStr;
}
}
}
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
actions.push('<a class="btn btn-success btn-xs ' + reviewFlag + '" href="javascript:void(0)" onclick="review(\'' + row.orderRefundsId + '\')"></i>一审</a> '); actions.push('<a class="btn btn-success btn-xs ' + reviewFlag + '" href="javascript:void(0)" onclick="review(\'' + row.orderRefundsId + '\')"></i>一审</a> ');
actions.push('<a class="btn btn-primary btn-xs ' + executeFlag + '" href="javascript:void(0)" onclick="execute(\'' + row.orderRefundsId + '\')"></i>二审</a> '); actions.push('<a class="btn btn-primary btn-xs ' + executeFlag + '" href="javascript:void(0)" onclick="execute(\'' + row.orderRefundsId + '\')"></i>二审</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderRefundsId + '\', \'确定取消退款申请吗?\', table.options.cancelUrl)"></i>取消</a> '); actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderRefundsId + '\', \'确定取消退款申请吗?\', table.options.cancelUrl)"></i>取消</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + reapplyFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderRefundsId + '\', \'确定重新提交退款审核吗?\', table.options.reapplyUrl)"></i>重新提交</a> '); // actions.push('<a class="btn btn-warning btn-xs ' + reapplyFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderRefundsId + '\', \'确定重新提交退款审核吗?\', table.options.reapplyUrl)"></i>重新提交</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + completedFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderRefundsId + '\', \'确定主动完成退款吗?\', table.options.completedUrl)"></i>主动完成退款</a> '); actions.push('<a class="btn btn-warning btn-xs ' + completedFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderRefundsId + '\', \'确定主动完成退款吗?\', table.options.completedUrl)"></i>主动完成退款</a> ');
return actions.join(''); return actions.join('');
} }
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
actions.push('<a class="btn btn-success btn-xs ' + reviewFlag + '" href="javascript:void(0)" onclick="review(\'' + row.refundBatchId + '\')"></i>一审</a> '); actions.push('<a class="btn btn-success btn-xs ' + reviewFlag + '" href="javascript:void(0)" onclick="review(\'' + row.refundBatchId + '\')"></i>一审</a> ');
actions.push('<a class="btn btn-primary btn-xs ' + executeFlag + '" href="javascript:void(0)" onclick="execute(\'' + row.refundBatchId + '\')"></i>二审</a> '); actions.push('<a class="btn btn-primary btn-xs ' + executeFlag + '" href="javascript:void(0)" onclick="execute(\'' + row.refundBatchId + '\')"></i>二审</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.refundBatchId + '\', \'确定取消退款申请吗?\', table.options.cancelUrl)"></i>取消</a> '); actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.refundBatchId + '\', \'确定取消退款申请吗?\', table.options.cancelUrl)"></i>取消</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + reapplyFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.refundBatchId + '\', \'确定重新提交退款审核吗?\', table.options.reapplyUrl)"></i>重新提交</a> '); // actions.push('<a class="btn btn-warning btn-xs ' + reapplyFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.refundBatchId + '\', \'确定重新提交退款审核吗?\', table.options.reapplyUrl)"></i>重新提交</a> ');
return actions.join(''); return actions.join('');
} }
}] }]
......
...@@ -238,7 +238,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -238,7 +238,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
return ResponseDto.failure("type类型错误"); return ResponseDto.failure("type类型错误");
case "cancel": case "cancel":
// orderRefundStatus = new Integer[]{KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY, KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT, KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE}; // orderRefundStatus = new Integer[]{KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY, KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT, KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE};
orderRefundStatus = new Integer[]{KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY, KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT}; orderRefundStatus = new Integer[]{KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY, KylinTableStatusConst.ORDER_REFUND_STATUS_APPROVED};
orderType = KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY; orderType = KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY;
break; break;
case "reapply": case "reapply":
...@@ -274,7 +274,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -274,7 +274,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
String refuse = refundApplyParam.getRefuse(); String refuse = refundApplyParam.getRefuse();
switch (type) { switch (type) {
case "cancel": case "cancel":
res = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList); res = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, true);
break; break;
case "reapply": case "reapply":
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, "", ""); res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, "", "");
...@@ -284,6 +284,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -284,6 +284,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
break; break;
case "reject": case "reject":
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, ""); res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, "");
res = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, false);
break; break;
case "unfilled": case "unfilled":
res = kylinRefundsStatusServiceImpl.orderTicketRefundUnfilled(refundList, refuse); res = kylinRefundsStatusServiceImpl.orderTicketRefundUnfilled(refundList, refuse);
......
...@@ -212,7 +212,7 @@ public class KylinRefundsStatusServiceImpl { ...@@ -212,7 +212,7 @@ public class KylinRefundsStatusServiceImpl {
return true; return true;
} }
public boolean orderTicketRefundCancel(List<KylinOrderRefunds> refundList) { public boolean orderTicketRefundCancel(List<KylinOrderRefunds> refundList, Boolean isUser) {
for (KylinOrderRefunds refundInfo : refundList) { for (KylinOrderRefunds refundInfo : refundList) {
List<KylinOrderRefundEntities> refundEntities = kylinOrderRefundsEntitiesMapper.selectList( List<KylinOrderRefundEntities> refundEntities = kylinOrderRefundsEntitiesMapper.selectList(
new QueryWrapper<KylinOrderRefundEntities>().eq("order_refunds_id", refundInfo.getOrderRefundsId()) new QueryWrapper<KylinOrderRefundEntities>().eq("order_refunds_id", refundInfo.getOrderRefundsId())
...@@ -304,17 +304,19 @@ public class KylinRefundsStatusServiceImpl { ...@@ -304,17 +304,19 @@ public class KylinRefundsStatusServiceImpl {
} }
// 退款细节取消 // 退款细节取消
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds(); if (isUser) {
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL); KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds();
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now()); kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL);
kylinOrderRefundsMapper.update(kylinOrderRefunds, new UpdateWrapper<KylinOrderRefunds>() kylinOrderRefunds.setUpdatedAt(LocalDateTime.now());
.eq("order_refunds_id", orderRefundsId)); kylinOrderRefundsMapper.update(kylinOrderRefunds, new UpdateWrapper<KylinOrderRefunds>()
// 修改缓存 .eq("order_refunds_id", orderRefundsId));
UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne( // 修改缓存
Query.query(Criteria.where("orderRefundsId").is(orderRefundsId)).getQueryObject(), UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne(
new Document("$set", new Document("status", KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL) Query.query(Criteria.where("orderRefundsId").is(orderRefundsId)).getQueryObject(),
.append("updatedAt", LocalDateTime.now())) new Document("$set", new Document("status", KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL)
); .append("updatedAt", LocalDateTime.now()))
);
}
} }
List<String> orderRefundIds = refundList.stream().map( List<String> orderRefundIds = refundList.stream().map(
......
...@@ -90,6 +90,9 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -90,6 +90,9 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
@Autowired @Autowired
private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper; private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper;
@Autowired
private KylinOrderTicketStatusMapper kylinOrderTicketStatusMapper;
@Autowired @Autowired
private DataUtils dataUtils; private DataUtils dataUtils;
...@@ -136,6 +139,12 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -136,6 +139,12 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
KylinOrderTickets orderInfo = kylinOrderTicketsMapper.selectOne( KylinOrderTickets orderInfo = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>().eq("order_tickets_id", orderTicketsId) new QueryWrapper<KylinOrderTickets>().eq("order_tickets_id", orderTicketsId)
); );
KylinOrderTicketStatus orderStatus = kylinOrderTicketStatusMapper.selectOne(
new QueryWrapper<KylinOrderTicketStatus>().eq("order_id", orderTicketsId)
);
if (orderStatus.getStatus() != KylinTableStatusConst.ORDER_STATUS1 && orderStatus.getStatus() != KylinTableStatusConst.ORDER_STATUS6) {
return ResponseDto.failure("当前状态不能下单");
}
// 生成预快递单 防止因失败没办法再次发起也不能主动获取数据 // 生成预快递单 防止因失败没办法再次发起也不能主动获取数据
KylinOrderExpress kylinOrderExpressPre = new KylinOrderExpress(); KylinOrderExpress kylinOrderExpressPre = new KylinOrderExpress();
String orderExpressId = IDGenerator.nextSnowId(); String orderExpressId = IDGenerator.nextSnowId();
......
...@@ -22,6 +22,11 @@ public class LnsRegex { ...@@ -22,6 +22,11 @@ public class LnsRegex {
* 汉字-省|市|区(2~30位) * 汉字-省|市|区(2~30位)
*/ */
public static final String CN_PCD = "^[\\u4e00-\\u9fa5]{2,30}$"; public static final String CN_PCD = "^[\\u4e00-\\u9fa5]{2,30}$";
/* ======================================================================= | 证件类 */
/** /**
* 大陆居民身份证(15位||18位) * 大陆居民身份证(15位||18位)
*/ */
...@@ -29,34 +34,66 @@ public class LnsRegex { ...@@ -29,34 +34,66 @@ public class LnsRegex {
/** /**
* 大陆居民身份证 * 大陆居民身份证
*/ */
public static final String CN_ID_CARD_REF = "/(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)/"; public static final String CN_ID_CARD_REF = "(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
/** /**
* 军官证 * 军官证
* 规则: 军/兵/士/文/职/广/(其他中文) + "字第" + 4到8位字母或数字 + "号" * 规则: 军/兵/士/文/职/广/(其他中文) + "字第" + 4到8位字母或数字 + "号"
* 样本: 军字第2001988号, 士字第P011816X号 * 样本: 军字第2001988号, 士字第P011816X号
*/ */
public static final String CN_ID_CARD_MO = "/^[\\x{4E00}-\\x{9FA5}](字第)([0-9a-zA-Z]{4,8})(号?)$/u"; public static final String CN_ID_CARD_MO = "^[\\x{4E00}-\\x{9FA5}](字第)([0-9a-zA-Z]{4,8})(号?)$";
/** /**
* 中国大陆护照 * 中国大陆护照
* 规则: 14/15开头 + 7位数字, P + 7位数字, G/E + 8位数字, S/D + 7或8位数字, 等 * 规则: 14/15开头 + 7位数字, P + 7位数字, G/E + 8位数字, S/D + 7或8位数字, 等
* 样本: 141234567, G12345678, P1234567 * 样本: 141234567, G12345678, P1234567
*/ */
public static final String CN_ID_CARD_PP = "/^(?:P\\d{7}|[GE]\\d{8}|[SD]\\d{7,8}|[PSD]E\\d{7}|1[45]\\d{7})$/"; public static final String CN_ID_CARD_PP = "^(?:P\\d{7}|[GE]\\d{8}|[SD]\\d{7,8}|[PSD]E\\d{7}|1[45]\\d{7})$";
/** /**
* 非中国大陆护照 * 非中国大陆护照
*/ */
public static final String CN_ID_CARD_PP_NON = "/^([A-Z0-9]){5,17}$/"; public static final String CN_ID_CARD_PP_NON = "^([A-Z0-9]){5,17}$";
/** /**
* 港澳居民来往内地通行证 * 港澳居民来往内地通行证
* 规则: H/M + 8位数字, C + 8位数字, C + 1位字母除去IO + 7位数字 * 规则: H/M + 8位数字, C + 8位数字, C + 1位字母除去IO + 7位数字
* 样本: H12345678 * 样本: H12345678
*/ */
public static final String CN_ID_CARD_HM = "/^(?:[HM]\\d{8}|C[A-HJ-NP-Z0-9]\\d{7})$/"; public static final String CN_ID_CARD_HM = "^(?:[HM]\\d{8}|C[A-HJ-NP-Z0-9]\\d{7})$";
/** /**
* 台湾居民来往大陆通行证 * 台湾居民来往大陆通行证
* 规则: 8位数字, 18位数字, 10位数字 + 1位英文字母 * 规则: 8位数字, 18位数字, 10位数字 + 1位英文字母
* 样本: 12345678 1234567890B * 样本: 12345678 1234567890B
*/ */
public static final String CN_ID_CARD_TW = "/^(?:\\d{8}|\\d{18}|\\d{10}[A-Z])$/"; public static final String CN_ID_CARD_TW = "^(?:\\d{8}|\\d{18}|\\d{10}[A-Z])$";
/* ======================================================================= | 第三方平台类 */
/**
* 支持的第三方账号平台类型(用户中心:登录注册)
*/
public static final String TRIPLE_PF_FOR_ULGOIN = "\\b(WEIBO|WECHAT|QQ)\\b";
/**
* 支持的支付终端
*/
public static final String TRIPLE_PF_FOR_PAY_TERMINAL = "\\b(app|wap|js|applet)\\b";
/**
* 支持的支付方式
*/
public static final String TRIPLE_PF_FOR_PAY = "\\b(alipay|wepay)\\b";
/* ======================================================================= | */
/* ======================================================================= | */
/* ======================================================================= | */
} }
} }
...@@ -44,7 +44,7 @@ public class AdamCollectionController { ...@@ -44,7 +44,7 @@ public class AdamCollectionController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[1,64]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[1,64]"),
}) })
@PostMapping("add") @PostMapping("add")
public ResponseDto<Object> add(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效") public ResponseDto<Object> add(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type, @RequestParam String type,
@Size(min = 1, max = 64, message = "收藏内容ID长度限制1-64位") @Size(min = 1, max = 64, message = "收藏内容ID长度限制1-64位")
@RequestParam String contentId) { @RequestParam String contentId) {
...@@ -70,7 +70,7 @@ public class AdamCollectionController { ...@@ -70,7 +70,7 @@ public class AdamCollectionController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentIds", value = "内容ID[多个ID用','分隔]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentIds", value = "内容ID[多个ID用','分隔]"),
}) })
@PostMapping("del") @PostMapping("del")
public ResponseDto<Object> del(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效") public ResponseDto<Object> del(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type, @RequestParam String type,
@NotBlank(message = "内容ID不能为空") @RequestParam String contentIds) { @NotBlank(message = "内容ID不能为空") @RequestParam String contentIds) {
adamCollectionService.del(CurrentUtil.getCurrentUid(), type, contentIds.split(",")); adamCollectionService.del(CurrentUtil.getCurrentUid(), type, contentIds.split(","));
...@@ -86,7 +86,7 @@ public class AdamCollectionController { ...@@ -86,7 +86,7 @@ public class AdamCollectionController {
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "页展示条数", example = "5"), @ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "页展示条数", example = "5"),
}) })
@PostMapping("list") @PostMapping("list")
public ResponseDto<PageInfo<AdamCollectVo>> list(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效") public ResponseDto<PageInfo<AdamCollectVo>> list(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type, @RequestParam String type,
@RequestParam(defaultValue = "1", required = false) int pageNo, @RequestParam(defaultValue = "1", required = false) int pageNo,
@RequestParam(defaultValue = "5", required = false) int pageSize) { @RequestParam(defaultValue = "5", required = false) int pageSize) {
...@@ -118,7 +118,7 @@ public class AdamCollectionController { ...@@ -118,7 +118,7 @@ public class AdamCollectionController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[64]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[64]"),
}) })
@GetMapping("state") @GetMapping("state")
public ResponseDto<Boolean> state(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "收藏类型无效") public ResponseDto<Boolean> state(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "收藏类型无效")
@RequestParam String type, @RequestParam String type,
@Size(min = 1, max = 64, message = "收藏内容ID长度限制1-64位") @Size(min = 1, max = 64, message = "收藏内容ID长度限制1-64位")
@RequestParam String contentId) { @RequestParam String contentId) {
......
...@@ -45,7 +45,7 @@ public class AdamDisposedController { ...@@ -45,7 +45,7 @@ public class AdamDisposedController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[1,64]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[1,64]"),
}) })
@PostMapping("add") @PostMapping("add")
public ResponseDto<Object> add(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效") public ResponseDto<Object> add(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "想去类型无效")
@RequestParam String type, @RequestParam String type,
@Size(min = 1, max = 64, message = "内容ID长度限制1-64位") @Size(min = 1, max = 64, message = "内容ID长度限制1-64位")
@RequestParam String contentId) { @RequestParam String contentId) {
...@@ -72,7 +72,7 @@ public class AdamDisposedController { ...@@ -72,7 +72,7 @@ public class AdamDisposedController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentIds", value = "内容ID[多个ID用','分隔]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentIds", value = "内容ID[多个ID用','分隔]"),
}) })
@PostMapping("del") @PostMapping("del")
public ResponseDto<Object> del(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效") public ResponseDto<Object> del(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "想去类型无效")
@RequestParam String type, @RequestParam String type,
@NotBlank(message = "内容ID不能为空") @RequestParam String contentIds) { @NotBlank(message = "内容ID不能为空") @RequestParam String contentIds) {
adamDisposedService.del(CurrentUtil.getCurrentUid(), type, contentIds.split(",")); adamDisposedService.del(CurrentUtil.getCurrentUid(), type, contentIds.split(","));
...@@ -88,7 +88,7 @@ public class AdamDisposedController { ...@@ -88,7 +88,7 @@ public class AdamDisposedController {
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "页展示条数", example = "5"), @ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "页展示条数", example = "5"),
}) })
@PostMapping("list") @PostMapping("list")
public ResponseDto<PageInfo<AdamDisposedVo>> list(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效") public ResponseDto<PageInfo<AdamDisposedVo>> list(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "想去类型无效")
@RequestParam String type, @RequestParam String type,
@RequestParam(defaultValue = "1", required = false) int pageNo, @RequestParam(defaultValue = "1", required = false) int pageNo,
@RequestParam(defaultValue = "5", required = false) int pageSize) { @RequestParam(defaultValue = "5", required = false) int pageSize) {
...@@ -107,7 +107,7 @@ public class AdamDisposedController { ...@@ -107,7 +107,7 @@ public class AdamDisposedController {
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "页展示条数", example = "10"), @ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "页展示条数", example = "10"),
}) })
@PostMapping("list/user") @PostMapping("list/user")
public ResponseDto<PageInfo<AdamDisposedUserVo>> listUser(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效") public ResponseDto<PageInfo<AdamDisposedUserVo>> listUser(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "想去类型无效")
@RequestParam String type, @RequestParam String type,
@Size(min = 1, max = 64, message = "内容ID长度限制1-64位") @Size(min = 1, max = 64, message = "内容ID长度限制1-64位")
@RequestParam String contentId, @RequestParam String contentId,
...@@ -126,7 +126,7 @@ public class AdamDisposedController { ...@@ -126,7 +126,7 @@ public class AdamDisposedController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[64]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "contentId", value = "内容ID[64]"),
}) })
@GetMapping("state") @GetMapping("state")
public ResponseDto<Boolean> state(//@Pattern(regexp = "\\b(TICKET,VIDEO)\\b", message = "想去类型无效") public ResponseDto<Boolean> state(@Pattern(regexp = "\\b(TICKET|VIDEO)\\b", message = "想去类型无效")
@RequestParam String type, @RequestParam String type,
@Size(min = 1, max = 64, message = "内容ID长度限制1-64位") @Size(min = 1, max = 64, message = "内容ID长度限制1-64位")
@RequestParam String contentId) { @RequestParam String contentId) {
......
...@@ -275,7 +275,7 @@ public class AdamUserController { ...@@ -275,7 +275,7 @@ public class AdamUserController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "platform", value = "平台类型", allowableValues = "WEIBO,WECHAT,QQ"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "platform", value = "平台类型", allowableValues = "WEIBO,WECHAT,QQ"),
}) })
@PostMapping(value = {"tpa/unbind/{platform}"}) @PostMapping(value = {"tpa/unbind/{platform}"})
public ResponseDto<List<AdamThirdPartInfoVo>> unbindTpa(//@Pattern(regexp = "\\b(WEIBO,WECHAT,QQ)\\b", message = "平台类型无效") public ResponseDto<List<AdamThirdPartInfoVo>> unbindTpa(@Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_ULGOIN, message = "平台类型无效")
@PathVariable String platform) { @PathVariable String platform) {
String currentUid = CurrentUtil.getCurrentUid(); String currentUid = CurrentUtil.getCurrentUid();
log.debug("unbind tpa.platform:{},uid:{}", platform, currentUid); log.debug("unbind tpa.platform:{},uid:{}", platform, currentUid);
......
# ------------------------创建退款订单----------------------------
dragon_order_refund.insert=INSERT INTO `dragon_order_refunds`(`order_id` ,`status` ,`ticket_id` ,`code` ,`order_refund_code` ,`price` ,`reason` ,`notify_url` ,`refund_type`,`refund_id`,`refund_error`,`refund_at`,`finished_at`,`created_at`,`updated_at`)VALUES(? ,? ,? ,? ,? ,? ,? ,? ,?,?,?,?,?,?,?);
# ------------------------创建退款订单日志----------------------------
package com.liquidnet.service.kylin.controller;
import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.service.impl.PerformancesExpressInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 演出快递
* </p>
*
* @author jiangxiulong
* @since 2021-06-21
*/
@Api(tags = "前端-物流信息")
@RestController
@RequestMapping("performancesExpress")
public class PerformancesExpressInfoController {
@Autowired
private PerformancesExpressInfoServiceImpl performancesExpressInfoServiceImpl;
@GetMapping("orderRoute/{orderTicketsId}")
@ApiOperation("获取物流信息") // 前端使用
@ApiImplicitParam(name = "orderTicketsId", value = "订单ID", required = true, dataType = "String", paramType = "path")
public ResponseDto<KylinOrderExpressVo> orderRouteDetail(@PathVariable() String orderTicketsId) {
KylinOrderExpressVo routeVoList = performancesExpressInfoServiceImpl.orderRouteDetail(orderTicketsId);
if (null != routeVoList) {
return ResponseDto.success(routeVoList);
} else {
return ResponseDto.failure(ErrorMapping.get("20800"));
}
}
}
package com.liquidnet.service.kylin.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.IKylinOrderExpress;
import com.liquidnet.service.kylin.utils.DataUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* <p>
* 演出 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-05-05
*/
@Service
@Slf4j
public class PerformancesExpressInfoServiceImpl {
@Autowired
MongoTemplate mongoTemplate;
@Autowired
HttpServletRequest httpServletRequest;
@Autowired
private DataUtils dataUtils;
public KylinOrderExpressVo orderRouteDetail(String orderTicketsId) {
List<KylinOrderExpressRouteVo> routeList = dataUtils.getOrderExpressRoute(orderTicketsId);
KylinOrderExpressVo expressInfo = dataUtils.getOrderExpressInfos(orderTicketsId);
expressInfo.setRouteList(routeList);
return expressInfo;
}
}
\ No newline at end of file
...@@ -4,9 +4,8 @@ import com.liquidnet.common.cache.redis.util.RedisUtil; ...@@ -4,9 +4,8 @@ import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.adam.constant.AdamRedisConst; import com.liquidnet.service.adam.constant.AdamRedisConst;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo;
import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo;
import com.liquidnet.service.kylin.dto.vo.mongo.*; import com.liquidnet.service.kylin.dto.vo.mongo.*;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo; import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo; import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo;
...@@ -17,7 +16,6 @@ import org.springframework.data.domain.Sort; ...@@ -17,7 +16,6 @@ import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -438,4 +436,24 @@ public class DataUtils { ...@@ -438,4 +436,24 @@ public class DataUtils {
return null == i ? 1 : i; return null == i ? 1 : i;
} }
/**
* 演出订单快递路由
*/
public List<KylinOrderExpressRouteVo> getOrderExpressRoute(String orderTicketsId) { // 获取
String redisKey = KylinRedisConst.ORDER_ROUTE_INFO.concat(orderTicketsId);
if (!redisUtil.hasKey(redisKey)) {
List<KylinOrderExpressRouteVo> routeVoList = mongoTemplate.find(
Query.query(Criteria.where("orderTicketsId").is(orderTicketsId)),
KylinOrderExpressRouteVo.class, KylinOrderExpressRouteVo.class.getSimpleName()
);
redisUtil.set(redisKey, routeVoList);
}
return (List<KylinOrderExpressRouteVo>) redisUtil.get(redisKey);
}
public KylinOrderExpressVo getOrderExpressInfos(String orderId) {
String redisKey = KylinRedisConst.ORDER_EXPRESS_INFO.concat(orderId);
return (KylinOrderExpressVo) redisUtil.get(redisKey);
}
} }
package com.liquidnet.service.platform.controller.express.shunfeng; package com.liquidnet.service.platform.controller.express.shunfeng;
import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.platform.service.express.shunfeng.PerformancesExpressCallbackServiceImpl; import com.liquidnet.service.platform.service.express.shunfeng.PerformancesExpressCallbackServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
/** /**
* <p> * <p>
...@@ -70,16 +64,4 @@ public class PerformancesExpressCallbackController { ...@@ -70,16 +64,4 @@ public class PerformancesExpressCallbackController {
return objectObjectHashMap; return objectObjectHashMap;
} }
@GetMapping("orderRoute/{orderTicketsId}")
@ApiOperation("获取物流信息") // 前端使用
@ApiImplicitParam(name = "orderTicketsId", value = "订单ID", required = true, dataType = "String", paramType = "path")
public ResponseDto<KylinOrderExpressVo> orderRouteDetail(@PathVariable() String orderTicketsId) {
KylinOrderExpressVo routeVoList = performancesExpressServiceImpl.orderRouteDetail(orderTicketsId);
if (null != routeVoList) {
return ResponseDto.success(routeVoList);
} else {
return ResponseDto.failure(ErrorMapping.get("20800"));
}
}
} }
package com.liquidnet.service.platform.service.express.shunfeng; package com.liquidnet.service.platform.service.express.shunfeng;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.*; import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.param.*; import com.liquidnet.service.kylin.dto.param.*;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressRouteVo;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo; import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinRoadShowVo;
import com.liquidnet.service.kylin.entity.*; import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*; import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.IKylinOrderExpress; import com.liquidnet.service.kylin.service.IKylinOrderExpress;
...@@ -20,8 +16,6 @@ import lombok.extern.slf4j.Slf4j; ...@@ -20,8 +16,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -182,10 +176,4 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd ...@@ -182,10 +176,4 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
return false; return false;
} }
public KylinOrderExpressVo orderRouteDetail(String orderTicketsId) {
List<KylinOrderExpressRouteVo> routeList = dataUtils.getOrderExpressRoute(orderTicketsId);
KylinOrderExpressVo expressInfo = dataUtils.getOrderExpressInfo(orderTicketsId);
expressInfo.setRouteList(routeList);
return expressInfo;
}
} }
\ No newline at end of file
...@@ -605,25 +605,7 @@ public class DataUtils { ...@@ -605,25 +605,7 @@ public class DataUtils {
String redisKey = KylinRedisConst.ORDER_EXPRESS_INFO.concat(orderId); String redisKey = KylinRedisConst.ORDER_EXPRESS_INFO.concat(orderId);
redisUtil.set(redisKey, kylinOrderExpressVo); redisUtil.set(redisKey, kylinOrderExpressVo);
} }
public KylinOrderExpressVo getOrderExpressInfo(String orderId) {
String redisKey = KylinRedisConst.ORDER_EXPRESS_INFO.concat(orderId);
return (KylinOrderExpressVo) redisUtil.get(redisKey);
}
/**
* 演出订单快递路由
*/
public List<KylinOrderExpressRouteVo> getOrderExpressRoute(String orderTicketsId) { // 获取
String redisKey = KylinRedisConst.ORDER_ROUTE_INFO.concat(orderTicketsId);
if (!redisUtil.hasKey(redisKey)) {
List<KylinOrderExpressRouteVo> routeVoList = mongoTemplate.find(
Query.query(Criteria.where("orderTicketsId").is(orderTicketsId)),
KylinOrderExpressRouteVo.class, KylinOrderExpressRouteVo.class.getSimpleName()
);
redisUtil.set(redisKey, routeVoList);
}
return (List<KylinOrderExpressRouteVo>) redisUtil.get(redisKey);
}
public void delOrderExpressRoute(String orderTicketsId) { // 删除 public void delOrderExpressRoute(String orderTicketsId) { // 删除
String redisKey = KylinRedisConst.ORDER_ROUTE_INFO.concat(orderTicketsId); String redisKey = KylinRedisConst.ORDER_ROUTE_INFO.concat(orderTicketsId);
redisUtil.del(redisKey); redisUtil.del(redisKey);
......
...@@ -59,26 +59,20 @@ public class ShunfengSignUtils { ...@@ -59,26 +59,20 @@ public class ShunfengSignUtils {
* @return * @return
*/ */
public boolean receiveRequestAndCheckSign(String params, HttpServletRequest request) { public boolean receiveRequestAndCheckSign(String params, HttpServletRequest request) {
log.error("params {}", params);
log.debug("params {}", params); log.debug("params {}", params);
log.info("params {}", params);
// 请求方APPID // 请求方APPID
String sendAppId = request.getHeader("sendAppId"); String sendAppId = request.getHeader("sendAppId");
log.error("sendAppId {}", sendAppId);
// 请求方时间戳 // 请求方时间戳
String timestamp = request.getHeader("timestamp"); String timestamp = request.getHeader("timestamp");
log.error("timestamp {}", timestamp);
// 请求方签名 // 请求方签名
String sign = request.getHeader("sign"); String sign = request.getHeader("sign");
log.error("sign {}", sign);
if (StringUtils.isBlank(sendAppId)) { if (StringUtils.isBlank(sendAppId)) {
log.error("参数sendAppId不能为空"); log.error("参数sendAppId不能为空");
return false; return false;
} }
if (StringUtils.isBlank(timestamp)) { if (StringUtils.isBlank(timestamp)) {
log.error("参数timestamp不能为空 {}", ""); log.error("参数timestamp不能为空");
System.out.println("参数timestamp不能为空");
return false; return false;
} }
if (StringUtils.isBlank(sign)) { if (StringUtils.isBlank(sign)) {
...@@ -94,7 +88,6 @@ public class ShunfengSignUtils { ...@@ -94,7 +88,6 @@ public class ShunfengSignUtils {
} }
// 请求方参数+请求方时间戳+SK 生成签名 // 请求方参数+请求方时间戳+SK 生成签名
String thisSign = genSign(timestamp, params); String thisSign = genSign(timestamp, params);
log.error("thisSign {}", thisSign);
// 获取的签名和请求方签名比较是否一致 // 获取的签名和请求方签名比较是否一致
if (!thisSign.equals(sign)) { if (!thisSign.equals(sign)) {
log.error("签名错误"); log.error("签名错误");
......
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