bug
This commit is contained in:
parent
ae1f1090ed
commit
12c27fa77c
@ -23,6 +23,7 @@ public class ActiveConsumptionChild {
|
|||||||
* 活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
* 活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||||
*/
|
*/
|
||||||
private String activeGift;
|
private String activeGift;
|
||||||
|
private String instruction;
|
||||||
/**
|
/**
|
||||||
* 商品id
|
* 商品id
|
||||||
*/
|
*/
|
||||||
|
@ -14,14 +14,24 @@ import com.fuint.business.marketingActivity.activeConsumption.service.ActiveCons
|
|||||||
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionAppletVO;
|
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionAppletVO;
|
||||||
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionVO;
|
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionVO;
|
||||||
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionVOS;
|
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionVOS;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.mapper.CardExchangeMapper;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeService;
|
||||||
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||||
|
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableMapper;
|
||||||
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.vo.CardFavorableVO;
|
||||||
|
import com.fuint.business.member.entity.LJStaff;
|
||||||
|
import com.fuint.business.member.service.ILJStaffService;
|
||||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
import com.fuint.business.userManager.entity.LJUserGrade;
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
import com.fuint.business.userManager.service.LJUserGradeService;
|
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||||
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -49,18 +59,35 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private StoreService storeService;
|
private StoreService storeService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ActiveConsumptionChildService activeConsumptionChildService;
|
private ActiveConsumptionChildService activeConsumptionChildService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LJUserGradeService userGradeService;
|
private LJUserGradeService userGradeService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private OilNameService oilNameService;
|
private OilNameService oilNameService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ActiveConsumptionMapper activeConsumptionMapper;
|
private ActiveConsumptionMapper activeConsumptionMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private CardFavorableRecordService cardFavorableRecordService;
|
private CardFavorableRecordService cardFavorableRecordService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CardFavorableMapper cardFavorableMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CardExchangeMapper cardExchangeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ILJStaffService ljStaffService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
* @param activeConsumptionDTO
|
* @param activeConsumptionDTO
|
||||||
@ -187,6 +214,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ActiveConsumptionVO getOneById(Serializable id) {
|
public ActiveConsumptionVO getOneById(Serializable id) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
ActiveConsumptionVO activeConsumptionVO = new ActiveConsumptionVO();
|
ActiveConsumptionVO activeConsumptionVO = new ActiveConsumptionVO();
|
||||||
if (ObjectUtils.isNotEmpty(id)){
|
if (ObjectUtils.isNotEmpty(id)){
|
||||||
//获取消费有礼活动信息
|
//获取消费有礼活动信息
|
||||||
@ -199,6 +227,39 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
List<ActiveConsumptionChild> activeConsumptionChildList = activeConsumptionChildService.list(queryWrapper);
|
List<ActiveConsumptionChild> activeConsumptionChildList = activeConsumptionChildService.list(queryWrapper);
|
||||||
BeanUtils.copyProperties(consumption,activeConsumptionVO);
|
BeanUtils.copyProperties(consumption,activeConsumptionVO);
|
||||||
if (CollectionUtils.isNotEmpty(activeConsumptionChildList)){
|
if (CollectionUtils.isNotEmpty(activeConsumptionChildList)){
|
||||||
|
//更新子表卡券信息
|
||||||
|
for (ActiveConsumptionChild activeConsumptionChild : activeConsumptionChildList) {
|
||||||
|
//优惠券
|
||||||
|
if (activeConsumptionChild.getActiveGift().equals("1")){
|
||||||
|
CardFavorable cardFavorable = cardFavorableMapper.selectById(activeConsumptionChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable)){
|
||||||
|
activeConsumptionChild.setGiftCardName(cardFavorable.getName());
|
||||||
|
activeConsumptionChild.setGiftCardDetail(cardFavorable.getCardDetail());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityZero())){
|
||||||
|
activeConsumptionChild.setValidityZero(cardFavorable.getValidityZero());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityOne())){
|
||||||
|
activeConsumptionChild.setValidityOne(cardFavorable.getValidityOne());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityTwo())){
|
||||||
|
activeConsumptionChild.setValidityTwo(cardFavorable.getValidityTwo());
|
||||||
|
}
|
||||||
|
activeConsumptionChild.setInstruction(cardFavorable.getInstruction());
|
||||||
|
activeConsumptionChildService.updateById(activeConsumptionChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (activeConsumptionChild.getActiveGift().equals("2")){
|
||||||
|
//兑换券
|
||||||
|
CardExchange cardExchange = cardExchangeMapper.selectById(activeConsumptionChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardExchange)) {
|
||||||
|
activeConsumptionChild.setGiftCardName(cardExchange.getName());
|
||||||
|
activeConsumptionChild.setGiftCardDetail(cardExchange.getCardDetail());
|
||||||
|
activeConsumptionChild.setGiftCardTime(cardExchange.getValidity());
|
||||||
|
activeConsumptionChildService.updateById(activeConsumptionChild);
|
||||||
|
activeConsumptionChild.setInstruction(cardExchange.getUseInstructions());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//封装VO返回
|
//封装VO返回
|
||||||
activeConsumptionVO.setParticipationConditionMoney(consumption.getParticipationConditionMoney().toString());
|
activeConsumptionVO.setParticipationConditionMoney(consumption.getParticipationConditionMoney().toString());
|
||||||
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
|
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
|
||||||
|
@ -38,8 +38,8 @@ public class CardExchangeController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
@Param("cardFuelDiesel") CardExchange cardExchange) {
|
@Param("cardFuelDiesel") CardExchange cardExchange) {
|
||||||
Page page = new Page(pageNo, pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
return getSuccessResult(this.cardExchangeService.select(page, cardExchange));
|
return getSuccessResult(this.cardExchangeService.select(page, cardExchange));
|
||||||
}
|
}
|
||||||
@ -77,6 +77,11 @@ public class CardExchangeController extends BaseController {
|
|||||||
if (cardExchange.getIsonline().equals("1")){
|
if (cardExchange.getIsonline().equals("1")){
|
||||||
cardExchange.setStatus("1");
|
cardExchange.setStatus("1");
|
||||||
}
|
}
|
||||||
|
if (cardExchange.getType().equals("0")){
|
||||||
|
cardExchange.setCardDetail("可兑换-"+cardExchange.getGiftName());
|
||||||
|
}else {
|
||||||
|
cardExchange.setCardDetail("可兑换-"+"洗车券");
|
||||||
|
}
|
||||||
return getSuccessResult(this.cardExchangeService.updateById(cardExchange));
|
return getSuccessResult(this.cardExchangeService.updateById(cardExchange));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,5 +59,5 @@ public class CardExchange extends Model<CardExchange> {
|
|||||||
//更新时间
|
//更新时间
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ public class CardFavorableController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("appletList")
|
@GetMapping("appletList")
|
||||||
public ResponseObject selectAllApplet(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
public ResponseObject selectAllApplet(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
@Param("cardFuelDiesel") CardFavorable cardFavorable) {
|
@Param("cardFuelDiesel") CardFavorable cardFavorable) {
|
||||||
Page page = new Page(pageNo, pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
return getSuccessResult(this.cardFavorableService.selectAllApplet(page,cardFavorable));
|
return getSuccessResult(this.cardFavorableService.selectAllApplet(page,cardFavorable));
|
||||||
}
|
}
|
||||||
@ -111,13 +111,13 @@ public class CardFavorableController extends BaseController {
|
|||||||
* @param pageSize
|
* @param pageSize
|
||||||
* @param cardFavorableDTO
|
* @param cardFavorableDTO
|
||||||
* @return
|
* @return
|
||||||
@GetMapping("OwnApplet")
|
@GetMapping("OwnApplet")
|
||||||
public ResponseObject selectAllOwnStore(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
public ResponseObject selectAllOwnStore(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
@Param("cardFuelDiesel") CardFavorableDTO cardFavorableDTO) {
|
@Param("cardFuelDiesel") CardFavorableDTO cardFavorableDTO) {
|
||||||
Page page = new Page(pageNo, pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
return getSuccessResult(this.cardFavorableService.selectAllOwnStore(page,cardFavorableDTO));
|
return getSuccessResult(this.cardFavorableService.selectAllOwnStore(page,cardFavorableDTO));
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,8 +129,8 @@ public class CardFavorableController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("applet")
|
@GetMapping("applet")
|
||||||
public ResponseObject selectAllByCondition(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
public ResponseObject selectAllByCondition(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
@Param("cardFuelDiesel") CardFavorableDTOS cardFavorableDTOS) {
|
@Param("cardFuelDiesel") CardFavorableDTOS cardFavorableDTOS) {
|
||||||
Page page = new Page(pageNo, pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
return getSuccessResult(this.cardFavorableService.selectAllByCondition(page,cardFavorableDTOS));
|
return getSuccessResult(this.cardFavorableService.selectAllByCondition(page,cardFavorableDTOS));
|
||||||
}
|
}
|
||||||
@ -144,8 +144,8 @@ public class CardFavorableController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("PC")
|
@GetMapping("PC")
|
||||||
public ResponseObject selectAllByConditionPC(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
public ResponseObject selectAllByConditionPC(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
@Param("cardFuelDiesel") CardFavorableDTOS cardFavorableDTOS) {
|
@Param("cardFuelDiesel") CardFavorableDTOS cardFavorableDTOS) {
|
||||||
Page page = new Page(pageNo, pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
return getSuccessResult(this.cardFavorableService.selectAllByConditionPC(page,cardFavorableDTOS));
|
return getSuccessResult(this.cardFavorableService.selectAllByConditionPC(page,cardFavorableDTOS));
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ public class CardFavorable extends Model<CardFavorable> {
|
|||||||
private String availablePeriod;
|
private String availablePeriod;
|
||||||
//可用周期类型 day:每天可用 week:周可用 month:月可用
|
//可用周期类型 day:每天可用 week:周可用 month:月可用
|
||||||
private String checkDateType;
|
private String checkDateType;
|
||||||
|
//使用说明
|
||||||
|
private String instruction;
|
||||||
//可用日期
|
//可用日期
|
||||||
private String checkTime;
|
private String checkTime;
|
||||||
//排除日期
|
//排除日期
|
||||||
|
@ -71,10 +71,11 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
}
|
}
|
||||||
cardFavorable.setOilType(oil);
|
cardFavorable.setOilType(oil);
|
||||||
if (cardFavorableDTO.getType().equals("0")){
|
if (cardFavorableDTO.getType().equals("0")){
|
||||||
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"减"+cardFavorableDTO.getDiscountAmount());
|
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"减"+cardFavorableDTO.getDiscountAmount()+"元");
|
||||||
}else {
|
}else {
|
||||||
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"打"+cardFavorableDTO.getSpecialDiscount()+"折");
|
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"打"+cardFavorableDTO.getSpecialDiscount()+"折");
|
||||||
}
|
}
|
||||||
|
cardFavorable.setInstruction("请到到店使用!");
|
||||||
return save(cardFavorable);
|
return save(cardFavorable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,6 +209,12 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
if (cardFavorableDTO.getIsonline().equals("1")){
|
if (cardFavorableDTO.getIsonline().equals("1")){
|
||||||
cardFavorable.setStatus("1");
|
cardFavorable.setStatus("1");
|
||||||
}
|
}
|
||||||
|
if (cardFavorableDTO.getType().equals("0")){
|
||||||
|
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"减"+cardFavorableDTO.getDiscountAmount()+"元");
|
||||||
|
}else {
|
||||||
|
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"打"+cardFavorableDTO.getSpecialDiscount()+"折");
|
||||||
|
}
|
||||||
|
cardFavorable.setInstruction("请到到店使用!");
|
||||||
return updateById(cardFavorable);
|
return updateById(cardFavorable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,10 +236,10 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
List<CouponVO> collect = records.stream().filter(s -> s.getEndTime().getTime() < System.currentTimeMillis()).collect(Collectors.toList());
|
List<CouponVO> collect = records.stream().filter(s -> s.getEndTime().getTime() < System.currentTimeMillis()).collect(Collectors.toList());
|
||||||
if (ObjectUtils.isNotEmpty(collect)){
|
if (ObjectUtils.isNotEmpty(collect)){
|
||||||
for (CouponVO couponVO : collect) {
|
for (CouponVO couponVO : collect) {
|
||||||
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
|
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
|
||||||
cardFavorableRecord.setId(couponVO.getCardRecordId());
|
cardFavorableRecord.setId(couponVO.getCardRecordId());
|
||||||
cardFavorableRecord.setStatus("2");
|
cardFavorableRecord.setStatus("2");
|
||||||
cardFavorableRecordMapper.updateById(cardFavorableRecord);
|
cardFavorableRecordMapper.updateById(cardFavorableRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//couponVOS.setRecords(collect);
|
//couponVOS.setRecords(collect);
|
||||||
|
Loading…
Reference in New Issue
Block a user