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

Commit e6a8a020 authored by jiangxiulong's avatar jiangxiulong

refund

parent 9ebe8e2a
...@@ -7,6 +7,7 @@ import com.liquidnet.client.admin.common.core.controller.BaseController; ...@@ -7,6 +7,7 @@ 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.common.enums.BusinessType; import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.common.utils.ShiroUtils;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinOrderRefundsServiceImpl; import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinOrderRefundsServiceImpl;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
...@@ -91,7 +92,9 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -91,7 +92,9 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody @ResponseBody
public AjaxResult refundApply(RefundApplyParam refundApplyParam) { public AjaxResult refundApply(RefundApplyParam refundApplyParam) {
try { try {
ResponseDto res = kylinOrderRefundsServiceImpl.refundApply(refundApplyParam); String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
ResponseDto res = kylinOrderRefundsServiceImpl.refundApply(refundApplyParam, authId, authName);
if (res.isSuccess()) { if (res.isSuccess()) {
return success(); return success();
} else { } else {
...@@ -109,7 +112,9 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -109,7 +112,9 @@ public class KylinOrderRefundAdminController extends BaseController {
public AjaxResult refundCancel(RefundApplyParam refundApplyParam) { public AjaxResult refundCancel(RefundApplyParam refundApplyParam) {
try { try {
refundApplyParam.setType("cancel"); refundApplyParam.setType("cancel");
ResponseDto res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
ResponseDto res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
if (res.isSuccess()) { if (res.isSuccess()) {
return success(); return success();
} else { } else {
...@@ -127,7 +132,9 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -127,7 +132,9 @@ public class KylinOrderRefundAdminController extends BaseController {
public AjaxResult refundReapply(RefundApplyParam refundApplyParam) { public AjaxResult refundReapply(RefundApplyParam refundApplyParam) {
try { try {
refundApplyParam.setType("reapply"); refundApplyParam.setType("reapply");
ResponseDto res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
ResponseDto res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
if (res.isSuccess()) { if (res.isSuccess()) {
return success(); return success();
} else { } else {
...@@ -147,13 +154,15 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -147,13 +154,15 @@ public class KylinOrderRefundAdminController extends BaseController {
try { try {
ResponseDto res = null; ResponseDto res = null;
Integer status = refundApplyParam.getStatus(); Integer status = refundApplyParam.getStatus();
String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_APPROVED) { // 通过 if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_APPROVED) { // 通过
refundApplyParam.setType("approved"); refundApplyParam.setType("approved");
res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
} }
if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT) { // 驳回 if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT) { // 驳回
refundApplyParam.setType("reject"); refundApplyParam.setType("reject");
res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
} }
if (res.isSuccess()) { if (res.isSuccess()) {
return success(); return success();
...@@ -174,13 +183,15 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -174,13 +183,15 @@ public class KylinOrderRefundAdminController extends BaseController {
try { try {
ResponseDto res = null; ResponseDto res = null;
Integer status = refundApplyParam.getStatus(); Integer status = refundApplyParam.getStatus();
String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_UNFILLED) { // 通过 if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_UNFILLED) { // 通过
refundApplyParam.setType("unfilled"); refundApplyParam.setType("unfilled");
res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
} }
if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE) { // 驳回 if (status == KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE) { // 驳回
refundApplyParam.setType("refuse"); refundApplyParam.setType("refuse");
res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
} }
if (res.isSuccess()) { if (res.isSuccess()) {
return success(); return success();
......
...@@ -89,7 +89,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -89,7 +89,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
@Autowired @Autowired
private MongoConverter mongoConverter; private MongoConverter mongoConverter;
public ResponseDto refundApply(RefundApplyParam refundApplyParam) { public ResponseDto refundApply(RefundApplyParam refundApplyParam, String authId, String authName) {
String orderTicketsId = refundApplyParam.getOrderTicketsId(); String orderTicketsId = refundApplyParam.getOrderTicketsId();
List<String> ticketEntityIds = refundApplyParam.getTicketEntityIds(); List<String> ticketEntityIds = refundApplyParam.getTicketEntityIds();
List<BigDecimal> entitiesPrice = refundApplyParam.getEntitiesPrice(); List<BigDecimal> entitiesPrice = refundApplyParam.getEntitiesPrice();
...@@ -201,6 +201,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -201,6 +201,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
refundApplyParam, orderInfo, orderTicketsId, refundApplyParam, orderInfo, orderTicketsId,
RefundPriceExpress, RefundPriceExpress,
ticketEntityIds, realRefundPriceList ticketEntityIds, realRefundPriceList
, authId, authName
); );
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
...@@ -226,7 +227,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -226,7 +227,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
); );
}*/ }*/
public ResponseDto refundCheckStatus(RefundApplyParam refundApplyParam) { public ResponseDto refundCheckStatus(RefundApplyParam refundApplyParam, String authId, String authName) {
String type = refundApplyParam.getType(); String type = refundApplyParam.getType();
List<String> orderRefundsIdList = refundApplyParam.getIds(); List<String> orderRefundsIdList = refundApplyParam.getIds();
if (orderRefundsIdList.size() <= 0) { if (orderRefundsIdList.size() <= 0) {
...@@ -279,23 +280,21 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -279,23 +280,21 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
res = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, true); res = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, true);
break; break;
case "reapply": case "reapply":
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, "", ""); res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, "", "", authId, authName);
break; break;
case "approved": case "approved":
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, ""); res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, "", authId, authName);
break; break;
case "reject": case "reject":
boolean cancelRes = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, false); boolean cancelRes = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, false);
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, ""); res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, "", authId, authName);
break; break;
case "unfilled": case "unfilled":
String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
kylinRefundsStatusServiceImpl.orderTicketRefundUnfilled(refundList, refuse, authId, authName); kylinRefundsStatusServiceImpl.orderTicketRefundUnfilled(refundList, refuse, authId, authName);
res = true; res = true;
break; break;
case "refuse": case "refuse":
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, "", refuse); res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, "", refuse, authId, authName);
break; break;
} }
if (res) { if (res) {
......
...@@ -50,7 +50,7 @@ public class KylinRefundExecuteServiceImpl { ...@@ -50,7 +50,7 @@ public class KylinRefundExecuteServiceImpl {
private KylinOrderRefundsServiceImpl kylinOrderRefundsServiceImpl; private KylinOrderRefundsServiceImpl kylinOrderRefundsServiceImpl;
@Async @Async
public void refundBatchApply(String targetId, String refundBatchId, String reason) { public void refundBatchApply(String targetId, String refundBatchId, String reason, String authId, String authName) {
RefundApplyParam refundApplyParam = new RefundApplyParam(); RefundApplyParam refundApplyParam = new RefundApplyParam();
int count; int count;
int limitNum = 10; int limitNum = 10;
...@@ -74,7 +74,7 @@ public class KylinRefundExecuteServiceImpl { ...@@ -74,7 +74,7 @@ public class KylinRefundExecuteServiceImpl {
refundApplyParam.setRefundPriceExpress(order.getPriceExpress()); refundApplyParam.setRefundPriceExpress(order.getPriceExpress());
} }
try { try {
ResponseDto res = kylinOrderRefundsServiceImpl.refundApply(refundApplyParam); ResponseDto res = kylinOrderRefundsServiceImpl.refundApply(refundApplyParam, authId, authName);
} catch (Exception e) { } catch (Exception e) {
} }
...@@ -95,7 +95,7 @@ public class KylinRefundExecuteServiceImpl { ...@@ -95,7 +95,7 @@ public class KylinRefundExecuteServiceImpl {
} }
@Async @Async
public void refundBatchStatus(RefundBatchApplyParam refundBatchApplyParam, String type) { public void refundBatchStatus(RefundBatchApplyParam refundBatchApplyParam, String type, String authId, String authName) {
String refundBatchId = refundBatchApplyParam.getRefundBatchId(); String refundBatchId = refundBatchApplyParam.getRefundBatchId();
Integer status = refundBatchApplyParam.getRefundStatus(); Integer status = refundBatchApplyParam.getRefundStatus();
// 处理查询订单状态 // 处理查询订单状态
...@@ -150,7 +150,7 @@ public class KylinRefundExecuteServiceImpl { ...@@ -150,7 +150,7 @@ public class KylinRefundExecuteServiceImpl {
refundApplyParam.setReject(refundBatchApplyParam.getReject()); refundApplyParam.setReject(refundBatchApplyParam.getReject());
} }
try { try {
ResponseDto res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam); ResponseDto res = kylinOrderRefundsServiceImpl.refundCheckStatus(refundApplyParam, authId, authName);
} catch (Exception e) { } catch (Exception e) {
} }
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -4,6 +4,7 @@ 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.common.utils.ShiroUtils;
import com.liquidnet.common.cache.redis.util.RedisUtil; import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.BeanUtil; import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.commons.lang.util.IDGenerator;
...@@ -111,7 +112,9 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -111,7 +112,9 @@ public class KylinRefundPerformancesAdminServiceImpl {
int resNum = kylinOrderRefundBatchesMapper.insert(createData); int resNum = kylinOrderRefundBatchesMapper.insert(createData);
if (resNum > 0) { if (resNum > 0) {
// 开始执行批量提交审核 分批处理退款申请 // 开始执行批量提交审核 分批处理退款申请
kylinRefundExecuteServiceImpl.refundBatchApply(targetId, refundBatchId, refundBatchApplyParam.getReason()); String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
kylinRefundExecuteServiceImpl.refundBatchApply(targetId, refundBatchId, refundBatchApplyParam.getReason(), authId, authName);
return ResponseDto.success(); return ResponseDto.success();
} else { } else {
return ResponseDto.failure("操作失败"); return ResponseDto.failure("操作失败");
...@@ -176,7 +179,9 @@ public class KylinRefundPerformancesAdminServiceImpl { ...@@ -176,7 +179,9 @@ public class KylinRefundPerformancesAdminServiceImpl {
if (null != orderUpdateStatus) { if (null != orderUpdateStatus) {
refundBatchApplyParam.setRefundStatus(orderUpdateStatus); refundBatchApplyParam.setRefundStatus(orderUpdateStatus);
} }
kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, type); String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
kylinRefundExecuteServiceImpl.refundBatchStatus(refundBatchApplyParam, type, authId, authName);
} catch (Exception e) { } catch (Exception e) {
return ResponseDto.failure("操作失败"); return ResponseDto.failure("操作失败");
} }
......
...@@ -95,13 +95,12 @@ public class KylinRefundsStatusServiceImpl { ...@@ -95,13 +95,12 @@ public class KylinRefundsStatusServiceImpl {
RefundApplyParam refundApplyParam, KylinOrderTickets orderInfo, String orderTicketsId, RefundApplyParam refundApplyParam, KylinOrderTickets orderInfo, String orderTicketsId,
BigDecimal RefundPriceExpress, BigDecimal RefundPriceExpress,
List<String> ticketEntityIds, List<BigDecimal> entitiesPrice List<String> ticketEntityIds, List<BigDecimal> entitiesPrice
, String authId, String authName
) { ) {
if (CollectionUtil.isEmpty(ticketEntityIds)) { if (CollectionUtil.isEmpty(ticketEntityIds)) {
return false; return false;
} }
// 基础数据 // 基础数据
String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
String reason = refundApplyParam.getReason(); String reason = refundApplyParam.getReason();
String orderRefundBatchesId = refundApplyParam.getOrderRefundBatchesId(); String orderRefundBatchesId = refundApplyParam.getOrderRefundBatchesId();
// 本次退款票总金额 // 本次退款票总金额
...@@ -334,9 +333,7 @@ public class KylinRefundsStatusServiceImpl { ...@@ -334,9 +333,7 @@ public class KylinRefundsStatusServiceImpl {
return true; return true;
} }
public boolean orderRefundChangeStatus(List<KylinOrderRefunds> refundList, String type, String reject, String refuse) { public boolean orderRefundChangeStatus(List<KylinOrderRefunds> refundList, String type, String reject, String refuse, String authId, String authName) {
String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds(); KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds();
switch (type) { switch (type) {
case "reapply": case "reapply":
......
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