1、推广码底图增加分享底图业务
2、优化订单核销码、核销人查询业务
This commit is contained in:
@@ -38,6 +38,9 @@ public class ShopActiveImage implements Serializable {
|
||||
@Schema(description = "图片地址,多个以‘,’隔开")
|
||||
private String imgUrl;
|
||||
|
||||
@Schema(description = "分享底图")
|
||||
private String shareImg;
|
||||
|
||||
@Schema(description = "图片地址集合")
|
||||
@TableField(exist = false)
|
||||
private List<String> imgUrlList;
|
||||
|
||||
@@ -335,6 +335,10 @@ public class ShopOrder implements Serializable {
|
||||
@Schema(description = "核销人")
|
||||
private Integer verifyUser;
|
||||
|
||||
@Schema(description = "核销人")
|
||||
@TableField(exist = false)
|
||||
private String verifyUserName;
|
||||
|
||||
@Schema(description = "推广核销佣金")
|
||||
private BigDecimal verifyMoney;
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ public class ShopActiveImageParam extends BaseParam {
|
||||
@Schema(description = "图片地址")
|
||||
private String imgUrl;
|
||||
|
||||
@Schema(description = "分享底图")
|
||||
private String shareImg;
|
||||
|
||||
@Schema(description = "启用状态 0-启用 1-禁用")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@@ -2,19 +2,19 @@ package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.ShopFlashSaleActivity;
|
||||
import com.gxwebsoft.shop.entity.ShopOrder;
|
||||
import com.gxwebsoft.shop.entity.ShopOrderGoods;
|
||||
import com.gxwebsoft.shop.mapper.ShopFlashSaleActivityMapper;
|
||||
import com.gxwebsoft.shop.mapper.ShopOrderGoodsMapper;
|
||||
import com.gxwebsoft.shop.mapper.ShopOrderMapper;
|
||||
import com.gxwebsoft.shop.service.ShopOrderGoodsService;
|
||||
import com.gxwebsoft.shop.entity.ShopOrderGoods;
|
||||
import com.gxwebsoft.shop.param.ShopOrderGoodsParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.service.ShopOrderGoodsService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -54,15 +54,14 @@ public class ShopOrderGoodsServiceImpl extends ServiceImpl<ShopOrderGoodsMapper,
|
||||
if(order.getActivityId() != null){
|
||||
saleActivity = shopFlashSaleActivityMapper.selectById(order.getActivityId());
|
||||
}
|
||||
ShopFlashSaleActivity finalSaleActivity = saleActivity;
|
||||
list.forEach(shopOrderGoods -> {
|
||||
shopOrderGoods.setVerifyCode(order.getVerifyCode());
|
||||
if(finalSaleActivity != null){
|
||||
if(shopOrderGoods.getGoodsId().equals(finalSaleActivity.getGoodsId())){
|
||||
shopOrderGoods.setActiveNam(finalSaleActivity.getName());
|
||||
for(ShopOrderGoods orderGoods : list){
|
||||
orderGoods.setVerifyCode(order.getVerifyCode());
|
||||
if(saleActivity != null){
|
||||
if(orderGoods.getGoodsId().equals(saleActivity.getGoodsId())){
|
||||
orderGoods.setActiveNam(saleActivity.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -358,12 +358,24 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder
|
||||
ShopOrderParam param = new ShopOrderParam();
|
||||
param.setOrderId(orderId);
|
||||
ShopOrder order = param.getOne(baseMapper.selectListRel(param));
|
||||
if(order != null && order.getAddressId() != null){
|
||||
if(order != null){
|
||||
//回显地址
|
||||
if(order.getAddressId() != null){
|
||||
ShopUserAddress shopUserAddress = shopUserAddressMapper.selectById(order.getAddressId());
|
||||
if(shopUserAddress != null && StrUtil.isNotBlank(shopUserAddress.getFullAddress())){
|
||||
order.setFullAddress(shopUserAddress.getFullAddress());
|
||||
}
|
||||
}
|
||||
|
||||
//回显核销人
|
||||
if(order.getVerifyUser() != null){
|
||||
User verifyUser = userMapper.getById(order.getVerifyUser());
|
||||
if(verifyUser != null){
|
||||
order.setVerifyUserName(verifyUser.getRealName());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return order;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user