|
|
|
@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
@ -25,6 +26,16 @@ public class AdminOrderController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private OrderGoodsDetailService orderGoodsDetailService; |
|
|
|
|
|
|
|
@PostMapping("/list") |
|
|
|
public JSONObject olist(@RequestParam(value = "page",defaultValue = "1") String spage){ |
|
|
|
int ipage = Integer.valueOf(spage); |
|
|
|
List<Order> orderList=orderService.getAllOrderList(ipage); |
|
|
|
jsonObject.put("code",200); |
|
|
|
jsonObject.put("data",orderList); |
|
|
|
jsonObject.put("msg","成功"); |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 订单列列表 |
|
|
|
* @param batchacode |
|
|
|
@ -40,18 +51,19 @@ public class AdminOrderController extends BaseController { |
|
|
|
* @param slimit |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/list") |
|
|
|
public JSONObject olist(String batchacode, |
|
|
|
@RequestParam("entrust_name") String entrustName, |
|
|
|
@RequestParam("buy_name") String buyName, |
|
|
|
@RequestParam("goods_ame") String goodsName, |
|
|
|
@RequestParam("order_type") String orderType, |
|
|
|
@PostMapping("/so") |
|
|
|
public JSONObject solist(@RequestParam(value = "batchcode",defaultValue = "") String batchacode, |
|
|
|
@RequestParam(value = "entrust_name",defaultValue = "") String entrustName, |
|
|
|
@RequestParam(value = "buy_name",defaultValue = "") String buyName, |
|
|
|
@RequestParam(value = "goods_ame",defaultValue = "") String goodsName, |
|
|
|
@RequestParam(value = "order_type",defaultValue = "") String orderType, |
|
|
|
@RequestParam("transaction_status") String transactionStatus, |
|
|
|
@RequestParam("createtime") String createtime, |
|
|
|
@RequestParam("goods_isli")String goodsIsli, |
|
|
|
@RequestParam("charges_type") String chargesType, |
|
|
|
@RequestParam(value = "createtime",defaultValue = "") String createtime, |
|
|
|
@RequestParam(value = "goods_isli",defaultValue = "")String goodsIsli, |
|
|
|
@RequestParam(value = "charges_type",defaultValue = "") String chargesType, |
|
|
|
@RequestParam(value = "page",defaultValue = "1") String spage, |
|
|
|
@RequestParam(value = "limit",defaultValue = "20") String slimit){ |
|
|
|
|
|
|
|
Map<String,Object> qmap=new HashMap<>(); |
|
|
|
qmap.put("batchcode",batchacode); |
|
|
|
qmap.put("entrust_name",entrustName); |
|
|
|
@ -65,7 +77,13 @@ public class AdminOrderController extends BaseController { |
|
|
|
//
|
|
|
|
int page= Integer.valueOf(spage); |
|
|
|
int limit = Integer.valueOf(slimit); |
|
|
|
List<Order> orderList =orderService.getOrderList(qmap,page,limit); |
|
|
|
List<Order> orderList = new ArrayList<>(); |
|
|
|
// 如果条件为空
|
|
|
|
if(qmap.isEmpty()){ |
|
|
|
orderList=orderService.getAllOrderList(page); |
|
|
|
}else { |
|
|
|
orderList=orderService.getOrderList(qmap, page, limit); |
|
|
|
} |
|
|
|
jsonObject.put("code",200); |
|
|
|
jsonObject.put("msg","操作成功"); |
|
|
|
jsonObject.put("data",orderList); |
|
|
|
|