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

Commit a8b1f78a authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev_nft_411' into dev_nft_411

parents fbe0d985 8befb1c2
package com.liquidnet.service.goblin.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ApiModel(value = "GoblinSkusSearchDto", description = "Sku搜素")
@Data
public class GoblinSkusSearchDto implements Serializable, Cloneable {
private static final long serialVersionUID = 8425727558228094904L;
@ApiModelProperty(position = 11, value = "店铺id")
private String spuId;
@ApiModelProperty(position = 11, value = "店铺名称")
private String spuName;
private static final GoblinSkusSearchDto obj = new GoblinSkusSearchDto();
public static GoblinSkusSearchDto getNew() {
try {
return (GoblinSkusSearchDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinSkusSearchDto();
}
}
}
......@@ -12,6 +12,8 @@ import java.io.Serializable;
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable {
private static final long serialVersionUID = 8903534983251413696L;
@ApiModelProperty(position = 10, value = "藏品封面图片URL")
private String coverPic;
@ApiModelProperty(position = 11, value = "藏品名称")
private String name;
@ApiModelProperty(position = 12, value = "藏品副名称")
......
......@@ -42,9 +42,20 @@ public class GoblinCommonController extends BaseController {
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品]"),
})
@ResponseBody
public AjaxResult storeSearch(String title, Integer type) {
public AjaxResult goodsSearch(String title, Integer type) {
return AjaxResult.success(goblinCommonService.goodsSearch(title, type));
}
@Log(title = "商品搜索", businessType = BusinessType.LIST)
@GetMapping("sku")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品]"),
})
@ResponseBody
public AjaxResult skuSearch(String title, Integer type) {
return AjaxResult.success(goblinCommonService.skuSearch(title, type));
}
/** ------------------------------------------------------------------------ **/
}
package com.liquidnet.client.admin.zhengzai.goblin.service;
import com.liquidnet.service.goblin.dto.GoblinGoodsSearchDto;
import com.liquidnet.service.goblin.dto.GoblinSkusSearchDto;
import com.liquidnet.service.goblin.dto.GoblinStoreSearchDto;
import java.util.List;
......@@ -13,4 +14,6 @@ public interface IGoblinCommonService {
List<GoblinStoreSearchDto> storeSearch(String name,List<String> status);
List<GoblinGoodsSearchDto> goodsSearch(String name, Integer type);
List<GoblinSkusSearchDto> skuSearch(String name, Integer type);
}
......@@ -5,10 +5,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinCommonService;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.goblin.dto.GoblinGoodsSearchDto;
import com.liquidnet.service.goblin.dto.GoblinSkusSearchDto;
import com.liquidnet.service.goblin.dto.GoblinStoreSearchDto;
import com.liquidnet.service.goblin.entity.GoblinGoods;
import com.liquidnet.service.goblin.entity.GoblinGoodsSku;
import com.liquidnet.service.goblin.entity.GoblinStoreInfo;
import com.liquidnet.service.goblin.mapper.GoblinGoodsMapper;
import com.liquidnet.service.goblin.mapper.GoblinGoodsSkuMapper;
import com.liquidnet.service.goblin.mapper.GoblinStoreInfoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -33,6 +36,8 @@ public class GoblinCommonServiceImpl implements IGoblinCommonService {
GoblinStoreInfoMapper goblinStoreInfoMapper;
@Autowired
GoblinGoodsMapper goblinGoodsMapper;
@Autowired
GoblinGoodsSkuMapper goblinGoodsSkuMapper;
@Override
public List<GoblinStoreSearchDto> storeSearch(String name, List<String> status) {
......@@ -68,7 +73,31 @@ public class GoblinCommonServiceImpl implements IGoblinCommonService {
List<GoblinGoodsSearchDto> dtoList = new ArrayList<>();
for (GoblinGoods item : list) {
GoblinGoodsSearchDto dto = GoblinGoodsSearchDto.getNew();
dto.setSpuId(item.getStoreId());
dto.setSpuId(item.getSpuId());
dto.setSpuName(item.getName());
dtoList.add(dto);
}
return dtoList;
}
@Override
public List<GoblinSkusSearchDto> skuSearch(String name, Integer type) {
if (type == null) {//普通商品
type = 1;
}
LambdaQueryWrapper<GoblinGoodsSku> queryWrapper = Wrappers.lambdaQuery(GoblinGoodsSku.class);
queryWrapper.ne(GoblinGoodsSku::getDelFlg, "1");
queryWrapper.eq(GoblinGoodsSku::getShelvesStatus, "3");
// queryWrapper.eq(GoblinGoodsSku::getSpuAppear, "0");
queryWrapper.eq(GoblinGoodsSku::getSkuType, type);
if (StringUtil.isNotBlank(name)) {
queryWrapper.like(GoblinGoodsSku::getName, name);
}
List<GoblinGoodsSku> list = goblinGoodsSkuMapper.selectList(queryWrapper.last("limit 20"));
List<GoblinSkusSearchDto> dtoList = new ArrayList<>();
for (GoblinGoodsSku item : list) {
GoblinSkusSearchDto dto = GoblinSkusSearchDto.getNew();
dto.setSpuId(item.getSkuId());
dto.setSpuName(item.getName());
dtoList.add(dto);
}
......
......@@ -18,7 +18,7 @@ liquidnet:
url-banner:
url6: "/kylin/performances/recommend/performance/status?pageNum=1&pageSize=50&status=(3,6,7,8,9,10)" #票务
url7: "/goblin/common/goods?type=0" #商品
url9: "/goblin/common/goods?type=1" #NFT
url9: "/goblin/common/sku?type=1" #NFT
url14: "${liquidnet.client.admin.phpMallUrl}/admin/good/collective/quick?page=1&per_page=50" #商品集合
# 开发环境配置
......
......@@ -106,6 +106,7 @@ public class GoblinUserDigitalArtworkServiceImpl implements IGoblinUserDigitalAr
GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(userDigitalArtworkVo.getSkuId());
GoblinGoodsInfoVo goodsInfoVo = goblinRedisUtils.getGoodsInfoVo(goodsSkuInfoVo.getSpuId());
artworkInfoVo.setCoverPic(goodsSkuInfoVo.getSkuPic());
artworkInfoVo.setName(goodsSkuInfoVo.getName());
artworkInfoVo.setSubtitle(goodsSkuInfoVo.getSubtitle());
artworkInfoVo.setMaterialType(goodsSkuInfoVo.getMaterialType());
......
......@@ -59,7 +59,7 @@ public class GoblinMongoUtils {
/**
* 分页查询
*/
public HashMap<String, Object> getGoblinGoodsAnticipateValueVos(GoblinGoodsAnticipateValueParam goblinGoodsAnticipateValueParam,String uid) {
public HashMap<String, Object> getGoblinGoodsAnticipateValueVos(GoblinGoodsAnticipateValueParam goblinGoodsAnticipateValueParam, String uid) {
HashMap<String, Object> info = CollectionUtil.mapStringObject();
Pageable pageable = PageRequest.of(goblinGoodsAnticipateValueParam.getPageNum() - 1, 20, Sort.by(Sort.Direction.DESC, "createdDate"));
Criteria criteria = Criteria.where("delTag").is(0).and("uid").is(uid);
......@@ -165,6 +165,7 @@ public class GoblinMongoUtils {
mongoTemplate.remove(query, GoblinGoodAnticipateUserVo.class.getSimpleName()).getDeletedCount();
}
}
/**
* 添加预约中间表信息
*/
......@@ -492,7 +493,7 @@ public class GoblinMongoUtils {
Criteria criteria = Criteria.where("delFlg").is("0").and("storeId").is(filterParam.getStoreId()).and("marketId").exists(false);
if (null != filterParam.getSpuType()) {
if (0 == filterParam.getSpuType()) {
criteria.andOperator(Criteria.where("spuType").exists(false).orOperator(Criteria.where("spuType").is(0)));
criteria.orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").is(0)));
} else {
criteria.and("spuType").is(1);
}
......
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