|
|
@@ -1,6 +1,5 @@
|
|
|
package com.sckw.product.controller;
|
|
|
|
|
|
-import com.sckw.core.annotation.Log;
|
|
|
import com.sckw.core.exception.BusinessException;
|
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
|
@@ -37,7 +36,6 @@ public class KwpGoodsController {
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
@PostMapping(value = "/addDraft", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- @Log(description = "添加草稿商品")
|
|
|
public HttpResult addDraft(@RequestBody @Validated AddGoodsDraftParam param) {
|
|
|
kwpGoodsService.addDraft(param);
|
|
|
return HttpResult.ok("添加草稿商品成功");
|
|
|
@@ -50,7 +48,6 @@ public class KwpGoodsController {
|
|
|
* @Param addGoodsParam:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "添加上架商品")
|
|
|
@PostMapping(value = "/addShelves", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult addShelves(@RequestBody @Validated AddGoodsParam addGoodsParam) {
|
|
|
kwpGoodsService.addShelves(addGoodsParam);
|
|
|
@@ -65,7 +62,6 @@ public class KwpGoodsController {
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
@GetMapping("/detail")
|
|
|
- @Log(description = "获取商品详情")
|
|
|
public HttpResult detail(@RequestParam Long id) {
|
|
|
return HttpResult.ok(kwpGoodsService.getDetail(id));
|
|
|
}
|
|
|
@@ -77,7 +73,6 @@ public class KwpGoodsController {
|
|
|
* @Param updateGoodsParam:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "修改商品")
|
|
|
@PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult update(@RequestBody @Validated UpdateGoodsParam updateGoodsParam) {
|
|
|
kwpGoodsService.update(updateGoodsParam);
|
|
|
@@ -92,7 +87,6 @@ public class KwpGoodsController {
|
|
|
* @Param params:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "分页查询商品列表")
|
|
|
@PostMapping(value = "/select", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult select(@RequestBody SelectGoodsListParam params) {
|
|
|
return HttpResult.ok(kwpGoodsService.select(params));
|
|
|
@@ -105,7 +99,6 @@ public class KwpGoodsController {
|
|
|
* @Param params:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "商品列表统计查询")
|
|
|
@PostMapping(value = "/statistic", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult statistic(@RequestBody StatisticGoodsListParam params) {
|
|
|
return HttpResult.ok(kwpGoodsService.statistic(params));
|
|
|
@@ -135,7 +128,6 @@ public class KwpGoodsController {
|
|
|
* @Param id:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "商品上架")
|
|
|
@GetMapping("/batchPutOnShelves")
|
|
|
public HttpResult batchPutOnShelves(@RequestParam Long id) {
|
|
|
kwpGoodsService.batchPutOnShelves(id);
|
|
|
@@ -149,7 +141,6 @@ public class KwpGoodsController {
|
|
|
* @Param ids:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "商品批量下架")
|
|
|
@GetMapping("/batchTakeOffShelves")
|
|
|
public HttpResult batchTakeOffShelves(@RequestParam String ids) {
|
|
|
List<Long> goodIds = StringUtils.splitStrToList(ids, ",", Long.class);
|
|
|
@@ -164,7 +155,6 @@ public class KwpGoodsController {
|
|
|
* @Param ids:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "商品批量删除")
|
|
|
@GetMapping("/batchDelete")
|
|
|
public HttpResult batchDelete(@RequestParam String ids) {
|
|
|
List<Long> goodIds = StringUtils.splitStrToList(ids, ",", Long.class);
|
|
|
@@ -179,7 +169,6 @@ public class KwpGoodsController {
|
|
|
* @Param params:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "建材市场分页查询")
|
|
|
@PostMapping(value = "/buildingMaterialsMarketList", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult buildingMaterialsMarketList(@RequestBody BuildingMaterialsMarketListParam params) {
|
|
|
return HttpResult.ok(kwpGoodsService.buildingMaterialsMarketList(params));
|
|
|
@@ -192,7 +181,6 @@ public class KwpGoodsController {
|
|
|
* @Param params:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "商品下拉列表")
|
|
|
@PostMapping(value = "/dropList", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult dropList(@RequestBody @Validated GoodsDropListReq params) {
|
|
|
return HttpResult.ok(kwpGoodsService.dropList(params));
|
|
|
@@ -205,7 +193,6 @@ public class KwpGoodsController {
|
|
|
* @Param param:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "获取商品预计最大可购数量")
|
|
|
@PostMapping(value = "/maxPurchaseNum", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult maxPurchaseNum(@RequestBody @Validated MaxPurchaseNumParam param) {
|
|
|
return HttpResult.ok(kwpGoodsService.maxPurchaseNum(param));
|
|
|
@@ -219,7 +206,6 @@ public class KwpGoodsController {
|
|
|
* @Param param:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "更新商品库存")
|
|
|
@PostMapping(value = "/updateAmount", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult updateAmount(@RequestBody @Validated UpdateAmountParam param) {
|
|
|
kwpGoodsService.updateAmount(param);
|
|
|
@@ -233,7 +219,6 @@ public class KwpGoodsController {
|
|
|
* @Param name:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @Log(description = "商品名称判重")
|
|
|
@GetMapping("/nameDuplicationJudgment")
|
|
|
public HttpResult nameDuplicationJudgment(@RequestParam String name, @RequestParam Long supplyEntId) {
|
|
|
return HttpResult.ok("商品名称判重成功", kwpGoodsService.nameDuplicationJudgment(name, supplyEntId, null));
|