diff --git a/fuintAdmin/src/views/EventMarketing/center/index.vue b/fuintAdmin/src/views/EventMarketing/center/index.vue
index d61e06da3..cde3e3179 100644
--- a/fuintAdmin/src/views/EventMarketing/center/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/center/index.vue
@@ -196,16 +196,8 @@
-
-
-
-
-
-
+
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -262,18 +254,33 @@
label="已领数量"
>
+
+
+
+
+
+
+
@@ -282,7 +289,7 @@
修改
-
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+ 停用
+
+
+
+
+
+
@@ -396,21 +521,34 @@ export default {
ruleForm:{},
value:1,
tabindex:0,
+ //类型 1:储值卡 2:囤油卡 3:立减营销 4:立减营销 5:消费有礼 6:开卡有礼 7:邀请有礼 8分时优惠 9限时特价
options: [{
- value: '选项1',
- label: '黄金糕1'
+ value: '1',
+ label: '储值卡'
}, {
- value: '选项2',
- label: '双皮奶'
+ value: '2',
+ label: '囤油卡'
}, {
- value: '选项3',
- label: '蚵仔煎'
+ value: '3',
+ label: '立减营销'
}, {
- value: '选项4',
- label: '龙须面'
+ value: '4',
+ label: '立减营销'
}, {
- value: '选项5',
- label: '北京烤鸭'
+ value: '5',
+ label: '立减营销'
+ }, {
+ value: '6',
+ label: '开卡有礼'
+ }, {
+ value: '7',
+ label: '邀请有礼'
+ }, {
+ value: '8',
+ label: '分时优惠'
+ }, {
+ value: '9',
+ label: '限时特价'
}],
tableData: [{
date: '2016-05-02',
@@ -429,6 +567,7 @@ export default {
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
+ oldTableData:[],
tablist:[
"营销活动",
"当前活动列表",
@@ -436,13 +575,19 @@ export default {
],
queryParams:{
page:0,
- pageSize:10
+ pageSize:10,
+ name:'',
+ type:'',
+ activeStatus:'1'
},
- total:0
+ total:0,
+ oldTotal:0
+
}
},
created() {
this.getList();
+ this.getOldList()
},
components:{
activeNewlyweds,activeConsumption,activeDiscount,activeFullminus,activeRecommend
@@ -453,12 +598,50 @@ export default {
* 查询列表
*/
getList() {
+ this.queryParams.activeStatus = '1'
pageActive(this.queryParams).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
})
},
+ handleQuery() {
+ this.queryParams.page = 1;
+ this.getList();
+ },
+
+ resetQuery() {
+ this.queryParams.page = 1
+ this.queryParams.name = null
+ this.queryParams.type = null
+ this.getList()
+ },
+
+ /**
+ * 查询历史列表
+ */
+ getOldList() {
+ this.queryParams.activeStatus = '2'
+ pageActive(this.queryParams).then(res=>{
+ this.oldTableData = res.data.records
+ this.oldTotal = res.data.total
+ })
+ },
+
+ handleOldQuery() {
+ this.queryParams.activeStatus = '2'
+ this.queryParams.page = 1;
+ this.getOldList();
+ },
+
+ resetOldQuery() {
+ this.queryParams.page = 1
+ this.queryParams.activeStatus = '2'
+ this.queryParams.name = null
+ this.queryParams.type = null
+ this.getOldList()
+ },
+
routerPush(id){
this.$router.push({
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/entity/ActiveApplet.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/entity/ActiveApplet.java
index e020ce306..40b2e3122 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/entity/ActiveApplet.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/entity/ActiveApplet.java
@@ -3,8 +3,10 @@ package com.fuint.business.marketingActivity.activeApplet.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
@@ -51,10 +53,13 @@ public class ActiveApplet extends Model {
//创建者
private String createBy;
//创建时间
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
private Date updateTime;
+ @TableField(exist = false)
+ private String typeText;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/mapper/xml/ActiveAppletMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/mapper/xml/ActiveAppletMapper.xml
index 850a58b73..feecdbe07 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/mapper/xml/ActiveAppletMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/mapper/xml/ActiveAppletMapper.xml
@@ -38,6 +38,9 @@
AND type = #{entity.type}
+
+ AND active_status = #{entity.activeStatus}
+
ORDER BY create_time desc
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java
index bc2b6f5af..4ab5afbab 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
+import com.fuint.utils.StringUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -61,7 +62,34 @@ public class ActiveAppletServiceImpl extends ServiceImpl pageActive(Page page, ActiveApplet activeApplet) {
- return activeAppletMapper.pageActive(page,activeApplet);
+ IPage result = activeAppletMapper.pageActive(page,activeApplet);
+ result.getRecords().forEach(item -> {
+ item.setTypeText(replaceType(item.getType()));
+ });
+ return result;
+ }
+ /**
+ * 类型转换
+ * @author PQZ
+ * @date 22:34 2024/9/9
+ * @param type 活动类型
+ * @return java.lang.String
+ **/
+ public String replaceType(String type) {
+ if (StringUtil.isNotBlank(type)) {
+ type = type.replace("1", "储值卡");
+ type = type.replace("2", "囤油卡");
+ type = type.replace("3", "立减营销");
+ type = type.replace("4", "立减营销");
+ type = type.replace("5", "消费有礼");
+ type = type.replace("6", "开卡有礼");
+ type = type.replace("7", "邀请有礼");
+ type = type.replace("8", "分时优惠");
+ type = type.replace("9", "限时特价");
+ } else {
+ type = "无";
+ }
+ return type;
}
}