bug
This commit is contained in:
parent
5da7530631
commit
470fed9d7c
@ -78,6 +78,9 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
|||||||
ActiveDiscount activeDiscount = new ActiveDiscount();
|
ActiveDiscount activeDiscount = new ActiveDiscount();
|
||||||
if (ObjectUtils.isNotEmpty(activeDiscountDTO)){
|
if (ObjectUtils.isNotEmpty(activeDiscountDTO)){
|
||||||
BeanUtils.copyProperties(activeDiscountDTO,activeDiscount);
|
BeanUtils.copyProperties(activeDiscountDTO,activeDiscount);
|
||||||
|
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeDiscount.setCreateBy(accountInfoById.getRealName());
|
||||||
//适用油号
|
//适用油号
|
||||||
activeDiscount.setAdaptOil(arrayToString(activeDiscountDTO.getAdaptOil()));
|
activeDiscount.setAdaptOil(arrayToString(activeDiscountDTO.getAdaptOil()));
|
||||||
//柴油会员等级
|
//柴油会员等级
|
||||||
@ -215,6 +218,9 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
|||||||
//更新折扣营销
|
//更新折扣营销
|
||||||
ActiveDiscount activeDiscount = new ActiveDiscount();
|
ActiveDiscount activeDiscount = new ActiveDiscount();
|
||||||
BeanUtils.copyProperties(activeDiscountDTO,activeDiscount);
|
BeanUtils.copyProperties(activeDiscountDTO,activeDiscount);
|
||||||
|
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeDiscount.setCreateBy(accountInfoById.getRealName());
|
||||||
//柴油会员等级
|
//柴油会员等级
|
||||||
activeDiscount.setDieselUserLevel(arrayToString(activeDiscountDTO.getDieselUserLevel()));
|
activeDiscount.setDieselUserLevel(arrayToString(activeDiscountDTO.getDieselUserLevel()));
|
||||||
//汽油会员等级
|
//汽油会员等级
|
||||||
|
@ -73,6 +73,8 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
|||||||
ActiveFullminus activeFullminus = new ActiveFullminus();
|
ActiveFullminus activeFullminus = new ActiveFullminus();
|
||||||
if (ObjectUtils.isNotEmpty(activeFullminusDTO)){
|
if (ObjectUtils.isNotEmpty(activeFullminusDTO)){
|
||||||
BeanUtils.copyProperties(activeFullminusDTO,activeFullminus);
|
BeanUtils.copyProperties(activeFullminusDTO,activeFullminus);
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeFullminus.setCreateBy(accountInfoById.getRealName());
|
||||||
//适用油号
|
//适用油号
|
||||||
activeFullminus.setAdaptOil(arrayToString(activeFullminusDTO.getAdaptOil()));
|
activeFullminus.setAdaptOil(arrayToString(activeFullminusDTO.getAdaptOil()));
|
||||||
//柴油会员等级
|
//柴油会员等级
|
||||||
@ -202,6 +204,8 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
|||||||
//更新折扣营销
|
//更新折扣营销
|
||||||
ActiveFullminus activeFullminus = new ActiveFullminus();
|
ActiveFullminus activeFullminus = new ActiveFullminus();
|
||||||
BeanUtils.copyProperties(activeFullminusDTO,activeFullminus);
|
BeanUtils.copyProperties(activeFullminusDTO,activeFullminus);
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeFullminus.setCreateBy(accountInfoById.getRealName());
|
||||||
//柴油会员等级
|
//柴油会员等级
|
||||||
activeFullminus.setDieselUserLevel(arrayToString(activeFullminusDTO.getDieselUserLevel()));
|
activeFullminus.setDieselUserLevel(arrayToString(activeFullminusDTO.getDieselUserLevel()));
|
||||||
//汽油会员等级
|
//汽油会员等级
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
|
package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
@ -23,7 +24,9 @@ import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRec
|
|||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
|
import com.fuint.common.service.AccountService;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import com.fuint.repository.model.TAccount;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -52,6 +55,8 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
private CardFavorableRecordService cardFavorableRecordService;
|
private CardFavorableRecordService cardFavorableRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
|
@Resource
|
||||||
|
private AccountService accountService;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param activeNewlywedsDTO
|
* @param activeNewlywedsDTO
|
||||||
@ -77,6 +82,8 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
|
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
|
||||||
if (ObjectUtils.isNotEmpty(activeNewlywedsDTO)){
|
if (ObjectUtils.isNotEmpty(activeNewlywedsDTO)){
|
||||||
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
|
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeNewlyweds.setCreateBy(accountInfoById.getRealName());
|
||||||
//有礼奖励
|
//有礼奖励
|
||||||
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
|
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
|
||||||
save = save(activeNewlyweds);
|
save = save(activeNewlyweds);
|
||||||
@ -392,6 +399,8 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
//更新新人有礼活动
|
//更新新人有礼活动
|
||||||
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
|
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
|
||||||
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
|
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeNewlyweds.setCreateBy(accountInfoById.getRealName());
|
||||||
//奖励类型
|
//奖励类型
|
||||||
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
|
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.marketingActivity.activeOneCoupon.service.impl;
|
package com.fuint.business.marketingActivity.activeOneCoupon.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -25,10 +26,12 @@ import com.fuint.business.marketingActivity.cardFavorable.vo.LJUserVos;
|
|||||||
import com.fuint.business.userManager.service.LJUserService;
|
import com.fuint.business.userManager.service.LJUserService;
|
||||||
import com.fuint.business.userManager.vo.LJUserVo;
|
import com.fuint.business.userManager.vo.LJUserVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.service.AccountService;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.repository.mapper.MtUserGradeMapper;
|
import com.fuint.repository.mapper.MtUserGradeMapper;
|
||||||
import com.fuint.repository.model.MtUserGrade;
|
import com.fuint.repository.model.MtUserGrade;
|
||||||
import com.fuint.repository.model.MtUserGradeVO;
|
import com.fuint.repository.model.MtUserGradeVO;
|
||||||
|
import com.fuint.repository.model.TAccount;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -62,6 +65,8 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
|
|||||||
private CardFavorableRecordService cardFavorableRecordService;
|
private CardFavorableRecordService cardFavorableRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
|
@Resource
|
||||||
|
private AccountService accountService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@ -84,6 +89,8 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
|
|||||||
activeOneCoupon.setStoreId(nowAccountInfo.getStoreId());
|
activeOneCoupon.setStoreId(nowAccountInfo.getStoreId());
|
||||||
activeOneCoupon.setConditions(activeOneCouponDTO.getCondition());
|
activeOneCoupon.setConditions(activeOneCouponDTO.getCondition());
|
||||||
activeOneCoupon.setActiveName(activeOneCouponDTO.getActiveName());
|
activeOneCoupon.setActiveName(activeOneCouponDTO.getActiveName());
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeOneCoupon.setCreateBy(accountInfoById.getRealName());
|
||||||
flag = save(activeOneCoupon);
|
flag = save(activeOneCoupon);
|
||||||
//优惠券
|
//优惠券
|
||||||
List<Integer> cardFavorableIds = activeOneCouponDTO.getCardFavorableIds();
|
List<Integer> cardFavorableIds = activeOneCouponDTO.getCardFavorableIds();
|
||||||
@ -224,6 +231,8 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
ActiveOneCoupon activeOneCoupon = new ActiveOneCoupon();
|
ActiveOneCoupon activeOneCoupon = new ActiveOneCoupon();
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeOneCoupon.setCreateBy(accountInfoById.getRealName());
|
||||||
BeanUtils.copyProperties(activeOneCouponDTO,activeOneCoupon);
|
BeanUtils.copyProperties(activeOneCouponDTO,activeOneCoupon);
|
||||||
activeOneCoupon.setConditions(activeOneCouponDTO.getCondition());
|
activeOneCoupon.setConditions(activeOneCouponDTO.getCondition());
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.marketingActivity.activeRecommend.service.impl;
|
package com.fuint.business.marketingActivity.activeRecommend.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
@ -20,7 +21,9 @@ import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRe
|
|||||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
|
import com.fuint.common.service.AccountService;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import com.fuint.repository.model.TAccount;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -52,6 +55,8 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
private CardFavorableRecordService cardFavorableRecordService;
|
private CardFavorableRecordService cardFavorableRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
|
@Resource
|
||||||
|
private AccountService accountService;
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
* @param activeRecommendDTO
|
* @param activeRecommendDTO
|
||||||
@ -79,6 +84,8 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
ActiveRecommend activeRecommend = new ActiveRecommend();
|
ActiveRecommend activeRecommend = new ActiveRecommend();
|
||||||
if (ObjectUtils.isNotEmpty(activeRecommendDTO)) {
|
if (ObjectUtils.isNotEmpty(activeRecommendDTO)) {
|
||||||
BeanUtils.copyProperties(activeRecommendDTO, activeRecommend);
|
BeanUtils.copyProperties(activeRecommendDTO, activeRecommend);
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeRecommend.setCreateBy(accountInfoById.getRealName());
|
||||||
//邀请人礼品类型
|
//邀请人礼品类型
|
||||||
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
||||||
activeRecommend.setId(null);
|
activeRecommend.setId(null);
|
||||||
@ -222,6 +229,8 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
//更新推荐有礼活动
|
//更新推荐有礼活动
|
||||||
ActiveRecommend activeRecommend = new ActiveRecommend();
|
ActiveRecommend activeRecommend = new ActiveRecommend();
|
||||||
BeanUtils.copyProperties(activeRecommendDTO,activeRecommend);
|
BeanUtils.copyProperties(activeRecommendDTO,activeRecommend);
|
||||||
|
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
|
||||||
|
if (ObjectUtil.isNotEmpty(accountInfoById)) activeRecommend.setCreateBy(accountInfoById.getRealName());
|
||||||
//柴油会员等级
|
//柴油会员等级
|
||||||
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
||||||
|
|
||||||
|
@ -117,8 +117,10 @@ public class CardFuelDieselController extends BaseController {
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public ResponseObject update(@RequestBody CardFuelDiesel cardFuelDiesel) {
|
public ResponseObject update(@RequestBody CardFuelDiesel cardFuelDiesel) {
|
||||||
cardFuelDiesel.setStatus(cardFuelDiesel.getStatus().equals("true") ? "1" : "2");
|
cardFuelDiesel.setStatus(cardFuelDiesel.getStatus().equals("true") ? "1" : "2");
|
||||||
|
if (cardFuelDiesel.getType().length() > 2){
|
||||||
String substring = cardFuelDiesel.getType().substring(0, 3);
|
String substring = cardFuelDiesel.getType().substring(0, 3);
|
||||||
cardFuelDiesel.setType(substring);
|
cardFuelDiesel.setType(substring);
|
||||||
|
}
|
||||||
return getSuccessResult(this.cardFuelDieselService.updateById(cardFuelDiesel));
|
return getSuccessResult(this.cardFuelDieselService.updateById(cardFuelDiesel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user