拼团秒杀砍价支持单独配置链接图
This commit is contained in:
@@ -54,6 +54,9 @@ public class YxStoreBargain extends BaseDomain {
|
||||
@ApiModelProperty(value = "砍价产品图片")
|
||||
private String image;
|
||||
|
||||
/** 砍价活动图片 */
|
||||
@ApiModelProperty(value = "砍价链接图片")
|
||||
private String linkImage;
|
||||
|
||||
/** 单位名称 */
|
||||
@ApiModelProperty(value = "砍价产品单位名称")
|
||||
|
||||
@@ -56,6 +56,10 @@ public class YxStoreCombination extends BaseDomain {
|
||||
@ApiModelProperty(value = "推荐图")
|
||||
private String image;
|
||||
|
||||
/** 链接图 */
|
||||
@ApiModelProperty(value = "链接图")
|
||||
private String linkImage;
|
||||
|
||||
|
||||
/** 轮播图 */
|
||||
@NotBlank(message = "请上传商品轮播")
|
||||
|
||||
@@ -51,6 +51,9 @@ public class YxStoreSeckill extends BaseDomain {
|
||||
@ApiModelProperty(value = "推荐图")
|
||||
private String image;
|
||||
|
||||
/** 推荐图 */
|
||||
@ApiModelProperty(value = "链接图")
|
||||
private String linkImage;
|
||||
|
||||
/** 轮播图 */
|
||||
@NotBlank(message = "请上传商品轮播")
|
||||
|
||||
@@ -83,4 +83,12 @@ public class StoreBargainController {
|
||||
yxStoreBargainService.removeById(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("查询砍价详情")
|
||||
@ApiOperation(value = "查询砍价详情")
|
||||
@GetMapping(value = "/yxStoreBargain/info/{id}")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_SELECT')")
|
||||
public ResponseEntity getInfo(@PathVariable Integer id){
|
||||
return new ResponseEntity<>(yxStoreBargainService.getById(id),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -39,6 +39,9 @@ public class YxStoreCombinationDto implements Serializable {
|
||||
// 推荐图
|
||||
private String image;
|
||||
|
||||
// 链接图
|
||||
private String linkImage;
|
||||
|
||||
private String images;
|
||||
|
||||
/** 轮播图 */
|
||||
|
||||
@@ -39,6 +39,9 @@ public class YxStoreSeckillDto implements Serializable {
|
||||
// 推荐图
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
private String linkImage;
|
||||
|
||||
// 轮播图
|
||||
private String images;
|
||||
|
||||
|
||||
+1
-2
@@ -333,8 +333,7 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
|
||||
|
||||
YxStoreBargainQueryVo storeBargainQueryVo = generator.convert(storeBargain,
|
||||
YxStoreBargainQueryVo.class)
|
||||
.setConfig(storeProductMapper.selectById(storeBargain.getProductId()).getConfig())
|
||||
.setLinkImage(storeProductMapper.selectById(storeBargain.getProductId()).getLinkImage());
|
||||
.setConfig(storeProductMapper.selectById(storeBargain.getProductId()).getConfig());
|
||||
YxUser yxUser;
|
||||
if (StringUtils.isBlank(uid.toString())||uid==0){
|
||||
yxUser=new YxUser();
|
||||
|
||||
+1
-2
@@ -137,8 +137,7 @@ public class YxStoreCombinationServiceImpl extends BaseServiceImpl<YxStoreCombin
|
||||
|
||||
StoreCombinationVo storeCombinationVo = new StoreCombinationVo();
|
||||
|
||||
storeCombinationVo.setStoreInfo(storeCombinationQueryVo.setConfig(storeProductMapper.selectById(storeCombination.getProductId()).getConfig())
|
||||
.setLinkImage(storeProductMapper.selectById(storeCombination.getProductId()).getLinkImage()));
|
||||
storeCombinationVo.setStoreInfo(storeCombinationQueryVo.setConfig(storeProductMapper.selectById(storeCombination.getProductId()).getConfig()));
|
||||
|
||||
//评价
|
||||
storeCombinationVo.setReply(replyService
|
||||
|
||||
+11
-2
@@ -227,8 +227,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
|
||||
return StoreSeckillVo.builder()
|
||||
.productAttr((List<YxStoreProductAttrQueryVo>)returnMap.get("productAttr"))
|
||||
.productValue((Map<String, YxStoreProductAttrValue>)returnMap.get("productValue"))
|
||||
.storeInfo(generator.convert(storeSeckill, YxStoreSeckillQueryVo.class).setConfig(storeProductMapper.selectById(storeSeckill.getProductId()).getConfig())
|
||||
.setLinkImage(storeProductMapper.selectById(storeSeckill.getProductId()).getLinkImage()))
|
||||
.storeInfo(generator.convert(storeSeckill, YxStoreSeckillQueryVo.class).setConfig(storeProductMapper.selectById(storeSeckill.getProductId()).getConfig()))
|
||||
.reply(replyService.getReply(storeSeckill.getProductId()))
|
||||
.replyCount(replyService.productReplyCount(storeSeckill.getProductId()))
|
||||
.tempName(tempName)
|
||||
@@ -272,8 +271,12 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
|
||||
YxStoreSeckillQueryVo.class);
|
||||
yxStoreSeckillQueryVos.forEach(item->{
|
||||
Integer sum = item.getSales() + item.getStock();
|
||||
if (sum==0){
|
||||
item.setPercent(100);
|
||||
}else {
|
||||
item.setPercent(NumberUtil.round(NumberUtil.mul(NumberUtil.div(item.getSales(),sum),
|
||||
100),0).intValue());
|
||||
}
|
||||
});
|
||||
return yxStoreSeckillQueryVos;
|
||||
}
|
||||
@@ -317,8 +320,13 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
|
||||
(yxStoreSeckillMapper.selectPage(pageModel,wrapper).getRecords(), YxStoreSeckillQueryVo.class);
|
||||
yxStoreSeckillQueryVos.forEach(item->{
|
||||
Integer sum = item.getSales() + item.getStock();
|
||||
if (sum==0){
|
||||
item.setPercent(100);
|
||||
}else {
|
||||
item.setPercent(NumberUtil.round(NumberUtil.mul(NumberUtil.div(item.getSales(),sum),
|
||||
100),0).intValue());
|
||||
}
|
||||
|
||||
});
|
||||
return yxStoreSeckillQueryVos;
|
||||
}
|
||||
@@ -464,6 +472,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
|
||||
yxStoreSeckill.setCost(BigDecimal.valueOf(resultDTO.getMinCost()));
|
||||
yxStoreSeckill.setStock(resultDTO.getStock());
|
||||
yxStoreSeckill.setImages(String.join(",", resources.getImages()));
|
||||
yxStoreSeckill.setLinkImage(resources.getLinkImage());
|
||||
this.saveOrUpdate(yxStoreSeckill);
|
||||
|
||||
//属性处理
|
||||
|
||||
Reference in New Issue
Block a user