| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.vo.order.CommonOrderVO;
|
| | | import com.yeshi.fanli.vo.order.TaoBaoOrderVO;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/order")
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 淘宝订单
|
| | | * 查询所有用户订单列表
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | |
| | | * @param endTime
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getTBOrder")
|
| | | public void getTBOrder(String callback, Integer pageIndex, Integer keyType,
|
| | | String key, Integer state, String startTime, String endTime, PrintWriter out) {
|
| | | @RequestMapping(value = "getUserOrderList")
|
| | | public void getUserOrderList(String callback, Integer pageIndex, Integer pageSize, Integer keyType,
|
| | | String key, Integer state, Integer type, Integer orderState, String startTime, String endTime, |
| | | PrintWriter out) {
|
| | |
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | if (state != null && state == 0) {
|
| | | state = null;// 所有状态
|
| | | }
|
| | |
|
| | | if (type != null && type == 0) {
|
| | | type = null; // 所有类型订单
|
| | | }
|
| | |
|
| | | if (endTime != null && endTime.trim().length() > 0) {
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | |
| | | long count = 0;
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | List<TaoBaoOrderVO> listVO = null;
|
| | | |
| | | if (key != null && key.trim().length() > 0 && keyType == 2) {
|
| | | |
| | | // 查询列表
|
| | | List<CommonOrderVO> list = commonOrderService.listQueryByUid((pageIndex - 1) * pageSize, pageSize , |
| | | Long.parseLong(key), state, null, null, null, startTime, endTime, null);
|
| | | |
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | // 统计总数
|
| | | count = commonOrderService.countQueryByUid(Long.parseLong(key), state, null, null, null, startTime, endTime, null);
|
| | | |
| | | } else {
|
| | | |
| | | List<TaoBaoOrderVO> listQuery = taoBaoOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, key, startTime, endTime, state);
|
| | | |
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | count= taoBaoOrderService.countQuery(key, startTime, endTime, state);
|
| | | |
| | | }
|
| | |
|
| | | |
| | | // 查询列表
|
| | | List<CommonOrderVO> list = commonOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, |
| | | keyType, key, state, type, orderState, startTime, endTime);
|
| | | |
| | |
|
| | | if (list != null && list.size() > 0) {
|
| | | // 统计总数
|
| | | count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime);
|
| | | }
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", listVO);
|
| | | data.put("result_list", list);
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 查询订单列表用户uid
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param uid
|
| | | * @param state
|
| | | * @param type
|
| | | * @param orderState
|
| | | * @param orderNo
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHistoryOrder")
|
| | | public void getHistoryOrder(String callback, Integer pageIndex, Integer pageSize, Long uid, Integer state, Integer type,
|
| | | Integer orderState, String orderNo, String startTime, String endTime, PrintWriter out) {
|