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

Commit fae7d062 authored by 姜秀龙's avatar 姜秀龙

收钱 商品列表

parent fcd9d616
......@@ -20,6 +20,7 @@ import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import com.liquidnet.service.goblin.util.ObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -66,8 +67,9 @@ public class GoblinStoreMgtSqbGoodsController {
@ApiOperationSupport(order = 1)
@ApiOperation(value = "SPU添加-收钱吧商品(批量)")
@PostMapping("add")
public ResponseDto<Object> add(@RequestParam("storeId") String storeId,
@RequestBody @Validated List<GoblinSqbPerfGoodsVo> items) {
public ResponseDto<Object> add(
@ApiParam(value = "门店ID", required = true) @RequestParam("storeId") String storeId,
@ApiParam(value = "待同步的收钱吧商品列表", required = true) @RequestBody @Validated List<GoblinSqbPerfGoodsVo> items) {
String currentUid = CurrentUtil.getCurrentUid();
if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) {
return ResponseDto.failure(ErrorMapping.get("149002"));
......@@ -118,8 +120,9 @@ public class GoblinStoreMgtSqbGoodsController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "商品编辑:SPU编辑-收钱吧商品(批量,传系统spuId)")
@PutMapping("edit_spu")
public ResponseDto<Object> editSpu(@RequestParam("storeId") String storeId,
@RequestBody @Validated List<String> localSpuIds) {
public ResponseDto<Object> editSpu(
@ApiParam(value = "门店ID", required = true) @RequestParam("storeId") String storeId,
@ApiParam(value = "本地系统SPU ID列表", required = true) @RequestBody @Validated List<String> localSpuIds) {
String currentUid = CurrentUtil.getCurrentUid();
if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) {
return ResponseDto.failure(ErrorMapping.get("149002"));
......
......@@ -1072,10 +1072,12 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
int safePage = Math.max(page, 0);
int safePageSize = pageSize <= 0 ? 40 : Math.min(pageSize, 100);
ArrayList<GoblinGoodsInfoVo> allGoods = ObjectUtil.goblinGoodsInfoVoArrayList();
List<GoblinSqbPerformanceGoods> relations = goblinSqbPerformanceGoodsMapper.selectList(
new LambdaQueryWrapper<GoblinSqbPerformanceGoods>()
.eq(GoblinSqbPerformanceGoods::getPerformancesId, performancesId)
.eq(GoblinSqbPerformanceGoods::getStatus, 1)
.groupBy(GoblinSqbPerformanceGoods::getSpuId)
.orderByAsc(GoblinSqbPerformanceGoods::getSort, GoblinSqbPerformanceGoods::getMid));
if (CollectionUtils.isEmpty(relations)) {
......@@ -1084,7 +1086,6 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
return respVo;
}
ArrayList<GoblinGoodsInfoVo> allGoods = ObjectUtil.goblinGoodsInfoVoArrayList();
for (GoblinSqbPerformanceGoods rel : relations) {
if (rel == null || StringUtils.isBlank(rel.getSpuId())) {
continue;
......
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