-
+
+
+
+
+
+

+

+ {{ item }}
+
+
+
+
至
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 赠送优惠券
- 赠送兑换券
-
-
-
-
-
-
-
-
-
-
-
- 满减券
- 折扣券
-
-
-
-
- {{scope.row.giftCardDetail}}
-
-
-
-
-
-
- {{ scope.row.validityZero }}天
- {{ scope.row.validityOne }}天
- {{ scope.row.validityTwo }}天
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
+
+
+ 编辑
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 赠送积分
+
+
+ 赠送成长值
+
+
+
赠送优惠券
+

+
+
+
+
+
-
-
-
-
-
- 商品券
- 洗车券
-
-
-
-
- {{scope.row.giftCardDetail}}
-
-
-
-
-
-
- {{ scope.row.giftCardTime }}天
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
+
+
+
赠送
+
+
+
+
+
+
+ 张
+
+

+
+
-
-
-
-
-
+
+ 重置
+ 保存
-
-
-
-
-
-
-
-
-
-
-
- 保存
-
-
-
-
-
-
-
- 新增
-
-
-
-
-
-
-
-
-
- {{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}
-
-
-
-
-
-
-
-
- 进行中
- 待生效
- 下线
-
-
-
-
- {{scope.row.points || 0}}
-
-
-
-
- {{scope.row.growthValue || 0}}
-
-
-
-
- {{scope.row.updateTime || '暂无更新'}}
-
-
-
-
-
- 修改
- 详情
- 上线
- 下线
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
-
-
-
-
-
- 满减券
- 折扣券
-
-
-
-
- {{scope.row.cardDetail}}
-
-
-
-
- {{scope.row.validityZero}}天
- {{scope.row.validityOne}}天
- {{scope.row.validityTwo}}天
-
-
-
-
-
- 选择
-
-
-
-
-
-
-
-
-
- 搜索
-
-
-
-
-
-
- 洗车券
- 商品券
-
-
-
-
- {{scope.row.cardDetail}}
-
-
-
-
- {{scope.row.useInstructions}}
-
-
-
-
- {{scope.row.validity}}天
-
-
-
-
-
- 选择
-
-
-
-
-
-
-
-
-
优惠券数量统计
-
总数量: {{statisticsyou.count ||0}}
-
已使用数量: {{statisticsyou.countEd ||0}}
-
未使用数量: {{statisticsyou.countLd ||0}}
-
-
-
兑换券数量统计
-
总数量: {{statisticsyou.counts ||0}}
-
已使用数量: {{statisticsyou.countEds ||0}}
-
未使用数量: {{statisticsyou.countLds ||0}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -535,7 +646,7 @@ import {
addActiveNewlyweds,
updateActiveNewlyweds,
huiActiveNewlyweds,
- editActiveNewlyweds
+ editActiveNewlyweds, getInfoActiveNewlyweds
} from "@/api/EventMarketing/activeNewlyweds";
import {getoilName, listExchange, listFavorable, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption";
import QRCode from "qrcodejs2";
@@ -550,34 +661,34 @@ export default {
name: "ActiveNewlyweds",
data() {
return {
- opendetails:false,
- looklist:[],
- statisticsyou:{},
- labelPosition:'left',
- loadingdialog:false,
- centerDialogVisible:false,
- pdidlist:[],//判断优惠券id
- pddhidlist:[],//判断兑换券id
+ opendetails: false,
+ looklist: [],
+ statisticsyou: {},
+ labelPosition: 'left',
+ loadingdialog: false,
+ centerDialogVisible: false,
+ pdidlist: [],//判断优惠券id
+ pddhidlist: [],//判断兑换券id
tableData: [],//优惠券
- tableDatadh:[],//兑换券
- dialogTableVisible:false,//优惠券
- dialogTableVisibledh:false,//兑换券
- tableDatas:[],
+ tableDatadh: [],//兑换券
+ dialogTableVisible: false,//优惠券
+ dialogTableVisibledh: false,//兑换券
+ tableDatas: [],
//请求优惠券列表时的参数
- youhuiquan:{
- name:'',
+ youhuiquan: {
+ name: '',
pageNum: 1,
pageSize: 10,
},
- ytotal:0,
+ ytotal: 0,
//请求兑换券列表时的参数
- duihuanquan:{
- name:'',
+ duihuanquan: {
+ name: '',
pageNum: 1,
pageSize: 10,
- total:0
+ total: 0
},
- dtotal:0,
+ dtotal: 0,
// 遮罩层
loading: true,
// 选中数组
@@ -616,49 +727,119 @@ export default {
activeFullminusList: [],
// 表单参数
form: {
- id:"",
- tableDatas:[],
- courtesyReward:[],
- activeNewlywedsChildList:[],
+ id: "",
+ tableDatas: [],
+ courtesyReward: [],
+ activeNewlywedsChildList: [],
},
+
+ ruleForm: {
+ name: '',
+ region: '',
+ date1: '',
+ date2: '',
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: ''
+ },
+ ifWrite: true,
+ tindex1: 0,
+ activityTimeTypeList: [
+ "永久有效", "自定义"
+ ],
+ couponList: [],
// 表单校验
rules: {
name: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
activeStartTime: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
activeEndTime: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
courtesyReward: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
points: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
growthValue: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
remark: [
- { required: true, message: '必填项不能为空', trigger: 'blur' },
+ {required: true, message: '必填项不能为空', trigger: 'blur'},
],
}
};
},
created() {
- this.getList()
+ // this.getList()
+ this.getInfo()
},
methods: {
+ getInfo(){
+ getInfoActiveNewlyweds().then(res => {
+ if (res.data) {
+ this.ruleForm = res.data
+ if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
+ if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
+ if (res.data.couponList) this.couponList = res.data.couponList
+ }else {
+ this.ruleForm = {
+ courtesyReward:[]
+ }
+ }
+ })
+ },
+ addCoupons() {
+ let data = {
+ activeGift: 0,
+ vouchersId: "",
+ giftCardTotal: "",
+ }
+ this.couponList.push(data)
+ },
+ deleteCoupons(index) {
+ this.couponList.splice(index, 1);
+ },
+ Typeindex1(index) {
+ this.tindex1 = index
+ this.ruleForm.activeTimeType = index
+ },
+ submitRuleForm(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
+ if (this.couponList) this.ruleForm.couponList = this.couponList
+ if (this.ruleForm.id) {
+ updateActiveNewlyweds(this.form).then(response => {
+ this.$modal.msgSuccess("修改成功");
+ this.getInfo()
+ });
+ }else {
+ addActiveNewlyweds(this.form).then(response => {
+ this.$modal.msgSuccess("新增成功");
+ this.getInfo()
+ });
+ }
+ }
+ });
+ },
+ resetForm(formName) {
+ this.$refs[formName].resetFields();
+ this.getInfo()
+ },
/** 查询新人有礼活动列表 */
getList() {
this.loading = true;
- listActiveNewlyweds(this.queryParams).then(res=>{
+ listActiveNewlyweds(this.queryParams).then(res => {
this.activeFullminusList = res.data.records
this.ztotal = res.data.total;
- console.log('wwwwwc',res)
+ console.log('wwwwwc', res)
this.loading = false;
})
// this.loading = true;
@@ -668,21 +849,21 @@ export default {
// this.loading = false;
// });
},
- getoilName(){
- getoilName().then(res=>{
+ getoilName() {
+ getoilName().then(res => {
console.log(res)
this.oillist = res.data
})
},
- addDatas(){
+ addDatas() {
this.open = true
this.form = {
- id:"",
- tableDatas:[],
- courtesyReward:[],
- activeNewlywedsChildList:[],
+ id: "",
+ tableDatas: [],
+ courtesyReward: [],
+ activeNewlywedsChildList: [],
}
this.form.tableDatas = []
this.tableDatas = []
@@ -723,8 +904,8 @@ export default {
activeStartTime: null,
activeEndTime: null,
courtesyReward: [],
- tableDatas:[],
- activeNewlywedsChildList:[],
+ tableDatas: [],
+ activeNewlywedsChildList: [],
activeCode: null,
isonline: null,
status: null,
@@ -745,24 +926,24 @@ export default {
},
// 请求兑换券
- getlistExchange(){
+ getlistExchange() {
this.tableDatadh = []
- listExchange(this.duihuanquan).then(res=>{
- if(res.code==200){
+ listExchange(this.duihuanquan).then(res => {
+ if (res.code == 200) {
this.dialogTableVisibledh = true
- this.tableDatadh = res.data.records
+ this.tableDatadh = res.data.records
this.dtotal = res.data.total
}
})
},
// 请求优惠券
- getlistFavorable(){
+ getlistFavorable() {
this.tableData = []
- listFavorable(this.youhuiquan).then(res=>{
- if(res.code == 200){
+ listFavorable(this.youhuiquan).then(res => {
+ if (res.code == 200) {
this.dialogTableVisible = true
- this.tableData = res.data.records
+ this.tableData = res.data.records
this.ytotal = res.data.total
}
@@ -770,28 +951,28 @@ export default {
},
// 兑换券券列表选择
- Favorabledata(row){
+ Favorabledata(row) {
this.dialogTableVisibledh = false
- if(this.pddhidlist.indexOf(row.id)>-1 ){
+ if (this.pddhidlist.indexOf(row.id) > -1) {
this.$message.error("该兑换卡券已存在")
return
}
this.pddhidlist.push(row.id)
console.log(row)
- let data ={
+ let data = {
activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
goodsIds: "", //商品id
- goodsName:"" , //商品名称
+ goodsName: "", //商品名称
goodsTotal: "", //商品数量
- vouchersId:row.id, //券id
- giftCardName:row.name, //赠送卡券名称
+ vouchersId: row.id, //券id
+ giftCardName: row.name, //赠送卡券名称
giftCardType: row.type, //券类型
validityZero: null,
validityOne: null,
- validityTwo:null,
- validity:row.validity,
- giftCardDetail: row.cardDetail , //券详情
+ validityTwo: null,
+ validity: row.validity,
+ giftCardDetail: row.cardDetail, //券详情
giftCardTime: row.validity, //券有效期
giftCardTotal: 1, //券数量
instruction: row.useInstructions, //使用说明
@@ -801,28 +982,28 @@ export default {
this.$message.success("新增成功")
},
// 优惠券列表选择
- chosedata(row){
+ chosedata(row) {
this.dialogTableVisible = false
- if(this.pdidlist.indexOf(row.id)>-1 ){
+ if (this.pdidlist.indexOf(row.id) > -1) {
this.$message.error("该优惠卡券已存在")
return
}
this.pdidlist.push(row.id)
- let data ={
+ let data = {
activeGift: 1, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
goodsIds: "", //商品id
- goodsName:"" , //商品名称
+ goodsName: "", //商品名称
goodsTotal: "", //商品数量
- vouchersId:row.id, //券id
- giftCardName:row.name, //赠送卡券名称
+ vouchersId: row.id, //券id
+ giftCardName: row.name, //赠送卡券名称
giftCardType: row.discountType, //券类型
timeType: row.timeType,
validityZero: row.validityZero,
validityOne: row.validityOne,
- validityTwo:row.validityTwo,
- giftCardDetail: row.cardDetail , //券详情
+ validityTwo: row.validityTwo,
+ giftCardDetail: row.cardDetail, //券详情
giftCardTime: "", //券有效期
giftCardTotal: 1,//券数量
instruction: row.instruction,//使用说明
@@ -834,61 +1015,62 @@ export default {
},
// 优惠券删除
- deletedata(row){
- if(this.form.tableDatas&&this.form.tableDatas.length>0){
- let delIdx=-1;
- for ( let item of this.form.tableDatas) {
+ deletedata(row) {
+ if (this.form.tableDatas && this.form.tableDatas.length > 0) {
+ let delIdx = -1;
+ for (let item of this.form.tableDatas) {
delIdx++;
- if (item.id===row.id){
+ if (item.id === row.id) {
break
}
}
- this.pdidlist.splice(delIdx,1);
- this.form.tableDatas.splice(delIdx,1);
+ this.pdidlist.splice(delIdx, 1);
+ this.form.tableDatas.splice(delIdx, 1);
}
},
// 兑换券删除
- deletedhdata(row){
- if(this.tableDatas&&this.tableDatas.length>0){
- let delIdx=-1;
- for ( let item of this.tableDatas) {
+ deletedhdata(row) {
+ if (this.tableDatas && this.tableDatas.length > 0) {
+ let delIdx = -1;
+ for (let item of this.tableDatas) {
delIdx++;
- if (item.id===row.id){
+ if (item.id === row.id) {
break
}
}
- this.pddhidlist.splice(delIdx,1);
- this.tableDatas.splice(delIdx,1);
+ this.pddhidlist.splice(delIdx, 1);
+ this.tableDatas.splice(delIdx, 1);
}
},
- lookDetail(row){
+ lookDetail(row) {
this.opendetails = true
let data = {
- id:row.id,
- exchangeFrom:"新人有礼"
+ id: row.id,
+ exchangeFrom: "新人有礼"
}
- looklook(data).then(res=>{
+ looklook(data).then(res => {
this.looklist = res.data
- console.log('详情',res)
+ console.log('详情', res)
})
- looklooklook(row.id).then(resp=>{
+ looklooklook(row.id).then(resp => {
this.statisticsyou = resp.data
- console.log('优惠券详情统计',resp)
+ console.log('优惠券详情统计', resp)
})
},
- Deleteshan(row){
+ Deleteshan(row) {
const ids = row.id || this.ids;
- this.$modal.confirm('是否确认删除此条新人有礼活动的信息?').then(function() {
+ this.$modal.confirm('是否确认删除此条新人有礼活动的信息?').then(function () {
return delActiveNewlyweds(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
- }).catch(() => {});
+ }).catch(() => {
+ });
},
/** 搜索按钮操作 */
@@ -904,7 +1086,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
@@ -914,11 +1096,11 @@ export default {
this.title = "添加新人有礼活动";
},
/** 修改按钮操作 */
- handleUpdate(row){
+ handleUpdate(row) {
this.reset()
getActiveNewlyweds(row.id).then(response => {
this.form = response.data;
- if(response.data.activeNewlywedsChildList){
+ if (response.data.activeNewlywedsChildList) {
this.form.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '1')
this.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '2')
}
@@ -926,7 +1108,7 @@ export default {
this.title = "编辑";
});
},
- handleDeletexia(row,isonline){
+ handleDeletexia(row, isonline) {
// getActiveNewlyweds(row.id).then(response => {
//
// let data = response.data
@@ -938,13 +1120,14 @@ export default {
// });
//
// });
- this.$modal.confirm('确定上线此条新人有礼活动信息?').then(function() {
- return editActiveNewlyweds({id:row.id,isonline:isonline});
+ this.$modal.confirm('确定上线此条新人有礼活动信息?').then(function () {
+ return editActiveNewlyweds({id: row.id, isonline: isonline});
}).then(() => {
this.$modal.msgSuccess("上线成功");
this.open = false;
this.getList();
- }).catch(() => {});
+ }).catch(() => {
+ });
},
submitForm() {
// this.form.activeNewlywedsChildList
@@ -959,7 +1142,7 @@ export default {
this.open = false;
this.getList();
});
- }else {
+ } else {
addActiveNewlyweds(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
@@ -996,12 +1179,13 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
- this.$modal.confirm('是否确认删除此条新人有礼活动信息?').then(function() {
+ this.$modal.confirm('是否确认删除此条新人有礼活动信息?').then(function () {
return delActiveNewlyweds(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
- }).catch(() => {});
+ }).catch(() => {
+ });
},
/** 导出按钮操作 */
handleExport() {
@@ -1013,18 +1197,49 @@ export default {
};
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/会员营销@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/会员营销@2x.png
new file mode 100644
index 000000000..5a6f9c89c
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/会员营销@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/充值@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/充值@2x.png
new file mode 100644
index 000000000..5392ad751
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/充值@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/券@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/券@2x.png
new file mode 100644
index 000000000..cf7e4ab22
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/券@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/折扣@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/折扣@2x.png
new file mode 100644
index 000000000..0aecb8af7
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/折扣@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/消费券@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/消费券@2x.png
new file mode 100644
index 000000000..c1f1c229c
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/消费券@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/消费卡@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/消费卡@2x.png
new file mode 100644
index 000000000..ef4aa5d78
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/消费卡@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/特价申请单@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/特价申请单@2x.png
new file mode 100644
index 000000000..743ca63ba
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/特价申请单@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/理财@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/理财@2x.png
new file mode 100644
index 000000000..05b5dc73b
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/理财@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/生日专区@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/生日专区@2x.png
new file mode 100644
index 000000000..01575f4aa
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/生日专区@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/礼物@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/礼物@2x.png
new file mode 100644
index 000000000..a0b2f53a9
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/礼物@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/营销@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/营销@2x.png
new file mode 100644
index 000000000..34b006f5e
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/营销@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/imgs/邀请@2x.png b/fuintAdmin/src/views/EventMarketing/center/imgs/邀请@2x.png
new file mode 100644
index 000000000..b86d74ff1
Binary files /dev/null and b/fuintAdmin/src/views/EventMarketing/center/imgs/邀请@2x.png differ
diff --git a/fuintAdmin/src/views/EventMarketing/center/index.vue b/fuintAdmin/src/views/EventMarketing/center/index.vue
index a85bd715a..cfc5675eb 100644
--- a/fuintAdmin/src/views/EventMarketing/center/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/center/index.vue
@@ -1,77 +1,262 @@
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
消费有礼
-
Consumption is polite
-
-
-
-
-

-
-
折扣营销
-
Discount marketing
-
-
-
-
-

-
-
满减营销
-
Consumption is polite
-
-
-
-
-

-
-
新人有礼
-
Full reduction marketing
-
-
-
-
-

-
-
推荐有礼
-
Newcomers are polite
-
-
-
-
-

-
-
一键发券
-
One click coupon issuance
-
-
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+

+
+
充值有礼
+
充值后赠送金额、积分、经验、 优惠券等
+
+
+
+
+
+
+

+
+
消费有礼
+
支付后赠送积分、成长值、优惠券
+
+
+
+
+
+
+

+
+
+
+
+
+
+

+
+
+
+
+
+
+
+

+
+
推荐会员充值有礼
+
会员充值后,推荐人获得积分、 成长值、优
+
+
+
+
+
+
+

+
+
推荐会员消费有礼
+
会员消费后,推荐人获得积分、 成长值、优
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+

+
+
分时优惠
+
不同会员不同时间,指定油品享受 限时优惠
+
+
+
+
+
+
+

+
+
限时特价
+
充值后赠送金额、积分、成长值、 优惠券、
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+

+
+
折扣营销
+
会员折扣营销,限时订单折扣, 引爆店铺流
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -94,7 +279,13 @@ export default {
name: 'Exchange',
data() {
return{
- value:1
+ value:1,
+ tabindex:0,
+ tablist:[
+ "营销活动",
+ "当前活动列表",
+ "历史活动列表"
+ ]
}
},
created() {
@@ -131,13 +322,20 @@ export default {
}
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
new file mode 100644
index 000000000..6b7ccef1b
--- /dev/null
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+
+
+
+
diff --git a/fuintAdmin/src/views/power/message.vue b/fuintAdmin/src/views/power/message.vue
index bd9011e62..96d161c05 100644
--- a/fuintAdmin/src/views/power/message.vue
+++ b/fuintAdmin/src/views/power/message.vue
@@ -2,12 +2,13 @@
-
{{ item.name }}
+
+ {{ item.name }}
-
+
-
-
-
+
+
+ {{scope.row.messageId}}
+
+
+
+
+ {{scope.row.name}}
+
+
+
+
+ {{scope.row.content}}
+
+
-
+
+
+ {{scope.row.roleIds}}
+
+
@@ -78,8 +95,16 @@
-
-
+
+
+ {{scope.row.createName}}
+
+
+
+
+ {{scope.row.createTime}}
+
+
-
+
@@ -143,12 +168,28 @@
-
+
-
-
-
-
+
+
+ {{scope.row.name}}
+
+
+
+
+ {{scope.row.content}}
+
+
+
+
+ {{scope.row.name}}
+
+
+
+
+ {{scope.row.successNum || 0}}/{{scope.row.sendNum || 0}}
+
+
@@ -160,8 +201,16 @@
-
-
+
+
+ {{scope.row.createName}}
+
+
+
+
+ {{scope.row.createTime}}
+
+
-
+
@@ -213,15 +262,51 @@
-
-
-
-
-
-
-
-
-
+
+
+ {{scope.row.storeId}}
+
+
+
+
+ {{scope.row.contacts}}
+
+
+
+
+ {{scope.row.mobile}}
+
+
+
+
+ {{scope.row.balance}}
+
+
+
+
+ {{scope.row.messageNum}}
+
+
+
+
+ {{scope.row.residueNum}}
+
+
+
+
+ {{scope.row.rechargeRecord}}
+
+
+
+
+ {{scope.row.name}}
+
+
+
+
+ {{scope.row.createTime}}
+
+
提交
+ 取 消
-
+
-
-
+
+
-
-
+
+
-
-
-
-
- 提交
+
+
+
-
+
-
+
-
+
-
-
-
- 提交
+
+
@@ -356,6 +444,8 @@ import {deleteApi, getListApi, saveApi, updateApi} from "../../api/sys/message";
import {getToken} from '../../utils/auth'
import {selectChildByDeptId} from "../../api/system/Site/site";
import NotifyMode from "./page/mode.vue";
+import {getCostListApi, saveCostApi, updateCostApi} from "@/api/sys/messageCost";
+import {getStaffByDeptId} from "@/api/staff/staff";
export default {
name: "printIndex",
@@ -363,8 +453,8 @@ export default {
dicts: ['dept_ids', 'message_status'],
data() {
return {
- activeindex: 0,
- tablist: [
+ tabindex: 0,
+ tabs: [
{
name: '短信模板',
},
@@ -404,7 +494,7 @@ export default {
page: 1,
pageSize: 10,
},
- messageRecordList:[],
+ messageRecordList: [],
total2: 0,
// 查询参数
@@ -412,11 +502,11 @@ export default {
page: 1,
pageSize: 10,
},
- messageCostList:[],
- open2:false,
- form2:{},
- open3:false,
- form3:{},
+ messageCostList: [],
+ open2: false,
+ form2: {},
+ open3: false,
+ form3: {},
// 上传地址
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
@@ -444,6 +534,15 @@ export default {
],
content: [
{required: true, message: "短信介绍不能为空", trigger: "blur"}
+ ],
+ deptId: [
+ {required: true, message: "机构名称不能为空", trigger: "blur"}
+ ],
+ contacts: [
+ {required: true, message: "联系人不能为空", trigger: "blur"}
+ ],
+ mobile: [
+ {required: true, message: "联系方式不能为空", trigger: "blur"}
]
}
};
@@ -453,12 +552,79 @@ export default {
this.selectChildByDeptIdApi()
},
methods: {
- handleAdd2(){
+ getStaff(deptId){
+ getStaffByDeptId(deptId).then(res => {
+ this.form2.contacts = res.data.realName
+ this.form2.mobile = res.data.mobile
+ this.$forceUpdate()
+ })
+ },
+ // 提交按钮
+ submitForm2: function () {
+ this.$refs["form2"].validate(valid => {
+ if (valid) {
+ if (!this.form2.id) {
+ saveCostApi(this.form2).then(res => {
+ if (res.data==1){
+ this.$message.success("添加成功")
+ this.open2 = false
+ this.queryParams2.page = 1;
+ this.getMessageCostList()
+ }else {
+ this.$message.error("添加失败,机构名称不可重复!")
+ }
+ })
+ } else {
+ updateCostApi(this.form).then(res => {
+ if (res.data==1) {
+ this.$message.success("修改成功")
+ this.open = false
+ this.queryParams.page = 1;
+ this.getList()
+ }else {
+ this.$message.error("添加失败,机构名称不可重复!")
+ }
+ })
+ }
+ }
+ });
+ },
+ // 提交按钮
+ submitForm3: function () {
+ this.$refs["form3"].validate(valid => {
+ if (valid) {
+ if (!this.form3.id) {
+ // saveLinkManageApi(this.form).then(res => {
+ // if (res.data==1){
+ // this.$message.success("添加成功")
+ // this.open = false
+ // this.queryParams.page = 1;
+ // this.getList()
+ // }else {
+ // this.$message.error("添加失败,页面/功能名称不可重复")
+ // }
+ // })
+ } else {
+ // updateLinkManageApi(this.form).then(res => {
+ // if (res.data==1) {
+ // this.$message.success("修改成功")
+ // this.open = false
+ // this.queryParams.page = 1;
+ // this.getList()
+ // }else {
+ // this.$message.error("添加失败,页面/功能名称不可重复")
+ // }
+ // })
+ }
+ }
+ });
+ },
+ handleAdd2() {
this.open2 = true
},
- getMessageCostList(){
- getListApi(this.queryParams2).then(res => {
- this.messageCostList = res.data
+ getMessageCostList() {
+ getCostListApi(this.queryParams2).then(res => {
+ this.messageCostList = res.data.records
this.total2 = res.data.total
})
},
@@ -636,24 +802,32 @@ export default {
.tab-box {
width: 100%;
+ height: 40px;
background: #fff;
display: flex;
box-sizing: border-box;
- padding: 0px 50px;
+ margin-bottom: 25px;
+
}
-.f-box {
- height: 40px;
- color: #999999;
- margin-right: 50px;
+.tab_ {
+ width: 85px;
+ height: 100%;
+ //border-bottom: 2px solid #FF770F;
display: flex;
+ font-weight: 500;
+ font-size: 14px;
+ color: #999999;
align-items: center;
-
+ justify-content: center;
+ margin-left: 50px;
+ cursor: pointer;
}
.active {
- color: #FF9655 !important;
- border-bottom: 2px solid #FF9655 !important;
+ border-bottom: 2px solid #FF770F !important;
+ color: #FF770F !important;
}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java
index 8edf9843f..4b60ef6fe 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java
@@ -110,6 +110,25 @@ public class ActiveConsumptionController extends BaseController {
return getSuccessResult(this.activeConsumptionService.add(activeConsumptionDTO));
}
+ /**
+ * 新增数据
+ *
+ * @param activeConsumption 实体对象
+ * @return 新增结果
+ */
+ @PostMapping("add")
+ public ResponseObject add(@RequestBody ActiveConsumption activeConsumption) {
+ try {
+ SysLog sysLog =new SysLog();
+ sysLog.setSystemName("2");
+ sysLog.setMoudle("营销中心");
+ sysLog.setContent("新增名称为"+activeConsumption.getName()+"消费有礼活动");
+ sysLogService.saveVo(sysLog);
+ }catch (Exception ignored){}
+
+ return getSuccessResult(this.activeConsumptionService.insertActiveConsumption(activeConsumption));
+ }
+
/**
* 修改数据
*
@@ -219,5 +238,15 @@ public class ActiveConsumptionController extends BaseController {
return getSuccessResult(this.activeConsumptionChildService.detailCount(id));
}
+ /**
+ * 统计
+ *
+ * @return 单条数据
+ */
+ @GetMapping("/getInfo")
+ public ResponseObject selectByStoreId() {
+ return getSuccessResult(this.activeConsumptionService.selectByStoreId());
+ }
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumption.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumption.java
index c39afdc2e..e56f749e5 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumption.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumption.java
@@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
+import java.util.List;
/**
* 消费有礼活动(ActiveConsumption)表实体类
@@ -36,10 +37,10 @@ public class ActiveConsumption extends Model {
//满足金额
private Double participationConditionMoney;
//活动开始时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeStartTime;
//活动结束时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeEndTime;
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
private String adaptOil;
@@ -72,15 +73,76 @@ public class ActiveConsumption extends Model {
//创建者
private String createBy;
//创建时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
//描述信息
@TableField(exist = false)
private String exchangeFrom;
- }
+ /**
+ *活动时间类型:0永久有效;1自定义
+ */
+ private String activityTimeType;
+ /**
+ *活动时间前
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date activityTimeFront;
+ /**
+ *活动时间后
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date activityTimeAfter;
+ /**
+ *适用时间段类型:0每周、1每月
+ */
+ private String suitTimeSlotType;
+ /**
+ *适用时间段:周/月
+ */
+ private String suitDate;
+ /**
+ *适用时间段前
+ */
+ @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
+ private Date suitTimeSlotFront;
+ /**
+ *适用时间段后
+ */
+ @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
+ private Date suitTimeSlotAfter;
+ /**
+ *会员标签id
+ */
+ private String userLabelIds;
+ /**
+ *每人每天参与上限
+ */
+ private String everyDayCeiling;
+ /**
+ *每人每月参与上限
+ */
+ private Integer monthlyCeiling;
+ /**
+ *每人累计参与上限
+ */
+ private Integer accumulateCeiling;
+ /**
+ *通知内容
+ */
+ private String noticeContent;
+ /**
+ *活动详情
+ */
+ private String activityDetails;
+ /**
+ * 活动奖品子表信息
+ */
+ @TableField(exist = false)
+ private List activityPrize;
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumptionChild.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumptionChild.java
index a3da2c07c..369f0370f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumptionChild.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/entity/ActiveConsumptionChild.java
@@ -86,4 +86,20 @@ public class ActiveConsumptionChild {
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;
+ /**
+ *订单类型:0订单金额、1实收金额、3加油升数
+ */
+ private String orderType;
+ /**
+ *消费金额
+ */
+ private String consumeAmount;
+ /**
+ *赠送积分
+ */
+ private String givePoints;
+ /**
+ *赠送成长值
+ */
+ private String giveGrowthValue;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionService.java
index 4d35a1e1c..d2c049180 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionService.java
@@ -63,5 +63,13 @@ public interface ActiveConsumptionService extends IService {
* @return
*/
List selectAllApplet(ActiveConsumption activeConsumption);
+
+ /**
+ * 根据storeId查询消费有礼信息
+ * @return
+ */
+ ActiveConsumption selectByStoreId();
+
+ int insertActiveConsumption(ActiveConsumption activeConsumption);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
index 427f4ab1c..38b921c4c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
@@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.activeConsumption.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -109,6 +110,9 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl();
+ queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
+ ActiveConsumption activeConsumption = baseMapper.selectOne(queryWrapper);
+ List activeConsumptionChildren = activeConsumptionChildService.selectList(activeConsumption.getId());
+ activeConsumption.setActivityPrize(activeConsumptionChildren);
+ return activeConsumption;
+ }
+
+ @Override
+ public int insertActiveConsumption(ActiveConsumption activeConsumption) {
+ ActiveConsumption activeConsumption1 = selectByStoreId();
+ if (ObjectUtil.isNotEmpty(activeConsumption1)){
+ return 0;
+ }
+ int row = baseMapper.insert(activeConsumption);
+ activeConsumption1 = selectByStoreId();
+ if (ObjectUtil.isNotEmpty(activeConsumption.getActivityPrize())){
+ for (ActiveConsumptionChild activeConsumptionChild : activeConsumption.getActivityPrize()) {
+ activeConsumptionChild.setActiveConsumptionId(activeConsumption1.getId());
+ activeConsumptionChildService.save(activeConsumptionChild);
+ }
+ }
+ return row;
+ }
+
/**
* 数组转字符串
* @param array
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsController.java
index 1b6462744..de2ac2323 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsController.java
@@ -194,5 +194,10 @@ public class ActiveNewlywedsController extends BaseController {
}catch (Exception ignored){}
return getSuccessResult(activeNewlywedsChildService.removeByIds(idList));
}
+
+ @GetMapping("getInfo")
+ public ResponseObject selectByStoreId(){
+ return getSuccessResult(activeNewlywedsService.selectByStoreId());
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlyweds.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlyweds.java
index 036fe30a2..b1aafcb19 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlyweds.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlyweds.java
@@ -3,11 +3,15 @@ package com.fuint.business.marketingActivity.activeNewlyweds.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.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
import java.io.Serializable;
+import java.util.List;
/**
* 新人有礼活动(ActiveNewlyweds)表实体类
@@ -16,6 +20,8 @@ import java.io.Serializable;
* @since 2023-11-13 13:15:58
*/
@SuppressWarnings("serial")
+@Data
+@TableName("active_newlyweds")
public class ActiveNewlyweds extends Model {
//主键id
@TableId(type = IdType.AUTO)
@@ -26,11 +32,13 @@ public class ActiveNewlyweds extends Model {
private Integer storeId;
//活动名称
private String name;
+ //活动时间类型:0永久有效;1自定义
+ private String activeTimeType;
//活动开始时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeStartTime;
//活动结束时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeEndTime;
//有礼奖励 0:优惠券 1:兑换券 2:成长值 3:积分
private String courtesyReward;
@@ -51,13 +59,23 @@ public class ActiveNewlyweds extends Model {
//创建者
private String createBy;
//创建时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
+ //通知内容
+ private String noticeContent;
+ //活动详情
+ private String activityDetails;
+
+ /**
+ * 优惠券列表信息
+ */
+ @TableField(exist = false)
+ private List couponList;
public String getActiveCode() {
return activeCode;
@@ -212,5 +230,5 @@ public class ActiveNewlyweds extends Model {
protected Serializable pkVal() {
return this.id;
}
- }
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsChild.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsChild.java
index 43495c3a5..f71b29383 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsChild.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsChild.java
@@ -4,6 +4,7 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@@ -18,6 +19,7 @@ import java.io.Serializable;
*/
@SuppressWarnings("serial")
@Data
+@TableName("active_newlyweds_child")
public class ActiveNewlywedsChild extends Model {
//主键id
@TableId(type = IdType.AUTO)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsChildService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsChildService.java
index 6ce345953..ac5111770 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsChildService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsChildService.java
@@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.activeNewlyweds.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
+import java.util.List;
+
/**
* 新人有礼活动子表(ActiveNewlywedsChild)表服务接口
*
@@ -10,6 +12,11 @@ import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywe
* @since 2023-11-13 13:17:14
*/
public interface ActiveNewlywedsChildService extends IService {
-
+ /**
+ * 根据新人有礼id查询子表列表信息
+ * @param activeNewlywedsId
+ * @return
+ */
+ List selectByActiveId(Integer activeNewlywedsId);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsService.java
index ab91bc2e0..a5094e2c2 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsService.java
@@ -64,5 +64,11 @@ public interface ActiveNewlywedsService extends IService {
* @return
*/
List selectApplet(ActiveConsumption activeConsumption);
+
+ /**
+ * 根据店铺id查询新人有礼信息
+ * @return
+ */
+ ActiveNewlyweds selectByStoreId();
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsChildServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsChildServiceImpl.java
index deac2b1cd..cb9f16c72 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsChildServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsChildServiceImpl.java
@@ -1,12 +1,15 @@
package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsChildMapper;
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsChildService;
import org.springframework.stereotype.Service;
+import java.util.List;
+
/**
* 新人有礼活动子表(ActiveNewlywedsChild)表服务实现类
*
@@ -16,5 +19,11 @@ import org.springframework.stereotype.Service;
@Service("activeNewlywedsChildService")
public class ActiveNewlywedsChildServiceImpl extends ServiceImpl implements ActiveNewlywedsChildService {
+ @Override
+ public List selectByActiveId(Integer activeNewlywedsId) {
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("active_newlyweds_id",activeNewlywedsId);
+ return baseMapper.selectList(queryWrapper);
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java
index d8004d83e..d54c128a0 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java
@@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -81,6 +82,10 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl();
+ queryWrapper.eq("store_id",TokenUtil.getNowAccountInfo().getStoreId());
+ ActiveNewlyweds activeNewlyweds = baseMapper.selectOne(queryWrapper);
+ if (ObjectUtil.isNotEmpty(activeNewlyweds)) {
+ List activeNewlywedsChildren = activeNewlywedsChildService.selectByActiveId(activeNewlyweds.getId());
+ activeNewlyweds.setCouponList(activeNewlywedsChildren);
+ }
+ return activeNewlyweds;
+ }
+
/**
* 数组转字符串
* @param array
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/controller/OpenCardGiftController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/controller/OpenCardGiftController.java
new file mode 100644
index 000000000..dee6456e2
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/controller/OpenCardGiftController.java
@@ -0,0 +1,73 @@
+package com.fuint.business.marketingActivity.openCardGift.controller;
+
+import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
+import com.fuint.business.marketingActivity.openCardGift.service.OpenCardGiftService;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.ResponseObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 开卡有礼Controller层
+ */
+@RestController
+@RequestMapping("openCardGift")
+public class OpenCardGiftController extends BaseController {
+ @Autowired
+ private OpenCardGiftService openCardGiftService;
+
+ /**
+ * 通过店铺id查询单条数据
+ *
+ * @return 单条数据
+ */
+ @GetMapping
+ public ResponseObject getInfo() {
+ return getSuccessResult(openCardGiftService.queryByStoreId());
+ }
+
+ /**
+ * 通过主键查询单条数据
+ *
+ * @param id 主键
+ * @return 单条数据
+ */
+ @GetMapping("{id}")
+ public ResponseObject queryById(@PathVariable("id") Integer id) {
+ return getSuccessResult(openCardGiftService.queryById(id));
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param openCardGift 实体
+ * @return 新增结果
+ */
+ @PostMapping
+ public ResponseObject add(@RequestBody OpenCardGift openCardGift) {
+ return getSuccessResult(openCardGiftService.insert(openCardGift));
+ }
+
+ /**
+ * 编辑数据
+ *
+ * @param openCardGift 实体
+ * @return 编辑结果
+ */
+ @PutMapping
+ public ResponseObject edit(@RequestBody OpenCardGift openCardGift) {
+ return getSuccessResult(openCardGiftService.update(openCardGift));
+ }
+
+ /**
+ * 删除数据
+ *
+ * @param id 主键
+ * @return 删除是否成功
+ */
+ @DeleteMapping("{id}")
+ public ResponseObject deleteById(@PathVariable Integer id) {
+ return getSuccessResult(openCardGiftService.deleteById(id));
+ }
+
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/entity/OpenCardGift.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/entity/OpenCardGift.java
new file mode 100644
index 000000000..109f1459a
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/entity/OpenCardGift.java
@@ -0,0 +1,98 @@
+package com.fuint.business.marketingActivity.openCardGift.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fuint.framework.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 营销中心-开卡有礼(OpenCardGift)实体类
+ *
+ * @author makejava
+ * @since 2024-08-27 15:41:16
+ */
+@Data
+@TableName("open_card_gift")
+@ApiModel(value = "OpenCardGift对象", description = "营销中心-开卡有礼")
+public class OpenCardGift extends BaseEntity implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * 主键
+ */
+ @ApiModelProperty("ID")
+ @TableId(value = "ID", type = IdType.AUTO)
+ private Integer id;
+ /**
+ * 连锁店id
+ */
+ private Integer chainStoreId;
+ /**
+ * 油站id
+ */
+ private Integer storeId;
+ /**
+ * 活动名称
+ */
+ private String name;
+ /**
+ * 活动时间类型:0永久有效;1自定义
+ */
+ private String activityTimeType;
+ /**
+ * 活动时间前
+ */
+ private Date activityTimeFront;
+ /**
+ * 活动时间后
+ */
+ private Date activityTimeAfter;
+ /**
+ * 通知内容
+ */
+ private String noticeContent;
+ /**
+ * 活动详情
+ */
+ private String activityDetails;
+ /**
+ * 活动奖品(多选):赠送积分、赠送成长值、赠送优惠券
+ */
+ private String activityPrize;
+ /**
+ * 赠送积分数量
+ */
+ private Integer givePoints;
+ /**
+ * 赠送成长值
+ */
+ private Integer giveGrowthValue;
+ /**
+ * 赠送优惠信息
+ */
+ private String giveCoupon;
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+ /**
+ * 创建人
+ */
+ private String createBy;
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+ /**
+ * 更新人
+ */
+ private String updateBy;
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/mapper/OpenCardGiftMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/mapper/OpenCardGiftMapper.java
new file mode 100644
index 000000000..6d457c9e2
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/mapper/OpenCardGiftMapper.java
@@ -0,0 +1,7 @@
+package com.fuint.business.marketingActivity.openCardGift.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
+
+public interface OpenCardGiftMapper extends BaseMapper {
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/service/OpenCardGiftService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/service/OpenCardGiftService.java
new file mode 100644
index 000000000..24a627ddb
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/service/OpenCardGiftService.java
@@ -0,0 +1,50 @@
+package com.fuint.business.marketingActivity.openCardGift.service;
+
+import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
+
+/**
+ * 营销中心-开卡有礼(OpenCardGift)表服务接口
+ *
+ * @author makejava
+ * @since 2024-08-27 15:41:20
+ */
+public interface OpenCardGiftService {
+ /**
+ * 根据店铺id查询开卡有礼配置信息
+ * @return
+ */
+ OpenCardGift queryByStoreId();
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ OpenCardGift queryById(Integer id);
+
+ /**
+ * 新增数据
+ *
+ * @param openCardGift 实例对象
+ * @return 实例对象
+ */
+ int insert(OpenCardGift openCardGift);
+
+ /**
+ * 修改数据
+ *
+ * @param openCardGift 实例对象
+ * @return 实例对象
+ */
+ int update(OpenCardGift openCardGift);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ int deleteById(Integer id);
+
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/service/impl/OpenCardGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/service/impl/OpenCardGiftServiceImpl.java
new file mode 100644
index 000000000..3b379071f
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift/service/impl/OpenCardGiftServiceImpl.java
@@ -0,0 +1,74 @@
+package com.fuint.business.marketingActivity.openCardGift.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
+import com.fuint.business.marketingActivity.openCardGift.mapper.OpenCardGiftMapper;
+import com.fuint.business.marketingActivity.openCardGift.service.OpenCardGiftService;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import org.springframework.stereotype.Service;
+
+/**
+ * 营销中心-开卡有礼(OpenCardGift)表服务实现类
+ *
+ * @author makejava
+ * @since 2024-08-27 15:41:23
+ */
+@Service("openCardGiftService")
+public class OpenCardGiftServiceImpl extends ServiceImpl implements OpenCardGiftService {
+
+ @Override
+ public OpenCardGift queryByStoreId() {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
+ return baseMapper.selectOne(queryWrapper);
+ }
+
+ /**
+ * 通过ID查询单条数据
+ * @param id 主键
+ * @return 实例对象
+ */
+ @Override
+ public OpenCardGift queryById(Integer id) {
+ return baseMapper.selectById(id);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param openCardGift 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public int insert(OpenCardGift openCardGift) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ openCardGift.setChainStoreId(nowAccountInfo.getChainStoreId());
+ openCardGift.setStoreId(nowAccountInfo.getStoreId());
+ return baseMapper.insert(openCardGift);
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param openCardGift 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public int update(OpenCardGift openCardGift) {
+ return baseMapper.updateById(openCardGift);
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ @Override
+ public int deleteById(Integer id) {
+ return baseMapper.deleteById(id);
+ }
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LJStaffController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LJStaffController.java
index 969ff8f44..eb125c568 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LJStaffController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LJStaffController.java
@@ -198,4 +198,14 @@ public class LJStaffController extends BaseController {
public ResponseObject queryStaffList(@PathVariable Integer storeId){
return getSuccessResult(mtStaffService.queryStaffs(storeId));
}
+
+ /**
+ * 根据机构id查询员工信息
+ * @param deptId
+ * @return
+ */
+ @GetMapping("/getStaffByDeptId/{deptId}")
+ public ResponseObject selectStaffByDeptId(@PathVariable Long deptId){
+ return getSuccessResult(mtStaffService.selectStaffByDeptId(deptId));
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java
index 82ff0b1ae..faa076216 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java
@@ -107,4 +107,11 @@ public interface ILJStaffService extends IService {
* @return
*/
LJStaff selectStaffByStoreId(int storeId);
+
+ /**
+ * 根据机构id查询员工信息
+ * @param deptId
+ * @return
+ */
+ LJStaff selectStaffByDeptId(Long deptId);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java
index 6d3841916..a26a00539 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java
@@ -62,6 +62,7 @@ public class LJStaffServiceImpl extends ServiceImpl impl
/**
* 根据条件分页查询员工信息
+ *
* @param page
* @param staff
* @return
@@ -76,14 +77,14 @@ public class LJStaffServiceImpl extends ServiceImpl impl
staff.setStoreId(storeId);
IPage ljStaffIPage = baseMapper.selectLJStaffList(page, staff);
List records = ljStaffIPage.getRecords();
- if (CollectionUtils.isNotEmpty(records)){
+ if (CollectionUtils.isNotEmpty(records)) {
for (LJStaff record : records) {
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(TagCodeRecord::getStaffId,record.getId());
+ queryWrapper.eq(TagCodeRecord::getStaffId, record.getId());
List list = tagCodeRecordService.list(queryWrapper);
- if (ObjectUtils.isNotEmpty(list)){
+ if (ObjectUtils.isNotEmpty(list)) {
record.setTagStatus("1");
- }else {
+ } else {
record.setTagStatus("0");
}
}
@@ -93,6 +94,7 @@ public class LJStaffServiceImpl extends ServiceImpl impl
/**
* 查询所有员工信息
+ *
* @return
*/
@Override
@@ -100,25 +102,25 @@ public class LJStaffServiceImpl extends ServiceImpl impl
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("store_id",storeId);
- queryWrapper.eq("status","qy");
- queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("store_id", storeId);
+ queryWrapper.eq("status", "qy");
+ queryWrapper.eq("if_delete", "0");
List list = baseMapper.selectList(queryWrapper);
return list;
}
@Override
public List queryStaffLists(Integer storeId) {
- if (storeId==null){
+ if (storeId == null) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
storeId = nowAccountInfo.getStoreId();
}
QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("store_id",storeId);
- queryWrapper.eq("status","qy");
+ queryWrapper.eq("store_id", storeId);
+ queryWrapper.eq("status", "qy");
/*queryWrapper.eq("role_id","15");*/
- queryWrapper.eq("if_delete","0");
- queryWrapper.eq("is_refuel","xs");
+ queryWrapper.eq("if_delete", "0");
+ queryWrapper.eq("is_refuel", "xs");
List list = baseMapper.selectList(queryWrapper);
return list;
}
@@ -126,17 +128,18 @@ public class LJStaffServiceImpl extends ServiceImpl impl
@Override
public List queryStaffLists1(Integer storeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("store_id",storeId);
- queryWrapper.eq("status","qy");
- queryWrapper.eq("role_id","15");
- queryWrapper.eq("if_delete","0");
- queryWrapper.eq("is_refuel","xs");
+ queryWrapper.eq("store_id", storeId);
+ queryWrapper.eq("status", "qy");
+ queryWrapper.eq("role_id", "15");
+ queryWrapper.eq("if_delete", "0");
+ queryWrapper.eq("is_refuel", "xs");
List list = baseMapper.selectList(queryWrapper);
return list;
}
/**
* 根据id查询员工信息
+ *
* @param id
* @return
*/
@@ -151,19 +154,20 @@ public class LJStaffServiceImpl extends ServiceImpl impl
/**
* 根据手机号查询员工信息
+ *
* @param mobile
* @return
*/
@Override
- public LJStaff selectStaffByMobile(String mobile,Integer storeId) {
- if (ObjectUtil.isEmpty(storeId)){
+ public LJStaff selectStaffByMobile(String mobile, Integer storeId) {
+ if (ObjectUtil.isEmpty(storeId)) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
storeId = nowAccountInfo.getStoreId();
}
QueryWrapper queryWrapper = new QueryWrapper();
- queryWrapper.eq("mobile",mobile);
- queryWrapper.eq("store_id",storeId);
- queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("mobile", mobile);
+ queryWrapper.eq("store_id", storeId);
+ queryWrapper.eq("if_delete", "0");
LJStaff staff = baseMapper.selectOne(queryWrapper);
return staff;
}
@@ -172,26 +176,28 @@ public class LJStaffServiceImpl extends ServiceImpl impl
@Override
public LJStaff selectStaffByMobile2(String mobile) {
QueryWrapper queryWrapper = new QueryWrapper();
- queryWrapper.eq("mobile",mobile);
- queryWrapper.eq("status","qy");
- queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("mobile", mobile);
+ queryWrapper.eq("status", "qy");
+ queryWrapper.eq("if_delete", "0");
LJStaff staff = baseMapper.selectOne(queryWrapper);
return staff;
}
/**
* 根据id批量删除员工信息
+ *
* @param ids
*/
@Override
public void deleteStaffByIds(Integer[] ids) {
- for (int id : ids){
+ for (int id : ids) {
this.deleteStaffById(id);
}
}
/**
* 根据id删除员工信息
+ *
* @param id
*/
@Override
@@ -203,6 +209,7 @@ public class LJStaffServiceImpl extends ServiceImpl impl
/**
* 添加用户信息
+ *
* @param staff
* @return
*/
@@ -213,17 +220,17 @@ public class LJStaffServiceImpl extends ServiceImpl impl
if (ObjectUtil.isNotEmpty(staff.getStoreId())) {
storeId = staff.getStoreId();
}
- LJStaff staff2 = this.selectStaffByMobile(staff.getMobile(),storeId);
+ LJStaff staff2 = this.selectStaffByMobile(staff.getMobile(), storeId);
if (ObjectUtil.isNotEmpty(staff2)) return 0;
staff.setStoreId(storeId);
- if (StringUtils.isNotEmpty(staff.getRefundPassword())){
+ if (StringUtils.isNotEmpty(staff.getRefundPassword())) {
this.entryptPassword(staff);
}
int row = baseMapper.insert(staff);
- LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),storeId);
- if (ObjectUtil.isNotEmpty(staff1)){
+ LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(), storeId);
+ if (ObjectUtil.isNotEmpty(staff1)) {
// 添加员工码
- staff1.setStaffCode("https://oilapi.youkerr.com/oilRefuel?storeId="+storeId+"&staffId="+staff1.getId());
+ staff1.setStaffCode("https://oilapi.youkerr.com/oilRefuel?storeId=" + storeId + "&staffId=" + staff1.getId());
this.updateStaff(staff1);
}
@@ -232,11 +239,11 @@ public class LJStaffServiceImpl extends ServiceImpl impl
TAccount account = new TAccount();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String timestamp = dateFormat.format(new Date());
- String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
- account.setAccountKey(timestamp+randomString);
- if (ObjectUtil.isNotEmpty(staff.getAccountName())){
+ String randomString = UUID.randomUUID().toString().replace("-", "").substring(0, 6);
+ account.setAccountKey(timestamp + randomString);
+ if (ObjectUtil.isNotEmpty(staff.getAccountName())) {
account.setAccountName(staff.getAccountName());
- }else {
+ } else {
account.setAccountName(staff.getMobile());
}
account.setAccountStatus(1);
@@ -249,27 +256,27 @@ public class LJStaffServiceImpl extends ServiceImpl impl
LJStore store = storeService.selectStoreByStoreId(storeId);
account.setDeptId(store.getContractDeptId());
- if (StringUtils.isNotEmpty(staff.getRefundPassword())){
+ if (StringUtils.isNotEmpty(staff.getRefundPassword())) {
account.setPassword(staff.getPassword());
- }else {
+ } else {
account.setPassword("123456");
}
- if (StringUtils.isNotEmpty(staff.getPassword())){
+ if (StringUtils.isNotEmpty(staff.getPassword())) {
account.setPassword(staff.getPassword());
- }else {
+ } else {
account.setPassword("123456");
}
TDuty tDuty = new TDuty();
tDuty.setDutyId(Integer.valueOf(staff1.getRoleId()));
- accountService.createAccountInfo(account,tDutyService.getDutyList(tDuty));
+ accountService.createAccountInfo(account, tDutyService.getDutyList(tDuty));
return row;
}
@Override
- public int addStaff(LJStaff staff,TAccount tAccount) {
+ public int addStaff(LJStaff staff, TAccount tAccount) {
int row = baseMapper.insert(staff);
- LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),null);
- if (ObjectUtil.isNotEmpty(staff1)){
+ LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(), null);
+ if (ObjectUtil.isNotEmpty(staff1)) {
tAccount.setStaffId(staff1.getId());
accountService.updateAccount(tAccount);
}
@@ -278,23 +285,24 @@ public class LJStaffServiceImpl extends ServiceImpl impl
/**
* 修改用户信息
+ *
* @param staff
* @return
*/
@Override
public int updateStaff(LJStaff staff) {
int row = 0;
- LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),staff.getStoreId());
- if (ObjectUtil.isNotEmpty(staff1) && !staff1.getId().equals(staff.getId())){
+ LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(), staff.getStoreId());
+ if (ObjectUtil.isNotEmpty(staff1) && !staff1.getId().equals(staff.getId())) {
row = 0;
return row;
}
- if (StringUtils.isEmpty(staff.getStaffCode())){
+ if (StringUtils.isEmpty(staff.getStaffCode())) {
// 添加员工码
- staff.setStaffCode("https://oilapi.youkerr.com/oilRefuel?storeId="+staff.getStoreId()+"&staffId="+staff.getId());
+ staff.setStaffCode("https://oilapi.youkerr.com/oilRefuel?storeId=" + staff.getStoreId() + "&staffId=" + staff.getId());
}
row = baseMapper.updateById(staff);
- if (StringUtils.isNotEmpty(staff.getPassword())){
+ if (StringUtils.isNotEmpty(staff.getPassword())) {
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
if (ObjectUtil.isNotEmpty(tAccount)) {
if (StringUtils.isNotEmpty(staff.getPassword())) {
@@ -311,7 +319,7 @@ public class LJStaffServiceImpl extends ServiceImpl impl
e.printStackTrace();
}
}
- }else {
+ } else {
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
if (ObjectUtil.isNotEmpty(tAccount)) {
if (tAccount.getAccountName().matches("\\d+")) {
@@ -350,19 +358,19 @@ public class LJStaffServiceImpl extends ServiceImpl impl
// }
String url = staff.getStaffCode();
String area = store.getName();
- String finalPath="/temp/qrCode/" + area + ".jpg";
+ String finalPath = "/temp/qrCode/" + area + ".jpg";
InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage);
InputStream logoStream = this.getClass().getClassLoader().getResourceAsStream(logoImage);
//背景图片路径 loge图片 二维码 输出地址
- qrCodeUtils.createLogoCodePicture(backgroundStream, logoStream, url, finalPath, staff.getId(),store.getId(),null);
+ qrCodeUtils.createLogoCodePicture(backgroundStream, logoStream, url, finalPath, staff.getId(), store.getId(), null);
File file1 = new File("/temp/qrCode/");
// 判断目录是否存在
if (!file1.exists()) {
file1.mkdir();
}
- File file =new File(finalPath);
- FileInputStream fileInputStream =new FileInputStream(file);
+ File file = new File(finalPath);
+ FileInputStream fileInputStream = new FileInputStream(file);
MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream);
// 返回图片路径
String saveFile = backendFileController.saveFile(resFile);
@@ -379,16 +387,16 @@ public class LJStaffServiceImpl extends ServiceImpl impl
@Override
public int auditPrem(String auditPrem) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
- int row = baseMapper.auditPrem(nowAccountInfo.getStaffId(),auditPrem);
+ int row = baseMapper.auditPrem(nowAccountInfo.getStaffId(), auditPrem);
return row;
}
@Override
public List queryStaffs(int storeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("store_id",storeId);
- queryWrapper.eq("status","qy");
- queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("store_id", storeId);
+ queryWrapper.eq("status", "qy");
+ queryWrapper.eq("if_delete", "0");
List list = baseMapper.selectList(queryWrapper);
return list;
}
@@ -397,18 +405,27 @@ public class LJStaffServiceImpl extends ServiceImpl impl
public LJStaff selectStaffByStoreId(int storeId) {
-
QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("store_id",storeId);
- queryWrapper.eq("status","qy");
- queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("store_id", storeId);
+ queryWrapper.eq("status", "qy");
+ queryWrapper.eq("if_delete", "0");
//queryWrapper.eq("role_id","12");
queryWrapper.orderByAsc("create_time");
List list = baseMapper.selectList(queryWrapper);
LJStaff staff = null;
- if (list.size()>0){
+ if (list.size() > 0) {
staff = list.get(0);
}
return staff;
}
+
+ @Override
+ public LJStaff selectStaffByDeptId(Long deptId) {
+ LJStaff ljStaff = null;
+ LJStore ljStore = storeService.selectStoreByDeptId(deptId);
+ if (ObjectUtil.isNotEmpty(ljStore)) {
+ ljStaff = this.selectStaffByStoreId(ljStore.getId());
+ }
+ return ljStaff;
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/entity/MessageCost.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/entity/MessageCost.java
index 1aab6917a..17e57f114 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/entity/MessageCost.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/entity/MessageCost.java
@@ -37,6 +37,10 @@ public class MessageCost extends BaseEntity implements Serializable {
* 油站id
*/
private Integer storeId;
+ /**
+ * 机构id
+ */
+ private Integer deptId;
/**
* 联系人
*/
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/MessageCostService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/MessageCostService.java
index 5eaba28c6..f0236133a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/MessageCostService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/MessageCostService.java
@@ -27,6 +27,8 @@ public interface MessageCostService {
*/
MessageCost queryById(Integer id);
+ MessageCost selectByDeptId(Integer deptId);
+
/**
* 新增数据
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/impl/MessageCostServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/impl/MessageCostServiceImpl.java
index 05978bc35..e9c5dfd26 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/impl/MessageCostServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/setting/service/impl/MessageCostServiceImpl.java
@@ -1,13 +1,19 @@
package com.fuint.business.setting.service.impl;
+import cn.hutool.core.util.ObjectUtil;
+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.fuint.business.setting.entity.MessageCost;
import com.fuint.business.setting.mapper.MessageCostMapper;
import com.fuint.business.setting.service.MessageCostService;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
+import java.util.Objects;
+
/**
* 短信费用信息表(MessageCost)表服务实现类
@@ -34,6 +40,13 @@ public class MessageCostServiceImpl extends ServiceImpl();
+ queryWrapper.eq("dept_id",deptId);
+ return baseMapper.selectOne(queryWrapper);
+ }
+
/**
* 新增数据
*
@@ -42,6 +55,13 @@ public class MessageCostServiceImpl extends ServiceImpl