From 5cad54a5d049cbf9f3d45df017053121f9a65ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Wed, 24 Jan 2024 17:38:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A2=86=E5=88=B8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/CardFavorableService.java | 2 +- .../impl/CardFavorableRecordServiceImpl.java | 29 ++++++++++++++----- .../impl/CardFavorableServiceImpl.java | 10 ++++++- .../impl/CardValueRecordServiceImpl.java | 26 +++++++++++------ 4 files changed, 48 insertions(+), 19 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java index 527b41c71..70b8103e2 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java @@ -58,7 +58,7 @@ public interface CardFavorableService extends IService { /** * 查询优惠券接口(小程序) * @param page - * @param cardFavorable + * @param cardFavorableDTOS * @return */ IPage selectAllByCondition(Page page, CardFavorableDTOS cardFavorableDTOS); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java index a0110afb7..82b36d48f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java @@ -35,6 +35,9 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZoneId; import java.util.Date; import java.util.List; import java.util.Map; @@ -155,17 +158,27 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl records = couponVOS.getRecords(); //有效期 List collect = records.stream().filter(s -> s.getEndTime().getTime() > System.currentTimeMillis()).collect(Collectors.toList()); - couponVOS.setRecords(collect); + if (ObjectUtils.isNotEmpty(collect)){ + for (CouponVO couponVO : collect) { + CardFavorableRecord cardFavorableRecord = new CardFavorableRecord(); + cardFavorableRecord.setId(couponVO.getCardRecordId()); + cardFavorableRecord.setStatus("2"); + cardFavorableRecordMapper.updateById(cardFavorableRecord); + } + } + //couponVOS.setRecords(collect); return couponVOS; } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java index 94a7f6f4b..eb0abd143 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -73,6 +73,8 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.ZoneId; import java.util.*; import java.util.concurrent.TimeUnit; @@ -839,18 +841,24 @@ public class CardValueRecordServiceImpl extends ServiceImpl Date: Wed, 24 Jan 2024 18:11:58 +0800 Subject: [PATCH 2/4] bug --- fuintAdmin/src/views/staff/list.vue | 1 + .../views/staffCommission/staffCommission.vue | 51 ++++++++++++++----- .../views/cashier/NewComponents/homeindex.vue | 2 + gasStation-uni/pagesMy/details/details.vue | 2 +- 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue index 821641377..1b52920a8 100644 --- a/fuintAdmin/src/views/staff/list.vue +++ b/fuintAdmin/src/views/staff/list.vue @@ -157,6 +157,7 @@ :value="item.dutyId+''" > diff --git a/fuintAdmin/src/views/staffCommission/staffCommission.vue b/fuintAdmin/src/views/staffCommission/staffCommission.vue index 3c5a59025..8c10e89cf 100644 --- a/fuintAdmin/src/views/staffCommission/staffCommission.vue +++ b/fuintAdmin/src/views/staffCommission/staffCommission.vue @@ -13,7 +13,7 @@ clearable placeholder="全部" > - + {{ item.realName }} {{ item.mobile }} @@ -123,10 +123,10 @@ @sort-change="handleSortChange"> - - - - + + @@ -213,13 +213,16 @@ - + + @@ -347,6 +350,7 @@ export default { // 显示搜索条件 showSearch: true, roleList:[], + staffRoleGroup:[], // 表单校验 rules: { name: [ @@ -382,6 +386,20 @@ export default { this.getStaffList(); }, methods:{ + getStaffDuty(list,ids){ + let id = ids.split(",") + let name = "" + let dutyName = "" + list.forEach(item => { + id.forEach(i => { + if (item.dutyId=i){ + name = item.dutyName + } + dutyName += name +"," + }) + }) + return name + }, getStaffList(){ queryStaffs().then( response => { this.staffList = response.data; @@ -391,6 +409,7 @@ export default { getDuty(){ listDuty().then(response => { this.roleList = response.data + console.log(response.data) }) }, // 点击标签页 @@ -425,7 +444,9 @@ export default { }, getCheckbox(){ - this.form.commissionSource = this.commissionSource.toString() + console.log(this.staffRoleGroup) + // this.form.commissionSource = this.commissionSource.toString() + this.form.staffRoleGroup = this.staffRoleGroup.toString() }, // 查询列表 getList() { @@ -453,6 +474,7 @@ export default { // 表单重置 reset() { this.resetForm("form"); + this.staffRoleGroup = [] if (this.activeName == 'oil'){ this.form = { type:'orderAmount', @@ -484,6 +506,9 @@ export default { this.form.royaltyRate = this.form.royaltyRate.slice(0,this.form.royaltyRate.length-1) this.open = true; this.title = "编辑提成方案"; + if (response.data.staffRoleGroup){ + this.staffRoleGroup = response.data.staffRoleGroup.split(","); + } }); }, @@ -524,8 +549,9 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { + this.form.royaltyRate = this.form.royaltyRate + this.select + this.form.staffRoleGroup = this.staffRoleGroup.toString() if (this.form.id) { - this.form.royaltyRate = this.form.royaltyRate + this.select updateCommission(this.form).then(response => { if (response.data==1){ this.$modal.msgSuccess("提成方案更新成功"); @@ -536,7 +562,6 @@ export default { } }); } else { - this.form.royaltyRate = this.form.royaltyRate + this.select addCommission(this.form).then(response => { if (response.data==1) { this.$modal.msgSuccess("提成方案新增成功"); @@ -573,7 +598,7 @@ export default {