Merge remote-tracking branch 'origin/main'

This commit is contained in:
zhuchunyun 2024-08-29 10:15:21 +08:00
commit 44f5dd35ef
51 changed files with 3665 additions and 1617 deletions

19
.idea/compiler.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="fuint-application" />
<module name="fuint-utils" />
<module name="fuint-repository" />
<module name="fuint-framework" />
<module name="fuint-payment" />
<module name="fuint-quartz" />
</profile>
</annotationProcessing>
</component>
</project>

12
.idea/dataSources.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="oil" uuid="4255010b-d3cd-4300-989c-d9a8910e1e0e">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://47.94.122.58:3306</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EasyCodeTableSetting">
<option name="tableInfoMap">
<map>
<entry key="oilsystem.open_card_gift">
<value>
<TableInfoDTO>
<option name="comment" value="营销中心-开卡有礼" />
<option name="fullColumn">
<list>
<ColumnInfoDTO>
<option name="comment" value="主键" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="id" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="连锁店id" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="chainStoreId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="油站id" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="storeId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动名称" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="name" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动时间类型0永久有效1自定义" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activityTimeType" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动时间前" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activityTimeFront" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动时间后" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activityTimeAfter" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="通知内容" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="noticeContent" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动详情" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activityDetails" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动奖品(多选):赠送积分、赠送成长值、赠送优惠券" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activityPrize" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="赠送积分数量" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="givePoints" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="赠送成长值" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="giveGrowthValue" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="赠送优惠信息" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="giveCoupon" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="创建时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="createTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="创建人" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="createBy" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="更新时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="updateTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="更新人" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="updateBy" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
</list>
</option>
<option name="name" value="OpenCardGift" />
<option name="preName" value="" />
<option name="saveModelName" value="fuint-application" />
<option name="savePackageName" value="com.fuint.business.marketingActivity.openCardGift" />
<option name="savePath" value="./fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift" />
<option name="templateGroupName" value="Default" />
</TableInfoDTO>
</value>
</entry>
</map>
</option>
</component>
</project>

19
.idea/encodings.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-application/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-application/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-framework/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-framework/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-payment/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-payment/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-quartz/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-quartz/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-repository/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-repository/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-utils/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/fuint-utils/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/fuintBackend/src/main/resources" charset="UTF-8" />
</component>
</project>

20
.idea/jarRepositories.xml Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

View File

@ -1,6 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/fuintBackend/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -106,3 +106,19 @@ export function looklooklook(id) {
})
}
export function getInfoActivity() {
return request({
url: 'business/marketingActivity/activeConsumption/getInfo',
method: 'get',
})
}
export function addActivity(data) {
return request({
url: 'business/marketingActivity/activeConsumption/add',
method: 'post',
data:data
})
}

View File

@ -68,3 +68,11 @@ export function delActiveNewlyweds(id) {
method: 'delete'
})
}
// 删除新人有礼活动
export function getInfoActiveNewlyweds() {
return request({
url: '/business/marketingActivity/activeNewlyweds/getInfo',
method: 'get'
})
}

View File

@ -0,0 +1,43 @@
import request from '@/utils/request'
// 查询开卡有礼信息
export function getOpenCardInfo() {
return request({
url: 'openCardGift',
method: 'get',
})
}
// 根据id查询开卡有礼信息
export function getOpenCardById(id) {
return request({
url: 'openCardGift/'+id,
method: 'get',
})
}
// 添加开卡有礼信息
export function addOpenCardBy(data) {
return request({
url: 'openCardGift',
method: 'post',
data:data
})
}
// 添加开卡有礼信息
export function editOpenCardBy(data) {
return request({
url: 'openCardGift',
method: 'put',
data:data
})
}
// 根据id删除开卡有礼信息
export function deleteOpenCard(id) {
return request({
url: 'openCardGift/'+id,
method: 'delete',
})
}

View File

@ -134,3 +134,12 @@ export function delOilTag(id) {
method: 'delete'
})
}
// 删除员工
export function getStaffByDeptId(deptId) {
return request({
url: '/business/member/staff/getStaffByDeptId/' + deptId,
method: 'get'
})
}

View File

@ -2,7 +2,7 @@ import request from '@/utils/request'
// 分页查询所有的订单信息
export function getListApi(query) {
export function getCostListApi(query) {
return request({
url: 'MessageCost',
method: 'get',
@ -18,14 +18,14 @@ export function getInfoApi(id) {
})
}
//
export function deleteApi(id) {
export function deleteCostApi(id) {
return request({
url: 'MessageCost/' + id,
method: 'delete'
})
}
//
export function saveApi(data) {
export function saveCostApi(data) {
return request({
url: 'MessageCost',
method: 'post',
@ -34,7 +34,7 @@ export function saveApi(data) {
}
// 保存修改信息
export function updateApi(data) {
export function updateCostApi(data) {
return request({
url: 'MessageCost',
method: 'put',

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,77 +1,262 @@
<template>
<!-- 活动中心-->
<div class="app-container">
<!-- <el-card style="margin-bottom: 20px">-->
<!-- <el-radio-group v-model="value">-->
<!-- <el-radio-button label="1">消费有礼</el-radio-button>-->
<!-- <el-radio-button label="2">折扣营销</el-radio-button>-->
<!-- <el-radio-button label="3">满减营销</el-radio-button>-->
<!-- <el-radio-button label="4">新人有礼</el-radio-button>-->
<!-- <el-radio-button label="5">推荐有礼</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </el-card>-->
<div class="fji" >
<div class="wrap-box" @click="gobox(1)" >
<img src="./imgs/xfyl.png" style="width: 315px;height: 265px;margin: 0 auto " >
<div class="p-r-title">
<div style="font-size: 24px;font-weight: bold" >消费有礼</div>
<div style="font-size: 12px">Consumption is polite</div>
</div>
<div class="bottom-box">
<div>消费有礼</div>
</div>
</div>
<div class="wrap-box" @click="gobox(2)" >
<img src="./imgs/zkyx.png" style="width: 315px;height: 265px;margin: 0 auto " >
<div class="p-r-title">
<div style="font-size: 24px;font-weight: bold" >折扣营销</div>
<div style="font-size: 12px">Discount marketing</div>
</div>
<div class="bottom-box">
<div>折扣营销</div>
</div>
</div>
<div class="wrap-box" @click="gobox(3)" >
<img src="./imgs/mjyx.png" style="width: 315px;height: 265px;margin: 0 auto " >
<div class="p-r-title">
<div style="font-size: 24px;font-weight: bold" >满减营销</div>
<div style="font-size: 12px">Consumption is polite</div>
</div>
<div class="bottom-box">
<div>满减营销</div>
</div>
</div>
<div class="wrap-box" @click="gobox(4)" >
<img src="./imgs/xryl.png" style="width: 315px;height: 265px;margin: 0 auto " >
<div class="p-r-title">
<div style="font-size: 24px;font-weight: bold" >新人有礼</div>
<div style="font-size: 12px">Full reduction marketing</div>
</div>
<div class="bottom-box">
<div>新人有礼</div>
</div>
</div>
<div class="wrap-box" @click="gobox(5)" >
<img src="./imgs/tjyl.png" style="width: 315px;height: 265px;margin: 0 auto " >
<div class="p-r-title">
<div style="font-size: 24px;font-weight: bold" >推荐有礼</div>
<div style="font-size: 12px">Newcomers are polite</div>
</div>
<div class="bottom-box">
<div>推荐有礼</div>
</div>
</div>
<div class="wrap-box" @click="gobox(6)" >
<img src="./imgs/yjfq.png" style="width: 315px;height: 265px;margin: 0 auto " >
<div class="p-r-title">
<div style="font-size: 24px;font-weight: bold" >一键发券</div>
<div style="font-size: 12px">One click coupon issuance</div>
</div>
<div class="bottom-box">
<div>一键发券</div>
</div>
<div class="app-containers">
<div class="tap-box">
<div class="t-box" :class="{'actve' : tabindex == index }" v-for="(item,index) in tablist" :key="index" @click="tabindex = index" >
{{item}}
</div>
</div>
<div class="rp-box">
<div class="bai-box">
<div class="d-s">
<div class="gang"></div>
<div style="font-weight: bold">会员营销</div>
</div>
<div class="wp-box">
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/礼物@2x.png">
<div>
<div class="size_title">开卡有礼</div>
<div class="size_text">激活会员卡享受优惠</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt" @click="gobox(4)">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/理财@2x.png">
<div>
<div class="size_title">充值有礼</div>
<div class="size_text">充值后赠送金额积分经验 优惠券等</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/消费券@2x.png">
<div>
<div class="size_title">消费有礼</div>
<div class="size_text">支付后赠送积分成长值优惠券</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt" @click="gobox(1)">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/邀请@2x.png">
<div>
<div class="size_title">邀请有礼</div>
<div class="size_text">邀请好友注册会员获得奖励</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/生日专区@2x.png">
<div>
<div class="size_title">生日有礼</div>
<div class="size_text">会员生日关怀激活用户复购</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/充值@2x.png">
<div>
<div class="size_title">推荐会员充值有礼</div>
<div class="size_text">会员充值后推荐人获得积分 成长值</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/消费卡@2x.png" style="width: 59px;height: 42px">
<div>
<div class="size_title">推荐会员消费有礼</div>
<div class="size_text">会员消费后推荐人获得积分 成长值</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/营销@2x.png" >
<div>
<div class="size_title">弹窗营销</div>
<div class="size_text">支付前定向投放优惠</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
</div>
<div class="d-s" style="margin-top: 15px">
<div class="gang"></div>
<div style="font-weight: bold">价格营销</div>
</div>
<div class="wp-box">
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/券@2x.png">
<div>
<div class="size_title">分时优惠</div>
<div class="size_text">不同会员不同时间指定油品享受 限时优惠</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/特价申请单@2x.png">
<div>
<div class="size_title">限时特价</div>
<div class="size_text">充值后赠送金额积分成长值 优惠券</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/会员营销@2x.png">
<div>
<div class="size_title">立减营销</div>
<div class="size_text">订单满立减营销活动</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
<div class="nr-box">
<div class="nr-top">
<img src="./imgs/折扣@2x.png">
<div>
<div class="size_title">折扣营销</div>
<div class="size_text">会员折扣营销限时订单折扣 引爆店铺流</div>
</div>
</div>
<div class="nr-bottom">
<div class="left-bt">进行中1个</div>
|
<div class="right-bt">创建活动</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="fji" >-->
<!-- <div class="wrap-box" @click="gobox(1)" >-->
<!-- <img src="./imgs/xfyl.png" style="width: 315px;height: 265px;margin: 0 auto " >-->
<!-- <div class="p-r-title">-->
<!-- <div style="font-size: 24px;font-weight: bold" >消费有礼</div>-->
<!-- <div style="font-size: 12px">Consumption is polite</div>-->
<!-- </div>-->
<!-- <div class="bottom-box">-->
<!-- <div>消费有礼</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="wrap-box" @click="gobox(2)" >-->
<!-- <img src="./imgs/zkyx.png" style="width: 315px;height: 265px;margin: 0 auto " >-->
<!-- <div class="p-r-title">-->
<!-- <div style="font-size: 24px;font-weight: bold" >折扣营销</div>-->
<!-- <div style="font-size: 12px">Discount marketing</div>-->
<!-- </div>-->
<!-- <div class="bottom-box">-->
<!-- <div>折扣营销</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="wrap-box" @click="gobox(3)" >-->
<!-- <img src="./imgs/mjyx.png" style="width: 315px;height: 265px;margin: 0 auto " >-->
<!-- <div class="p-r-title">-->
<!-- <div style="font-size: 24px;font-weight: bold" >满减营销</div>-->
<!-- <div style="font-size: 12px">Consumption is polite</div>-->
<!-- </div>-->
<!-- <div class="bottom-box">-->
<!-- <div>满减营销</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="wrap-box" @click="gobox(4)" >-->
<!-- <img src="./imgs/xryl.png" style="width: 315px;height: 265px;margin: 0 auto " >-->
<!-- <div class="p-r-title">-->
<!-- <div style="font-size: 24px;font-weight: bold" >新人有礼</div>-->
<!-- <div style="font-size: 12px">Full reduction marketing</div>-->
<!-- </div>-->
<!-- <div class="bottom-box">-->
<!-- <div>新人有礼</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="wrap-box" @click="gobox(5)" >-->
<!-- <img src="./imgs/tjyl.png" style="width: 315px;height: 265px;margin: 0 auto " >-->
<!-- <div class="p-r-title">-->
<!-- <div style="font-size: 24px;font-weight: bold" >推荐有礼</div>-->
<!-- <div style="font-size: 12px">Newcomers are polite</div>-->
<!-- </div>-->
<!-- <div class="bottom-box">-->
<!-- <div>推荐有礼</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="wrap-box" @click="gobox(6)" >-->
<!-- <img src="./imgs/yjfq.png" style="width: 315px;height: 265px;margin: 0 auto " >-->
<!-- <div class="p-r-title">-->
<!-- <div style="font-size: 24px;font-weight: bold" >一键发券</div>-->
<!-- <div style="font-size: 12px">One click coupon issuance</div>-->
<!-- </div>-->
<!-- <div class="bottom-box">-->
<!-- <div>一键发券</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
@ -94,7 +279,13 @@ export default {
name: 'Exchange',
data() {
return{
value:1
value:1,
tabindex:0,
tablist:[
"营销活动",
"当前活动列表",
"历史活动列表"
]
}
},
created() {
@ -131,13 +322,20 @@ export default {
}
</script>
<style scoped lang="scss">
.app-container{
.app-containers{
width: 100%;
height: 100vh;
background: #f9f9f9;
}
.qr-code{
margin: 0px auto;
}
.rp-box{
width: 100%;
box-sizing: border-box;
padding: 15px;
}
.wrap-box{
text-align: center;
width: 375px;
@ -172,4 +370,115 @@ export default {
font-weight: bold;
padding-bottom: 15px;
}
.rp-box{
display: flex;
flex-wrap: wrap;
}
.d-s{
display: flex;
align-items: center;
}
.tap-box{
width: 100%;
height: 50px;
background: #fff;
box-sizing: border-box;
display: flex;
align-items: center;
}
.t-box{
height: 100%;
font-size: 14px;
color: #999999;
border-bottom: 2px solid transparent;
margin: 0px 30px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
//border-bottom: 2px solid #FF770F;
}
.actve{
color: #FF770F !important;
font-weight: bold;
border-bottom: 2px solid #FF770F !important;
}
.bai-box{
width: 100%;
height: 100%;
background: #fff;
border-radius: 10px;
box-sizing: border-box;
padding: 15px;
}
.gang{
width: 2px;
height: 14px;
background: #FF9655;
margin-right: 5px;
}
.wp-box{
width: 100%;
display: flex;
flex-wrap: wrap;
}
.nr-box{
border-radius: 10px;
border: 1px solid #EEEEEE;
margin-top: 15px;
margin-right: 15px;
width: 310px;
}
.nr-top{
box-sizing: border-box;
padding: 15px;
display: flex;
align-items: center;
img{
width: 55px;
height: 55px ;
margin-right: 10px;
}
}
.size_title{
font-weight: bold;
font-size: 16px;
color: #333333;
margin-bottom: 10px;
}
.size_text{
font-size: 12px;
color: #333333;
}
.nr-bottom{
border-top: 1px solid #EEEEEE;
box-sizing: border-box;
padding: 4px ;
display: flex;
align-items: center;
color:#EEEEEE;
}
.left-bt{
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #666666;
width: 50%;
box-sizing: border-box;
padding: 5px;
}
.right-bt{
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #FF9655;
width: 50%;
box-sizing: border-box;
padding: 5px;
}
</style>

View File

@ -0,0 +1,127 @@
<template>
<div class="app-container">
<div class="cot-box">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="活动名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="活动时间" prop="region">
<el-select v-model="ruleForm.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="活动时间" required>
<el-col :span="11">
<el-form-item prop="date1">
<el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.date1" style="width: 100%;"></el-date-picker>
</el-form-item>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11">
<el-form-item prop="date2">
<el-time-picker placeholder="选择时间" v-model="ruleForm.date2" style="width: 100%;"></el-time-picker>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="通知内容" prop="delivery">
<el-switch v-model="ruleForm.delivery"></el-switch>
</el-form-item>
<el-form-item label="活动详情" prop="type">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
<el-checkbox label="地推活动" name="type"></el-checkbox>
<el-checkbox label="线下主题活动" name="type"></el-checkbox>
<el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="活动奖品" prop="resource">
<el-radio-group v-model="ruleForm.resource">
<el-radio label="线上品牌商赞助"></el-radio>
<el-radio label="线下场地免费"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button @click="resetForm('ruleForm')">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
export default {
data() {
return {
ruleForm: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
rules: {
name: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
],
region: [
{ required: true, message: '请选择活动区域', trigger: 'change' }
],
date1: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
],
date2: [
{ type: 'date', required: true, message: '请选择时间', trigger: 'change' }
],
type: [
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
],
resource: [
{ required: true, message: '请选择活动资源', trigger: 'change' }
],
desc: [
{ required: true, message: '请填写活动形式', trigger: 'blur' }
]
}
}
},
created() {
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
}
}
}
</script>
<style lang="scss" scoped>
.app-container {
width: 100%;
height: 100vh;
background: #f6f8f9;
}
.cot-box {
width: 100%;
border-radius: 8px;
background: #fff;
box-sizing: border-box;
padding: 20px;
margin: 0 auto;
}
</style>

View File

@ -2,12 +2,13 @@
<div class="app-container">
<div class="tab-box">
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="getindex(index)"
:class="{ 'active' :activeindex==index}">{{ item.name }}
<div class="tab_" :class="{active:index== tabindex }" @click="getindex(index)" v-for="(item,index) in tabs"
:key="index">
{{ item.name }}
</div>
</div>
<div class="card-change" style="margin: 20px" v-if="activeindex == 0">
<div class="card-change" style="margin: 20px" v-if="tabindex == 0">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
<el-form-item label="" prop="name">
<el-input
@ -57,16 +58,32 @@
<div style="height: 70vh;overflow: auto">
<el-table :data="tableData" border style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="messageId" label="短信模板ID"></el-table-column>
<el-table-column prop="name" label="短信名称"></el-table-column>
<el-table-column prop="content" label="短信模板内容"></el-table-column>
<el-table-column prop="messageId" label="短信模板ID">
<template slot-scope="scope">
<span>{{scope.row.messageId}}</span>
</template>
</el-table-column>
<el-table-column prop="name" label="短信名称">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="短信模板内容">
<template slot-scope="scope">
<span>{{scope.row.content}}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="image" label="短信图片">-->
<!-- <template slot-scope="scope">-->
<!-- <ImagePreview :src="scope.row.image"></ImagePreview>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="deptNames" label="适用范围"></el-table-column>-->
<el-table-column prop="roleIds" label="接收角色"></el-table-column>
<el-table-column prop="roleIds" label="接收角色">
<template slot-scope="scope">
<span>{{scope.row.roleIds}}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="短信状态">
<template slot-scope="scope">
@ -78,8 +95,16 @@
</div>
</template>
</el-table-column>
<el-table-column prop="createName" label="创建人"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="createName" label="创建人">
<template slot-scope="scope">
<span>{{scope.row.createName}}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<template slot-scope="scope">
<span>{{scope.row.createTime}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -111,7 +136,7 @@
/>
</div>
<div class="card-change" style="margin: 20px" v-if="activeindex == 1">
<div class="card-change" style="margin: 20px" v-if="tabindex == 1">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
<el-form-item label="" prop="status">
@ -143,12 +168,28 @@
</el-form>
<div style="height: 70vh;overflow: auto">
<el-table :data="tableData" border style="width: 100%">
<el-table :data="messageRecordList" border style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="name" label="短信名称"></el-table-column>
<el-table-column prop="content" label="短信内容"></el-table-column>
<el-table-column prop="roleIds" label="接收角色"></el-table-column>
<el-table-column prop="roleIds" label="短信发送记录"></el-table-column>
<el-table-column prop="name" label="短信名称">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="短信内容">
<template slot-scope="scope">
<span>{{scope.row.content}}</span>
</template>
</el-table-column>
<el-table-column prop="roleIds" label="接收角色">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column prop="successNum" label="短信发送记录">
<template slot-scope="scope">
<span>{{scope.row.successNum || 0}}/{{scope.row.sendNum || 0}}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="发送状态">
<template slot-scope="scope">
@ -160,8 +201,16 @@
</div>
</template>
</el-table-column>
<el-table-column prop="createName" label="发送人"></el-table-column>
<el-table-column prop="createTime" label="发送时间"></el-table-column>
<el-table-column prop="createName" label="发送人">
<template slot-scope="scope">
<span>{{scope.row.createName}}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="发送时间">
<template slot-scope="scope">
<span>{{scope.row.createTime}}</span>
</template>
</el-table-column>
</el-table>
</div>
<pagination
@ -173,7 +222,7 @@
/>
</div>
<div class="card-change" style="margin: 20px" v-if="activeindex == 2">
<div class="card-change" style="margin: 20px" v-if="tabindex == 2">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
<el-form-item label="" prop="status">
@ -213,15 +262,51 @@
<div style="height: 70vh;overflow: auto">
<el-table :data="messageCostList" border style="width: 100%">
<el-table-column type="index" align="center" label="序号"></el-table-column>
<el-table-column prop="storeId" align="center" label="机构名称"></el-table-column>
<el-table-column prop="contacts" align="center" label="联系人"></el-table-column>
<el-table-column prop="mobile" align="center" label="联系方式"></el-table-column>
<el-table-column prop="balance" align="center" label="短信余额"></el-table-column>
<el-table-column prop="messageNum" align="center" label="累计已发短信条数"></el-table-column>
<el-table-column prop="residueNum" align="center" label="剩余短信条数"></el-table-column>
<el-table-column prop="rechargeRecord" align="center" label="短信充值记录"></el-table-column>
<el-table-column prop="createName" align="center" label="操作人"></el-table-column>
<el-table-column prop="createTime" align="center" label="操作时间"></el-table-column>
<el-table-column prop="storeId" align="center" label="机构名称">
<template slot-scope="scope">
<span>{{scope.row.storeId}}</span>
</template>
</el-table-column>
<el-table-column prop="contacts" align="center" label="联系人">
<template slot-scope="scope">
<span>{{scope.row.contacts}}</span>
</template>
</el-table-column>
<el-table-column prop="mobile" align="center" label="联系方式">
<template slot-scope="scope">
<span>{{scope.row.mobile}}</span>
</template>
</el-table-column>
<el-table-column prop="balance" align="center" label="短信余额">
<template slot-scope="scope">
<span>{{scope.row.balance}}</span>
</template>
</el-table-column>
<el-table-column prop="messageNum" align="center" label="累计已发短信条数">
<template slot-scope="scope">
<span>{{scope.row.messageNum}}</span>
</template>
</el-table-column>
<el-table-column prop="residueNum" align="center" label="剩余短信条数">
<template slot-scope="scope">
<span>{{scope.row.residueNum}}</span>
</template>
</el-table-column>
<el-table-column prop="rechargeRecord" align="center" label="短信充值记录">
<template slot-scope="scope">
<span>{{scope.row.rechargeRecord}}</span>
</template>
</el-table-column>
<el-table-column prop="createName" align="center" label="操作人">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" align="center" label="操作时间">
<template slot-scope="scope">
<span>{{scope.row.createTime}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -288,16 +373,17 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">提交</el-button>
<el-button @click="open = false"> </el-button>
</el-form-item>
</el-form>
</el-dialog>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open2" width="35%" append-to-body>
<el-form ref="form" :rules="rules" :model="form2" label-width="120px">
<el-form ref="form2" :rules="rules" :model="form2" label-width="120px">
<el-form-item label="机构名称" prop="deptIdList">
<el-select v-model="form.deptIdList" multiple placeholder="请选择所属机构" style="width: 300px">
<el-form-item label="机构名称" prop="deptId">
<el-select v-model="form2.deptId" placeholder="请选择所属机构" @change="getStaff(form2.deptId)" style="width: 300px">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -306,23 +392,24 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="联系人" prop="content">
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
<el-form-item label="联系人" prop="contacts">
<el-input v-model="form2.contacts" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="content">
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">提交</el-button>
<el-form-item label="联系方式" prop="mobile">
<el-input v-model="form2.mobile" style="width: 300px"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm2"> </el-button>
<el-button @click="open3 = false"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open3" width="35%" append-to-body>
<el-form ref="form" :rules="rules" :model="form3" label-width="120px">
<el-form-item label="机构名称" prop="deptIdList">
<el-select v-model="form.deptIdList" multiple placeholder="请选择所属机构" style="width: 300px">
<el-select v-model="form3.deptIdList" multiple placeholder="请选择所属机构" style="width: 300px">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -332,17 +419,18 @@
</el-select>
</el-form-item>
<el-form-item label="充值金额" prop="content">
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
<el-input type="textarea" v-model="form3.content" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="短信单价" prop="content">
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
<el-input type="textarea" v-model="form3.content" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="短信条数" prop="content">
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">提交</el-button>
<el-input type="textarea" v-model="form3.content" style="width: 300px"></el-input>
</el-form-item>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm3"> </el-button>
<el-button @click="open3 = false"> </el-button>
</div>
</el-form>
</el-dialog>
@ -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;
}
</style>

View File

@ -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());
}
}

View File

@ -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<ActiveConsumption> {
//满足金额
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;
//适用油品092# 1: 95# 298# 30# 4-10# 5 LNG 6CNG 7京92# 8京95# 9京0#
private String adaptOil;
@ -72,15 +73,76 @@ public class ActiveConsumption extends Model<ActiveConsumption> {
//创建者
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<ActiveConsumptionChild> activityPrize;
}

View File

@ -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;
}

View File

@ -63,5 +63,13 @@ public interface ActiveConsumptionService extends IService<ActiveConsumption> {
* @return
*/
List<ActiveConsumptionAppletVO> selectAllApplet(ActiveConsumption activeConsumption);
/**
* 根据storeId查询消费有礼信息
* @return
*/
ActiveConsumption selectByStoreId();
int insertActiveConsumption(ActiveConsumption activeConsumption);
}

View File

@ -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<ActiveConsumptionM
@Override
@Transactional
public Boolean add(ActiveConsumptionDTO activeConsumptionDTO) {
ActiveConsumption activeConsumption1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeConsumption1)) return false;
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
@ -560,6 +564,34 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
return appletVOList;
}
@Override
public ActiveConsumption selectByStoreId() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
ActiveConsumption activeConsumption = baseMapper.selectOne(queryWrapper);
List<ActiveConsumptionChild> 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

View File

@ -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());
}
}

View File

@ -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<ActiveNewlyweds> {
//主键id
@TableId(type = IdType.AUTO)
@ -26,11 +32,13 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
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<ActiveNewlyweds> {
//创建者
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<ActiveNewlywedsChild> couponList;
public String getActiveCode() {
return activeCode;
@ -212,5 +230,5 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
protected Serializable pkVal() {
return this.id;
}
}
}

View File

@ -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<ActiveNewlywedsChild> {
//主键id
@TableId(type = IdType.AUTO)

View File

@ -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<ActiveNewlywedsChild> {
/**
* 根据新人有礼id查询子表列表信息
* @param activeNewlywedsId
* @return
*/
List<ActiveNewlywedsChild> selectByActiveId(Integer activeNewlywedsId);
}

View File

@ -64,5 +64,11 @@ public interface ActiveNewlywedsService extends IService<ActiveNewlyweds> {
* @return
*/
List<ActiveNewlywedsAppletVO> selectApplet(ActiveConsumption activeConsumption);
/**
* 根据店铺id查询新人有礼信息
* @return
*/
ActiveNewlyweds selectByStoreId();
}

View File

@ -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<ActiveNewlywedsChildMapper, ActiveNewlywedsChild> implements ActiveNewlywedsChildService {
@Override
public List<ActiveNewlywedsChild> selectByActiveId(Integer activeNewlywedsId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("active_newlyweds_id",activeNewlywedsId);
return baseMapper.selectList(queryWrapper);
}
}

View File

@ -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<ActiveNewlywedsMappe
@Override
@Transactional
public Boolean add(ActiveNewlywedsDTO activeNewlywedsDTO) {
// 查看是否存在活动存在则返回
ActiveNewlyweds activeNewlyweds1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeNewlyweds1)) return false;
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
@ -640,6 +645,18 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
return arrayList;
}
@Override
public ActiveNewlyweds selectByStoreId() {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",TokenUtil.getNowAccountInfo().getStoreId());
ActiveNewlyweds activeNewlyweds = baseMapper.selectOne(queryWrapper);
if (ObjectUtil.isNotEmpty(activeNewlyweds)) {
List<ActiveNewlywedsChild> activeNewlywedsChildren = activeNewlywedsChildService.selectByActiveId(activeNewlyweds.getId());
activeNewlyweds.setCouponList(activeNewlywedsChildren);
}
return activeNewlyweds;
}
/**
* 数组转字符串
* @param array

View File

@ -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));
}
}

View File

@ -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;
}

View File

@ -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<OpenCardGift> {
}

View File

@ -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);
}

View File

@ -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<OpenCardGiftMapper,OpenCardGift> 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);
}
}

View File

@ -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));
}
}

View File

@ -107,4 +107,11 @@ public interface ILJStaffService extends IService<LJStaff> {
* @return
*/
LJStaff selectStaffByStoreId(int storeId);
/**
* 根据机构id查询员工信息
* @param deptId
* @return
*/
LJStaff selectStaffByDeptId(Long deptId);
}

View File

@ -62,6 +62,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
/**
* 根据条件分页查询员工信息
*
* @param page
* @param staff
* @return
@ -76,14 +77,14 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
staff.setStoreId(storeId);
IPage<LJStaff> ljStaffIPage = baseMapper.selectLJStaffList(page, staff);
List<LJStaff> records = ljStaffIPage.getRecords();
if (CollectionUtils.isNotEmpty(records)){
if (CollectionUtils.isNotEmpty(records)) {
for (LJStaff record : records) {
LambdaQueryWrapper<TagCodeRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TagCodeRecord::getStaffId,record.getId());
queryWrapper.eq(TagCodeRecord::getStaffId, record.getId());
List<TagCodeRecord> 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<LJStaffMapper, LJStaff> impl
/**
* 查询所有员工信息
*
* @return
*/
@Override
@ -100,25 +102,25 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> 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<LJStaff> 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<LJStaffMapper, LJStaff> impl
@Override
public List<LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> impl
/**
* 添加用户信息
*
* @param staff
* @return
*/
@ -213,17 +220,17 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaffMapper, LJStaff> 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<LJStaff> 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<LJStaff> list = baseMapper.selectList(queryWrapper);
return list;
}
@ -397,18 +405,27 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> 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<LJStaff> 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;
}
}

View File

@ -37,6 +37,10 @@ public class MessageCost extends BaseEntity implements Serializable {
* 油站id
*/
private Integer storeId;
/**
* 机构id
*/
private Integer deptId;
/**
* 联系人
*/

View File

@ -27,6 +27,8 @@ public interface MessageCostService {
*/
MessageCost queryById(Integer id);
MessageCost selectByDeptId(Integer deptId);
/**
* 新增数据
*

View File

@ -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<MessageCostMapper,Messag
return baseMapper.selectById(id);
}
@Override
public MessageCost selectByDeptId(Integer deptId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("dept_id",deptId);
return baseMapper.selectOne(queryWrapper);
}
/**
* 新增数据
*
@ -42,6 +55,13 @@ public class MessageCostServiceImpl extends ServiceImpl<MessageCostMapper,Messag
*/
@Override
public int insert(MessageCost messageCost) {
MessageCost messageCost1 = selectByDeptId(messageCost.getDeptId());
if (ObjectUtil.isNotEmpty(messageCost1)){
return 0;
}
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
messageCost.setChainStoreId(nowAccountInfo.getChainStoreId());
messageCost.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.insert(messageCost);
}
@ -53,6 +73,10 @@ public class MessageCostServiceImpl extends ServiceImpl<MessageCostMapper,Messag
*/
@Override
public int update(MessageCost messageCost) {
MessageCost messageCost1 = selectByDeptId(messageCost.getDeptId());
if (ObjectUtil.isNotEmpty(messageCost1) && !Objects.equals(messageCost1.getId(), messageCost.getId())){
return 0;
}
return baseMapper.updateById(messageCost);
}