|
@@ -1,10 +1,12 @@
|
|
|
package com.uas.platform.b2c.prod.product.kind.controller;
|
|
package com.uas.platform.b2c.prod.product.kind.controller;
|
|
|
|
|
|
|
|
import com.uas.platform.b2c.prod.product.kind.model.Kind;
|
|
import com.uas.platform.b2c.prod.product.kind.model.Kind;
|
|
|
|
|
+import com.uas.platform.b2c.prod.product.kind.model.KindInfo;
|
|
|
import com.uas.platform.b2c.prod.product.kind.model.KindProperty;
|
|
import com.uas.platform.b2c.prod.product.kind.model.KindProperty;
|
|
|
import com.uas.platform.b2c.prod.product.kind.service.KindService;
|
|
import com.uas.platform.b2c.prod.product.kind.service.KindService;
|
|
|
import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
|
|
import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
|
|
|
import com.uas.platform.b2c.core.utils.FastjsonUtils;
|
|
import com.uas.platform.b2c.core.utils.FastjsonUtils;
|
|
|
|
|
+import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.wordnik.swagger.annotations.ApiOperation;
|
|
import com.wordnik.swagger.annotations.ApiOperation;
|
|
|
import com.wordnik.swagger.annotations.ApiParam;
|
|
import com.wordnik.swagger.annotations.ApiParam;
|
|
@@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -222,4 +225,15 @@ public class KindController {
|
|
|
public ModelAndView downloadKindProperties(@PathVariable("kindid") Long kindId) {
|
|
public ModelAndView downloadKindProperties(@PathVariable("kindid") Long kindId) {
|
|
|
return kindService.downloadKindProperties(kindId);
|
|
return kindService.downloadKindProperties(kindId);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 通过父类目id获取类目信息
|
|
|
|
|
+ * @param parentId 父类目id
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/parentid", method = RequestMethod.GET)
|
|
|
|
|
+ public ResultMap getKindsByLevelAndParentId(@RequestParam(value = "parentid", defaultValue = "0") Long parentId) {
|
|
|
|
|
+ List<KindInfo> kindInfos = kindService.findByParentId(parentId);
|
|
|
|
|
+ return ResultMap.success(kindInfos);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|