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

Commit aa1a62a7 authored by 张国柄's avatar 张国柄

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

parents f6f0e133 f16af52b
...@@ -157,7 +157,6 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -157,7 +157,6 @@ public class KylinOrderRefundAdminController extends BaseController {
return error("审核退款失败"); return error("审核退款失败");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
return error(e.getMessage()); return error(e.getMessage());
} }
} }
......
...@@ -77,6 +77,8 @@ public class KylinOrderRefundBatchAdminController extends BaseController { ...@@ -77,6 +77,8 @@ public class KylinOrderRefundBatchAdminController extends BaseController {
@PostMapping("reapply") @PostMapping("reapply")
@ResponseBody @ResponseBody
public AjaxResult refundBatchReApply(RefundBatchApplyParam refundBatchApplyParam) { public AjaxResult refundBatchReApply(RefundBatchApplyParam refundBatchApplyParam) {
String ids = refundBatchApplyParam.getIds();
refundBatchApplyParam.setRefundBatchId(ids);
try { try {
Boolean res = kylinRefundPerformancesAdminServiceImpl.refundBatchReapply(refundBatchApplyParam); Boolean res = kylinRefundPerformancesAdminServiceImpl.refundBatchReapply(refundBatchApplyParam);
if (res) { if (res) {
......
...@@ -215,6 +215,7 @@ ...@@ -215,6 +215,7 @@
detailUrl: prefix + "/details/{id}", detailUrl: prefix + "/details/{id}",
cancelUrl: prefix + "/cancel", cancelUrl: prefix + "/cancel",
reapplyUrl: prefix + "/reapply", reapplyUrl: prefix + "/reapply",
modalName: "-订单退款",
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
return false; return false;
} }
data['reject'] = remark; data['reject'] = remark;
data['status'] = 1; data['status'] = 4;
$.operate.save(prefix + "/review", data); $.operate.save(prefix + "/review", data);
layer.close(index) layer.close(index)
}, },
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
return false; return false;
} }
data['reject'] = remark; data['reject'] = remark;
data['status'] = 5; data['status'] = 3;
$.operate.save(prefix + "/review", data); $.operate.save(prefix + "/review", data);
} }
}); });
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
return false; return false;
} }
data['refuse'] = remark; data['refuse'] = remark;
data['status'] = 7; data['status'] = 6;
$.operate.save(prefix + "/execute", data); $.operate.save(prefix + "/execute", data);
layer.close(index) layer.close(index)
}, },
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
return false; return false;
} }
data['refuse'] = remark; data['refuse'] = remark;
data['status'] = 8; data['status'] = 5;
$.operate.save(prefix + "/execute", data); $.operate.save(prefix + "/execute", data);
// return false; // return false;
} }
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
detailUrl: prefix + "/details/{id}", detailUrl: prefix + "/details/{id}",
cancelUrl: prefix + "/cancel", cancelUrl: prefix + "/cancel",
reapplyUrl: prefix + "/reapply", reapplyUrl: prefix + "/reapply",
modalName: "-演出退款",
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
......
...@@ -60,9 +60,6 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -60,9 +60,6 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
@Autowired @Autowired
MongoTemplate mongoTemplate; MongoTemplate mongoTemplate;
@Autowired
private DataUtils dataUtils;
public Boolean refundApply(RefundApplyParam refundApplyParam) throws Exception { public Boolean refundApply(RefundApplyParam refundApplyParam) throws Exception {
/*int count = 0; /*int count = 0;
count = kylinOrderTicketsMapper.selectCount( count = kylinOrderTicketsMapper.selectCount(
...@@ -189,6 +186,9 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -189,6 +186,9 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
public Boolean refundApproved(RefundApplyParam refundApplyParam) throws Exception { public Boolean refundApproved(RefundApplyParam refundApplyParam) throws Exception {
List<String> orderRefundsIdList = refundApplyParam.getIds(); List<String> orderRefundsIdList = refundApplyParam.getIds();
if (orderRefundsIdList.size() <= 0) {
throw new Exception("无退款订单");
}
String reject = refundApplyParam.getReject(); String reject = refundApplyParam.getReject();
Integer[] orderRefundStatus = {KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY, KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT, KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE}; Integer[] orderRefundStatus = {KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY, KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT, KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE};
List<KylinOrderRefunds> refundList = kylinOrderRefundsMapper.selectList( List<KylinOrderRefunds> refundList = kylinOrderRefundsMapper.selectList(
......
...@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -44,7 +45,6 @@ public class KylinRefundExecuteServiceImpl { ...@@ -44,7 +45,6 @@ public class KylinRefundExecuteServiceImpl {
@Autowired @Autowired
private KylinOrderRefundsServiceImpl kylinOrderRefundsServiceImpl; private KylinOrderRefundsServiceImpl kylinOrderRefundsServiceImpl;
@Async
public void refundBatchApply(String targetId, String refundBatchId, String reason) throws Exception { public void refundBatchApply(String targetId, String refundBatchId, String reason) throws Exception {
RefundApplyParam refundApplyParam = new RefundApplyParam(); RefundApplyParam refundApplyParam = new RefundApplyParam();
int count; int count;
...@@ -56,15 +56,17 @@ public class KylinRefundExecuteServiceImpl { ...@@ -56,15 +56,17 @@ public class KylinRefundExecuteServiceImpl {
for (KylinOrderTickets order : orderList) { for (KylinOrderTickets order : orderList) {
List<KylinOrderTicketEntities> entitiesList = kylinOrderTicketEntitiesMapper.selectList( List<KylinOrderTicketEntities> entitiesList = kylinOrderTicketEntitiesMapper.selectList(
new UpdateWrapper<KylinOrderTicketEntities>().eq("order_id", order.getOrderTicketsId()) new UpdateWrapper<KylinOrderTicketEntities>().eq("order_id", order.getOrderTicketsId())
.eq("is_payment", "yes") .eq("is_payment", 1)
); );
List<String> ticketEntityIds = entitiesList.stream().map(KylinOrderTicketEntities -> KylinOrderTicketEntities.getOrderTicketEntitiesId()).collect(Collectors.toList()); List<String> ticketEntityIds = entitiesList.stream().map(KylinOrderTicketEntities -> KylinOrderTicketEntities.getOrderTicketEntitiesId()).collect(Collectors.toList());
// 请求php接口
refundApplyParam.setOrderRefundBatchesId(refundBatchId); refundApplyParam.setOrderRefundBatchesId(refundBatchId);
refundApplyParam.setReason(reason); refundApplyParam.setReason(reason);
refundApplyParam.setOrderTicketsId(order.getOrderTicketsId()); refundApplyParam.setOrderTicketsId(order.getOrderTicketsId());
refundApplyParam.setTicketEntityIds(ticketEntityIds); refundApplyParam.setTicketEntityIds(ticketEntityIds);
if (order.getPriceExpress() != null) {
refundApplyParam.setRefundPriceExpress(order.getPriceExpress().doubleValue()); refundApplyParam.setRefundPriceExpress(order.getPriceExpress().doubleValue());
}
Boolean res = kylinOrderRefundsServiceImpl.refundApply(refundApplyParam); Boolean res = kylinOrderRefundsServiceImpl.refundApply(refundApplyParam);
} }
...@@ -74,10 +76,9 @@ public class KylinRefundExecuteServiceImpl { ...@@ -74,10 +76,9 @@ public class KylinRefundExecuteServiceImpl {
} while (count >= limitNum); } while (count >= limitNum);
} }
@Async
public void refundBatchStatus(RefundBatchApplyParam refundBatchApplyParam, String type) throws Exception { public void refundBatchStatus(RefundBatchApplyParam refundBatchApplyParam, String type) throws Exception {
String refundBatchId = refundBatchApplyParam.getRefundBatchId(); String refundBatchId = refundBatchApplyParam.getRefundBatchId();
Integer status = refundBatchApplyParam.getStatus(); Integer status = refundBatchApplyParam.getRefundStatus();
// 处理查询订单状态 // 处理查询订单状态
Integer[] whereStatus = {}; Integer[] whereStatus = {};
Integer whereType = KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY; Integer whereType = KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY;
...@@ -108,14 +109,14 @@ public class KylinRefundExecuteServiceImpl { ...@@ -108,14 +109,14 @@ public class KylinRefundExecuteServiceImpl {
throw new Exception("type异常,无法操作"); throw new Exception("type异常,无法操作");
} }
int count; int count = 0;
int limitNum = 1; int limitNum = 1;
int mid = 0; int mid = 0;
do { do {
List<KylinOrderRefunds> refundList = kylinOrderRefundsMapper.getRefundList(whereType, refundBatchId, whereStatus, mid, limitNum); List<KylinOrderRefunds> refundList = kylinOrderRefundsMapper.getRefundList(whereType, refundBatchId, whereStatus, mid, limitNum);
List<String> refundIds = null; List<String> refundIds = null;
if (!refundList.isEmpty()) { if (refundList != null && refundList.size()>0) {
refundIds = refundList.stream().map(KylinOrderRefunds -> KylinOrderRefunds.getOrderRefundsId()).collect(Collectors.toList()); refundIds = refundList.stream().map(KylinOrderRefunds -> KylinOrderRefunds.getOrderRefundsId()).collect(Collectors.toList());
RefundApplyParam refundApplyParam = new RefundApplyParam(); RefundApplyParam refundApplyParam = new RefundApplyParam();
...@@ -151,8 +152,12 @@ public class KylinRefundExecuteServiceImpl { ...@@ -151,8 +152,12 @@ public class KylinRefundExecuteServiceImpl {
} }
count = refundList.size(); count = refundList.size();
if (count > 0){
KylinOrderRefunds lastInfo = refundList.get(count - 1); KylinOrderRefunds lastInfo = refundList.get(count - 1);
if (lastInfo != null) {
mid = lastInfo.getMid(); mid = lastInfo.getMid();
}
}
} while (count >= limitNum); } while (count >= limitNum);
} }
......
package com.liquidnet.client.admin.zhengzai.kylin.service.impl; package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.zhengzai.kylin.utils.DataUtils;
import com.liquidnet.common.cache.redis.util.RedisUtil; import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
...@@ -51,10 +53,10 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -51,10 +53,10 @@ 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);
if (priceNum != null) { if (null != priceNum) {
Double totalPrice = (Double) priceNum.get("total_price"); double totalPrice = Double.parseDouble(priceNum.get("total_price").toString());
Integer totalNum = (Integer) priceNum.get("total_num"); Integer 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("当前演出暂无需要退款的订单,请确认后重试!");
} }
...@@ -69,18 +71,19 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -69,18 +71,19 @@ public class KylinRefundPerformancesAdminServiceImpl {
double totalPriceExpressWepay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_express", paymentTypeWepayArray);*/ double totalPriceExpressWepay = kylinOrderTicketsMapper.getTotalPrice(targetId, "price_express", paymentTypeWepayArray);*/
KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne( KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne(
new UpdateWrapper<KylinOrderRefundBatches>().eq("target_id", targetId).orderByDesc("refund_batch_id") new QueryWrapper<KylinOrderRefundBatches>().eq("target_id", targetId).orderByDesc("refund_batch_id")
); );
if (refundBatchesInfo.getRefundBatchId().isEmpty() || if (refundBatchesInfo == null ||
refundBatchesInfo.getStatus() == KylinTableStatusConst.STATUS_CANCEL || refundBatchesInfo.getStatus() == KylinTableStatusConst.STATUS_CANCEL ||
refundBatchesInfo.getStatus() == KylinTableStatusConst.STATUS_FINANCE_ADOPT refundBatchesInfo.getStatus() == KylinTableStatusConst.STATUS_FINANCE_ADOPT
) { ) {
// 添加演出退款记录 // 添加演出退款记录
KylinPerformanceVo performancesInfo = (KylinPerformanceVo) redisUtil.hget(KylinRedisConst.PERFORMANCES, targetId);
String refundBatchId = IDGenerator.nextSnowId().toString(); String refundBatchId = IDGenerator.nextSnowId().toString();
KylinOrderRefundBatches createData = new KylinOrderRefundBatches(); KylinOrderRefundBatches createData = new KylinOrderRefundBatches();
createData.setRefundBatchId(refundBatchId); createData.setRefundBatchId(refundBatchId);
createData.setTargetId(targetId);
createData.setCreatedAt(LocalDateTime.now());
createData.setStatus(KylinTableStatusConst.STATUS_APPLY); createData.setStatus(KylinTableStatusConst.STATUS_APPLY);
int resNum = kylinOrderRefundBatchesMapper.insert(createData); int resNum = kylinOrderRefundBatchesMapper.insert(createData);
...@@ -102,7 +105,7 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -102,7 +105,7 @@ public class KylinRefundPerformancesAdminServiceImpl {
KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne( KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne(
new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray) new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray)
); );
if (!refundBatchesInfo.getRefundBatchId().isEmpty()) { if (null != refundBatchesInfo) {
// 开始执行批量提交审核 分批处理退款申请 // 开始执行批量提交审核 分批处理退款申请
kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "reapply"); kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "reapply");
...@@ -118,11 +121,11 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -118,11 +121,11 @@ public class KylinRefundPerformancesAdminServiceImpl {
public Boolean refundBatchCancel(RefundBatchApplyParam refundBatchApplyParam) throws Exception { public Boolean refundBatchCancel(RefundBatchApplyParam refundBatchApplyParam) throws Exception {
String refundBatchId = refundBatchApplyParam.getRefundBatchId(); String refundBatchId = refundBatchApplyParam.getRefundBatchId();
Integer[] paymentTypeAlipayArray = {KylinTableStatusConst.STATUS_APPLY, KylinTableStatusConst.STATUS_OPERATE_REJECT, KylinTableStatusConst.STATUS_OPERATE_ADOPT, KylinTableStatusConst.STATUS_FINANCE_REJECT}; Integer[] paymentTypeAlipayArray = {KylinTableStatusConst.STATUS_APPLY, KylinTableStatusConst.STATUS_OPERATE_REJECT, KylinTableStatusConst.STATUS_FINANCE_REJECT};
KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne( KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne(
new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray) new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray)
); );
if (!refundBatchesInfo.getRefundBatchId().isEmpty()) { if (null != refundBatchesInfo) {
// 开始执行批量提交审核 分批处理退款申请 // 开始执行批量提交审核 分批处理退款申请
kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "cancel"); kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "cancel");
...@@ -149,15 +152,17 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -149,15 +152,17 @@ public class KylinRefundPerformancesAdminServiceImpl {
KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne( KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne(
new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray) new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray)
); );
if (!refundBatchesInfo.getRefundBatchId().isEmpty()) { if (null != refundBatchesInfo) {
// 开始执行批量提交审核 分批处理退款申请 // 开始执行批量提交审核 分批处理退款申请
refundBatchApplyParam.setRefundStatus(updateStatus); refundBatchApplyParam.setRefundStatus(updateStatus);
kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "review"); kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "review");
KylinOrderRefundBatches params = new KylinOrderRefundBatches(); KylinOrderRefundBatches params = new KylinOrderRefundBatches();
params.setStatus(batchStatus); params.setStatus(batchStatus);
kylinOrderRefundBatchesMapper.update(params, new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId)); kylinOrderRefundBatchesMapper.update(
params,
new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId)
);
return true; return true;
} else { } else {
...@@ -174,12 +179,11 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -174,12 +179,11 @@ public class KylinRefundPerformancesAdminServiceImpl {
} else if (KylinTableStatusConst.STATUS_FINANCE_ADOPT == batchStatus) {// 通过 } else if (KylinTableStatusConst.STATUS_FINANCE_ADOPT == batchStatus) {// 通过
updateStatus = KylinTableStatusConst.ORDER_REFUND_STATUS_UNFILLED; updateStatus = KylinTableStatusConst.ORDER_REFUND_STATUS_UNFILLED;
} }
Integer[] paymentTypeAlipayArray = {KylinTableStatusConst.STATUS_APPLY}; Integer[] paymentTypeAlipayArray = {KylinTableStatusConst.STATUS_OPERATE_ADOPT, KylinTableStatusConst.STATUS_FINANCE_REJECT};
KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne( KylinOrderRefundBatches refundBatchesInfo = kylinOrderRefundBatchesMapper.selectOne(
new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray) new UpdateWrapper<KylinOrderRefundBatches>().eq("refund_batch_id", refundBatchId).in("status", paymentTypeAlipayArray)
); );
if (!refundBatchesInfo.getRefundBatchId().isEmpty()) { if (null != refundBatchesInfo) {
// 开始执行批量提交审核 分批处理退款申请 // 开始执行批量提交审核 分批处理退款申请
refundBatchApplyParam.setRefundStatus(updateStatus); refundBatchApplyParam.setRefundStatus(updateStatus);
kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "execute"); kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, "execute");
......
...@@ -26,6 +26,8 @@ import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper; ...@@ -26,6 +26,8 @@ import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import com.mongodb.client.model.FindOneAndUpdateOptions; import com.mongodb.client.model.FindOneAndUpdateOptions;
import com.mongodb.client.model.ReturnDocument; import com.mongodb.client.model.ReturnDocument;
import com.sun.media.jfxmedia.logging.Logger;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpException; import org.apache.http.HttpException;
import org.bson.Document; import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -49,6 +51,7 @@ import java.util.stream.Collectors; ...@@ -49,6 +51,7 @@ import java.util.stream.Collectors;
* @author jiaangxiulong * @author jiaangxiulong
* @since 2021-05-26 * @since 2021-05-26
*/ */
@Slf4j
@Service @Service
public class KylinRefundsStatusServiceImpl { public class KylinRefundsStatusServiceImpl {
...@@ -341,7 +344,8 @@ public class KylinRefundsStatusServiceImpl { ...@@ -341,7 +344,8 @@ public class KylinRefundsStatusServiceImpl {
// start // start
// TODO: 2021/5/31 待整理 // TODO: 2021/5/31 待整理
String postResult = HttpUtil.post(postUrl, params); String postResult = null;
postResult = HttpUtil.post(postUrl, params);
JsonNode postResultNew = JsonUtils.fromJson(postResult, JsonNode.class); JsonNode postResultNew = JsonUtils.fromJson(postResult, JsonNode.class);
// 请求提审接口结果 // 请求提审接口结果
if (postResultNew.get("message").toString() != "OK") { if (postResultNew.get("message").toString() != "OK") {
......
...@@ -22,7 +22,10 @@ liquidnet: ...@@ -22,7 +22,10 @@ liquidnet:
knife4j: knife4j:
disable: false disable: false
redis: redis:
host: r-2zefzyjbij5vbez65y.redis.rds.aliyuncs.com # host: r-2zefzyjbij5vbez65y.redis.rds.aliyuncs.com
# port: 6380
# password: PO@B!Iud32
host: r-2ze7002ckw5u75fguk.redis.rds.aliyuncs.com
port: 6380 port: 6380
password: PO@B!Iud32 password: PO@B!Iud32
mongodb: mongodb:
......
...@@ -28,6 +28,7 @@ public class OrderRefundDao implements Serializable { ...@@ -28,6 +28,7 @@ public class OrderRefundDao implements Serializable {
private BigDecimal price; private BigDecimal price;
private Integer status; private Integer status;
private String statusName; private String statusName;
private Integer type; private Integer type;
......
...@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.mapper; ...@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.dao.OrderRefundDao; import com.liquidnet.service.kylin.dao.OrderRefundDao;
import com.liquidnet.service.kylin.entity.KylinOrderRefunds; import com.liquidnet.service.kylin.entity.KylinOrderRefunds;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -16,9 +17,16 @@ import java.util.Map; ...@@ -16,9 +17,16 @@ import java.util.Map;
* @since 2021-05-26 * @since 2021-05-26
*/ */
public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> { public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
List<KylinOrderRefunds> getRefundList(Integer whereType, String refundBatchId, Integer[] whereStatus, int mid, int limitNum); List<KylinOrderRefunds> getRefundList(
@Param("whereType") Integer whereType,
@Param("refundBatchId") String refundBatchId,
@Param("whereStatus") Integer[] whereStatus,
@Param("mid") int mid,
@Param("limitNum") int limitNum
);
double refundedTotalPrice(String orderTicketsId); double refundedTotalPrice(String orderTicketsId);
List<OrderRefundDao> misRefundList(Map<String,Object> map); List<OrderRefundDao> misRefundList(Map<String,Object> map);
} }
...@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.mapper; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.mapper;
import com.liquidnet.service.kylin.entity.KylinOrderTickets; import com.liquidnet.service.kylin.entity.KylinOrderTickets;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -23,5 +24,5 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> { ...@@ -23,5 +24,5 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
Double getTotalPrice(String targetId, String selectFields, String[] paymentType); Double getTotalPrice(String targetId, String selectFields, String[] paymentType);
// 获取订单和购票信息 // 获取订单和购票信息
List getOrderList(String targetId, int mid, int limitNum); List<KylinOrderTickets> getOrderList(@Param("targetId") String targetId, @Param("mid") int mid, @Param("limitNum") int limitNum);
} }
...@@ -2,10 +2,21 @@ ...@@ -2,10 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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.KylinOrderRefundsMapper"> <mapper namespace="com.liquidnet.service.kylin.mapper.KylinOrderRefundsMapper">
<select id="getRefundList" parameterType="java.lang.String" resultType="com.liquidnet.service.kylin.entity.KylinOrderRefunds"> <select id="getRefundList" resultType="com.liquidnet.service.kylin.entity.KylinOrderRefunds">
SELECT order_refunds_id SELECT order_refunds_id, mid
FROM kylin_order_refunds FROM kylin_order_refunds
<where>
order_refund_batches_id=${refundBatchId}
AND type=${whereType}
AND mid>${mid}
AND status IN
<foreach collection="whereStatus" item="where_status" index="index" open="(" close=")" separator=",">
${where_status}
</foreach>
</where>
LIMIT ${limitNum}
</select> </select>
<select id="refundedTotalPrice" resultType="java.lang.Double"> <select id="refundedTotalPrice" resultType="java.lang.Double">
SELECT SUM('price') SELECT SUM('price')
FROM kylin_order_refunds FROM kylin_order_refunds
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper"> <mapper namespace="com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper">
<select id="getPriceNum" resultType="java.util.HashMap"> <select id="getPriceNum" resultType="java.util.HashMap">
SELECT SUM('o.price_actual') as total_price, SUM('o.number') as total_num SELECT SUM(o.price_actual) as total_price, SUM(o.number) as total_num
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
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
AND s.pay_status=1 AND s.pay_status=1
AND o.coupon_type='no' AND o.coupon_type='no'
</where> </where>
LIMIT 1
</select> </select>
<select id="getTotalPrice" resultType="java.lang.Double"> <select id="getTotalPrice" resultType="java.lang.Double">
SELECT SUM(${selectFields}) SELECT SUM(${selectFields})
...@@ -30,18 +31,18 @@ ...@@ -30,18 +31,18 @@
</foreach> </foreach>
</where> </where>
</select> </select>
<select id="getOrderList" resultType="java.util.List"> <select id="getOrderList" parameterType="java.lang.String" resultType="com.liquidnet.service.kylin.entity.KylinOrderTickets">
SELECT o.mid, order_tickets_id, number, price_actual, performance_title SELECT o.mid, order_tickets_id, number, price_actual, performance_title
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.mid>#{mid} AND o.mid>${mid}
</where> </where>
LIMIT #{limitNum} LIMIT ${limitNum}
</select> </select>
</mapper> </mapper>
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