|
|
|
@ -55,6 +55,7 @@ import java.io.IOException;
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.text.ParseException; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
@ -121,10 +122,24 @@ public class StoreOrderController {
|
|
|
|
|
Pageable pageable, |
|
|
|
|
@RequestParam(name = "orderStatus") String orderStatus, |
|
|
|
|
@RequestParam(name = "orderType") String orderType) { |
|
|
|
|
|
|
|
|
|
// String[] orderTypeList=orderType.split(",");
|
|
|
|
|
// Map<String,Object> result=new HashMap<>();
|
|
|
|
|
// for (String type : orderTypeList) {
|
|
|
|
|
// YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria,orderStatus,type);
|
|
|
|
|
// Map<String,Object> result1=yxStoreOrderService.queryAll(newCriteria, pageable);
|
|
|
|
|
// if (result.isEmpty()){
|
|
|
|
|
// result.putAll(yxStoreOrderService.queryAll(newCriteria, pageable));
|
|
|
|
|
// }else {
|
|
|
|
|
// List<YxStoreOrderDto> storeOrderDTOS= (List<YxStoreOrderDto>) result.get("content");
|
|
|
|
|
// Long totalElements=(Long)result.get("totalElements")+(Long)result1.get("totalElements");
|
|
|
|
|
// storeOrderDTOS.addAll((List<YxStoreOrderDto>) result1.get("content"));
|
|
|
|
|
// result.put("content",storeOrderDTOS);
|
|
|
|
|
// result.put("totalElements",totalElements);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria,orderStatus,orderType); |
|
|
|
|
|
|
|
|
|
return new ResponseEntity<>(yxStoreOrderService.queryAll(newCriteria, pageable), HttpStatus.OK); |
|
|
|
|
// return new ResponseEntity<>(result,HttpStatus.OK);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据订单id获取订单详情") |
|
|
|
@ -419,29 +434,30 @@ public class StoreOrderController {
|
|
|
|
|
} |
|
|
|
|
//订单类型查询
|
|
|
|
|
if (StrUtil.isNotEmpty(orderType)) { |
|
|
|
|
switch (orderType) { |
|
|
|
|
case "1": |
|
|
|
|
criteria.setBargainId(0); |
|
|
|
|
criteria.setCombinationId(0); |
|
|
|
|
criteria.setSeckillId(0); |
|
|
|
|
break; |
|
|
|
|
case "2": |
|
|
|
|
criteria.setNewCombinationId(0); |
|
|
|
|
break; |
|
|
|
|
case "3": |
|
|
|
|
criteria.setNewSeckillId(0); |
|
|
|
|
break; |
|
|
|
|
case "4": |
|
|
|
|
criteria.setNewBargainId(0); |
|
|
|
|
break; |
|
|
|
|
case "5": |
|
|
|
|
criteria.setShippingType(2); |
|
|
|
|
break; |
|
|
|
|
case "6": |
|
|
|
|
criteria.setPayIntegral(new BigDecimal("0.00")); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
} |
|
|
|
|
switch (orderType) { |
|
|
|
|
case "1": |
|
|
|
|
criteria.setBargainId(0); |
|
|
|
|
criteria.setCombinationId(0); |
|
|
|
|
criteria.setSeckillId(0); |
|
|
|
|
break; |
|
|
|
|
case "2": |
|
|
|
|
criteria.setNewCombinationId(0); |
|
|
|
|
break; |
|
|
|
|
case "3": |
|
|
|
|
criteria.setNewSeckillId(0); |
|
|
|
|
break; |
|
|
|
|
case "4": |
|
|
|
|
criteria.setNewBargainId(0); |
|
|
|
|
break; |
|
|
|
|
case "5": |
|
|
|
|
criteria.setShippingType(2); |
|
|
|
|
break; |
|
|
|
|
case "6": |
|
|
|
|
criteria.setPayIntegral(new BigDecimal("0.00")); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return criteria; |
|
|
|
|