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

Commit bc3e5038 authored by zhanggb's avatar zhanggb

+api:商品管理:SKU筛选列表;

parent 26e495bf
......@@ -5,6 +5,7 @@ import com.liquidnet.service.goblin.dto.manage.*;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuSimpleVo;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
......@@ -20,6 +21,8 @@ public interface IGoblinstoreMgtGoodsService {
*/
PagedResult<GoblinStoreMgtGoodsListVo> goodsList(GoblinStoreMgtGoodsFilterParam mgtGoodsFilterParam);
PagedResult<GoblinStoreMgtGoodsSkuSimpleVo> skuList(GoblinStoreMgtGoodsSkuSimpleFilterParam mgtGoodsSkuSimpleFilterParam);
PagedResult<GoblinStoreMgtGoodsSkuListVo> skusList(GoblinStoreMgtGoodsSkuFilterParam mgtGoodsSkuFilterParam);
/**
......
......@@ -20,9 +20,9 @@ import com.liquidnet.service.goblin.dto.manage.*;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuSimpleVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtExtraService;
import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService;
import com.liquidnet.service.goblin.service.manage.IGoblinstoreMgtGoodsService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
......@@ -82,22 +82,36 @@ public class GoblinStoreMgtGoodsController {
return ResponseDto.success(goblinstoreMgtGoodsService.goodsList(storeMgtGoodsFilterParam));
}
@ApiOperationSupport(order = 11)
@ApiOperation(value = "SKU筛选列表")
@PostMapping("sku_search")
public ResponseDto<PagedResult<GoblinStoreMgtGoodsSkuSimpleVo>> skuList(@Valid @RequestBody GoblinStoreMgtGoodsSkuSimpleFilterParam mgtGoodsSkuSimpleFilterParam) {
String currentUid = CurrentUtil.getCurrentUid();
if (!goblinRedisUtils.hasStoreId(currentUid, mgtGoodsSkuSimpleFilterParam.getStoreId())) {
log.warn("商品管理:SKU筛选列表:无权操作该店铺,请核实[UID={},GoblinStoreMgtGoodsSkuSimpleFilterParam={}]", currentUid, JsonUtils.toJson(mgtGoodsSkuSimpleFilterParam));
return ResponseDto.success();
}
if (log.isDebugEnabled()) {
log.debug("商品管理:SKU筛选列表:[GoblinStoreMgtGoodsSkuSimpleFilterParam={}]", JsonUtils.toJson(mgtGoodsSkuSimpleFilterParam));
}
return ResponseDto.success(goblinstoreMgtGoodsService.skuList(mgtGoodsSkuSimpleFilterParam));
}
@ApiOperationSupport(order = 10)
@ApiOperation(value = "SKU搜索列表")
@PostMapping("edit_sku/search")
public ResponseDto<PagedResult<GoblinStoreMgtGoodsSkuListVo>> skuSearch(@Valid @RequestBody GoblinStoreMgtGoodsSkuFilterParam goblinStoreMgtGoodsSkuFilterParam) {
String currentUid = CurrentUtil.getCurrentUid();
if (!goblinRedisUtils.hasStoreId(currentUid, goblinStoreMgtGoodsSkuFilterParam.getStoreId())) {
log.warn("商品管理:SKU搜索列表:无权操作该店铺,请核实[UID={},GoblinStoreMgtGoodsFilterParam={}]", currentUid, JsonUtils.toJson(goblinStoreMgtGoodsSkuFilterParam));
log.warn("商品管理:SKU搜索列表:无权操作该店铺,请核实[UID={},GoblinStoreMgtGoodsSkuFilterParam={}]", currentUid, JsonUtils.toJson(goblinStoreMgtGoodsSkuFilterParam));
return ResponseDto.success();
}
if (log.isDebugEnabled()) {
log.debug("商品管理:SKU搜索列表:[GoblinStoreMgtGoodsFilterParam={}]", JsonUtils.toJson(goblinStoreMgtGoodsSkuFilterParam));
log.debug("商品管理:SKU搜索列表:[GoblinStoreMgtGoodsSkuFilterParam={}]", JsonUtils.toJson(goblinStoreMgtGoodsSkuFilterParam));
}
return ResponseDto.success(goblinstoreMgtGoodsService.skusList(goblinStoreMgtGoodsSkuFilterParam));
}
@ApiOperationSupport(order = 2)
@ApiOperation(value = "SPU导出")
@PostMapping("export")
......@@ -191,7 +205,7 @@ public class GoblinStoreMgtGoodsController {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "非本店铺商品,无权操作");
}
if (goodsInfoVo.getSpuType() == 1) {
log.warn("商品管理:SPU管理:架警告:数字藏品不支持此操作[UID={},spuId={}]", currentUid, spuId);
log.warn("商品管理:SPU管理:架警告:数字藏品不支持此操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品为数字藏品");
}
if (!goodsInfoVo.getShelvesStatus().equals("3")) {// 非上架中不允许下架
......@@ -210,7 +224,7 @@ public class GoblinStoreMgtGoodsController {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品不存在或已删除");
}
if (goodsInfoVo.getSpuType() == 1) {
log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},spuId={}]", currentUid, spuId);
log.warn("商品管理:SPU管理:删除警告:数字藏品不支持此操作[UID={},spuId={}]", currentUid, spuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品为数字藏品");
}
if (!goodsInfoVo.getStoreId().equals(storeId)) {
......
......@@ -10,10 +10,7 @@ import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto;
import com.liquidnet.service.goblin.dto.manage.*;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinMgtCategorySpecVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsSkuListVo;
import com.liquidnet.service.goblin.dto.manage.vo.*;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.enums.GoblinStoreConf;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtExtraService;
......@@ -101,6 +98,11 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
return goodsListVoPagedResult;
}
@Override
public PagedResult<GoblinStoreMgtGoodsSkuSimpleVo> skuList(GoblinStoreMgtGoodsSkuSimpleFilterParam mgtGoodsSkuSimpleFilterParam) {
return goblinMongoUtils.getMgtGoodsSkuSimpleVos(mgtGoodsSkuSimpleFilterParam);
}
@Override
public PagedResult<GoblinStoreMgtGoodsSkuListVo> skusList(GoblinStoreMgtGoodsSkuFilterParam mgtGoodsSkuFilterParam) {
PagedResult<GoblinStoreMgtGoodsSkuListVo> voList = goblinMongoUtils.getSkuSearch(mgtGoodsSkuFilterParam);
......
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