Browse Source

调整代码规范

yuj 7 years ago
parent
commit
a6efc4cf20

+ 15 - 10
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ProductController.java

@@ -209,12 +209,12 @@ public class ProductController {
 
 	/**
 	 * 根据物料Id获取替代物料列表
-	 * @param id
-	 * @return
+	 * @param id 物料id
+	 * @return  List<ProductReplace> 替换物料
 	 */
 	@RequestMapping(value = "/{id}/replaces", method = RequestMethod.GET)
 	public List<ProductReplace> getReplacesByProductId(@PathVariable("id") Long id) {
-    	return productService.getReplacesByProductId(id);
+		return productService.getReplacesByProductId(id);
 	}
 
     /**
@@ -244,7 +244,7 @@ public class ProductController {
 	/**
 	 * 一键匹配物料信息
 	 * @param type  匹配类型
-	 * @return
+	 * @return ResultMap 返回结果集
 	 */
 	@RequestMapping(value = "/matchbytype/{type}", method = RequestMethod.GET)
 	@ResponseBody
@@ -256,10 +256,10 @@ public class ProductController {
 	 * 一键匹配物料信息
 	 *
 	 * @param json 填充的字段
-	 * @return
+	 * @return ResultMap
 	 */
-	@RequestMapping(value = "/update", method = RequestMethod.PUT)
 	@ResponseBody
+	@RequestMapping(value = "/update", method = RequestMethod.PUT)
 	private ResultMap updateMatch(@RequestBody String json) {
 		return productService.updateMatch(json);
 	}
@@ -268,28 +268,33 @@ public class ProductController {
 	 * 统计数量
 	 *
 	 * @param isPerson 是否个人
-	 * @return
+	 * @return ap<String, Integer>
 	 */
 	@RequestMapping(value = "/count", method = RequestMethod.GET)
-	public Map<String, Integer> getProductCount(Integer isPerson){
+	public Map<String, Integer> getProductCount(Integer isPerson) {
 		logger.info("统计个人或企业非标与标准数量");
 		return productService.getProductCount(isPerson);
 	}
 
 	/**
 	 * 批量删除所有的非标的产品
+	 * @param isPerson 是否是个人
+	 * @return ResultMap
 	 */
 	@RequestMapping(value = "/unstandard", method = RequestMethod.DELETE)
-	private ResultMap deleteUnstandardByBatch(Integer isPerson) {
+	public ResultMap deleteUnstandardByBatch(Integer isPerson) {
 		logger.info("删除非标物料信息:操作人:" + SystemSession.getUser().getUserName());
 		 return productService.deleteBatch(ProductConstant.NSTANDARD, isPerson);
 	}
 
+
 	/**
 	 * 批量删除所有的标准的产品
+	 * @param isPerson 是否是个人
+	 * @return ResultMap 结果
 	 */
 	@RequestMapping(value = "/standard", method = RequestMethod.DELETE)
-	private ResultMap deleteStandardByBatch(Integer isPerson) {
+	public ResultMap deleteStandardByBatch(Integer isPerson) {
 		logger.info("删除标准物料信息:操作人:" + SystemSession.getUser().getUserName());
 		return productService.deleteBatch(ProductConstant.STANDARD, isPerson);
 	}