From cd637932a970e7935b17d41568fe89c92775bccc Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 06 十二月 2019 17:18:27 +0800 Subject: [PATCH] 双12活动添加,邀请码发布修改,爬单新规则添加 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java | 37 ++++++++++++++++++++++++++++++++++--- 1 files changed, 34 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java index a85cf19..177b57d 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java @@ -495,6 +495,26 @@ } /** + * 淇敼鎺掑簭 + * + * @param callback + * @param goodsClass + * @param out + */ + @RequestMapping(value = "updateOrderBrand") + public void updateOrderBrand(String callback, Long id, Integer moveType, PrintWriter out) { + try { + brandInfoService.updateOrder(id, moveType); + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎿嶄綔鎴愬姛")); + } catch (BrandInfoException e) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); + } catch (Exception e) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔澶辫触")); + e.printStackTrace(); + } + } + + /** * 鍝佺墝淇℃伅鏌ヨ * @param callback * @param pageIndex @@ -506,7 +526,7 @@ */ @RequestMapping(value = "queryBrand") public void queryBrand(String callback, Integer pageIndex, Integer pageSize, String key, Long cid, Integer state, - PrintWriter out) { + Integer showState, PrintWriter out) { if (pageIndex == null || pageIndex < 1) { pageIndex = 1; @@ -516,8 +536,19 @@ pageSize = Constant.PAGE_SIZE; } + List<String> keys = null; + if (!StringUtil.isNullOrEmpty(key)) { + String[] array = key.split("\\s+"); + if (array != null && array.length > 0) { + keys = new ArrayList<String>(); + for (int i= 0; i < array.length; i++) { + keys.add(array[i].toString()); + } + } + } + try { - List<BrandInfo> list = brandInfoService.listQuery((pageIndex - 1) * pageSize, pageSize, key, cid, state); + List<BrandInfo> list = brandInfoService.listQuery((pageIndex - 1) * pageSize, pageSize, keys, cid, state, showState); if (list == null || list.size() == 0) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鏁版嵁")); @@ -534,7 +565,7 @@ } } - long count = brandInfoService.countQuery(key, cid, state); + long count = brandInfoService.countQuery(keys, cid, state, showState); int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); -- Gitblit v1.8.0