From f67743e47f57dafc7031af44e2037c03e680a60c Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期一, 25 三月 2019 11:30:43 +0800
Subject: [PATCH] 清理无效引用

---
 fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java |  110 ++++--------------------------------------------------
 1 files changed, 9 insertions(+), 101 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java
index c0598f7..195619b 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java
@@ -9,8 +9,6 @@
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
-import net.sf.json.JSONObject;
-
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -24,9 +22,8 @@
 import com.google.gson.reflect.TypeToken;
 import com.yeshi.fanli.entity.admin.GoodsClassAdmin;
 import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
-import com.yeshi.fanli.entity.system.System;
-import com.yeshi.fanli.service.inter.config.SystemService;
-import com.yeshi.fanli.service.inter.goods.ClassRecommendGoodsService;
+import com.yeshi.fanli.entity.system.BusinessSystem;
+import com.yeshi.fanli.service.inter.config.BusinessSystemService;
 import com.yeshi.fanli.service.inter.goods.GoodsClassService;
 import com.yeshi.fanli.service.inter.goods.GoodsSecondClassService;
 import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
@@ -36,6 +33,8 @@
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.Utils;
+
+import net.sf.json.JSONObject;
 
 @Controller
 @RequestMapping("admin/new/api/v1/goodsclass")
@@ -47,8 +46,6 @@
 	@Resource
 	private SuperGoodsClassService superGoodsClassService;
 
-	@Resource
-	private ClassRecommendGoodsService classRecommendGoodsService;
 
 	@Resource
 	private GoodsSecondClassService goodsSecondClassService;
@@ -60,11 +57,9 @@
 	private LabelClassService labelClassService;
 
 	@Resource
-	private SystemService systemService;
+	private BusinessSystemService businessSystemService;
 
-	// private static final String IMGPATH="/upload/class";
-
-	@RequestMapping(value = "getGoodsClassList"/* , method = RequestMethod.POST */)
+	@RequestMapping(value = "getGoodsClassList")
 	public void getGoodsClassList(String callback, Integer pageIndex, String platform, String packages, String key, PrintWriter out) {
 
 		List<GoodsClassAdmin> goodsClassList = goodsClassService.getGoodsClassAdmins(pageIndex - 1, platform, packages, key);
@@ -79,17 +74,12 @@
 		pe.setParams(map);
 		JSONObject data = new JSONObject();
 		data.put("pe", pe);
-		List<System> systemList = systemService.getSystems();
+		List<BusinessSystem> systemList = businessSystemService.getBusinessSystems();
 
 		data.put("systemList", systemList);
 		data.put("goodsClassList", goodsClassList);
 
 		JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
-
-		// out.print(JsonUtil.loadTrueResult(data));
-
-		return;
-
 	}
 
 	@RequestMapping(value = "queryAll")
@@ -103,26 +93,19 @@
 				return;
 			}
 
-			Map<String, String> map = new HashMap<String, String>();
-			map.put("platform", platform);
-			map.put("packages", packages);
 			JSONObject data = new JSONObject();
-
-			// List<System> systemList = systemService.getSystems();
-			// data.put("systemList", systemList);
-
 			data.put("goodsClassList", goodsClassList);
 
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
 		} catch (Exception e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔寮傚父"));
 		}
 
 	}
 
-	@RequestMapping(value = "getGoodsClasAll"/* , method = RequestMethod.POST */)
+	
+	@RequestMapping(value = "getGoodsClasAll")
 	public void getGoodsClassAll(String callback, PrintWriter out) {
 		List<GoodsClass> goodsClassList = goodsClassService.getGoodsClassAll();
 
@@ -136,67 +119,6 @@
 		}
 	}
 
-	@RequestMapping(value = "addGoodsClass", method = RequestMethod.POST)
-	public void addGoodsClass(GoodsClass goodsClass, PrintWriter out) {
-		if (goodsClass == null) {
-			out.print(JsonUtil.loadFalseResult("goodsClass涓嶈兘涓虹┖"));
-			return;
-		}
-		Integer res = goodsClassService.addGoodsClass(goodsClass);
-		if (res == null) {
-			out.print(JsonUtil.loadTrueResult("娣诲姞鍒嗙被鎴愬姛"));
-		} else {
-			out.print(JsonUtil.loadFalseResult("娣诲姞澶辫触"));
-		}
-		return;
-	}
-
-	// @RequestMapping(value="uploadImg",method=RequestMethod.POST)
-	// public void uploadImg(@RequestParam("file") CommonsMultipartFile
-	// file,HttpServletRequest request,PrintWriter out){
-	// ServletContext servletContext = request.getSession().getServletContext();
-	// JSONObject json=new JSONObject();
-	// if(file != null){
-	// String root=servletContext.getRealPath(IMGPATH);
-	// if (!new File(root).exists()){
-	// new File(root).mkdirs();
-	// }
-	// File newFile=new File(root+"/"+file.getOriginalFilename());
-	// //閫氳繃CommonsMultipartFile鐨勬柟娉曠洿鎺ュ啓鏂囦欢锛堟敞鎰忚繖涓椂鍊欙級
-	// try {
-	// file.transferTo(newFile);
-	// json.put("code", "0");
-	// json.put("path", IMGPATH+"/"+newFile.getName());
-	// } catch (IllegalStateException e) {
-	// e.printStackTrace();
-	// json.put("code", "1");
-	// } catch (IOException e) {
-	// e.printStackTrace();
-	// json.put("code", "1");
-	// }finally{
-	// out.print(json);
-	// }
-	// }else{
-	// json.put("code", "1");
-	// out.print(json);
-	// }
-	// }
-
-	@RequestMapping(value = "setGoodsClassSystem", method = RequestMethod.POST)
-	public void setGoodsClassSystem(String type, long gcid, String platform, String packageName, PrintWriter out) {
-		platform = Utils.getMap().get(platform);
-		if (Constant.DEL.equals(type)) {
-			Integer integer = superGoodsClassService.deleteSuperGoodsClass(gcid, platform, packageName);
-			if (integer > 0) {
-				out.print(JsonUtil.loadTrueResult("鍒犻櫎鎴愬姛"));
-			} else {
-				out.print(JsonUtil.loadTrueResult("鍒犻櫎澶辫触"));
-			}
-		} else {
-			superGoodsClassService.addSuperGoodsClass(gcid, platform, packageName);
-			out.print(JsonUtil.loadTrueResult("娣诲姞鎴愬姛"));
-		}
-	}
 
 	@RequestMapping(value = "getGoodsClass", method = RequestMethod.POST)
 	public void getGoodsClass(long id, PrintWriter out) {
@@ -208,17 +130,6 @@
 		out.print(JsonUtil.loadFalseResult("涓嶅瓨鍦ㄨGoodsClass"));
 	}
 
-	@RequestMapping(value = "deleteGoodsClass", method = RequestMethod.POST)
-	public void deleteGoodsClass(long[] gcids, PrintWriter out) {
-		goodsClassService.deleteGoodsClasss(gcids);
-		out.print(JsonUtil.loadTrueResult("鍒犻櫎鎴愬姛"));
-	}
-
-	@RequestMapping(value = "updateGoodsClass", method = RequestMethod.POST)
-	public void updateGoodsClass(GoodsClass goodsClass, PrintWriter out) {
-		goodsClassService.updateGoodsClass(goodsClass);
-		out.print(JsonUtil.loadTrueResult("淇敼鎴愬姛"));
-	}
 
 	/**
 	 * 娣诲姞绫诲埆
@@ -376,10 +287,7 @@
 					Long recordId = Long.parseLong(id);
 
 					superGoodsClassService.deleteSuperGoodsClass(recordId);
-					classRecommendGoodsService.deleteClassGoodsByGC(recordId);
 					
-					// goodsSecondClassService.deleteSecondClassByGC(recordId); 
-				
 					// 鍒犻櫎瀛愮被鍒嗙被
 					goodsSubClassService.deleteByRootId(recordId);
 					// 鍒犻櫎绫诲埆鍏宠仈鏍囩

--
Gitblit v1.8.0