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

Commit b17f2709 authored by jiangxiulong's avatar jiangxiulong

Merge branch 'dev' into test

parents 0650c726 1a5829e8
......@@ -22,6 +22,8 @@ public class RefundSearchParam implements Serializable {
private String orderRefundCode;
private String orderCode;
private Integer status;
@ApiModelProperty(value = "页数", example = "0")
......
......@@ -11,7 +11,7 @@ import java.time.LocalDateTime;
@Data
public class KylinOrderRefundEntitiesVo {
private Integer mid;
private String orderRefundsEntities_id;
private String orderRefundsEntitiesId;
private String orderRefundsId;
private String orderTicketEntitiesId;
private BigDecimal refundPrice;
......
......@@ -5,36 +5,39 @@ import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@Data
public class KylinOrderRefundsVo {
private Integer mid;
private String order_refunds_id;
private String order_tickets_id;
private String order_refund_code;
private String order_refund_batches_id;
private String refund_code;
private LocalDateTime refund_at;
private String refund_id;
private String refund_error;
private String orderRefundsId;
private String orderTicketsId;
private String orderRefundCode;
private String orderRefund_batchesId;
private String refundCode;
private LocalDateTime refundAt;
private String refundId;
private String refundError;
private BigDecimal price;
private BigDecimal price_express;
private BigDecimal priceExpress;
private Integer status;
private Integer type;
private String applicant_id;
private String applicant_name;
private LocalDateTime applicant_at;
private String applicantId;
private String applicantName;
private LocalDateTime applicantAt;
private String reason;
private String auditor_id;
private String auditor_name;
private LocalDateTime auditor_at;
private String auditorId;
private String auditorName;
private LocalDateTime auditorAt;
private String reject;
private String executor_id;
private String executor_name;
private LocalDateTime executor_at;
private String executorId;
private String executorName;
private LocalDateTime executorAt;
private String refuse;
private Integer refund_type;
private String refund_cate;
private LocalDateTime created_at;
private LocalDateTime updated_at;
private Integer refundType;
private String refundCate;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private List<KylinOrderRefundEntitiesVo> orderRefundEntitiesVos;
}
......@@ -73,6 +73,7 @@ INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status,
INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES (107, '支付状态', 'zhengzai_payment_type', '0', 'admin', '2021-06-11 16:01:37', '', null, '票务状态');
INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES (108, '出票状态', 'zhengzai_ticket_status', '0', 'admin', '2021-06-11 16:03:36', '', null, '订单出票状态');
INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES (109, '票种类型', 'zhengzai_ticket_type', '0', 'admin', '2021-06-18 11:12:28', '', null, null);
INSERT INTO test_ln_scene.sys_dict_type (dict_id, dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES (110, '会员订单状态', 'zhengzai_member_order_status', '0', 'admin', '2021-06-20 17:18:48', '', null, '会员订单状态');
-- sys_dict_data
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (100, 2, '支付宝', 'alipay', 'zhengzai_pay_type', null, null, 'Y', '0', 'admin', '2021-06-07 10:39:11', '', null, '支付宝');
......@@ -110,3 +111,9 @@ INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (133, 2, '已出票', '1', 'zhengzai_ticket_status', null, null, 'Y', '0', 'admin', '2021-06-11 16:07:41', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (134, 1, '单日票', '1', 'zhengzai_ticket_type', null, null, 'Y', '0', 'admin', '2021-06-18 11:13:08', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (135, 2, '通票', '2', 'zhengzai_ticket_type', null, null, 'Y', '0', 'admin', '2021-06-18 11:13:36', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (136, 1, '未支付', '0', 'zhengzai_member_order_status', null, null, 'Y', '0', 'admin', '2021-06-20 17:19:22', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (137, 2, '已支付', '1', 'zhengzai_member_order_status', null, null, 'Y', '0', 'admin', '2021-06-20 17:19:37', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (138, 3, '已关闭', '2', 'zhengzai_member_order_status', null, null, 'Y', '0', 'admin', '2021-06-20 17:21:41', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (139, 3, '超时付', '3', 'zhengzai_member_order_status', null, null, 'Y', '0', 'admin', '2021-06-20 17:22:04', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (140, 5, '退款中', '4', 'zhengzai_member_order_status', null, null, 'Y', '0', 'admin', '2021-06-20 17:22:28', '', null, null);
INSERT INTO test_ln_scene.sys_dict_data (dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (141, 6, '已退款', '5', 'zhengzai_member_order_status', null, null, 'Y', '0', 'admin', '2021-06-20 17:22:45', '', null, null);
\ No newline at end of file
......@@ -9,86 +9,64 @@
<form class="form-horizontal m" id="form-tickets-edit" th:object="${orderDetailsVo}">
<!-- <input name="mid" th:field="*{mid}" type="hidden">-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">演出名称:</label>
<div class="col-sm-8">
<input name="performanceTitle" th:field="*{performanceVo.title}" class="form-control" type="text" required>
</div>
<label class="col-sm-3 control-label is-required">演出名称2:</label>
<div class="form-control-static" th:text="*{performanceVo.title}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">票名:</label>
<div class="col-sm-8">
<input name="performanceTitle" th:field="*{ticketsVo.title}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{ticketsVo.title}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单价:</label>
<div class="col-sm-8">
<input name="price" th:field="*{orderTicketVo.price}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.price}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">数量:</label>
<div class="col-sm-8">
<input name="number" th:field="*{orderTicketVo.number}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.number}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">适用日期:</label>
<div class="col-sm-8">
<input name="payCountdownMinute" th:field="*{ticketsVo.useStart}" class="form-control" type="text" required>
<div class="form-control-static" th:text="*{ticketsVo.useStart}">
<input name="payCountdownMinute" th:field="*{ticketsVo.useStart}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">应付价格:</label>
<div class="col-sm-8">
<input name="priceTotal" th:field="*{orderTicketVo.priceTotal}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.priceTotal}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">优惠价格:</label>
<div class="col-sm-8">
<input name="priceVoucher" th:field="*{orderTicketVo.priceVoucher}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.priceTotal}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">实付价格:</label>
<div class="col-sm-8">
<input name="priceActual" th:field="*{orderTicketVo.priceActual}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.priceActual}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">快递价格:</label>
<div class="col-sm-8">
<input name="priceExpress" th:field="*{orderTicketVo.priceExpress}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.priceExpress}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">退款价格:</label>
<div class="col-sm-8">
<input name="priceRefund" th:field="*{orderTicketVo.priceRefund}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.priceRefund}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单状态:</label>
<div class="col-sm-8">
<!-- <input name="priceVoucher" th:field="*{orderTicketVo.}" class="form-control" type="text" required>-->
</div>
<div class="form-control-static" th:text="*{@dict.getLabel('zhengzai_order_status',orderTicketVo.status)}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">转增状态:</label>
<div class="col-sm-8">
<div class="form-control-static">
<!-- <input name="priceVoucher" th:field="*{priceVoucher}" class="form-control" type="text" required>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单号:</label>
<div class="col-sm-8">
<input name="orderCode" th:field="*{orderTicketVo.orderCode}" class="form-control" type="text" required>
</div>
<div class="form-control-static" th:text="*{orderTicketVo.orderCode}" />
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生成时间:</label>
<div class="col-sm-8">
<div class="form-control-static">
<div class="input-group date">
<!-- <input name="createdAt" th:value="${#dates.format(orderTicketVo.createdAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<input name="createdAt" th:value="*{orderTicketVo.createdAt}" class="form-control" placeholder="yyyy-MM-dd" type="text">
......@@ -98,34 +76,33 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实际支付方式:</label>
<div class="col-sm-8">
<select name="paymentType" th:with="type=${@dict.getType('zhengzai_pay_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{orderTicketVo.paymentType}" readonly></option>
</select>
</div>
<div class="form-control-static" th:text="*{@dict.getLabel('zhengzai_pay_type',orderTicketVo.payType)}" />
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">微信订单号:</label>
<div class="col-sm-8">
<div class="form-control-static">
<!-- <input name="orderCode" th:field="*{orderCode}" class="form-control" type="text" required>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付时间:</label>
<div class="col-sm-8">
<input name="timePay" th:field="*{orderTicketVo.timePay}" class="form-control" type="text">
</div>
<div class="form-control-static" th:text="*{orderTicketVo.timePay}"/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">取票方式:</label>
<div class="col-sm-8" th:text="${@dict.getLabel('zhengzai_get_ticket_type',orderDetailsVo.orderTicketVo.getTicketType)}">
<div class="form-control-static" th:text="${@dict.getLabel('zhengzai_get_ticket_type',orderDetailsVo.orderTicketVo.getTicketType)}">
</div>
</div>
<div th:each="ticketEntity,ticketEntityStat : *{orderTicketEntitiesVo}" class="select-list" >
<div th:each="ticketEntity,ticketEntityStat : *{orderTicketEntitiesVo}" class="form-group select-list" >
<div class="hr-line-dashed"></div>
<label class="col-sm-3 control-label is-required">取票人[[${ticketEntityStat.count}]]:</label>
<div class="col-sm-3">
<input th:value="${ticketEntity.enterName}" class="form-control" type="text" readonly>
</div>
<label class="col-sm-3 control-label">证件类型:</label>
<div class="col-sm-3">
<input th:value="${@dict.getLabel('zhengzai_certificate_type',ticketEntity.enterType)}" class="form-control" type="text" readonly>
</div>
<label class="col-sm-3 control-label">证件号:</label>
<div class="col-sm-3">
<input th:value="${ticketEntity.enterIdCode}" class="form-control" type="text" readonly>
......
......@@ -11,12 +11,12 @@
<div class="select-list">
<ul>
<li>
<label>票务订单ID:</label>
<label>订单ID:</label>
<input type="text" name="orderTicketsId"/>
</li>
<li>
<label>退款编号:</label>
<input type="text" name="orderRefundCode"/>
<label>订单编号:</label>
<input type="text" name="orderCode"/>
</li>
<li>
<label>退款状态:</label>
......@@ -197,19 +197,15 @@
},
{
field: 'orderRefundsId',
title: '退款id'
title: '退款ID'
},
{
field: 'orderTicketsId',
title: '票务订单id'
title: '订单ID'
},
{
field: 'orderRefundCode',
title: '退款编号'
},
{
field: 'refundCode',
title: '退款中心退款编号'
field: 'orderCode',
title: '订单编号'
},
{
field: 'price',
......
......@@ -354,7 +354,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
}
pageInfoTmp = new PageInfo(voList);
} catch (Exception e) {
return new PageInfo();
return new PageInfo(new ArrayList());
}
return pageInfoTmp;
}
......
......@@ -15,6 +15,7 @@ import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.IKylinOrderTicketStatusService;
import com.liquidnet.service.kylin.service.admin.IKylinOrderTicketsAdminService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -46,6 +47,9 @@ public class KylinOrderTicketsAdminServiceImpl extends ServiceImpl<KylinOrderTic
@Autowired
private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper;
@Autowired
private KylinOrderTicketStatusMapper kylinOrderTicketStatusMapper;
@Autowired
private KylinPerformancesMapper kylinPerformancesMapper;
......@@ -91,6 +95,18 @@ public class KylinOrderTicketsAdminServiceImpl extends ServiceImpl<KylinOrderTic
BeanUtil.copy(kylinOrderTickets,orderTicketVo);
orderTicketVo.setPerformanceId(kylinOrderTicketRelations.getPerformanceId());
orderTicketVo.setTicketId(kylinOrderTicketRelations.getTicketId());
//获取订单状态
LambdaQueryWrapper<KylinOrderTicketStatus> orderStatusWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotNull(orderId)) {
orderStatusWrapper.eq(KylinOrderTicketStatus::getOrderId,orderId);
}
KylinOrderTicketStatus kylinOrderTicketStatus = kylinOrderTicketStatusMapper.selectOne(orderStatusWrapper);
BeanUtil.copy(kylinOrderTickets,orderTicketVo);
orderTicketVo.setPerformanceId(kylinOrderTicketRelations.getPerformanceId());
orderTicketVo.setTicketId(kylinOrderTicketRelations.getTicketId());
orderTicketVo.setStatus(kylinOrderTicketStatus.getStatus());
orderTicketVo.setPayStatus(kylinOrderTicketStatus.getPayStatus());
if (null != orderTicketVo) {
// Expresses expresses = expressesMapper.selectOne(new UpdateWrapper<Expresses>().eq("order_id", orderId).eq("order_type", "order_ticket"));
//获取演出信息
......
......@@ -161,24 +161,27 @@ public class MongoVoUtils {
* @param type 1新增 2修改
* @param orderId 订单id [需要新增或者修改的订单id]
*/
public Boolean resetOrderListVo(String userId, Integer type, String orderId , KylinOrderTicketVo dataSingle) {
public Boolean resetOrderListVo(String userId, Integer type, String orderId, KylinOrderTicketVo dataSingle) {
List<KylinOrderListVo> vo = new ArrayList<>();
List<KylinOrderListVo> redisVo = new ArrayList();
KylinOrderListVo voItem = new KylinOrderListVo();
KylinOrderTicketVo data;
if (dataSingle == null) {
data = dataUtils.getOrderTicketVo(orderId);
data = (KylinOrderTicketVo) redisUtil.get(KylinRedisConst.ORDER + orderId);
} else {
data = dataSingle;
}
BeanUtils.copyProperties(data, voItem);
List<KylinOrderListVo> redisData = (List<KylinOrderListVo>) redisUtil.get(KylinRedisConst.ORDER_LIST + userId);
if (type == 1) {
redisVo.add(voItem);
List<KylinOrderListVo> redisData = dataUtils.getOrderList(userId);
if (redisData.size() > 0) {
if (redisData.get(0).getOrderTicketsId().equals(orderId)) {
redisData.remove(0);
}
}
}
redisVo.addAll(redisData);
switch (type) {
......@@ -190,13 +193,13 @@ public class MongoVoUtils {
if (i == 0) {
vo.add(voItem);
} else {
vo.add(redisVo.get(i - 1));
vo.add(redisVo.get(i));
}
}
if (redisVo.size() == 0) {
vo.add(voItem);
}
dataUtils.setOrderList(userId, vo);
redisUtil.set(KylinRedisConst.ORDER_LIST + userId, vo);
return true;
case 2:
for (int i = 0; i < redisVo.size(); i++) {
......@@ -209,7 +212,7 @@ public class MongoVoUtils {
vo.add(redisVo.get(i));
}
}
dataUtils.setOrderList(userId, vo);
redisUtil.set(KylinRedisConst.ORDER_LIST + userId, vo);
return true;
default:
return false;
......
......@@ -64,6 +64,8 @@ public class OrderRefundDao implements Serializable {
private String updatedAt;
private String orderCode;
public void setStatusName(Integer status){
this.status=status;
switch (status){
......
......@@ -34,17 +34,18 @@
<result column="created_at" property="createdAt"/>
</resultMap>
<select id="misRefundList" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao" resultMap="misRefundListResult">
SELECT *
FROM kylin_order_refunds
SELECT a.*, b.order_code
FROM kylin_order_refunds AS a
JOIN kylin_order_tickets AS b ON a.order_tickets_id = b.order_tickets_id
<where>
<if test="orderTicketsId!=''">
AND order_tickets_id = #{orderTicketsId}
AND a.order_tickets_id = #{orderTicketsId}
</if>
<if test="orderRefundCode!=''">
AND order_refund_code = #{orderRefundCode}
<if test="orderCode!=''">
AND b.order_code = #{orderCode}
</if>
<if test="status!=''">
AND status = #{status}
AND a.status = #{status}
</if>
</where>
</select>
......
......@@ -203,13 +203,15 @@ public class KylinRefundsStatusServiceImpl {
if (refundInfo.getType() == KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY) {
// 退还库存
for (String entitiesId : orderTicketEntitiesIdsArr) {
dataUtils.changeSurplusGeneral(entitiesId, 1);
KylinOrderTicketEntities entitiesInfo = kylinOrderTicketEntitiesMapper.selectOne(
new QueryWrapper<KylinOrderTicketEntities>().eq("order_ticket_entities_id", entitiesId)
);
if (entitiesInfo.getIsPayment() == KylinTableStatusConst.ENTITIES_IS_PAYMENT3) {
dataUtils.changeSurplusGeneral(entitiesInfo.getTicketId(), 1);
dataUtils.changeBuyInfo(orderInfo.getUserId(), "", orderRelations.getPerformanceId(), entitiesInfo.getTicketId(), -1);
}
}
}
return true;
}
......
......@@ -164,12 +164,14 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
if (res) {
// 超时直接退还库存
for (String entitiesId : ticketEntityIds) {
dataUtils.changeSurplusGeneral(entitiesId, 1);
KylinOrderTicketEntities entitiesInfo = kylinOrderTicketEntitiesMapper.selectOne(
new QueryWrapper<KylinOrderTicketEntities>().eq("order_ticket_entities_id", entitiesId)
);
if (entitiesInfo.getIsPayment() == KylinTableStatusConst.ENTITIES_IS_PAYMENT3) {
dataUtils.changeSurplusGeneral(entitiesInfo.getTicketId(), 1);
dataUtils.changeBuyInfo(orderInfo.getUserId(), "", orderRelations.getPerformanceId(), entitiesInfo.getTicketId(), -1);
}
}
return true;
} else {
return false;
......
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