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

Commit c3c9f048 authored by 胡佳晨's avatar 胡佳晨

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

parents 0037d2bc 2a3ea637
......@@ -285,9 +285,9 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
break;
case "reject":
boolean cancelRes = kylinRefundsStatusServiceImpl.orderTicketRefundCancel(refundList, false);
if (cancelRes) {
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, "");
}
log.info("取消处理" + cancelRes);
log.info("取消处理ing");
res = kylinRefundsStatusServiceImpl.orderRefundChangeStatus(refundList, type, reject, "");
break;
case "unfilled":
res = kylinRefundsStatusServiceImpl.orderTicketRefundUnfilled(refundList, refuse);
......@@ -380,7 +380,8 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
KylinOrderRefundPic kylinOrderRefundPic = kylinOrderRefundPicMapper.selectOne(new UpdateWrapper<KylinOrderRefundPic>().eq("order_refunds_id", orderRefundId));
if (kylinOrderRefundPic != null) {
String picStr = kylinOrderRefundPic.getPicUrl();
List<String> strList = JsonUtils.fromJson(picStr, new TypeReference<List<String>>() {});
List<String> strList = JsonUtils.fromJson(picStr, new TypeReference<List<String>>() {
});
kylinOrderRefundsVo.setPicList(strList);
}
......@@ -473,20 +474,20 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
}
@Override
public String getOrderRefundCode(String code,int type) {
public String getOrderRefundCode(String code, int type) {
String orderCode = null;
if(type==1){
KylinOrderRefunds data = kylinOrderRefundsMapper.selectOne(new UpdateWrapper<KylinOrderRefunds>().like("order_refund_code",code));
if(data==null){
if (type == 1) {
KylinOrderRefunds data = kylinOrderRefundsMapper.selectOne(new UpdateWrapper<KylinOrderRefunds>().like("order_refund_code", code));
if (data == null) {
return null;
}else{
} else {
orderCode = data.getOrderRefundCode();
}
}else if(type==2){
KylinOrderTickets data = kylinOrderTicketsMapper.selectOne(new UpdateWrapper<KylinOrderTickets>().like("order_code",code));
if(data==null){
} else if (type == 2) {
KylinOrderTickets data = kylinOrderTicketsMapper.selectOne(new UpdateWrapper<KylinOrderTickets>().like("order_code", code));
if (data == null) {
return null;
}else{
} else {
orderCode = data.getOrderCode();
}
}
......
......@@ -214,7 +214,6 @@ public class KylinRefundsStatusServiceImpl {
public boolean orderTicketRefundCancel(List<KylinOrderRefunds> refundList, Boolean isUser) {
for (KylinOrderRefunds refundInfo : refundList) {
log.info("order_refunds_id" + refundInfo.getOrderRefundsId());
List<KylinOrderRefundEntities> refundEntities = kylinOrderRefundsEntitiesMapper.selectList(
new QueryWrapper<KylinOrderRefundEntities>().eq("order_refunds_id", refundInfo.getOrderRefundsId())
);
......@@ -335,18 +334,21 @@ public class KylinRefundsStatusServiceImpl {
}
public boolean orderRefundChangeStatus(List<KylinOrderRefunds> refundList, String type, String reject, String refuse) {
log.info("orderRefundChangeStatus ----- in");
String authId = ShiroUtils.getUserId().toString();
String authName = ShiroUtils.getLoginName();
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds();
log.info("type" + type);
switch (type) {
case "reapply":
log.info("type-1");
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY);
kylinOrderRefunds.setApplicantId(authId);
kylinOrderRefunds.setApplicantName(authName);
kylinOrderRefunds.setApplicantAt(LocalDateTime.now());
break;
case "approved":
log.info("type-2");
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPROVED);
kylinOrderRefunds.setAuditorId(authId);
kylinOrderRefunds.setAuditorName(authName);
......@@ -354,6 +356,7 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setReject(reject);
break;
case "reject":
log.info("type-reject" + type);
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT);
kylinOrderRefunds.setAuditorId(authId);
kylinOrderRefunds.setAuditorName(authName);
......@@ -361,6 +364,7 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setReject(reject);
break;
case "refuse":
log.info("type-3");
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_REFUSE);
kylinOrderRefunds.setExecutorId(authId);
kylinOrderRefunds.setExecutorName(authName);
......@@ -380,9 +384,13 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds,
new UpdateWrapper<KylinOrderRefunds>().in("order_refunds_id", orderRefundIds)
);
log.info("type-4");
// 修改缓存
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo();
BeanUtils.copyProperties(kylinOrderRefunds, kylinOrderRefundsVo);
kylinOrderRefundsVo.setUpdatedAt(LocalDateTime.now());
kylinOrderRefundsVo.setReason("11111");
log.info("kylinOrderRefundsVo-"+kylinOrderRefundsVo.getStatus());
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVo));
UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderRefundsId").in(orderRefundIds)).getQueryObject(),
......@@ -390,6 +398,7 @@ public class KylinRefundsStatusServiceImpl {
);
dataUtils.delOrderRefundVo(orderRefundIds);
dataUtils.delOrderRefundVoByOrderId(orderIds);
log.info("type-5");
return true;
}
......
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