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

Commit 4086785c authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev' into dev

parents 63598849 5819a36c
......@@ -21,7 +21,7 @@ public class RefundApplyParam implements Serializable {
private String reason;
private double RefundPriceExpress;
private Double RefundPriceExpress;
private List<String> ticketEntityIds;
......
package com.liquidnet.service.kylin.dto.vo;
import com.liquidnet.service.kylin.dao.KylinOrderRefundsEntitiesDao;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -7,6 +8,7 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
/**
* <p>
......@@ -51,6 +53,8 @@ public class KylinOrderRefundsVo implements Serializable {
@ApiModelProperty(value = "退款状态: 0请求退款 2取消退款 1审核通过 5驳回退款 7等待退款 3正在退款 4完成退款 6退款失败")
private Integer status;
private String statusName;
@ApiModelProperty(value = "退款差异: 0申请退款返还库存 1自动退款无法取消退款不返还库存")
private Integer type;
......@@ -102,4 +106,42 @@ public class KylinOrderRefundsVo implements Serializable {
@ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt;
List<KylinOrderRefundsEntitiesDao> entities;
public void setStatusName(Integer status){
this.status=status;
switch (status){
case 0:
this.statusName="请求退款";
break;
case 1:
this.statusName="一审通过";
break;
case 2:
this.statusName="取消退款";
break;
case 3:
this.statusName="正在退款";
break;
case 4:
this.statusName="完成退款";
break;
case 5:
this.statusName="一审驳回退款";
break;
case 6:
this.statusName="退款失败";
break;
case 7:
this.statusName="二审通过等待退款";
break;
case 8:
this.statusName="二审驳回退款";
break;
default:
this.statusName="其他";
break;
}
}
}
......@@ -37,23 +37,23 @@
</li>
<li>
<label>支付方式:</label>
<select name="orderType">
<select name="paymentType" th:with="type=${@dict.getType('zhengzai_pay_type')}">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>订单状态:</label>
<select name="orderType">
<select name="orderStatus" th:with="type=${@dict.getType('zhengzai_order_status')}">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>客户端:</label>
<select name="orderType">
<select name="orderSource" th:with="type=${@dict.getType('zhengzai_order_source')}">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
......
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('提交订单退款')" />
<th:block th:include="include :: header('提交订单退款')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-post-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单id:</label>
<div class="col-sm-8">
<input th:value="71619365224734720" class="form-control" type="text" name="orderTicketsId" id="orderTicketsId" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">快递费:</label>
<div class="col-sm-8">
<input th:value="0" class="form-control" type="text" name="RefundPriceExpress">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人:</label>
<div class="col-sm-8">
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="reason" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "kylin/refund";
$("#form-post-add").validate({
onkeyup: false,
rules:{
orderTicketsId:{
submitHandler: function(form) {
var config = {
url: prefix + "/applyOrder",
type: "post",
dataType: "json",
data: {
"orderTicketsId" : function() {
return $.common.trim($("#orderTicketsId").val());
}
},
beforeSend: function () {
$.modal.loading("正在查询订单,请稍后...");
},
success: function(result) {
$.modal.closeLoading();
console.log(result)
}
};
$.ajax(config)
}
},
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/apply", $('#form-post-add').serialize());
}
}
</script>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-post-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单id:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="orderTicketsId" id="orderTicketsId" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">快递费:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="RefundPriceExpress">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人:</label>
<div class="col-sm-8">
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label layui-required is-required">备注:</label>
<div class="col-sm-8">
<textarea name="reason" maxlength="500" class="form-control layui-required" rows="3"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
var prefix = ctx + "kylin/refund";
$("#form-post-add").validate({
onkeyup: false,
rules: {
orderTicketsId: {
submitHandler: function (form) {
var config = {
url: prefix + "/applyOrder",
type: "post",
dataType: "json",
data: {
"orderTicketsId": function () {
return $.common.trim($("#orderTicketsId").val());
}
},
beforeSend: function () {
$.modal.loading("正在查询订单,请稍后...");
},
success: function (result) {
var options = {
data: result.orderTicketEntitiesVo,
pagination: false,
columns: [{
checkbox: true
},
{
field: 'orderTicketEntitiesId',
title: '入场人id'
},
]
};
$.table.init(options);
$.modal.closeLoading();
}
};
$.ajax(config)
}
},
},
focusCleanup: true
});
function submitHandler() {
var reason = $('#form-post-add').find("[name='reason']").val();
var orderTicketsId = $('#form-post-add').find("[name='orderTicketsId']").val();
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (!orderTicketsId || !reason || rows.length <= 0) {
layer.msg("请完善数据");
return false;
}
if ($.validate.form()) {
var data = $('#form-post-add').serializeArray();
data.push({"ticketEntityIds":rows.join()});
data.push({"name":"ticketEntityIds","value":rows});
console.log(111)
$.operate.save(prefix + "/apply", data);
}
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('退款详情')" />
<th:block th:include="include :: header('退款详情')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<div class="form-group">
<label class="col-sm-2 control-label">退款单id:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.orderRefundsId}">
</div>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.orderRefundsId}"></div>
<label class="col-sm-2 control-label">票务订单id:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.orderTicketsId}"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">退款编号:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.orderRefundCode}"></div>
<label class="col-sm-2 control-label">退款中心退款编号:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.RefundCode}"></div>
<label class="col-sm-2 control-label">第三方退款编号:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.RefundId}"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">退款总金额:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.price}"></div>
<label class="col-sm-2 control-label">退款状态:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.statusName}"></div>
<label class="col-sm-2 control-label">成功退款时间:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.RefundAt}"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">申请人名称:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.applicantName}"></div>
<label class="col-sm-2 control-label">申请时间:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.applicantAt}"></div>
<label class="col-sm-2 control-label">申请备注:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.reason}"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">审核人名称:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.auditorName}"></div>
<label class="col-sm-2 control-label">审核时间:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.auditorAt}"></div>
<label class="col-sm-2 control-label">审核备注:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.reject}"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">执行人名称:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.executorName}"></div>
<label class="col-sm-2 control-label">执行时间:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.executorAt}"></div>
<label class="col-sm-2 control-label">执行备注:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsVo.refuse}"></div>
</div>
<div class="form-group">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>票种</legend>
</fieldset>
<table class="col-sm-8 select-table table-bordered">
<thead>
<tr>
<th>票种名称</th>
<th>适用日期</th>
<th>入场人</th>
<th>状态</th>
<th>价格</th>
</tr>
</thead>
<tbody>
<tr th:each="v : ${KylinOrderRefundsVo.entities}">
<td th:text="${v.title}"></td>
<td th:text="${v.useStart}"></td>
<td th:text="${v.enterName}"></td>
<td th:text="${v.isPaymentName}"></td>
<td th:text="${v.price}"></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: footer"/>
</body>
</html>
\ No newline at end of file
......@@ -202,12 +202,20 @@
title: '票务订单id'
},
{
field: 'title',
title: '演出名称'
field: 'orderRefundCode',
title: '退款编号'
},
{
field: 'RefundCode',
title: '退款中心退款编号'
},
{
field: 'RefundId',
title: '第三方退款编号'
},
{
field: 'price',
title: '退款金额'
title: '退款金额'
},
{
field: 'statusName',
......@@ -217,6 +225,10 @@
field: 'createdAt',
title: '申请时间'
},
{
field: 'RefundAt',
title: '成功退款时间'
},
{
title: '操作',
align: 'center',
......
......@@ -8,6 +8,7 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.constant.KylinTableStatusConst;
import com.liquidnet.service.kylin.dao.KylinOrderRefundsEntitiesDao;
import com.liquidnet.service.kylin.dao.OrderRefundDao;
import com.liquidnet.service.kylin.dto.param.RefundApplyParam;
import com.liquidnet.service.kylin.dto.param.RefundCallbackParam;
......@@ -62,7 +63,10 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
public ResponseDto refundApply(RefundApplyParam refundApplyParam) {
String orderTicketsId = refundApplyParam.getOrderTicketsId();
List<String> ticketEntityIds = refundApplyParam.getTicketEntityIds();
double RefundPriceExpress = refundApplyParam.getRefundPriceExpress();
Double RefundPriceExpress = refundApplyParam.getRefundPriceExpress();
if (null == RefundPriceExpress) {
RefundPriceExpress = 0.0;
}
KylinOrderTickets orderInfo = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>().eq("order_tickets_id", orderTicketsId)
......@@ -204,7 +208,17 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
new QueryWrapper<KylinOrderRefunds>()
.eq("order_refunds_id", orderRefundId)
);
String orderTicketEntitiesId = data.getOrderTicketEntitiesIds();
String[] orderTicketEntitiesIdS = orderTicketEntitiesId.split(",");
List<KylinOrderRefundsEntitiesDao> entities = kylinOrderTicketEntitiesMapper.selectEntitiesList(orderTicketEntitiesIdS);
for (KylinOrderRefundsEntitiesDao item : entities) {
item.setPaymentName(item.getIsPayment());
}
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo();
kylinOrderRefundsVo.setStatusName(data.getStatus());
kylinOrderRefundsVo.setEntities(entities);
BeanUtils.copyProperties(data, kylinOrderRefundsVo);
return kylinOrderRefundsVo;
......
package com.liquidnet.commons.lang.constant;
public class LnsRegex {
public static class Valid {
public static final String DATETIME_FULL = "^(((((0[48]|[2468][048]|[3579][26])00))|(([0-9]{2})(0[48]|[2468][048]|[13579][26])))[-|.|/| ]0?2[-|.|/| ]29|(((?!0{1,4})[0-9]{1,4})[-|.|/| ](((0[13-9]|1[0-2]|[13-9])[-|.|/| ](29|30))|((0[13578]|(10|12)|[13578])[-|.|/| ]31)|((0(?:[1-9])|1(?:[0-2])|[1-9])[-|.|/| ](0(?:[1-9])|1[0-9]|2[0-8]|[1-9])))))( ((0?[0-9])|(1[0-9]|2[0-3])):(([1-5][0-9])|(0?[0-9])):(([1-5][0-9])|(0?[0-9])))?$";
}
}
package com.liquidnet.service.kylin.dao;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
* refund返回给前端的数据字段
* </p>
*
* @author jiangxiulong
* @since 2021-05-31 11:19 上午
*/
@Data
public class KylinOrderRefundsEntitiesDao implements Serializable {
private String title;
private String enterName;
private String useStart;
private Integer isPayment;
private String isPaymentName;
private BigDecimal price;
public void setPaymentName(Integer isPayment){
this.isPayment=isPayment;
switch (isPayment){
case 0:
this.isPaymentName="未支付";
break;
case 1:
this.isPaymentName="已支付";
break;
case 2:
this.isPaymentName="退款中";
break;
case 3:
this.isPaymentName="已退款";
break;
default:
this.isPaymentName="其他";
break;
}
}
}
package com.liquidnet.service.kylin.mapper;
import com.liquidnet.service.kylin.dao.KylinOrderRefundsEntitiesDao;
import com.liquidnet.service.kylin.entity.KylinOrderTicketEntities;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
......@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface KylinOrderTicketEntitiesMapper extends BaseMapper<KylinOrderTicketEntities> {
List<KylinOrderRefundsEntitiesDao> selectEntitiesList(@Param("orderTicketEntitiesIdS") String[] orderTicketEntitiesIdS);
}
......@@ -2,4 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.kylin.mapper.KylinOrderTicketEntitiesMapper">
<select id="selectEntitiesList" resultType="com.liquidnet.service.kylin.dao.KylinOrderRefundsEntitiesDao">
SELECT a.enter_name, a.is_payment, b.title, b.use_start, b.price
FROM kylin_order_ticket_entities AS a
JOIN kylin_tickets AS b ON a.ticket_id = b.tickets_id
<where>
a.order_ticket_entities_id IN
<foreach collection="orderTicketEntitiesIdS" item="id" index="index" open="(" close=")" separator=",">
${id}
</foreach>
</where>
</select>
</mapper>
......@@ -7,7 +7,10 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.MongoTransactionManager;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -16,7 +19,6 @@ import java.util.Arrays;
@Slf4j
@EnableFeignClients
@MapperScan(basePackages = "com.liquidnet.service.adam.mapper")
//@SpringBootApplication(scanBasePackages = {"com.liquidnet"},exclude = {MongoAutoConfiguration.class,})
@SpringBootApplication(scanBasePackages = {"com.liquidnet"})
public class ServiceAdamApplication implements CommandLineRunner {
@Autowired
......@@ -44,4 +46,9 @@ public class ServiceAdamApplication implements CommandLineRunner {
e.printStackTrace();
}
}
// @Bean
// MongoTransactionManager transactionManager(MongoDbFactory factory){
// return new MongoTransactionManager(factory);
// }
}
......@@ -8,7 +8,10 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.MongoTransactionManager;
import java.net.InetAddress;
import java.net.UnknownHostException;
......@@ -44,4 +47,9 @@ public class ServiceKylinApplication implements CommandLineRunner {
e.printStackTrace();
}
}
// @Bean
// MongoTransactionManager transactionManager(MongoDbFactory factory){
// return new MongoTransactionManager(factory);
// }
}
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