This commit is contained in:
cun-nan 2024-03-15 09:01:19 +08:00
parent e3d6125229
commit 98406ae1b4
15 changed files with 110 additions and 64 deletions

View File

@ -49,7 +49,7 @@ service.interceptors.request.use(config => {
const s_url = sessionObj.url; // 请求地址
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
const interval = 999; // 间隔时间(ms),小于此时间视为重复提交
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url && s_url!='backendApi/store/loginVerification') {
const message = '数据正在处理,请耐心等待';
console.warn(`[${s_url}]: ` + message)

View File

@ -1025,9 +1025,9 @@ export default {
},
//
deletedata(row){
if(this.form.tableDatas&&this.form.tableDatas.length>0){
if(this.tableData1&&this.tableData1.length>0){
let delIdx=-1;
for ( let item of this.form.tableDatas) {
for ( let item of this.tableData1) {
delIdx++;
if (item.id===row.id){
break

View File

@ -66,9 +66,9 @@
<span> {{scope.row.activeDiscountChildList[0].amount}} </span>
</template>
</el-table-column>
<el-table-column label="折扣金额(元)" align="center" prop="adaptOil" >
<el-table-column label="折扣优惠" align="center" prop="adaptOil" >
<template slot-scope="scope">
<span> {{scope.row.activeDiscountChildList[0].discount}} </span>
<span> {{scope.row.activeDiscountChildList[0].discount}} </span>
</template>
</el-table-column>

View File

@ -193,6 +193,9 @@
</el-form-item>
<el-form-item label="卡券有效期" prop="validity">
<el-input-number :min="1" placeholder="请输入卡券有效期" v-model="form.validity">
<template slot="append"></template>
</el-input-number>
<div style="width: 217px">
<el-input type="number" placeholder="请输入卡券有效期" v-model="form.validity">
<template slot="append"></template>

View File

@ -18,7 +18,7 @@
<el-table-column align="center" prop="balance" label="变动金额"/>
<el-table-column align="center" label="变动前余额">
<template slot-scope="scope">
<span>{{ scope.row.afterTheChange?parseFloat(scope.row.afterTheChange - scope.row.balance).toFixed(2) : '/'}}</span>
<span>{{ scope.row.afterTheChange?parseFloat(scope.row.afterTheChange + scope.row.balance).toFixed(2) : '/'}}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="afterTheChange" label="变动后余额">

View File

@ -89,6 +89,7 @@ export default {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.queryParams.useStatus = 0
this.getList()
this.getOilName()
},

View File

@ -199,14 +199,14 @@ public class FyPayServiceImpl implements FyPayService {
}
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
// 修改优惠券使用状态
// if (oilOrder.getCouponId()!=null){
// CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId());
// if (!ObjectUtil.isEmpty(byId)){
// byId.setStatus("1");
// cardFavorableRecordService.updateById(byId);
// }
// }
//修改优惠券使用状态
if (oilOrder.getCouponId()!=null){
CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId());
if (!ObjectUtil.isEmpty(byId)){
byId.setStatus("1");
cardFavorableRecordService.updateById(byId);
}
}
}
if (!ObjectUtil.isEmpty(goodsOrder)){
// 商品订单

View File

@ -499,11 +499,11 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
//会员日筛选
for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOListss) {
//
if (activeDiscountPayVO.getMemberDayType().equals("1")) {
if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("2")) {
String weekDay = activeDiscountPayVO.getWeekDay();
if (weekDay.contains(displayName)) {
activeDiscountVOList.add(activeDiscountPayVO);
} else if (activeDiscountPayVO.getMemberDayType().equals("2")) {
} else if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("1")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
@ -521,21 +521,21 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
//会员日筛选
for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOLists) {
//
if (activeDiscountPayVO.getMemberDayType().equals("1")) {
if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("2")) {
String weekDay = activeDiscountPayVO.getWeekDay();
if (weekDay.contains(displayName)) {
activeDiscountVOList.add(activeDiscountPayVO);
} else if (activeDiscountPayVO.getMemberDayType().equals("2")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
activeDiscountVOList.add(activeDiscountPayVO);
}
}
} else {
activeDiscountVOList.add(activeDiscountPayVO);
}
}
else if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("1")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
activeDiscountVOList.add(activeDiscountPayVO);
}
}
} else {
activeDiscountVOList.add(activeDiscountPayVO);
}
}
//activeDiscountVOList.addAll(activeDiscountVOLists);
@ -545,21 +545,21 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
//会员日筛选
for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOListss) {
//
if (activeDiscountPayVO.getMemberDayType().equals("1")) {
if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("2")) {
String weekDay = activeDiscountPayVO.getWeekDay();
if (weekDay.contains(displayName)) {
activeFuletVOList.add(activeDiscountPayVO);
} else if (activeDiscountPayVO.getMemberDayType().equals("2")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
activeFuletVOList.add(activeDiscountPayVO);
}
}
} else {
activeFuletVOList.add(activeDiscountPayVO);
}
}
else if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("1")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
activeFuletVOList.add(activeDiscountPayVO);
}
}
} else {
activeFuletVOList.add(activeDiscountPayVO);
}
}
//满减无限制
@ -567,21 +567,22 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
//会员日筛选
for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOLists) {
//
if (activeDiscountPayVO.getMemberDayType().equals("1")) {
if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("2")) {
String weekDay = activeDiscountPayVO.getWeekDay();
if (weekDay.contains(displayName)) {
activeFuletVOList.add(activeDiscountPayVO);
} else if (activeDiscountPayVO.getMemberDayType().equals("2")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
activeFuletVOList.add(activeDiscountPayVO);
}
}
} else {
activeFuletVOList.add(activeDiscountPayVO);
}
}
else if (ObjectUtil.isNotEmpty(activeDiscountPayVO.getMemberDayType()) && activeDiscountPayVO.getMemberDayType().equals("1")) {
String[] split = activeDiscountPayVO.getMonthDay().split(",");
for (String s : split) {
if (day.equals(s)){
activeFuletVOList.add(activeDiscountPayVO);
}
}
} else {
activeFuletVOList.add(activeDiscountPayVO);
}
}
//activeFuletVOList.addAll(activeFuletVOLists);
//优惠券
@ -633,13 +634,17 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
if (StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("0")) {
cardFavorableRecordVOS.add(cardFavorableRecordVO);
}
if (StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2")) {
boolean flag = false;
if (StringUtils.isNotEmpty(cardFavorableRecordVO.getMembershipLevel()) && StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2")) {
String membershipLevel = cardFavorableRecordVO.getMembershipLevel();
for (String s : membershipLevel.split(",")) {
if (paymentActiveDTO.getMtUserLevel().equals(s)){
cardFavorableRecordVOS.add(cardFavorableRecordVO);
if (paymentActiveDTO.getMtUserLevel().toString().equals(s)){
flag = true;
}
}
if (!flag){
cardFavorableRecordVOS.add(cardFavorableRecordVO);
}
}
}
}

View File

@ -107,6 +107,9 @@
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cfr.status = #{cardFavorableDTOS.useStatus}
</if>
<if test="cardFavorableDTOS.useStatus == 0">
and cfr.status = #{cardFavorableDTOS.useStatus}
</if>
and cfr.store_id = #{cardFavorableDTOS.storeId}
and cf.type != 1 UNION ALL
SELECT
@ -119,7 +122,12 @@
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 0
and cer.status = #{cardFavorableDTOS.useStatus}
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cer.status = #{cardFavorableDTOS.useStatus}
</if>
<if test="cardFavorableDTOS.useStatus == 0">
and cer.status = #{cardFavorableDTOS.useStatus}
</if>
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
SELECT
'洗车券' AS couponType,
@ -131,7 +139,12 @@
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 1
and cer.status = #{cardFavorableDTOS.useStatus}
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cer.status = #{cardFavorableDTOS.useStatus}
</if>
<if test="cardFavorableDTOS.useStatus == 0">
and cer.status = #{cardFavorableDTOS.useStatus}
</if>
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
SELECT
'洗车卡' AS couponType,
@ -142,10 +155,13 @@
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 2
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cer.status = #{cardFavorableDTOS.useStatus}
and cer.status = #{cardFavorableDTOS.useStatus}
</if>
<if test="cardFavorableDTOS.useStatus == 0">
and cer.status = #{cardFavorableDTOS.useStatus}
</if>
and ce.type = 2
and cer.store_id = #{cardFavorableDTOS.storeId}) AS card_favorables
<where>
<if test="cardFavorableDTOS.couponType != null">
@ -163,7 +179,7 @@
cf.oil_type oilType,
cf.satisfied_amount satisfiedAmount,
cf.exclusive_function exclusiveFunction,
cf.membership_level membershipLevel
cf.membership_level membershipLevel,
(case discount_type when'1'then cf.satisfied_amount * (1-(cf.special_discount * ${paymentActiveDTO.amount}))
when '0' then cf.discount_amount
end) as amount

View File

@ -29,6 +29,8 @@ import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecord
import com.fuint.business.marketingActivity.cardFavorable.vo.LJUserVos;
import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.business.userManager.entity.LJUser;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.LJUserService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
@ -86,6 +88,9 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
@Resource
@Lazy
private ActiveOneCouponChildService activeOneCouponChildService;
@Resource
@Lazy
private LJUserGradeService userGradeService;
/**
* 分页查询所有数据
* @param page
@ -446,17 +451,23 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
LJUserVo ljUserVo = new LJUserVo();
LJUserVos ljUserVos = new LJUserVos();
ljUserVo.setGradeId(gradeId);
LJUserGrade ljUserGrade = userGradeService.selectUserGradeById(gradeId);
List<LJUserVo> userLists = userService.getUserCountList(ljUserVo);
if (CollectionUtils.isNotEmpty(userLists)){
ljUserVos.setGradeName(userLists.get(0).getGradeName());
ljUserVos.setCountAll(userLists.size());
}else {
ljUserVos.setGradeName(ljUserGrade.getName());
ljUserVos.setCountAll(0);
ljUserVos.setRate("0.0%");
}
ljUserVo.setDays(cardFavorableAdnUserDTO.getDays());
List<LJUserVo> userListss = userService.getUserLists(ljUserVo);
ljUserVos.setCount(userListss.size());
if (ObjectUtils.isNotEmpty(ljUserVos.getCountAll()) && ObjectUtils.isNotEmpty(ljUserVos.getCount()) && ljUserVos.getCountAll()!=0){
ljUserVos.setRate((ljUserVos.getCount()/ljUserVos.getCountAll())*100 + "%");
ljUserVos.setRate((Double.valueOf(ljUserVos.getCount())/Double.valueOf(ljUserVos.getCountAll()))*100 + "%");
}
ljUserVosList.add(ljUserVos);
}

View File

@ -89,7 +89,8 @@
cbc.create_time createTime,
cbc.chain_store_id chainStoreId,
cbc.store_id storeId,
cbc.id payStatus
cbc.id payStatus,
cbc.update_time expireTime
from card_balance_change cbc
left join oil_order oo on cbc.order_no = oo.order_no
where change_type = 0 ) AS combined_result

View File

@ -361,6 +361,9 @@
ad.adapt_oil oilId,
ad.limit_acount as limitAcount,
ad.participation_condition,
ad.week_day weekDay,
ad.month_day monthDay,
ad.member_day_type memberDayType,
max((case ad.store_id when ${storeId} then adc.amount * (1-(adc.discount * 0.1))
end)) as discount
FROM
@ -375,7 +378,6 @@
AND ad.STATUS = 0
AND concat(',',ad.adapt_oil,',') like concat('%',#{oilId},'%')
AND concat(',',ad.diesel_user_level,',') like concat('%',#{levelId},'%')
AND ad.participation_acount = 1
GROUP BY ad.id
HAVING IFNULL(sum(adr.id),0) <![CDATA[ < ]]> limitAcount
</select>
@ -387,6 +389,9 @@
ad.adapt_oil oilId,
ad.limit_acount as limitAcount,
ad.participation_condition,
ad.week_day weekDay,
ad.month_day monthDay,
ad.member_day_type memberDayType,
max((case ad.store_id when ${storeId} then adc.amount * (1-(adc.discount * 0.1))
end)) as discount
FROM
@ -401,7 +406,6 @@
AND ad.STATUS = 0
AND concat(',',ad.adapt_oil,',') like concat('%',#{oilId},'%')
AND concat(',',ad.diesel_user_level,',') like concat('%',#{levelId},'%')
AND ad.participation_acount = 0
GROUP BY ad.id
</select>
@ -413,6 +417,9 @@
af.adapt_oil oilId,
af.limit_acount as limitAcount,
af.participation_condition,
af.week_day weekDay,
af.month_day monthDay,
af.member_day_type memberDayType,
max(adc.deduction_amount) discount
FROM
active_fullminus af
@ -426,7 +433,6 @@
AND af.STATUS = 0
AND concat(',',af.adapt_oil,',') like concat('%',#{oilId},'%')
AND concat(',',af.diesel_user_level,',') like concat('%',#{levelId},'%')
AND af.participation_acount = 1
GROUP BY af.id
HAVING IFNULL(sum(afr.id),0) <![CDATA[ < ]]> limitAcount
</select>
@ -438,6 +444,9 @@
af.adapt_oil oilId,
af.limit_acount as limitAcount,
af.participation_condition,
af.week_day weekDay,
af.month_day monthDay,
af.member_day_type memberDayType,
max(adc.deduction_amount) discount
FROM
active_fullminus af
@ -451,7 +460,6 @@
AND af.STATUS = 0
AND concat(',',af.adapt_oil,',') like concat('%',#{oilId},'%')
AND concat(',',af.diesel_user_level,',') like concat('%',#{levelId},'%')
AND af.participation_acount = 0
GROUP BY af.id
</select>

View File

@ -18,7 +18,7 @@
<el-table-column align="center" prop="balance" label="变动金额"/>
<el-table-column align="center" label="变动前余额">
<template slot-scope="scope">
<span>{{ scope.row.afterTheChange?parseFloat(scope.row.afterTheChange - scope.row.balance).toFixed(2) : '/'}}</span>
<span>{{ scope.row.afterTheChange?parseFloat(scope.row.afterTheChange + scope.row.balance).toFixed(2) : '/'}}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="afterTheChange" label="变动后余额">

View File

@ -89,6 +89,7 @@ export default {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.queryParams.useStatus = 0
this.getList()
this.getOilName()
},

View File

@ -56,7 +56,7 @@
</view>
<view class="y-bt">
<view class="sizehui">到期时间</view>
<view class="sizehei">{{item.expireTime}}</view>
<view class="sizehei">{{item.expireTime ? item.expireTime : '不限时间'}}</view>
</view>
<!-- <view class="dibu">
<view class="xiaanniu">评价有礼</view>