From 1a89a80dafd7842653087ff40c0fec8594df69b6 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 13 三月 2019 15:38:47 +0800 Subject: [PATCH] 删除提现未使用的方法 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java | 165 ++++-------------------------------------------------- 1 files changed, 14 insertions(+), 151 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java index d428f08..d25c44e 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java @@ -97,64 +97,6 @@ @Resource private TaoBaoWeiQuanOrderService taoBaoWeiQuanOrderService; - private final static String TODAY = "1"; - private final static String THREE = "2"; - private final static String AWEEK = "3"; - - @RequestMapping(value = "getExtractList", method = RequestMethod.POST) - public void getExtractList(int pageIndex, PrintWriter out) { - List<Extract> extractList = extractService.getExtractList(pageIndex - 1); - int count = extractService.getCount(); - 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("extractList", extractList); - out.print(JsonUtil.loadTrueResult(data)); - } - - /** - * - * 鏂规硶璇存槑: 閫氳繃鎻愮幇璇锋眰 - * - * @author mawurui createTime 2018骞�3鏈�14鏃� 涓嬪崍3:15:42 - * @param id - * @param out - * @param request - */ - @RequestMapping(value = "passExtract", method = RequestMethod.POST) - public void passExtract(String callback, long id, PrintWriter out, HttpServletRequest request) { - - // TODO 闇�瑕侀偖绠卞彂閫佺煭淇¢獙璇� - - AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN); - - Integer integer = extractService.passExtract(id, admin); - Extract extract = extractService.getExtractById(id); - long uid = extract.getUserInfo().getId(); - - if (integer == null) { - out.print(JsonUtil.loadTrueResult("閫氳繃")); - LogHelper - .userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "閫氳繃浜哰id=" + id + "]鐨勬彁鐜扮敵璇�!"); // 鍚屾剰涔嬪悗鎴愬姛 - } else if (integer == 1) { - - out.print(JsonUtil.loadFalseResult("涓嶅瓨鍦ㄨ瀵硅薄")); // 鍚屾剰涔嬪悗澶辫触 - LogHelper.userInfo( - "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鍚屾剰鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇蜂笉瀛樺湪"); - String title = "浣犵殑鎻愮幇鐢宠琚┏鍥�"; - String content = "闈炲父閬楁喚锛屼綘鐨勬彁鐜扮敵璇疯椹冲洖銆傛垜浠�氳繃鏍稿鍙戠幇浣犵殑璐︾洰鏄庣粏鏈夎锛屾垜浠細鍦ㄥ璁″畬鎴愪箣鍚庣粰浣犲彂閫氱煡娑堟伅銆傚鏈夌枒闂鑱旂郴瀹㈡湇銆�"; - // xingePushController.pushSystemZnx(uid, title, content, out); - } else { - - LogHelper.userInfo( - "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鍚屾剰鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇风姸鎬佸紓甯�"); - out.print(JsonUtil.loadFalseResult("璇ョ姸鎬佷笉绛変簬涓嶄负鍒濆鐘舵��")); - String title = "浣犵殑鎻愮幇鐢宠涓嶆垚鍔�"; - String content = "璇风‘淇濅綘鐨勬彁鐜拌处鎴风殑闅愮璁剧疆涓� 鍏佽閭銆佹墜鏈哄彿銆佷細鍛樺悕鎵惧埌鎴戙�傚惁鍒欐棤娉曟垚鍔熷畬鎴愯浆璐︺�傚鏈夌枒闂鑱旂郴瀹㈡湇銆�"; - // xingePushController.pushSystemZnx(uid, title, content, out); - } - } /** * @@ -186,75 +128,20 @@ /* 鍏佽鎻愮幇 鎿嶄綔 */ Integer integer = extractService.passExtract(id, admin); - Extract extract = extractService.getExtractById(id); - long uid = extract.getUserInfo().getId(); - + // 鏃ュ織璁板綍 if (integer == null) { - JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("閫氳繃")); - - LogHelper - .userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "閫氳繃浜哰id=" + id + "]鐨勬彁鐜扮敵璇�!"); // 鍚屾剰涔嬪悗鎴愬姛 + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("宸查�氳繃")); + LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "閫氳繃浜哰id=" + id + "]鐨勬彁鐜扮敵璇�!"); } else if (integer == 1) { - JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("涓嶅瓨鍦ㄨ瀵硅薄")); - - LogHelper.userInfo( - "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鍚屾剰鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇蜂笉瀛樺湪"); - String title = "浣犵殑鎻愮幇鐢宠琚┏鍥�"; - String content = "闈炲父閬楁喚锛屼綘鐨勬彁鐜扮敵璇疯椹冲洖銆傛垜浠�氳繃鏍稿鍙戠幇浣犵殑璐︾洰鏄庣粏鏈夎锛屾垜浠細鍦ㄥ璁″畬鎴愪箣鍚庣粰浣犲彂閫氱煡娑堟伅銆傚鏈夌枒闂鑱旂郴瀹㈡湇銆�"; - // xingePushController.pushSystemZnx(uid, title, content, out); + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇ユ彁鐜拌褰曞凡涓嶅瓨鍦�,璇峰埛鏂�")); + LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鍚屾剰鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇蜂笉瀛樺湪"); } else { - JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇ョ姸鎬佷笉绛変簬涓嶄负鍒濆鐘舵��")); - - LogHelper.userInfo( - "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鍚屾剰鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇风姸鎬佸紓甯�"); - String title = "浣犵殑鎻愮幇鐢宠涓嶆垚鍔�"; - String content = "璇风‘淇濅綘鐨勬彁鐜拌处鎴风殑闅愮璁剧疆涓� 鍏佽閭銆佹墜鏈哄彿銆佷細鍛樺悕鎵惧埌鎴戙�傚惁鍒欐棤娉曟垚鍔熷畬鎴愯浆璐︺�傚鏈夌枒闂鑱旂郴瀹㈡湇銆�"; - // xingePushController.pushSystemZnx(uid, title, content, out); + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇ョ敤鎴峰凡琚鐞�,璇峰埛鏂�")); + LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鍚屾剰鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇风姸鎬佸紓甯�"); } } - /** - * - * 鏂规硶璇存槑: 鎷掔粷鎻愮幇璇锋眰 - * - * @author mawurui createTime 2018骞�3鏈�14鏃� 涓嬪崍3:15:55 - * @param id - * @param reason - * @param out - * @param request - */ - @RequestMapping(value = "rejectExtract", method = RequestMethod.POST) - public void rejectExtract(String callback, long id, String reason, PrintWriter out, HttpServletRequest request) { - AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN); - - Extract extract = extractService.getExtractById(id); - long uid = extract.getUserInfo().getId(); - long extractTime = extract.getExtractTime(); - - try { - extractService.rejectExtract(id, reason, extractTime, admin);// 鎻愮幇澶辫触 - - // 璋冪敤鎺ㄩ�佺珯鍐呬俊缁欑敤鎴� - out.print(JsonUtil.loadTrueResult("鎷掔粷")); - LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "鎷掔粷浜哰id=" + id - + "]鐨勬彁鐜扮敵璇�!鎷掔粷鍘熷洜鏄�" + reason); - - String title = "浣犵殑鎻愮幇鐢宠琚┏鍥�"; - String content = "闈炲父閬楁喚锛屼綘鐨勬彁鐜扮敵璇疯椹冲洖銆傛垜浠�氳繃鏍稿鍙戠幇浣犵殑璐︾洰鏄庣粏鏈夎锛屾垜浠細鍦ㄥ璁″畬鎴愪箣鍚庣粰浣犲彂閫氱煡娑堟伅銆傚鏈夌枒闂鑱旂郴瀹㈡湇銆�"; - // xingePushController.pushSystemZnx(uid, title, content, out); - } catch (ObjectStateException e) { - LogHelper.userInfo( - "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鎷掔粷鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇风姸鎬佸紓甯�!"); // - - out.print(JsonUtil.loadFalseResult(e.getMessage())); - } catch (NotExistObjectException e) { - LogHelper.userInfo( - "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鎷掔粷鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇蜂笉瀛樺湪!"); - - out.print(JsonUtil.loadFalseResult(e.getMessage())); - } - } /** * @@ -283,29 +170,23 @@ return; } - /* 鎷掔粷鎻愮幇 鎿嶄綔 */ try { + // 缂栫爜杞崲 reason = URLDecoder.decode(reason, "UTF-8"); } catch (Exception e1) { e1.printStackTrace(); } try { - Extract extract = extractService.getExtractById(id); - long extractTime = extract.getExtractTime(); - extractService.rejectExtract(id, reason, extractTime, admin);// 鎻愮幇澶辫触 + + extractService.rejectExtract(id, reason, admin);// 鎻愮幇澶辫触 - JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎷掔粷")); + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎷掔粷鎴愬姛")); - // 璋冪敤鎺ㄩ�佺珯鍐呬俊缁欑敤鎴� - // out.print(JsonUtil.loadTrueResult("鎷掔粷")); LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "]" + admin.getName() + "鎷掔粷浜哰id=" + id + "]鐨勬彁鐜扮敵璇�!鎷掔粷鍘熷洜鏄�" + reason); - String title = "浣犵殑鎻愮幇鐢宠琚┏鍥�"; - String content = "闈炲父閬楁喚锛屼綘鐨勬彁鐜扮敵璇疯椹冲洖銆傛垜浠�氳繃鏍稿鍙戠幇浣犵殑璐︾洰鏄庣粏鏈夎锛屾垜浠細鍦ㄥ璁″畬鎴愪箣鍚庣粰浣犲彂閫氱煡娑堟伅銆傚鏈夌枒闂鑱旂郴瀹㈡湇銆�"; - // xingePushController.pushSystemZnx(uid, title, content, out); } catch (ObjectStateException e) { LogHelper.userInfo( "[ip:" + IPUtil.getRemotIP(request) + "][绠$悊鍛�:" + admin.getName() + "] 鎷掔粷鎻愮幇id=" + id + "鐨勬彁鐜扮敵璇风姸鎬佸紓甯�!"); // @@ -321,23 +202,6 @@ } - /** - * 璧勯噾鏍¢獙鏄惁寮傚父 - * - * @param uid - * @param out - */ - @RequestMapping(value = "checkExtract", method = RequestMethod.POST) - public void checkExtract(String uid, PrintWriter out) { - JSONObject data = new JSONObject(); - try { - extractService.checkExtract(uid); - data.put("code", "1"); // 姝e父 - } catch (ExtractException e) { - data.put("code", "0");// 寮傚父 - } - out.print(data); - } /** * 鑾峰彇浠婃棩鎻愮幇璁板綍锛氫粖鏃ユ�婚銆佹�绘鏁般�佹垚鍔熸鏁般�佸け璐ユ鏁� 鑾峰彇绯荤粺鎻愮幇璁板綍锛氭�婚銆佹�绘鏁� @@ -490,13 +354,12 @@ // } int pageSize = Constant.PAGE_SIZE; - Integer days = null; - if (TODAY.equals(timeSlot)) { + if ("1".equals(timeSlot)) { days = 0; // 浠婃棩 - } else if (THREE.equals(timeSlot)) { + } else if ("2".equals(timeSlot)) { days = 3; // 鍓�3澶� - } else if (AWEEK.equals(timeSlot)) { + } else if ("3".equals(timeSlot)) { days = 7; // 鍓�7澶� } -- Gitblit v1.8.0