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

Commit 8af7c317 authored by jiangxiulong's avatar jiangxiulong

完善列表 详情 提交

parent 93f51ec4
package com.liquidnet.service.kylin.dto.vo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import io.swagger.annotations.ApiModel;
import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* <p>
* refund batches返回给前端的数据字段
* </p>
*
* @author jiangxiulong
* @since 2021-05-31 11:19 上午
*/
@Data
@ApiModel
public class KylinOrderRefundBatchesPerformanceVo implements Serializable {
private KylinPerformanceMisVo kylinPerformanceMisVo;
private List<PerformanceOrderStatisticalDao> performanceOrderStatisticalDao;
}
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
...@@ -29,6 +30,10 @@ public class KylinOrderRefundBatchesVo implements Serializable { ...@@ -29,6 +30,10 @@ public class KylinOrderRefundBatchesVo implements Serializable {
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private Integer status; private Integer status;
private Integer totalNum;
private BigDecimal totalAlipay;
private BigDecimal totalWepay;
@ApiModelProperty(value = "添加时间") @ApiModelProperty(value = "添加时间")
private LocalDateTime createdAt; private LocalDateTime createdAt;
......
...@@ -4,18 +4,24 @@ import com.github.pagehelper.PageInfo; ...@@ -4,18 +4,24 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.common.core.controller.BaseController; import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult; import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo; import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinRefundPerformancesAdminServiceImpl; import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinRefundPerformancesAdminServiceImpl;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dao.OrderRefundBatchDao; import com.liquidnet.service.kylin.dao.OrderRefundBatchDao;
import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao;
import com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam; import com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam;
import com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam; import com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam;
import com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesPerformanceVo;
import com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo; import com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* <p> * <p>
* 后台按演出批量退款 服务实现类 * 后台按演出批量退款 服务实现类
...@@ -34,6 +40,9 @@ public class KylinOrderRefundBatchAdminController extends BaseController { ...@@ -34,6 +40,9 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
@Autowired @Autowired
private KylinRefundPerformancesAdminServiceImpl kylinRefundPerformancesAdminServiceImpl; private KylinRefundPerformancesAdminServiceImpl kylinRefundPerformancesAdminServiceImpl;
@Autowired
private KylinPerformancesAdminServiceImpl kylinPerformancesService;
@RequiresPermissions("kylin:refundBatch:view") @RequiresPermissions("kylin:refundBatch:view")
@GetMapping() @GetMapping()
public String operlog() public String operlog()
...@@ -65,8 +74,16 @@ public class KylinOrderRefundBatchAdminController extends BaseController { ...@@ -65,8 +74,16 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
@PostMapping("applyPerformance") @PostMapping("applyPerformance")
@ResponseBody @ResponseBody
public String applyPerformance(RefundBatchSearchParam refundBatchSearchParam) { public KylinOrderRefundBatchesPerformanceVo applyPerformance(RefundBatchApplyParam refundBatchApplyParam) {
return "error"; String performancesId = refundBatchApplyParam.getTargetId();
//获取演出详情
KylinPerformanceMisVo performanceMisVo = kylinPerformancesService.performanceDetails(performancesId);
List<PerformanceOrderStatisticalDao> result = kylinPerformancesService.getPerformanceOrderStatisticalList(performancesId);
KylinOrderRefundBatchesPerformanceVo kylinOrderRefundBatchesPerformanceVo = new KylinOrderRefundBatchesPerformanceVo();
kylinOrderRefundBatchesPerformanceVo.setKylinPerformanceMisVo(performanceMisVo);
kylinOrderRefundBatchesPerformanceVo.setPerformanceOrderStatisticalDao(result);
return kylinOrderRefundBatchesPerformanceVo;
} }
@RequiresPermissions("kylin:refundBatch:apply") @RequiresPermissions("kylin:refundBatch:apply")
...@@ -81,6 +98,7 @@ public class KylinOrderRefundBatchAdminController extends BaseController { ...@@ -81,6 +98,7 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
return error("申请退款失败"); return error("申请退款失败");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
return error(e.getMessage()); return error(e.getMessage());
} }
} }
......
...@@ -91,7 +91,6 @@ ...@@ -91,7 +91,6 @@
var data = $('#form-post-add').serializeArray(); var data = $('#form-post-add').serializeArray();
data.push({"ticketEntityIds":rows.join()}); data.push({"ticketEntityIds":rows.join()});
data.push({"name":"ticketEntityIds","value":rows}); data.push({"name":"ticketEntityIds","value":rows});
console.log(111)
$.operate.save(prefix + "/apply", data); $.operate.save(prefix + "/apply", data);
} }
} }
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">演出id:</label> <label class="col-sm-3 control-label is-required">演出id:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input th:value="67689474263547904" class="form-control" type="text" name="targetId" id="targetId" required> <input class="form-control" type="text" name="targetId" id="targetId" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">演出名称:</label> <label class="col-sm-3 control-label">演出名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input th:value="0" class="form-control" type="text" name="title"> <input class="form-control" type="text" name="title">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注:</label> <label class="col-sm-3 control-label layui-required is-required">备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="reason" class="form-control"></textarea> <textarea name="reason" maxlength="500" class="form-control layui-required" rows="3"></textarea>
</div> </div>
</div> </div>
</form> </form>
...@@ -48,16 +48,28 @@ ...@@ -48,16 +48,28 @@
type: "post", type: "post",
dataType: "json", dataType: "json",
data: { data: {
"performancesId" : function() { "targetId" : function() {
return $.common.trim($("#targetId").val()); return $.common.trim($("#targetId").val());
} }
}, },
beforeSend: function () { beforeSend: function () {
$.modal.loading("正在查询订单,请稍后..."); $.modal.loading("正在查询演出,请稍后...");
}, },
success: function(result) { success: function(result) {
var options = {
data: result.orderTicketEntitiesVo,
pagination: false,
columns: [{
checkbox: true
},
{
field: 'orderTicketEntitiesId',
title: '票种数据'
},
]
};
$.table.init(options);
$.modal.closeLoading(); $.modal.closeLoading();
console.log(result)
} }
}; };
$.ajax(config) $.ajax(config)
...@@ -68,10 +80,17 @@ ...@@ -68,10 +80,17 @@
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { var reason = $('#form-post-add').find("[name='reason']").val();
$.operate.save(prefix + "/apply", $('#form-post-add').serialize()); var targetId = $('#form-post-add').find("[name='targetId']").val();
} if (!targetId || !reason) {
} layer.msg("请完善数据");
return false;
}
if ($.validate.form()) {
var data = $('#form-post-add').serializeArray();
$.operate.save(prefix + "/apply", data);
}
}
</script> </script>
</body> </body>
</html> </html>
...@@ -7,12 +7,32 @@ ...@@ -7,12 +7,32 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m-t" id="signupForm"> <form class="form-horizontal m-t" id="signupForm">
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">批量退款id:</label> <label class="col-sm-2 control-label">演出退款id:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.refundBatchId}"> <div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.refundBatchId}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">批量提交时间:</label> <label class="col-sm-2 control-label">演出id:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.targetId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">应退款总票数:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.totalNum}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">应退款支付宝总金额:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.totalAlipay}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">应退款微信总金额:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.totalWepay}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">提交时间:</label>
<div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.createdAt}"> <div class="form-control-static" th:text="${KylinOrderRefundsBatchVo.createdAt}">
</div> </div>
</div> </div>
......
...@@ -160,14 +160,18 @@ ...@@ -160,14 +160,18 @@
field: 'refundBatchId', field: 'refundBatchId',
title: '退款id' title: '退款id'
}, },
{
field: 'status',
title: '状态'
},
{ {
field: 'targetId', field: 'targetId',
title: '演出id' title: '演出id'
}, },
{
field: 'performancesInfo.title',
title: '演出名称'
},
{
field: 'statusName',
title: '状态'
},
{ {
field: 'createdAt', field: 'createdAt',
title: '申请时间' title: '申请时间'
......
...@@ -10,16 +10,20 @@ import com.liquidnet.commons.lang.util.IDGenerator; ...@@ -10,16 +10,20 @@ import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.constant.KylinTableStatusConst; import com.liquidnet.service.kylin.constant.KylinTableStatusConst;
import com.liquidnet.service.kylin.dao.OrderRefundBatchDao; import com.liquidnet.service.kylin.dao.OrderRefundBatchDao;
import com.liquidnet.service.kylin.dao.OrderRefundDao;
import com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam; import com.liquidnet.service.kylin.dto.param.RefundBatchApplyParam;
import com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam; import com.liquidnet.service.kylin.dto.param.RefundBatchSearchParam;
import com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo; import com.liquidnet.service.kylin.dto.vo.KylinOrderRefundBatchesVo;
import com.liquidnet.service.kylin.entity.KylinOrderRefundBatches; import com.liquidnet.service.kylin.entity.KylinOrderRefundBatches;
import com.liquidnet.service.kylin.entity.KylinPerformances;
import com.liquidnet.service.kylin.mapper.KylinOrderRefundBatchesMapper; import com.liquidnet.service.kylin.mapper.KylinOrderRefundBatchesMapper;
import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper; import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
import com.liquidnet.service.kylin.mapper.KylinPerformancesMapper;
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.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -43,6 +47,9 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -43,6 +47,9 @@ public class KylinRefundPerformancesAdminServiceImpl {
@Autowired @Autowired
private KylinOrderRefundBatchesMapper kylinOrderRefundBatchesMapper; private KylinOrderRefundBatchesMapper kylinOrderRefundBatchesMapper;
@Autowired
private KylinPerformancesMapper kylinPerformancesMapper;
@Autowired @Autowired
private KylinRefundExecuteServiceImpl kylinRefundExecuteServiceImpl; private KylinRefundExecuteServiceImpl kylinRefundExecuteServiceImpl;
...@@ -52,15 +59,15 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -52,15 +59,15 @@ public class KylinRefundPerformancesAdminServiceImpl {
public Boolean refundBatchApply(RefundBatchApplyParam refundBatchApplyParam) throws Exception { public Boolean refundBatchApply(RefundBatchApplyParam refundBatchApplyParam) throws Exception {
String targetId = refundBatchApplyParam.getTargetId(); String targetId = refundBatchApplyParam.getTargetId();
HashMap<String, Object> priceNum = kylinOrderTicketsMapper.getPriceNum(targetId); HashMap<String, Object> priceNum = kylinOrderTicketsMapper.getPriceNum(targetId);
Integer totalNum = 0;
if (null != priceNum) { if (null != priceNum) {
double totalPrice = Double.parseDouble(priceNum.get("total_price").toString()); double totalPrice = Double.parseDouble(priceNum.get("total_price").toString());
Integer totalNum = Integer.parseInt(priceNum.get("total_num").toString()); totalNum = Integer.parseInt(priceNum.get("total_num").toString());
if (totalPrice <= 0 || totalNum <= 0) throw new Exception("当前演出暂无需要退款的订单,请确认后重试!"); if (totalPrice <= 0 || totalNum <= 0) throw new Exception("当前演出暂无需要退款的订单,请确认后重试!");
} else { } else {
throw new Exception("当前演出暂无需要退款的订单,请确认后重试!"); throw new Exception("当前演出暂无需要退款的订单,请确认后重试!");
} }
// 汇总退款 // 汇总退款
/*String[] paymentTypeAlipayArray = {"APPALIPAY", "WAPALIPAY", "alipay"}; /*String[] paymentTypeAlipayArray = {"APPALIPAY", "WAPALIPAY", "alipay"};
double totalRefundAlipay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_actual", paymentTypeAlipayArray); double totalRefundAlipay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_actual", paymentTypeAlipayArray);
...@@ -69,6 +76,11 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -69,6 +76,11 @@ public class KylinRefundPerformancesAdminServiceImpl {
double totalPriceExpressAlipay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_express", paymentTypeAlipayArray); double totalPriceExpressAlipay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_express", paymentTypeAlipayArray);
double totalPriceExpressWepay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_express", paymentTypeWepayArray);*/ double totalPriceExpressWepay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_express", paymentTypeWepayArray);*/
String[] paymentTypeAlipayArray = {"APPALIPAY", "WAPALIPAY", "alipay"};
Double totalAlipay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_actual", paymentTypeAlipayArray);
String[] paymentTypeWepayArray = {"APPWEPAY", "APPLETWEPAY", "WAPWEPAY", "JSWEPAY", "wepay"};
Double totalWepay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_actual", paymentTypeWepayArray);
KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne( KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne(
new QueryWrapper<KylinOrderRefundBatches>().eq("target_id", targetId).orderByDesc("refund_batch_id") new QueryWrapper<KylinOrderRefundBatches>().eq("target_id", targetId).orderByDesc("refund_batch_id")
); );
...@@ -82,8 +94,15 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -82,8 +94,15 @@ public class KylinRefundPerformancesAdminServiceImpl {
KylinOrderRefundBatches createData = new KylinOrderRefundBatches(); KylinOrderRefundBatches createData = new KylinOrderRefundBatches();
createData.setRefundBatchId(refundBatchId); createData.setRefundBatchId(refundBatchId);
createData.setTargetId(targetId); createData.setTargetId(targetId);
createData.setCreatedAt(LocalDateTime.now());
createData.setStatus(KylinTableStatusConst.STATUS_APPLY); createData.setStatus(KylinTableStatusConst.STATUS_APPLY);
createData.setTotalNum(totalNum);
if (null != totalAlipay) {
createData.setTotalAlipay(BigDecimal.valueOf(totalAlipay));
}
if (null != totalWepay) {
createData.setTotalWepay(BigDecimal.valueOf(totalWepay));
}
createData.setCreatedAt(LocalDateTime.now());
int resNum = kylinOrderRefundBatchesMapper.insert(createData); int resNum = kylinOrderRefundBatchesMapper.insert(createData);
if (resNum > 0) { if (resNum > 0) {
...@@ -168,6 +187,7 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -168,6 +187,7 @@ public class KylinRefundPerformancesAdminServiceImpl {
new UpdateWrapper<KylinOrderRefundBatches>() new UpdateWrapper<KylinOrderRefundBatches>()
.eq("refund_batch_id", orderRefundId) .eq("refund_batch_id", orderRefundId)
); );
KylinOrderRefundBatchesVo kylinOrderRefundBatchesVo = new KylinOrderRefundBatchesVo(); KylinOrderRefundBatchesVo kylinOrderRefundBatchesVo = new KylinOrderRefundBatchesVo();
BeanUtils.copyProperties(data, kylinOrderRefundBatchesVo); BeanUtils.copyProperties(data, kylinOrderRefundBatchesVo);
...@@ -179,6 +199,14 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -179,6 +199,14 @@ public class KylinRefundPerformancesAdminServiceImpl {
try { try {
PageHelper.startPage(refundBatchSearchParam.getPageNum(), refundBatchSearchParam.getPageSize()); PageHelper.startPage(refundBatchSearchParam.getPageNum(), refundBatchSearchParam.getPageSize());
List<OrderRefundBatchDao> voList = kylinOrderRefundBatchesMapper.misRefundBatchList(BeanUtil.convertBeanToMap(refundBatchSearchParam)); List<OrderRefundBatchDao> voList = kylinOrderRefundBatchesMapper.misRefundBatchList(BeanUtil.convertBeanToMap(refundBatchSearchParam));
for (OrderRefundBatchDao item : voList) {
KylinPerformances info = kylinPerformancesMapper.selectOne(
new UpdateWrapper<KylinPerformances>()
.eq("performances_id", item.getTargetId())
);
item.setPerformancesInfo(info);
item.setStatusName(item.getStatus());
}
pageInfoTmp = new PageInfo(voList); pageInfoTmp = new PageInfo(voList);
} catch (Exception e) { } catch (Exception e) {
return null; return null;
......
package com.liquidnet.service.kylin.dao; package com.liquidnet.service.kylin.dao;
import com.liquidnet.service.kylin.entity.KylinPerformances;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -13,10 +14,41 @@ public class OrderRefundBatchDao implements Serializable { ...@@ -13,10 +14,41 @@ public class OrderRefundBatchDao implements Serializable {
private String targetId; private String targetId;
private Integer status; private Integer status;
private String statusName;
private LocalDateTime executorAt; private LocalDateTime executorAt;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
private KylinPerformances performancesInfo;
public void setStatusName(Integer status){
this.status=status;
switch (status){
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;
default:
this.statusName="其他";
break;
}
}
} }
...@@ -2,6 +2,8 @@ package com.liquidnet.service.kylin.entity; ...@@ -2,6 +2,8 @@ package com.liquidnet.service.kylin.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
...@@ -39,6 +41,10 @@ public class KylinOrderRefundBatches implements Serializable { ...@@ -39,6 +41,10 @@ public class KylinOrderRefundBatches implements Serializable {
*/ */
private Integer status; private Integer status;
private Integer totalNum;
private BigDecimal totalAlipay;
private BigDecimal totalWepay;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
......
...@@ -22,7 +22,7 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> { ...@@ -22,7 +22,7 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
HashMap<String, Object> getPriceNum(String targetId); HashMap<String, Object> getPriceNum(String targetId);
// 查询微信、支付宝对应的订单金额、快递费金额 // 查询微信、支付宝对应的订单金额、快递费金额
Double getTotalPrice(String targetId, String selectFields, String[] paymentType); Double getTotalPrice(@Param("targetId") String targetId, @Param("selectFields") String selectFields, @Param("paymentType") String[] paymentType);
// 获取订单和购票信息 // 获取订单和购票信息
List<KylinOrderTickets> getOrderList(@Param("targetId") String targetId, @Param("mid") int mid, @Param("limitNum") int limitNum); List<KylinOrderTickets> getOrderList(@Param("targetId") String targetId, @Param("mid") int mid, @Param("limitNum") int limitNum);
......
...@@ -38,19 +38,19 @@ ...@@ -38,19 +38,19 @@
</where> </where>
LIMIT 1 LIMIT 1
</select> </select>
<select id="getTotalPrice" resultType="java.lang.Double"> <select id="getTotalPrice" parameterType="java.lang.String" resultType="java.lang.Double">
SELECT SUM(${selectFields}) SELECT SUM(${selectFields})
FROM kylin_order_tickets AS o FROM kylin_order_tickets AS o
JOIN kylin_order_ticket_relations AS r ON r.order_id = o.order_tickets_id JOIN kylin_order_ticket_relations AS r ON r.order_id = o.order_tickets_id
JOIN kylin_order_ticket_status AS s ON s.order_id = o.order_tickets_id JOIN kylin_order_ticket_status AS s ON s.order_id = o.order_tickets_id
<where> <where>
r.performance_id=#{targetId} r.performance_id=${targetId}
AND s.status=1 AND s.status=1
AND s.pay_status=1 AND s.pay_status=1
AND o.coupon_type='no' AND o.coupon_type='no'
AND o.payment_type IN AND o.payment_type IN
<foreach collection="paymentType" item="payment_type" index="index" open="(" close=")" separator=","> <foreach collection="paymentType" item="payment_type" index="index" open="(" close=")" separator=",">
#{payment_type} '${payment_type}'
</foreach> </foreach>
</where> </where>
</select> </select>
......
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