营销活动

This commit is contained in:
13405411873 2024-10-08 14:11:20 +08:00
parent 95a0ce60f9
commit deb3db0b95
7 changed files with 20 additions and 13 deletions

View File

@ -69,7 +69,9 @@ public class CardFuelDieselController extends BaseController {
}
@GetMapping("fuelCardList")
public ResponseObject fuelCardList(CardFuelDiesel cardFuelDiesel) {
//获取当前登录用户
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cardFuelDiesel.setStoreId(nowAccountInfo.getStoreId());
return getSuccessResult(this.cardFuelDieselService.fuelCardList(cardFuelDiesel));
}
/**

View File

@ -106,11 +106,10 @@ public class CardFuelDieselServiceImpl extends ServiceImpl<CardFuelDieselMapper,
@Override
public List<CardFuelDiesel> fuelCardList(CardFuelDiesel cardFuelDiesel) {
//获取当前登录用户
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
String nowTime = DateUtil.format(new Date(), "yyyy-MM-dd")+" 00:00:00";
LambdaQueryWrapper<CardFuelDiesel> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(CardFuelDiesel::getStoreId,nowAccountInfo.getStoreId()).eq(CardFuelDiesel::getActiveStatus,"1").and(it->{
queryWrapper.eq(CardFuelDiesel::getStoreId,cardFuelDiesel.getStoreId()).eq(CardFuelDiesel::getActiveStatus,"1").and(it->{
return it.eq(CardFuelDiesel::getActiveTime,"1").or(item->{
return item .eq(CardFuelDiesel::getActiveTime,"2")
.le(CardFuelDiesel::getStartTime,nowTime).ge(CardFuelDiesel::getEndTime,nowTime);

View File

@ -7,6 +7,8 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
import com.fuint.business.marketingActivity.cardValue.service.CardValueService;
import com.fuint.business.setting.entity.SysLog;
import com.fuint.business.setting.service.SysLogService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.apache.ibatis.annotations.Param;
@ -77,6 +79,9 @@ public class CardValueController extends BaseController {
*/
@GetMapping("cardValueList")
public ResponseObject cardValueList(@Param("cardValue") CardValue cardValue) {
//获取当前登录用户
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cardValue.setStoreId(nowAccountInfo.getStoreId());
return getSuccessResult(this.cardValueService.cardValueList(cardValue));
}

View File

@ -554,9 +554,9 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardFuelRecordDTO.setOilType(fuelDiesel.getOilType());
cardFuelRecordDTO.setOilNumberId(fuelDiesel.getOilNumberId());
//锁定单价
cardFuelRecordDTO.setLockupPrice(BigDecimal.valueOf(fuelDiesel.getRechargeBalance()/fuelDiesel.getIncomeLitres()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
cardFuelRecordDTO.setLockupPrice(fuelDiesel.getLockPrice());
//所得升数
cardFuelRecordDTO.setIncomeLitres(fuelDiesel.getIncomeLitres());
cardFuelRecordDTO.setIncomeLitres(BigDecimal.valueOf(fuelDiesel.getRechargeBalance()/fuelDiesel.getLockPrice()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
//充值金额
cardFuelRecordDTO.setRechargeBalance(selectCard.getRechargeBalance().doubleValue());

View File

@ -545,11 +545,10 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
@Override
public List<CardValue> cardValueList(CardValue cardValue) {
//获取当前登录用户
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
String nowTime = DateUtil.format(new Date(), "yyyy-MM-dd")+" 00:00:00";
LambdaQueryWrapper<CardValue> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(CardValue::getStoreId,nowAccountInfo.getStoreId()).eq(CardValue::getActiveStatus,"1").and(it->{
queryWrapper.eq(CardValue::getStoreId,cardValue.getStoreId()).eq(CardValue::getActiveStatus,"1").and(it->{
return it.eq(CardValue::getActiveTime,"1").or(item->{
return item .eq(CardValue::getActiveTime,"2")
.le(CardValue::getStartTime,nowTime).ge(CardValue::getEndTime,nowTime);

View File

@ -191,6 +191,8 @@ public class LJUserController extends BaseController {
return getSuccessResult(user);
}
/**
* 根据手机号查询会员信息
* @param map

View File

@ -29,10 +29,10 @@
</div>
</div>
</div>
<!-- <div class="d-s" >-->
<!-- <div style="font-size: 12px;margin-right: 5px">储值卡{{chooseVipUser.cardBalance}} </div>-->
<!-- <div style="font-size: 12px">囤油卡1000.000</div>-->
<!-- </div>-->
<div class="d-s" >
<div style="font-size: 12px;margin-right: 5px">储值卡{{chooseVipUser.cardBalance}} </div>
<div style="font-size: 12px">囤油卡1000.000</div>
</div>
</div>
<div class="d-s" style="width: 50%">