| | |
| | | @RequestMapping(value = "getHistory", method = RequestMethod.POST)
|
| | | public void getHistory(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
|
| | | try {
|
| | | if (type == null) {
|
| | | out.print(JsonUtil.loadFalseResult("类型不正确"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (page == null || page < 1) {
|
| | | page = 1;
|
| | | }
|
| | | |
| | | int pageSize;
|
| | | if (type == 1) {
|
| | | pageSize = 4;
|
| | |
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", list.size());
|
| | | data.put("count", count);
|
| | | data.put("list", JsonUtil.getApiCommonGson().toJson(list));
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
| | | @RequestMapping(value = "getShopInfo", method = RequestMethod.POST)
|
| | | public void getShopInfo(AcceptData acceptData, Integer page, Long sid, Long uid, PrintWriter out) {
|
| | | try {
|
| | | if (sid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("缺失店铺id"));
|
| | | return;
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | if (page == 1) {
|
| | | TaoBaoShop taoBaoShop = taoBaoShopService.selectByPrimaryKey(sid);
|
| | | if (taoBaoShop == null) {
|
| | | out.print(JsonUtil.loadFalseResult("店铺信息获取失败"));
|
| | | return;
|
| | | }
|
| | | String shopLink = taoBaoShop.getShopLink();
|
| | | if (StringUtil.isNullOrEmpty(shopLink)) {
|
| | |
| | | if (!StringUtil.isNullOrEmpty(shopIconCustom)) {
|
| | | taoBaoShop.setShopIcon(shopIconCustom);
|
| | | }
|
| | | data.put("shop", taoBaoShop);
|
| | | data.put("shop", JsonUtil.getApiCommonGson().toJson(taoBaoShop));
|
| | |
|
| | |
|
| | | ThreadUtil.run(new Runnable() {
|