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

Commit a21aaa56 authored by wangyifan's avatar wangyifan

退款列表请求参数支持多个状态查询

parent 98914df3
...@@ -47,6 +47,12 @@ public class GoblinStoreBackOrderStatusCountVo { ...@@ -47,6 +47,12 @@ public class GoblinStoreBackOrderStatusCountVo {
@ApiModelProperty("退货失败[status=9]") @ApiModelProperty("退货失败[status=9]")
private long returnFailed; private long returnFailed;
@ApiModelProperty("退款失败[status=10]")
private long refundFailed;
@ApiModelProperty("取消退款[status=11]")
private long refundCancelled;
/** /**
* 从 Mongo 按 status 分组统计结果组装 VO。 * 从 Mongo 按 status 分组统计结果组装 VO。
*/ */
...@@ -63,6 +69,8 @@ public class GoblinStoreBackOrderStatusCountVo { ...@@ -63,6 +69,8 @@ public class GoblinStoreBackOrderStatusCountVo {
vo.waitReceive = grouped.getOrDefault(7, 0L); vo.waitReceive = grouped.getOrDefault(7, 0L);
vo.returnCompleted = grouped.getOrDefault(8, 0L); vo.returnCompleted = grouped.getOrDefault(8, 0L);
vo.returnFailed = grouped.getOrDefault(9, 0L); vo.returnFailed = grouped.getOrDefault(9, 0L);
vo.refundFailed = grouped.getOrDefault(10, 0L);
vo.refundCancelled = grouped.getOrDefault(11, 0L);
return vo; return vo;
} }
} }
...@@ -16,7 +16,7 @@ public interface IGoblinStoreBackOrderService { ...@@ -16,7 +16,7 @@ public interface IGoblinStoreBackOrderService {
String cet, String cet,
String orderCode, String orderCode,
String spuName, String spuName,
Integer status); String status);
ResponseDto<GoblinBackOrderDetailsVo> orderDetails(String backOrderId); ResponseDto<GoblinBackOrderDetailsVo> orderDetails(String backOrderId);
......
...@@ -37,7 +37,7 @@ public class GoblinStoreBackOrderController { ...@@ -37,7 +37,7 @@ public class GoblinStoreBackOrderController {
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "cet", value = "申请终止时间"), @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "cet", value = "申请终止时间"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderCode", value = "订单编号"), @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderCode", value = "订单编号"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "spuName", value = "商品名称"), @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "spuName", value = "商品名称"),
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "status", value = "审核状态[1-待审核(退款申请)|2-已退款(退款成功)|3-已驳回(退款拒绝)]"), @ApiImplicitParam(type = "form", required = false, dataType = "String", name = "status", value = "审核状态,多个用英文逗号分隔。0-商铺发起退款|1-退款申请|2-退款成功|3-退款拒绝|4-退货申请|5-退货拒绝|6-待填物流|7-待收货|8-退货完成|9-退货失败|10-退款失败|11-取消退款"),
}) })
@GetMapping(value = "list") @GetMapping(value = "list")
public ResponseDto<GoblinStoreBackOrderListPageVo> orderBackList(@RequestParam(value = "page", required = true) @Valid Integer page, public ResponseDto<GoblinStoreBackOrderListPageVo> orderBackList(@RequestParam(value = "page", required = true) @Valid Integer page,
...@@ -47,7 +47,7 @@ public class GoblinStoreBackOrderController { ...@@ -47,7 +47,7 @@ public class GoblinStoreBackOrderController {
@RequestParam(value = "cet", required = false) String cet, @RequestParam(value = "cet", required = false) String cet,
@RequestParam(value = "orderCode", required = false) String orderCode, @RequestParam(value = "orderCode", required = false) String orderCode,
@RequestParam(value = "spuName", required = false) String spuName, @RequestParam(value = "spuName", required = false) String spuName,
@RequestParam(value = "status", required = false) Integer status) { @RequestParam(value = "status", required = false) String status) {
return goblinStoreBackOrderService.orderBackList(page, orderBackCode, type, cst, cet, orderCode, spuName, status); return goblinStoreBackOrderService.orderBackList(page, orderBackCode, type, cst, cet, orderCode, spuName, status);
} }
......
...@@ -44,7 +44,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -44,7 +44,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
GoblinRefundHelper refundHelper; GoblinRefundHelper refundHelper;
@Override @Override
public ResponseDto<GoblinStoreBackOrderListPageVo> orderBackList(Integer page, String orderBackCode, Integer type, String cst, String cet, String orderCode, String spuName, Integer status) { public ResponseDto<GoblinStoreBackOrderListPageVo> orderBackList(Integer page, String orderBackCode, Integer type, String cst, String cet, String orderCode, String spuName, String status) {
List<GoblinStoreBackOrderListVo> listVos = ObjectUtil.goblinStoreBackOrderListVoArrayList(); List<GoblinStoreBackOrderListVo> listVos = ObjectUtil.goblinStoreBackOrderListVoArrayList();
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid); GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
......
...@@ -1499,7 +1499,7 @@ public class GoblinMongoUtils { ...@@ -1499,7 +1499,7 @@ public class GoblinMongoUtils {
} }
//商品退款订单列表 //商品退款订单列表
public HashMap<String, Object> storeBackOrderList(String storeId, Integer page, String orderBackCode, Integer type, String cst, String cet, String orderCode, String spuName, Integer status) { public HashMap<String, Object> storeBackOrderList(String storeId, Integer page, String orderBackCode, Integer type, String cst, String cet, String orderCode, String spuName, String status) {
//查询销量 //查询销量
int size = 20; int size = 20;
int skipCount = ((page - 1) * size); int skipCount = ((page - 1) * size);
...@@ -1526,10 +1526,19 @@ public class GoblinMongoUtils { ...@@ -1526,10 +1526,19 @@ public class GoblinMongoUtils {
} }
/** 列表查询条件(含 status Tab 筛选) */ /** 列表查询条件(含 status Tab 筛选) */
private Criteria storeBackOrderListCriteria(String storeId, String orderBackCode, Integer type, String cst, String cet, String orderCode, String spuName, Integer status) { private Criteria storeBackOrderListCriteria(String storeId, String orderBackCode, Integer type, String cst, String cet, String orderCode, String spuName, String status) {
Criteria criteria = storeBackOrderListBaseCriteria(storeId, orderBackCode, type, cst, cet, orderCode, spuName); Criteria criteria = storeBackOrderListBaseCriteria(storeId, orderBackCode, type, cst, cet, orderCode, spuName);
if (status != null) { if (StringUtils.isNotBlank(status)) {
criteria = criteria.and("status").is(status); List<Integer> statusList = new ArrayList<>();
for (String part : status.split(",")) {
String trimmed = part.trim();
if (StringUtils.isNotBlank(trimmed)) {
statusList.add(Integer.valueOf(trimmed));
}
}
if (!statusList.isEmpty()) {
criteria = criteria.and("status").in(statusList);
}
} }
return criteria; return criteria;
} }
......
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