记得上下班打卡 | git大法好,push需谨慎

Commit ec5e7c15 authored by zhanggb's avatar zhanggb

+api:商品管理:藏品AR删除;

parent 19f07844
...@@ -2,11 +2,13 @@ package com.liquidnet.service.goblin.controller.manage; ...@@ -2,11 +2,13 @@ package com.liquidnet.service.goblin.controller.manage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.common.exception.constant.ErrorCode;
import com.liquidnet.commons.lang.util.CurrentUtil; import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ErrorMapping; import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.PagedResult; import com.liquidnet.service.base.PagedResult;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsSkuArActionParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsSkuArAddParam; import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsSkuArAddParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsSkuArFilterParam; import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsSkuArFilterParam;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuArListVo; import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuArListVo;
...@@ -18,10 +20,12 @@ import io.swagger.annotations.ApiOperation; ...@@ -18,10 +20,12 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List;
@ApiSupport(order = 149005) @ApiSupport(order = 149005)
@Api(tags = "商品管理:单品拓展信息") @Api(tags = "商品管理:单品拓展信息")
...@@ -50,47 +54,47 @@ public class GoblinStoreMgtGoodsSkuExtraController { ...@@ -50,47 +54,47 @@ public class GoblinStoreMgtGoodsSkuExtraController {
return ResponseDto.success(goblinStoreMgtGoodsSkuExtraService.skuArList(mgtGoodsSkuArFilterParam)); return ResponseDto.success(goblinStoreMgtGoodsSkuExtraService.skuArList(mgtGoodsSkuArFilterParam));
} }
// @ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
// @ApiOperation(value = "藏品AR:管理") @ApiOperation(value = "藏品AR:管理")
// @PostMapping("ar_action") @PostMapping("ar_action")
// public ResponseDto<Object> action(@Valid @RequestBody GoblinStoreMgtGoodsSkuArActionParam mgtGoodsSkuArActionParam) { public ResponseDto<Object> action(@Valid @RequestBody GoblinStoreMgtGoodsSkuArActionParam mgtGoodsSkuArActionParam) {
// String currentUid = CurrentUtil.getCurrentUid(), storeId = mgtGoodsSkuArActionParam.getStoreId(); String currentUid = CurrentUtil.getCurrentUid(), storeId = mgtGoodsSkuArActionParam.getStoreId();
// if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) { if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) {
// return ResponseDto.failure(ErrorMapping.get("149002")); return ResponseDto.failure(ErrorMapping.get("149002"));
// } }
// List<String> skuIdList = mgtGoodsSkuArActionParam.getSkuIdList(); List<String> skuIdList = mgtGoodsSkuArActionParam.getSkuIdList();
// if (CollectionUtils.isEmpty(skuIdList)) { if (CollectionUtils.isEmpty(skuIdList)) {
// return ResponseDto.failure(ErrorMapping.get("149021")); return ResponseDto.failure(ErrorMapping.get("149021"));
// } }
// if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
// log.debug("商品管理:藏品AR:管理[UID={},GoblinStoreMgtGoodsActionParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuArActionParam)); log.debug("商品管理:藏品AR:管理[UID={},GoblinStoreMgtGoodsActionParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuArActionParam));
// } }
// boolean resultFlg; boolean resultFlg;
// switch (mgtGoodsSkuArActionParam.getAction()) { switch (mgtGoodsSkuArActionParam.getAction()) {
// case "REMOVE": case "REMOVE":
// for (String skuId : skuIdList) { for (String skuId : skuIdList) {
// GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId); GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
// if (null == mgtGoodsSkuInfoVo || !mgtGoodsSkuInfoVo.getDelFlg().equals("0")) { if (null == mgtGoodsSkuInfoVo || !mgtGoodsSkuInfoVo.getDelFlg().equals("0")) {
// log.warn("商品管理:藏品AR:管理:藏品不存在或已删除[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:藏品AR:管理:藏品不存在或已删除[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "藏品AR不存在或已删除"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "藏品AR不存在或已删除");
// } }
// if (mgtGoodsSkuInfoVo.getSkuType() != 1) { if (mgtGoodsSkuInfoVo.getSkuType() != 1) {
// log.warn("商品管理:藏品AR:管理:非数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:藏品AR:管理:非数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,非数字藏品"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,非数字藏品");
// } }
// if (!mgtGoodsSkuInfoVo.getStoreId().equals(storeId)) { if (!mgtGoodsSkuInfoVo.getStoreId().equals(storeId)) {
// log.warn("商品管理:藏品AR:管理:非本店铺藏品,无权操作[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:藏品AR:管理:非本店铺藏品,无权操作[UID={},skuId={}]", currentUid, skuId);
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺藏品,无权操作"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺藏品,无权操作");
// } }
// } }
// resultFlg = goblinStoreMgtGoodsSkuExtraService.skuArDel(currentUid, skuIdList); resultFlg = goblinStoreMgtGoodsSkuExtraService.skuArDel(currentUid, skuIdList);
// break; break;
// default: default:
// log.warn("商品管理:藏品AR:管理:Invalid operation[UID={},GoblinStoreMgtGoodsSkuArActionParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuArActionParam)); log.warn("商品管理:藏品AR:管理:Invalid operation[UID={},GoblinStoreMgtGoodsSkuArActionParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuArActionParam));
// return ResponseDto.failure(ErrorMapping.get("149001")); return ResponseDto.failure(ErrorMapping.get("149001"));
// } }
// return resultFlg ? ResponseDto.success() : ResponseDto.failure(); return resultFlg ? ResponseDto.success() : ResponseDto.failure();
// } }
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "藏品AR:添加") @ApiOperation(value = "藏品AR:添加")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment