|
@@ -13,6 +13,7 @@ import java.util.List;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
@@ -41,10 +42,13 @@ public class ApiController {
|
|
@RequestMapping("/orders")
|
|
@RequestMapping("/orders")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public ControllerResult orders(@RequestParam("stime") String stime, @RequestParam("etime") String etime,
|
|
public ControllerResult orders(@RequestParam("stime") String stime, @RequestParam("etime") String etime,
|
|
- @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize){
|
|
|
|
|
|
+ @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize, @RequestParam(name="search",required=false) String search){
|
|
|
|
|
|
Integer s = null;
|
|
Integer s = null;
|
|
Integer e = null;
|
|
Integer e = null;
|
|
|
|
+ if (search != null && search.isEmpty()){
|
|
|
|
+ search = null;
|
|
|
|
+ }
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
try{
|
|
try{
|
|
@@ -54,8 +58,8 @@ public class ApiController {
|
|
return new ControllerResult(ErrorConstant.PARAM_ERROR);
|
|
return new ControllerResult(ErrorConstant.PARAM_ERROR);
|
|
}
|
|
}
|
|
|
|
|
|
- List<BuyOrderItem> items = buyOrderService.queryPayedOrderItems(s, e, page, pageSize);
|
|
|
|
- Integer count = buyOrderService.queryPayedOrderItemCount(s, e);
|
|
|
|
|
|
+ List<BuyOrderItem> items = buyOrderService.queryPayedOrderItems(s, e, page, pageSize, search);
|
|
|
|
+ Integer count = buyOrderService.queryPayedOrderItemCount(s, e, search);
|
|
|
|
|
|
List<IncomeBean> beans = buyOrderService.toIncomeBeans(items, format);
|
|
List<IncomeBean> beans = buyOrderService.toIncomeBeans(items, format);
|
|
|
|
|
|
@@ -68,9 +72,12 @@ public class ApiController {
|
|
|
|
|
|
@RequestMapping("refundOrders")
|
|
@RequestMapping("refundOrders")
|
|
public ControllerResult refundOrders(@RequestParam("stime") String stime, @RequestParam("etime") String etime,
|
|
public ControllerResult refundOrders(@RequestParam("stime") String stime, @RequestParam("etime") String etime,
|
|
- @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize){
|
|
|
|
|
|
+ @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize, @RequestParam(name="search",required=false) String search){
|
|
Integer s = null;
|
|
Integer s = null;
|
|
Integer e = null;
|
|
Integer e = null;
|
|
|
|
+ if (search != null && search.isEmpty()){
|
|
|
|
+ search = null;
|
|
|
|
+ }
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
try{
|
|
try{
|
|
@@ -80,8 +87,8 @@ public class ApiController {
|
|
return new ControllerResult(ErrorConstant.PARAM_ERROR);
|
|
return new ControllerResult(ErrorConstant.PARAM_ERROR);
|
|
}
|
|
}
|
|
|
|
|
|
- List<BuyOrderItem> items = buyOrderService.queryRefundItems(s, e, page, pageSize);
|
|
|
|
- Integer count = buyOrderService.queryRefundItemCount(s, e);
|
|
|
|
|
|
+ List<BuyOrderItem> items = buyOrderService.queryRefundItems(s, e, page, pageSize, search);
|
|
|
|
+ Integer count = buyOrderService.queryRefundItemCount(s, e, search);
|
|
|
|
|
|
List<IncomeBean> beans = buyOrderService.toIncomeBeans(items, format);
|
|
List<IncomeBean> beans = buyOrderService.toIncomeBeans(items, format);
|
|
|
|
|