Commit 0e10921e by jinxin

transactionId改为OrderNumber

parent 57b7fdfc
......@@ -76,7 +76,7 @@ public class LicenceOrderDTO implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 上传凭证url
......@@ -258,12 +258,12 @@ public class LicenceOrderDTO implements Serializable {
this.payType = payType;
}
public String getTransactionId() {
return transactionId;
public String getOrderNumber() {
return orderNumber;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getVoucher() {
......
......@@ -58,7 +58,7 @@ public class LicenceOrderPageDTO implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
......@@ -127,6 +127,18 @@ public class LicenceOrderPageDTO implements Serializable {
* 微信商户名称
*/
private String wxEnterpriseName;
/**
* 微信订单id
*/
private String wxOrderId;
public String getWxOrderId() {
return wxOrderId;
}
public void setWxOrderId(String wxOrderId) {
this.wxOrderId = wxOrderId;
}
public Date getQywxPayTime() {
return qywxPayTime;
......@@ -240,12 +252,12 @@ public class LicenceOrderPageDTO implements Serializable {
this.payType = payType;
}
public String getTransactionId() {
return transactionId;
public String getOrderNumber() {
return orderNumber;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Integer getOrderStatus() {
......
......@@ -20,7 +20,7 @@ public class LicenceOrderPageQDTO extends BasePageInfo implements Serializable
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
......@@ -92,12 +92,12 @@ public class LicenceOrderPageQDTO extends BasePageInfo implements Serializable
this.creatorName = creatorName;
}
public String getTransactionId() {
return transactionId;
public String getOrderNumber() {
return orderNumber;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Integer getOrderStatus() {
......
......@@ -113,7 +113,7 @@ public interface LicenceOrderApiService {
* 查询订单编号id
*
* @param param 查询参数
* @param type 0 微信订单编号 1 企业微信订单编号
* @param type 0 订单编号 1 企业微信订单编号 2微信订单编号
* @param wxEnterpriseId
* @return
*/
......
......@@ -202,7 +202,7 @@ public class LicenceOrderController {
* 订单编号和企业微信订单编号模糊搜索
*
* @param param 模糊查询
* @param type 0 微信订单编号 1 企业微信订单编号
* @param type 0 订单编号 1 企业微信订单编号 2微信订单编号
* @return
*/
@RequestMapping("get-order-id-list")
......
......@@ -23,7 +23,7 @@ public class LicenceOrderPageQO extends BasePageInfo implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
......@@ -56,5 +56,9 @@ public class LicenceOrderPageQO extends BasePageInfo implements Serializable {
* gic商户Id
*/
private String enterpriseId;
/**
* 微信订单id
*/
private String wxOrderId;
}
......@@ -63,7 +63,7 @@ public class LicenceOrderPageVO implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
......@@ -128,6 +128,10 @@ public class LicenceOrderPageVO implements Serializable {
* 微信商户名称
*/
private String wxEnterpriseName;
/**
* 微信订单id
*/
private String wxOrderId;
}
......@@ -81,7 +81,7 @@ public class LicenceOrderVO implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 上传凭证url
......
......@@ -4,7 +4,6 @@ import com.gic.haoban.manage.api.dto.qdto.licence.LicenceOrderPageQDTO;
import com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrder;
import org.apache.ibatis.annotations.Param;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;
......@@ -86,19 +85,18 @@ public interface TabHaobanLicenceOrderMapper {
List<TabHaobanLicenceOrder> getLicenceOrderPage(LicenceOrderPageQDTO licenceOrderPageQDTO);
Integer saveTransactionCode(@Param("orderId") Long orderId, @Param("transactionCode") String transactionCode, @Param("prepayId") String prepayId,
@Param("wxOrderId") String wxOrderId, @Param("payTime") Date payTime,@Param("wxUrl") String wxUrl);
Integer saveTransactionCode(@Param("orderId") Long orderId, @Param("orderNumber") String orderNumber, @Param("prepayId") String prepayId,
@Param("wxOrderId") String wxOrderId, @Param("payTime") Date payTime, @Param("wxUrl") String wxUrl);
/**
* 获取订单详情
*
* @param transactionId 微信订单id
* @param orderNumber 订单编号
* @return
*/
TabHaobanLicenceOrder selectByTransactionId(@Param("transactionId") String transactionId);
TabHaobanLicenceOrder selectByTransactionId(@Param("orderNumber") String orderNumber);
/**
*
* @param qywxOrderId 企业微信订单id
* @return
*/
......@@ -113,19 +111,22 @@ public interface TabHaobanLicenceOrderMapper {
*/
Integer saveQywxOrderId(@Param("orderId") Long orderId, @Param("qywxOrderId") String qywxOrderId);
List<String> getTransactionIdList(@Param("transactionId") String transactionId,@Param("wxEnterpriseId") String wxEnterpriseId);
List<String> getTransactionIdList(@Param("orderNumber") String orderNumber, @Param("wxEnterpriseId") String wxEnterpriseId);
List<String> getQywxOrderId(@Param("qywxOrderId") String qywxOrderId, @Param("wxEnterpriseId") String wxEnterpriseId);
List<String> getQywxOrderId(@Param("qywxOrderId") String qywxOrderId,@Param("wxEnterpriseId") String wxEnterpriseId);
List<String> getWxOrderId(@Param("wxOrderId") String wxOrderId, @Param("wxEnterpriseId") String wxEnterpriseId);
Integer saveOrderCheckReason(@Param("orderId") Long orderId, @Param("reason") String reason,@Param("type") Integer type);
Integer saveOrderCheckReason(@Param("orderId") Long orderId, @Param("reason") String reason, @Param("type") Integer type);
/**
* 记录回调时间
*
* @param orderId 订单id
* @param type 0 微信支付时间 1 微信退款时间 2 企业微信支付时间 3企业微信退款时间
* @param type 0 微信支付时间 1 微信退款时间 2 企业微信支付时间 3企业微信退款时间
* @param time
* @return
*/
Integer saveCallBackTime(@Param("orderId")Long orderId,@Param("type")Integer type,@Param("time")Date time);
Integer saveCallBackTime(@Param("orderId") Long orderId, @Param("type") Integer type, @Param("time") Date time);
}
......@@ -73,7 +73,7 @@ public class TabHaobanLicenceOrder implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 上传凭证url
......
......@@ -82,13 +82,13 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
order.setOrderStatus(0);
order.setCreateTime(now);
order.setUpdateTime(now);
//生成订单编号
String num = "ZH"+orderId;
order.setOrderNumber(num);
Date expireTime;
if(order.getPayType()==1){
expireTime = DateUtil.addNumForMinute(now, 30);
}else {
//生成订单编号
String num = "ZH"+orderId;
order.setTransactionId(num);
expireTime = DateUtil.addDay(now, 3);
}
order.setExpireTime(expireTime);
......@@ -193,7 +193,7 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
String subHost = host.substring(0, secondLastIndex + 1);
String url = subHost + "enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="+orderId;
String msg = "标题:企微账号许可通知\n品牌名称:"+enterpriseName+"\n"+"企业名称:"+wxEnterpriseName+"\n"+"消息内容:"+dateToStr+
"订单编号为"+tabHaobanLicenceOrder.getTransactionId()+",请尽快处理!\n"+url;
"订单编号为"+tabHaobanLicenceOrder.getOrderNumber()+",请尽快处理!\n"+url;
DingUtils.send(msg,"https://oapi.dingtalk.com/robot/send?access_token=63074c9fc1ac2c00aa62477facdf16e5fa2388cf6a621edba1fb05d6e55d031f",false);
return true;
}
......@@ -254,8 +254,10 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
List<String> result = new ArrayList<>();
if (type == 0){
result = tabHaobanLicenceOrderMapper.getTransactionIdList(param,wxEnterpriseId);
}else {
}else if(type == 1){
result = tabHaobanLicenceOrderMapper.getQywxOrderId(param,wxEnterpriseId);
}else {
result = tabHaobanLicenceOrderMapper.getWxOrderId(param,wxEnterpriseId);
}
return result;
}
......
......@@ -231,9 +231,9 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
// 倒数第二个分隔符位置
int secondLastIndex = host.lastIndexOf("/", lastIndex - 1);
String subHost = host.substring(0, secondLastIndex + 1);
String url = subHost + "enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId=" + orderId;
String url = subHost + "enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId=" + licenceOrder.getOrderId();
String msg = "标题:企微账号许可通知\n品牌名称:" + enterpriseName + "\n" + "企业名称:" + wxEnterpriseName + "\n" + "消息内容:" + dateToStr +
"订单编号为" + orderId + ",请尽快处理!\n" + url;
"订单编号为" + licenceOrder.getOrderNumber() + ",请尽快处理!\n" + url;
DingUtils.send(msg, "https://oapi.dingtalk.com/robot/send?access_token=63074c9fc1ac2c00aa62477facdf16e5fa2388cf6a621edba1fb05d6e55d031f", false);
return ServiceResponse.success(true);
}
......@@ -316,7 +316,10 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
return ServiceResponse.failure("-9999", "订单id有误!");
}
if (2 == order.getPayType()) {
return ServiceResponse.success(false);
return ServiceResponse.failure("-9999", "对公转账类型不需要申请微信退款!");
}
if (4 == order.getOrderStatus()){
return ServiceResponse.failure("-9999", "该笔订单已退款!");
}
RefundReqDataDTO reqData = new RefundReqDataDTO(order.getWxOrderId(), null, null, String.valueOf(orderId), 1,
1, null, null);
......
......@@ -12,7 +12,7 @@
<result column="time_type" property="timeType"/>
<result column="time_value" property="timeValue"/>
<result column="pay_type" property="payType"/>
<result column="transaction_id" property="transactionId"/>
<result column="order_number" property="orderNumber"/>
<result column="voucher" property="voucher"/>
<result column="order_status" property="orderStatus"/>
<result column="order_status_reason" property="orderStatusReason"/>
......@@ -45,7 +45,7 @@
time_type,
time_value,
pay_type,
transaction_id,
order_number,
voucher,
order_status,
order_status_reason,
......@@ -81,7 +81,7 @@
time_type,
time_value,
pay_type,
transaction_id,
order_number,
voucher,
order_status,
order_status_reason,
......@@ -109,7 +109,7 @@
#{timeType,jdbcType=INTEGER},
#{timeValue,jdbcType=INTEGER},
#{payType,jdbcType=INTEGER},
#{transactionId,jdbcType=CHAR},
#{orderNumber,jdbcType=CHAR},
#{voucher,jdbcType=VARCHAR},
#{orderStatus,jdbcType=INTEGER},
#{orderStatusReason,jdbcType=VARCHAR},
......@@ -214,7 +214,7 @@
FROM tab_haoban_licence_order
WHERE delete_flag = 0
<if test="transactionId != null and transactionId !='' ">
and transaction_id=#{transactionId}
and order_number=#{orderNumber}
</if>
<if test="orderStatus != null">
and order_status=#{orderStatus}
......@@ -238,7 +238,7 @@
UPDATE tab_haoban_licence_order
SET
<if test="transactionCode != null">
transaction_id = #{transactionCode},
order_number = #{orderNumber},
</if>
<if test="prepayId != null">
prepay_id = #{prepayId},
......@@ -260,7 +260,7 @@
<select id="selectByTransactionId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM tab_haoban_licence_order WHERE transaction_id = #{transactionId} and delete_flag=0
FROM tab_haoban_licence_order WHERE order_number = #{orderNumber} and delete_flag=0
</select>
<select id="selectByQywxOrderId" resultMap="BaseResultMap">
......@@ -278,8 +278,8 @@
<select id="getTransactionIdList" resultMap="BaseResultMap">
SELECT
transaction_id
FROM tab_haoban_licence_order WHERE transaction_id like concat (#{transactionId},'%') and delete_flag=0 and wx_enterprise_id = #{wxEnterpriseId}
order_number
FROM tab_haoban_licence_order WHERE order_number like concat (#{orderNumber},'%') and delete_flag=0 and wx_enterprise_id = #{wxEnterpriseId}
</select>
<select id="getQywxOrderId" resultMap="BaseResultMap">
......@@ -288,6 +288,12 @@
FROM tab_haoban_licence_order WHERE qywx_order_id like concat (#{qywxOrderId},'%') and delete_flag=0 and wx_enterprise_id = #{wxEnterpriseId}
</select>
<select id="getWxOrderId" resultMap="BaseResultMap">
SELECT
wx_order_id
FROM tab_haoban_licence_order WHERE wx_order_id like concat (#{wxOrderId},'%') and delete_flag=0 and wx_enterprise_id = #{wxEnterpriseId}
</select>
<update id="saveOrderCheckReason">
UPDATE tab_haoban_licence_order
SET reason = #{reason} ,update_time = now(),order_status_reason = '审核未通过',order_status = #{type}
......
......@@ -84,18 +84,18 @@ public class LicenceOrderController {
return RestResponse.successResult(licenceOrderVO);
}
/**
* 删除订单
*/
@RequestMapping("licence-order-delete")
public RestResponse<Boolean> deleteLicenceOrder(@RequestParam Long orderId) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
if (loginUser == null || StringUtils.isBlank(loginUser.getEnterpriseId())) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_4.getCode()), HaoBanErrCode.ERR_4.getMsg());
}
ServiceResponse<Boolean> booleanServiceResponse = licenceOrderApiService.deleteLicenceOrder(orderId);
return RestResponse.successResult(booleanServiceResponse.getResult());
}
// /**
// * 删除订单
// */
// @RequestMapping("licence-order-delete")
// public RestResponse<Boolean> deleteLicenceOrder(@RequestParam Long orderId) {
// WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
// if (loginUser == null || StringUtils.isBlank(loginUser.getEnterpriseId())) {
// return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_4.getCode()), HaoBanErrCode.ERR_4.getMsg());
// }
// ServiceResponse<Boolean> booleanServiceResponse = licenceOrderApiService.deleteLicenceOrder(orderId);
// return RestResponse.successResult(booleanServiceResponse.getResult());
// }
/**
* 新增或者修改订单
......@@ -127,7 +127,7 @@ public class LicenceOrderController {
} else {
time = licenceOrderQO.getTimeValue() + "天";
}
String logValue = "【购买企微许可账号】:订单编号" + result + ",企业员工账号" + licenceOrderQO.getExternalContactCount() + "个,时长" + time;
String logValue = "【购买企微许可账号】:订单编号ZH" + result + ",企业员工账号" + licenceOrderQO.getExternalContactCount() + "个,时长" + time;
GicLogRecordEvaluationContext.putAttribute("logValue", logValue);
return RestResponse.successResult(result);
}
......@@ -173,7 +173,7 @@ public class LicenceOrderController {
String wxEnterpriseId = loginUser.getWxEnterpriseId();
String clerkName = loginUser.getClerkName();
Boolean result = licenceOrderApiService.updateLicenceOrderType(orderId, type, enterpriseId, wxEnterpriseId, clerkName, 1).getResult();
String logValue = "【取消购买企微许可账号订单】:订单编号" + orderId + ",取消时间" + DateUtil.dateToStr(new Date(), DateUtil.FORMAT_DATETIME_19);
String logValue = "【取消购买企微许可账号订单】:订单编号" + dto.getOrderNumber() + ",取消时间" + DateUtil.dateToStr(new Date(), DateUtil.FORMAT_DATETIME_19);
GicLogRecordEvaluationContext.putAttribute("logValue", logValue);
return RestResponse.successResult(result);
}
......@@ -198,7 +198,7 @@ public class LicenceOrderController {
String wxEnterpriseId = loginUser.getWxEnterpriseId();
String clerkName = loginUser.getClerkName();
Boolean result = licenceOrderApiService.uploadLicenceOrderVoucher(orderId, voucher, enterpriseId, wxEnterpriseId, clerkName).getResult();
String logValue = "【上传购买企微许可账号支付凭证】:订单编号" + orderId + ",上传时间" + DateUtil.dateToStr(new Date(), DateUtil.FORMAT_DATETIME_19);
String logValue = "【上传购买企微许可账号支付凭证】:订单编号" + dto.getOrderNumber() + ",上传时间" + DateUtil.dateToStr(new Date(), DateUtil.FORMAT_DATETIME_19);
GicLogRecordEvaluationContext.putAttribute("logValue", logValue);
return RestResponse.successResult(result);
}
......@@ -219,7 +219,7 @@ public class LicenceOrderController {
//判断url是否存在,存在直接返回
if (null != result.getWxUrl() && null != result.getExpireTime() && new Date().before(result.getExpireTime())) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("transactionCode", result.getTransactionId());
map.put("transactionCode", result.getOrderNumber());
map.put("url", result.getWxUrl());
map.put("money", result.getPrice());
return RestResponse.successResult(map);
......@@ -230,7 +230,7 @@ public class LicenceOrderController {
money = 1;
}
// 交易订单号
String transactionCode = String.valueOf(UniqueIdUtils.uniqueLong());
String transactionCode = result.getOrderNumber();
ScanPayReqDataDTO scanPayReqData = new ScanPayReqDataDTO("好办平台企业微信许可账号购买", loginUser.getEnterpriseId(),
transactionCode, money, DateUtil.dateToStr(new Date(), DateUtil.FORMAT_DATETIME_14), "",
"NATIVE");
......
......@@ -23,7 +23,7 @@ public class LicenceOrderPageQO extends BasePageInfo implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
......
......@@ -63,7 +63,7 @@ public class LicenceOrderPageVO implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
......
......@@ -81,7 +81,7 @@ public class LicenceOrderVO implements Serializable {
/**
* 订单编号
*/
private String transactionId;
private String orderNumber;
/**
* 上传凭证url
......
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