This commit is contained in:
齐天大圣 2024-03-27 11:24:51 +08:00
parent eb0fe3b943
commit d31e230e8c
2 changed files with 17 additions and 1 deletions

View File

@ -785,7 +785,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
//4. 3和优惠券比较
if (ObjectUtils.isNotEmpty(activeDiscountPayVO3)) {
finalAmount = activeDiscountPayVO3.getDiscounts();
if (ObjectUtils.isNotEmpty(cardFavorableRecordVO) && finalAmount < cardFavorableRecordVO.getDiscountAmount()) {
if (ObjectUtils.isNotEmpty(cardFavorableRecordVO) && ObjectUtils.isNotEmpty(cardFavorableRecordVO.getDiscountAmount()) && finalAmount < cardFavorableRecordVO.getDiscountAmount()) {
PaymentActiveVO paymentActiveVO1 = new PaymentActiveVO();
//单用优惠券优惠力度最大
paymentActiveVO1.setCardFavorableId(cardFavorableRecordVO.getId());

View File

@ -17,6 +17,7 @@ import com.fuint.business.tag.mapper.TagCodeRecordMapper;
import com.fuint.business.tag.entity.TagCodeRecord;
import com.fuint.business.tag.service.OilTagService;
import com.fuint.business.tag.service.TagCodeRecordService;
import com.fuint.business.tag.service.TagCodeService;
import com.fuint.business.tag.vo.TagCodeRecordVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.service.StaffService;
@ -51,6 +52,9 @@ public class TagCodeRecordServiceImpl extends ServiceImpl<TagCodeRecordMapper, T
@Resource
private ILJStaffService mtStaffService;
@Resource
private TagCodeService tagCodeService;
@Override
@Transactional
public boolean add(TagCodeRecordDTO tagCodeRecordDTO) {
@ -59,6 +63,18 @@ public class TagCodeRecordServiceImpl extends ServiceImpl<TagCodeRecordMapper, T
TagCodeRecord tagCodeRecord = new TagCodeRecord();
if (ObjectUtils.isNotEmpty(tagCodeRecordDTO) && CollectionUtils.isNotEmpty(tagCodeRecordDTO.getOilTagList())){
for (Integer integer : tagCodeRecordDTO.getOilTagList()) {
//码牌配置
OilTag byId = oilTagService.getById(integer);
//二维码id
Integer tagCodeId = byId.getTagCodeId();
//二维码
TagCode byId1 = tagCodeService.getById(tagCodeId);
String collection = byId1.getCollection();
collection += "&storeId=" + tagCodeRecordDTO.getStoreId();
byId1.setCollection(collection);
tagCodeService.updateById(byId1);
OilTag oilTag = new OilTag();
//码牌绑定店铺
tagCodeRecord.setOilTagId(integer);