Compare commits
4 Commits
8736c104b7
...
6436423875
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6436423875 | ||
|
|
c4e7d2059e | ||
|
|
120dabb9df | ||
|
|
6c60f63089 |
@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api'
|
|||||||
VUE_APP_PUBLIC_PATH = '/'
|
VUE_APP_PUBLIC_PATH = '/'
|
||||||
|
|
||||||
# 后端接口地址
|
# 后端接口地址
|
||||||
VUE_APP_SERVER_URL = 'http://192.168.31.178:8080/'
|
VUE_APP_SERVER_URL = 'http://127.0.0.1:8080/'
|
||||||
|
|
||||||
|
|
||||||
# http://192.168.0.121:8080/
|
# http://192.168.0.121:8080/
|
||||||
|
|||||||
10
fuintAdmin/src/api/active/active.js
Normal file
10
fuintAdmin/src/api/active/active.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 查询油罐列表
|
||||||
|
export function pageActive(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/activeApplet/page',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -196,16 +196,8 @@
|
|||||||
<div class="bai-box" v-show="tabindex == 1" >
|
<div class="bai-box" v-show="tabindex == 1" >
|
||||||
<div class="b-d">
|
<div class="b-d">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-input v-model="ruleForm.input" placeholder="请输入活动名称" style=" width: 260px; margin-right: 15px"></el-input>
|
<el-input v-model="queryParams.name" placeholder="请输入活动名称" style=" width: 260px; margin-right: 15px"></el-input>
|
||||||
<el-select v-model="ruleForm.value" placeholder="请选择活动类型" style=" width: 260px; margin-right: 15px">
|
<el-select v-model="queryParams.type" placeholder="请选择活动类型" style=" width: 260px; margin-right: 15px">
|
||||||
<el-option
|
|
||||||
v-for="item in options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select v-model="ruleForm.value" placeholder="请选择状态" style=" width: 260px; margin-right: 15px">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -215,8 +207,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh-right">重置</el-button>
|
<el-button icon="el-icon-refresh-right" @click="resetQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@ -233,7 +225,7 @@
|
|||||||
width="55">
|
width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="typeText"
|
||||||
label="活动类型"
|
label="活动类型"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -243,55 +235,61 @@
|
|||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="discountActiveDescribe"
|
||||||
label="活动内容"
|
label="活动内容"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="time"
|
||||||
label="活动时间"
|
label="活动时间"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="adaptUserType"
|
||||||
label="适用会员等级"
|
label="适用会员等级"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="活动详情"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
label="已领数量"
|
label="已领数量"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="sendNum"
|
||||||
label="状态"
|
label="已领数量"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="activeStatus"
|
||||||
|
label="状态"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.activeStatus"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="2">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createBy"
|
||||||
label="创建人"
|
label="创建人"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="createTime"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
prop="address"
|
|
||||||
label="地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="date" label="操作" align="center" >
|
<el-table-column prop="date" label="操作" align="center" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@click="routerPush(scope.row.type)"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -306,8 +304,133 @@
|
|||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.page"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="bai-box" v-show="tabindex == 2">
|
||||||
|
<div class="b-d">
|
||||||
|
<div class="d-s">
|
||||||
|
<el-input v-model="queryParams.name" placeholder="请输入活动名称" style=" width: 260px; margin-right: 15px"></el-input>
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择活动类型" style=" width: 260px; margin-right: 15px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="d-s">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleOldQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh-right" @click="resetOldQuery">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="oldTableData"
|
||||||
|
border
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="typeText"
|
||||||
|
label="活动类型"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="活动名称"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="discountActiveDescribe"
|
||||||
|
label="活动内容"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="time"
|
||||||
|
label="活动时间"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="adaptUserType"
|
||||||
|
label="适用会员等级"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="已领数量"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="sendNum"
|
||||||
|
label="已领数量"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="activeStatus"
|
||||||
|
label="状态"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.activeStatus"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="2">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createBy"
|
||||||
|
label="创建人"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="date" label="操作" align="center" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="routerPush(scope.row.type)"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
slot="reference"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
>停用</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="oldTotal>0"
|
||||||
|
:total="oldTotal"
|
||||||
|
:page.sync="queryParams.page"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getOldList"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="bai-box" v-show="tabindex == 2"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="fji" >-->
|
<!-- <div class="fji" >-->
|
||||||
@ -390,6 +513,7 @@ import activeNewlyweds from '../activeNewlyweds/index'
|
|||||||
import activeConsumption from '../activeConsumption/index'
|
import activeConsumption from '../activeConsumption/index'
|
||||||
import activeFullminus from '../activeFullminus/index'
|
import activeFullminus from '../activeFullminus/index'
|
||||||
import activeRecommend from '../activeRecommend/index'
|
import activeRecommend from '../activeRecommend/index'
|
||||||
|
import {pageActive} from "@/api/active/active";
|
||||||
export default {
|
export default {
|
||||||
name: 'Exchange',
|
name: 'Exchange',
|
||||||
data() {
|
data() {
|
||||||
@ -397,21 +521,34 @@ export default {
|
|||||||
ruleForm:{},
|
ruleForm:{},
|
||||||
value:1,
|
value:1,
|
||||||
tabindex:0,
|
tabindex:0,
|
||||||
|
//类型 1:储值卡 2:囤油卡 3:立减营销 4:立减营销 5:消费有礼 6:开卡有礼 7:邀请有礼 8分时优惠 9限时特价
|
||||||
options: [{
|
options: [{
|
||||||
value: '选项1',
|
value: '1',
|
||||||
label: '黄金糕'
|
label: '储值卡'
|
||||||
}, {
|
}, {
|
||||||
value: '选项2',
|
value: '2',
|
||||||
label: '双皮奶'
|
label: '囤油卡'
|
||||||
}, {
|
}, {
|
||||||
value: '选项3',
|
value: '3',
|
||||||
label: '蚵仔煎'
|
label: '立减营销'
|
||||||
}, {
|
}, {
|
||||||
value: '选项4',
|
value: '4',
|
||||||
label: '龙须面'
|
label: '立减营销'
|
||||||
}, {
|
}, {
|
||||||
value: '选项5',
|
value: '5',
|
||||||
label: '北京烤鸭'
|
label: '立减营销'
|
||||||
|
}, {
|
||||||
|
value: '6',
|
||||||
|
label: '开卡有礼'
|
||||||
|
}, {
|
||||||
|
value: '7',
|
||||||
|
label: '邀请有礼'
|
||||||
|
}, {
|
||||||
|
value: '8',
|
||||||
|
label: '分时优惠'
|
||||||
|
}, {
|
||||||
|
value: '9',
|
||||||
|
label: '限时特价'
|
||||||
}],
|
}],
|
||||||
tableData: [{
|
tableData: [{
|
||||||
date: '2016-05-02',
|
date: '2016-05-02',
|
||||||
@ -430,22 +567,82 @@ export default {
|
|||||||
name: '王小虎',
|
name: '王小虎',
|
||||||
address: '上海市普陀区金沙江路 1516 弄'
|
address: '上海市普陀区金沙江路 1516 弄'
|
||||||
}],
|
}],
|
||||||
|
oldTableData:[],
|
||||||
tablist:[
|
tablist:[
|
||||||
"营销活动",
|
"营销活动",
|
||||||
"当前活动列表",
|
"当前活动列表",
|
||||||
"历史活动列表"
|
"历史活动列表"
|
||||||
]
|
],
|
||||||
|
queryParams:{
|
||||||
|
page:0,
|
||||||
|
pageSize:10,
|
||||||
|
name:'',
|
||||||
|
type:'',
|
||||||
|
activeStatus:'1'
|
||||||
|
},
|
||||||
|
total:0,
|
||||||
|
oldTotal:0
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getOldList()
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
activeNewlyweds,activeConsumption,activeDiscount,activeFullminus,activeRecommend
|
activeNewlyweds,activeConsumption,activeDiscount,activeFullminus,activeRecommend
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
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){
|
routerPush(id){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/EventMarketing/openCardGift/index',
|
path: '/EventMarketing/openCardGift/index',
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package com.fuint.business.marketingActivity.activeApplet.controller;
|
package com.fuint.business.marketingActivity.activeApplet.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
||||||
|
import com.fuint.business.marketingActivity.activePrice.vo.ActivePriceReqVO;
|
||||||
|
import com.fuint.business.marketingActivity.activePrice.vo.ActivePriceRespVO;
|
||||||
import com.fuint.business.setting.entity.SysLog;
|
import com.fuint.business.setting.entity.SysLog;
|
||||||
import com.fuint.business.setting.service.SysLogService;
|
import com.fuint.business.setting.service.SysLogService;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -41,6 +45,24 @@ public class ActiveAppletController extends BaseController {
|
|||||||
return getSuccessResult(this.activeAppletService.applet(activeApplet));
|
return getSuccessResult(this.activeAppletService.applet(activeApplet));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询主表信息
|
||||||
|
*
|
||||||
|
* @param pageNo 分页参数
|
||||||
|
* @param pageSize 分页参数
|
||||||
|
* @param activeApplet ActiveApplet实体
|
||||||
|
* @return com.fuint.framework.web.ResponseObject
|
||||||
|
* @author PQZ
|
||||||
|
* @date 21:36 2024/9/9
|
||||||
|
**/
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ResponseObject page(@RequestParam(value = "page", defaultValue = "1") Integer page,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
@Param("actPriceReq") ActiveApplet activeApplet) {
|
||||||
|
Page<ActiveApplet> pageActive = new Page<>(page, pageSize);
|
||||||
|
return getSuccessResult(activeAppletService.pageActive(pageActive,activeApplet));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有数据
|
* 查询所有数据
|
||||||
*
|
*
|
||||||
@ -53,7 +75,6 @@ public class ActiveAppletController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过主键查询单条数据
|
* 通过主键查询单条数据
|
||||||
*
|
*
|
||||||
@ -79,7 +100,8 @@ public class ActiveAppletController extends BaseController {
|
|||||||
sysLog.setMoudle("营销中心");
|
sysLog.setMoudle("营销中心");
|
||||||
sysLog.setContent("新增油站活动");
|
sysLog.setContent("新增油站活动");
|
||||||
sysLogService.saveVo(sysLog);
|
sysLogService.saveVo(sysLog);
|
||||||
}catch (Exception ignored){}
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
return getSuccessResult(this.activeAppletService.save(activeApplet));
|
return getSuccessResult(this.activeAppletService.save(activeApplet));
|
||||||
}
|
}
|
||||||
@ -98,7 +120,8 @@ public class ActiveAppletController extends BaseController {
|
|||||||
sysLog.setMoudle("营销中心");
|
sysLog.setMoudle("营销中心");
|
||||||
sysLog.setContent("更新油站活动");
|
sysLog.setContent("更新油站活动");
|
||||||
sysLogService.saveVo(sysLog);
|
sysLogService.saveVo(sysLog);
|
||||||
}catch (Exception ignored){}
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
return getSuccessResult(this.activeAppletService.updateById(activeApplet));
|
return getSuccessResult(this.activeAppletService.updateById(activeApplet));
|
||||||
}
|
}
|
||||||
@ -117,7 +140,8 @@ public class ActiveAppletController extends BaseController {
|
|||||||
sysLog.setMoudle("营销中心");
|
sysLog.setMoudle("营销中心");
|
||||||
sysLog.setContent("删除油站活动");
|
sysLog.setContent("删除油站活动");
|
||||||
sysLogService.saveVo(sysLog);
|
sysLogService.saveVo(sysLog);
|
||||||
}catch (Exception ignored){}
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
return getSuccessResult(this.activeAppletService.removeByIds(idList));
|
return getSuccessResult(this.activeAppletService.removeByIds(idList));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,8 +3,10 @@ package com.fuint.business.marketingActivity.activeApplet.entity;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -51,10 +53,13 @@ public class ActiveApplet extends Model<ActiveApplet> {
|
|||||||
//创建者
|
//创建者
|
||||||
private String createBy;
|
private String createBy;
|
||||||
//创建时间
|
//创建时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
//更新者
|
//更新者
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
//更新时间
|
//更新时间
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String typeText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package com.fuint.business.marketingActivity.activeApplet.mapper;
|
package com.fuint.business.marketingActivity.activeApplet.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||||
|
import com.fuint.business.marketingActivity.activePrice.vo.ActivePriceReqVO;
|
||||||
|
import com.fuint.business.marketingActivity.activePrice.vo.ActivePriceRespVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -17,5 +21,16 @@ public interface ActiveAppletMapper extends BaseMapper<ActiveApplet> {
|
|||||||
List<ActiveApplet> selectApplet(@Param("activeApplet") ActiveApplet activeApplet);
|
List<ActiveApplet> selectApplet(@Param("activeApplet") ActiveApplet activeApplet);
|
||||||
|
|
||||||
List<ActiveApplet> appletActiveByType(@Param("activeApplet") ActiveApplet activeApplet);
|
List<ActiveApplet> appletActiveByType(@Param("activeApplet") ActiveApplet activeApplet);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询活动主表信息
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param entity 实体
|
||||||
|
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet>
|
||||||
|
* @author PQZ
|
||||||
|
* @date 21:39 2024/9/9
|
||||||
|
**/
|
||||||
|
IPage<ActiveApplet> pageActive(@Param("page") Page<ActiveApplet> page, @Param("entity") ActiveApplet entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,5 +26,23 @@
|
|||||||
and store_id = #{activeApplet.storeId} and isonline = '0'
|
and store_id = #{activeApplet.storeId} and isonline = '0'
|
||||||
ORDER BY create_time desc
|
ORDER BY create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="pageActive" resultType="com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
active_applet
|
||||||
|
<where>
|
||||||
|
<if test="entity.name != null and entity.name != ''">
|
||||||
|
AND name like concat('%', #{entity.name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.name != null and entity.name != ''">
|
||||||
|
AND type = #{entity.type}
|
||||||
|
</if>
|
||||||
|
<if test="entity.activeStatus != null and entity.activeStatus != ''">
|
||||||
|
AND active_status = #{entity.activeStatus}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package com.fuint.business.marketingActivity.activeApplet.service;
|
package com.fuint.business.marketingActivity.activeApplet.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||||
|
import com.fuint.business.marketingActivity.activePrice.vo.ActivePriceReqVO;
|
||||||
|
import com.fuint.business.marketingActivity.activePrice.vo.ActivePriceRespVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -14,8 +18,20 @@ import java.util.List;
|
|||||||
public interface ActiveAppletService extends IService<ActiveApplet> {
|
public interface ActiveAppletService extends IService<ActiveApplet> {
|
||||||
|
|
||||||
List<ActiveApplet> applet(ActiveApplet activeApplet);
|
List<ActiveApplet> applet(ActiveApplet activeApplet);
|
||||||
|
|
||||||
List<ActiveApplet> appletActiveByType(ActiveApplet activeApplet);
|
List<ActiveApplet> appletActiveByType(ActiveApplet activeApplet);
|
||||||
|
|
||||||
void updateIsonline(Integer storeId, String type, Integer activeId, String isonline);
|
void updateIsonline(Integer storeId, String type, Integer activeId, String isonline);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询活动信息
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param activeApplet ActiveApplet实体
|
||||||
|
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet>
|
||||||
|
* @author PQZ
|
||||||
|
* @date 21:37 2024/9/9
|
||||||
|
**/
|
||||||
|
IPage<ActiveApplet> pageActive(Page<ActiveApplet> page, ActiveApplet activeApplet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,13 @@ package com.fuint.business.marketingActivity.activeApplet.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
|
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
||||||
|
import com.fuint.utils.StringUtil;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -47,5 +50,46 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
|||||||
baseMapper.updateById(activeApplet);
|
baseMapper.updateById(activeApplet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询活动信息
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param activeApplet 实体
|
||||||
|
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet>
|
||||||
|
* @author PQZ
|
||||||
|
* @date 21:37 2024/9/9
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public IPage<ActiveApplet> pageActive(Page<ActiveApplet> page, ActiveApplet activeApplet) {
|
||||||
|
IPage<ActiveApplet> 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,13 +88,6 @@ public class ActivePriceServiceImpl extends ServiceImpl<ActivePriceMapper, Activ
|
|||||||
/*3、数据保存*/
|
/*3、数据保存*/
|
||||||
//保存营销活动
|
//保存营销活动
|
||||||
saveOrUpdate(activePrice);
|
saveOrUpdate(activePrice);
|
||||||
|
|
||||||
// 如果是增加的话查询活动id信息
|
|
||||||
if (isAdd) {
|
|
||||||
IPage<ActivePriceRespVO> activePriceRespVOIPage = this.pageActivePrice(new Page<>(), new ActivePriceReqVO());
|
|
||||||
activePrice = activePriceRespVOIPage.getRecords().get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//保存关联油品信息
|
//保存关联油品信息
|
||||||
activePriceOilService.saveOilList(activePrice.getId(), saveVO.getOilList());
|
activePriceOilService.saveOilList(activePrice.getId(), saveVO.getOilList());
|
||||||
/*4、日志操作*/
|
/*4、日志操作*/
|
||||||
|
|||||||
@ -4,7 +4,8 @@ env.profile=dev
|
|||||||
#env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/
|
#env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/
|
||||||
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
|
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
|
||||||
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
|
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
|
||||||
env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure/
|
#env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure
|
||||||
|
env.properties.path=D:/Code/yuzhan/oil-station/fuintBackend/configure
|
||||||
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/
|
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/
|
||||||
|
|
||||||
# \u6570\u636E\u5E93\u914D\u7F6E
|
# \u6570\u636E\u5E93\u914D\u7F6E
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user