|
|
|
@ -9,17 +9,22 @@ import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 用户订单信息 |
|
|
|
* only POST method |
|
|
|
*/ |
|
|
|
@RestController |
|
|
|
@RequestMapping(name = "/api/Order",method = RequestMethod.POST) |
|
|
|
@RequestMapping(name = "/api/Order", method = RequestMethod.POST) |
|
|
|
public class OrderController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private OrderService orderService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取订单信息 |
|
|
|
* |
|
|
|
* @param batchcode |
|
|
|
* @param userIsli |
|
|
|
* @param userRole |
|
|
|
@ -33,55 +38,67 @@ public class OrderController extends BaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/getOrder") |
|
|
|
public JSONObject getOrder(@RequestParam("batchcode")String batchcode, |
|
|
|
public JSONObject getOrder(@RequestParam("batchcode") String batchcode, |
|
|
|
@RequestParam("user_isli") String userIsli, |
|
|
|
String userRole,String payStatus,String closeStatus, |
|
|
|
String orderStatus,String creatime,String chargesType, |
|
|
|
@RequestParam(name = "page",defaultValue = "1") String page, |
|
|
|
@RequestParam(name = "limit",defaultValue = "20")String pagesize |
|
|
|
){ |
|
|
|
|
|
|
|
// $batchcode = $this->request->post('', '');
|
|
|
|
// $user_isli = $this->request->post();
|
|
|
|
// $user_role = $this->request->post('user_role');
|
|
|
|
// $pay_status = $this->request->post('pay_status');
|
|
|
|
// $close_status = $this->request->post('close_status');
|
|
|
|
// $order_status = $this->request->post('order_status');
|
|
|
|
// $createtime = $this->request->post('createtime');
|
|
|
|
// $charges_type = $this->request->post('charges_type');
|
|
|
|
|
|
|
|
@RequestParam("user_role") String userRole, |
|
|
|
@RequestParam("pay_status") String payStatus, |
|
|
|
@RequestParam("close_status") String closeStatus, |
|
|
|
@RequestParam("order_status") String orderStatus, |
|
|
|
@RequestParam("createtime") String creatime, |
|
|
|
@RequestParam("charges_type") String chargesType, |
|
|
|
@RequestParam(name = "page", defaultValue = "1") String page, |
|
|
|
@RequestParam(name = "limit", defaultValue = "20") String pagesize |
|
|
|
) { |
|
|
|
// 拼装查询条件
|
|
|
|
Map<String, Object> qmap = new HashMap<>(); |
|
|
|
qmap.put("batchcode", batchcode); |
|
|
|
qmap.put("user_isli", userIsli); |
|
|
|
qmap.put("user_role", userRole); |
|
|
|
qmap.put("pay_status", payStatus); |
|
|
|
qmap.put("close_status", closeStatus); |
|
|
|
qmap.put("order_status", orderStatus); |
|
|
|
qmap.put("createtime", creatime); |
|
|
|
qmap.put("charges_type", chargesType); |
|
|
|
//
|
|
|
|
int ipage = Integer.valueOf(page); |
|
|
|
int ips = Integer.valueOf(pagesize); |
|
|
|
int startrs = ipage > 0 ? (ipage - 1) * ips : 0; |
|
|
|
orderService.getOrderList(qmap, startrs, ips); |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 创建订单 |
|
|
|
* |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/createOrder") |
|
|
|
public JSONObject createOrder(){ |
|
|
|
public JSONObject createOrder() { |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询发票 |
|
|
|
* |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/getTicket") |
|
|
|
public JSONObject getTicket(){ |
|
|
|
public JSONObject getTicket() { |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 订单结算 |
|
|
|
* |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/getBalance") |
|
|
|
public JSONObject getBalance(){ |
|
|
|
public JSONObject getBalance() { |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
@RequestMapping("/orderCloseCallback") |
|
|
|
public JSONObject orderCloseCallback(){ |
|
|
|
public JSONObject orderCloseCallback() { |
|
|
|
// 请求转发到远程服务器
|
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|