From 4a05f1c9c508ab7f10c5eae22a5c716f5454ca02 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期二, 12 三月 2019 16:29:55 +0800 Subject: [PATCH] 冲突提交 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java | 82 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 82 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java index 2777228..2456d67 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java @@ -73,6 +73,7 @@ import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.TimeUtil; import com.yeshi.fanli.util.factory.AccountDetailsFactory; +import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO; import net.sf.json.JSONArray; import net.sf.json.JSONObject; @@ -133,6 +134,7 @@ @Resource private UserRankService userRankService; + @Resource private UserMoneyDetailService userMoneyDetailService; @@ -1624,4 +1626,84 @@ } } + + /** + * 鏌ヨ灏佺 + * @param callback + * @param pageIndex + * @param pageSize + * @param key + * @param type + * @param out + */ + @RequestMapping(value = "forbiddenQuery") + public void forbiddenQuery(String callback, Integer pageIndex, Integer pageSize, String key, Integer type, PrintWriter out) { + + try { + + if (pageIndex == null) + pageIndex = 1; + + if (pageSize == null) + pageSize = Constant.PAGE_SIZE; + + + List<ForbiddenUserIdentifyCodeVO> list = forbiddenUserIdentifyCodeService.listQuery((pageIndex - 1) * pageSize, + pageSize, key, type); + + if (list == null || list.size() == 0) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鐩稿叧鏁版嵁")); + return; + } + + long count = forbiddenUserIdentifyCodeService.countQuery(key, type); + + int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); + PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); + + GsonBuilder gsonBuilder = new GsonBuilder(); + gsonBuilder.serializeNulls(); + Gson gson = gsonBuilder.create(); + + JSONObject data = new JSONObject(); + data.put("pe", pe); + data.put("result_list", gson.toJson(list)); + + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); + + } catch (Exception e) { + e.printStackTrace(); + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔寮傚父")); + } + } + + + /** + * 鐢ㄦ埛璐﹀彿- 灏佺/瑙e皝 + * @param callback + * @param code + * @param type 1("寰俊unionId"), 2("娣樺疂ID"), 3("鎵嬫満鍙�"), 4("鏀粯瀹濊处鍙�"); + * @param out + */ + @RequestMapping(value = "saveForbiddenInfo") + public void saveForbiddenInfo(String callback, String code, Integer type, boolean state, PrintWriter out) { + try { + if (code == null || code.trim().length() == 0 || type == null) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鍙傛暟涓嶈兘涓虹┖")); + } + + forbiddenUserIdentifyCodeService.saveForbiddenInfo(code, type, state); + + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("淇敼鎴愬姛")); + + } catch (ForbiddenUserIdentifyCodeException e) { + e.printStackTrace(); + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); + } catch (Exception e) { + e.printStackTrace(); + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔寮傚父")); + } + + } + } -- Gitblit v1.8.0