3 changed files with 83 additions and 5 deletions
@ -0,0 +1,80 @@ |
|||
package cn.chjyj.szwh.controller.admin; |
|||
|
|||
import cn.chjyj.szwh.bean.Order; |
|||
import cn.chjyj.szwh.bean.OrderGoodsDetail; |
|||
import cn.chjyj.szwh.controller.BaseController; |
|||
import cn.chjyj.szwh.service.OrderService; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 订单管理 |
|||
* just support post method |
|||
*/ |
|||
@RestController |
|||
@RequestMapping(value = "/admin/order.Order",method = RequestMethod.POST) |
|||
public class AdminOrderController extends BaseController { |
|||
@Autowired |
|||
private OrderService orderService; |
|||
|
|||
/** |
|||
* 订单列列表 |
|||
* @param batchacode |
|||
* @param entrustName |
|||
* @param buyName |
|||
* @param goodsName |
|||
* @param orderType |
|||
* @param transactionStatus |
|||
* @param createtime |
|||
* @param goodsIsli |
|||
* @param chargesType |
|||
* @param spage |
|||
* @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, |
|||
@RequestParam("transaction_status") String transactionStatus, |
|||
@RequestParam("createtime") String createtime, |
|||
@RequestParam("goods_isli")String goodsIsli, |
|||
@RequestParam("charges_type") 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); |
|||
qmap.put("goods_name",goodsName); |
|||
qmap.put("order_type",orderType); |
|||
qmap.put("transaction_status",transactionStatus); |
|||
qmap.put("createtime",createtime); |
|||
qmap.put("godos_isli",goodsIsli); |
|||
qmap.put("charges_type",chargesType); |
|||
|
|||
//
|
|||
int page= Integer.valueOf(spage); |
|||
int limit = Integer.valueOf(slimit); |
|||
List<Order> orderList =orderService.getOrderList(qmap,page,limit); |
|||
jsonObject.put("code",200); |
|||
jsonObject.put("msg","操作成功"); |
|||
jsonObject.put("data",orderList); |
|||
return jsonObject; |
|||
} |
|||
|
|||
@PostMapping("/orderDetail") |
|||
public JSONObject orderDetail(String batchcode){ |
|||
Order order = orderService.getOrderByBatchcode(batchcode); |
|||
jsonObject.put("code",200); |
|||
jsonObject.put("msg","成功"); |
|||
jsonObject.put("data",order); |
|||
return jsonObject; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue