yujian
2019-03-27 cdcbed9af813b2a02cdc01eefa24db8bec6b51a9
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -8,9 +8,6 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -23,7 +20,6 @@
import com.yeshi.fanli.exception.order.CommonOrderException;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.count.TaoBaoOrderCountService;
import com.yeshi.fanli.service.inter.hongbao.HongBaoService;
import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
import com.yeshi.fanli.service.inter.order.CommonOrderService;
import com.yeshi.fanli.service.inter.order.OrderService;
@@ -33,6 +29,9 @@
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.order.CommonOrderVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Controller
@RequestMapping("admin/new/api/v1/order")
public class OrderAdminController {
@@ -40,8 +39,6 @@
   @Resource
   private OrderService orderService;
   @Resource
   private HongBaoService hongBaoService;
   @Resource
   private HongBaoV2CountService hongBaoV2CountService;
@@ -93,19 +90,6 @@
      }
   }
   
   @RequestMapping(value = "getOrderList", method = RequestMethod.POST)
   public void getOrderList(int pageIndex, String key, PrintWriter out) {
      List<OrderAdmin> orderAdminList = hongBaoService.getOrderAdminList(pageIndex, key);
      int count = orderService.getCount(key);
      int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1;
      PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage);
      JSONObject data = new JSONObject();
      data.put("pe", pe);
      data.put("orderList", JsonUtil.getSimpleGsonWithDateAndSerialization().toJson(orderAdminList));
      out.print(JsonUtil.loadTrueResult(data));
   }
   
   /**
    * 查询所有用户订单列表