no message
This commit is contained in:
parent
b400283d2e
commit
e2f7915a9a
39
fuintAdmin_zt/src/api/sys/pay.js
Normal file
39
fuintAdmin_zt/src/api/sys/pay.js
Normal file
@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getPayListApi(query) {
|
||||
return request({
|
||||
url: 'api/merchantConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
export function deletePayApi(PayId) {
|
||||
return request({
|
||||
url: 'api/merchantConfig/' + PayId,
|
||||
method: 'delete'
|
||||
|
||||
})
|
||||
}
|
||||
//
|
||||
export function savePayApi(data) {
|
||||
return request({
|
||||
url: 'api/merchantConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存修改信息
|
||||
export function updatePayApi(data) {
|
||||
return request({
|
||||
url: 'api/merchantConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
301
fuintAdmin_zt/src/views/setting/pay/index.vue
Normal file
301
fuintAdmin_zt/src/views/setting/pay/index.vue
Normal file
@ -0,0 +1,301 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="" prop="orgName">
|
||||
<el-input
|
||||
v-model="queryParams.orgName"
|
||||
placeholder="请输入机构名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="legalRepresentativeContact">
|
||||
<el-input
|
||||
v-model="queryParams.legalRepresentativeContact"
|
||||
placeholder="请输入法人联系方式"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="appStatus">
|
||||
<el-input
|
||||
v-model="queryParams.appStatus"
|
||||
placeholder="请选择小程序状态"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>新增小程序配置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 列表信息-->
|
||||
<el-card style="margin-top: 20px" >
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="deptName" label="机构名称"></el-table-column>
|
||||
<el-table-column prop="deptType" label="机构类型"></el-table-column>
|
||||
<el-table-column prop="paymentChannel" label="支付通道"></el-table-column>
|
||||
<el-table-column prop="appKey" label="密钥">
|
||||
<el-table-column prop="publicKey" label="公钥"></el-table-column>
|
||||
<el-table-column prop="privateKey" label="私钥"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contact" label="联系人"></el-table-column>
|
||||
<el-table-column prop="information" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="paymentChannelType" label="支付通道状态"></el-table-column>
|
||||
<el-table-column prop="createByName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="edit(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="del(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :model="deviceInfo" label-width="80px">
|
||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px">
|
||||
<el-form-item label="机构名称" prop="orgName">
|
||||
<el-input v-model="deviceInfo.orgName" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="机构名称" prop="unifiedSocialCreditCode">
|
||||
<el-select v-model="deviceInfo.deptId" multiple placeholder="请选择机构">
|
||||
<el-option
|
||||
v-for="item in deptListSelect"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="机构类型" prop="appId">
|
||||
<el-input v-model="deviceInfo.appId"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付通道" prop="appKey">
|
||||
<el-input v-model="deviceInfo.appKey"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="公钥" prop="legalRepresentativeName">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="私钥" prop="legalRepresentativeWeChat">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeWeChat"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="legalRepresentativeContact">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeContact"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付状态" prop="appStatus">
|
||||
<el-switch
|
||||
v-model="deviceInfo.appStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/app";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
deviceInfo: {
|
||||
deptName:'',
|
||||
deptType:'',
|
||||
paymentChannel:'',
|
||||
publicKey:'',
|
||||
contact:'',
|
||||
information:'',
|
||||
paymentChannelType:'',
|
||||
createByName:'',
|
||||
createTime:'',
|
||||
},
|
||||
deptListSelect:[],
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
title:"",
|
||||
total:0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
orgName:'',
|
||||
legalRepresentativeContact:'',
|
||||
appStatus:'',
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
getAppListApi(this.queryParams).then(res=>{
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
getsSubmitDeviceInfo(){},
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
// 表单验证通过,可以提交数据
|
||||
// 示例:调用 API 提交数据
|
||||
this.submitDeviceInfo();
|
||||
} else {
|
||||
// 表单验证失败,不执行任何操作
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
submitDeviceInfo() {
|
||||
// 在这里调用接口提交设备信息数据
|
||||
console.log('提交设备信息数据:', this.deviceInfo);
|
||||
if (this.deviceInfo.id) {
|
||||
updateAppApi(this.deviceInfo).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
|
||||
})
|
||||
}else {
|
||||
saveAppApi(this.deviceInfo).then(res=>{
|
||||
if(res.code === 200) {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
deviceName:'',
|
||||
},
|
||||
this.getList()
|
||||
},
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "增加设备"
|
||||
this.selectChildByDeptIdApi();
|
||||
},
|
||||
edit(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "编辑设备"
|
||||
this.deviceInfo = e
|
||||
console.log('提交设备信息数据:', this.deviceInfo);
|
||||
|
||||
},
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res=>{
|
||||
this.deptListSelect = res.data
|
||||
})
|
||||
},
|
||||
|
||||
del(e) {
|
||||
|
||||
this.$confirm('此操作将永久删除该设备, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteAppApi(e.id).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
clean() {
|
||||
this.deviceInfo= {
|
||||
id: null, // 自增id
|
||||
deptName:'',
|
||||
deptType:'',
|
||||
paymentChannel:'',
|
||||
publicKey:'',
|
||||
contact:'',
|
||||
information:'',
|
||||
paymentChannelType:'',
|
||||
createByName:'',
|
||||
createTime:'',
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.common-dialog >>> .el-upload--picture-card {
|
||||
width: 60px;
|
||||
height: 50px;
|
||||
line-height: 60px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,5 +1,9 @@
|
||||
<script >
|
||||
import NotifyMode from "@/views/system/notify/page/mode.vue";
|
||||
import NotifyRecord from "@/views/system/notify/page/record.vue";
|
||||
|
||||
export default {
|
||||
components: {NotifyRecord, NotifyMode},
|
||||
data(){
|
||||
return{
|
||||
activeindex:0,
|
||||
@ -21,6 +25,8 @@ export default {
|
||||
<div class="tab-box">
|
||||
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
|
||||
</div>
|
||||
<notify-mode v-if="activeindex == 0"></notify-mode>
|
||||
<notify-record v-else></notify-record>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
BIN
fuintAdmin_zt/src/views/system/notify/page/img/icon-adduser.png
Normal file
BIN
fuintAdmin_zt/src/views/system/notify/page/img/icon-adduser.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 629 B |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@ -5,30 +5,40 @@
|
||||
<el-form-item label="" prop="orgName">
|
||||
<el-input
|
||||
v-model="queryParams.orgName"
|
||||
placeholder="请输入机构名称"
|
||||
placeholder="请选择通知名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="legalRepresentativeContact">
|
||||
<el-form-item label="" prop="orgName">
|
||||
<el-input
|
||||
v-model="queryParams.legalRepresentativeContact"
|
||||
placeholder="请输入法人联系方式"
|
||||
v-model="queryParams.orgName"
|
||||
placeholder="请选择通知类型"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="appStatus">
|
||||
<el-form-item label="" prop="orgName">
|
||||
<el-input
|
||||
v-model="queryParams.appStatus"
|
||||
placeholder="请选择小程序状态"
|
||||
v-model="queryParams.orgName"
|
||||
placeholder="请选择接收角色"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="orgName">
|
||||
<el-input
|
||||
v-model="queryParams.orgName"
|
||||
placeholder="请选择通知状态"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -39,28 +49,16 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 列表信息-->
|
||||
<el-card style="margin-top: 20px" >
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="orgName" label="机构名称"></el-table-column>
|
||||
<el-table-column prop="unifiedSocialCreditCode" label="统一社会信用代码"></el-table-column>
|
||||
<el-table-column prop="appId" label="小程序appID"></el-table-column>
|
||||
<el-table-column prop="appKey" label="密钥"></el-table-column>
|
||||
<el-table-column prop="legalRepresentativeName" label="法人姓名"></el-table-column>
|
||||
<el-table-column prop="legalRepresentativeWeChat" label="法人微信号"></el-table-column>
|
||||
<el-table-column prop="legalRepresentativeContact" label="法人联系方式"></el-table-column>
|
||||
<el-table-column prop="appStatus" label="小程序状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.appStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createByName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="notificationName" label="通知名称"></el-table-column>
|
||||
<el-table-column prop="notificationType" label="通知类型"></el-table-column>
|
||||
<el-table-column prop="templateContent" label="小程序appID"></el-table-column>
|
||||
<el-table-column prop="recipientRoles" label="密钥"></el-table-column>
|
||||
<el-table-column prop="templateStatus" label="法人姓名"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -90,48 +88,66 @@
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :model="deviceInfo" label-width="80px">
|
||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px">
|
||||
<el-form-item label="机构名称" prop="orgName">
|
||||
<el-input v-model="deviceInfo.orgName" style="width: 300px"></el-input>
|
||||
<el-form :model="form" label-width="120px">
|
||||
<!-- 通知名称 -->
|
||||
<el-form-item label="通知名称" :required="true">
|
||||
<el-input v-model="form.notificationName" placeholder="请输入通知名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="机构名称" prop="orgName">-->
|
||||
<!-- <el-input v-model="deviceInfo.orgName" style="width: 300px"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- -->
|
||||
<!-- 通知类型 -->
|
||||
<el-form-item label="通知类型" :required="true">
|
||||
<el-select v-model="form.notificationType" placeholder="请选择通知类型">
|
||||
<el-option label="到期提醒" value="到期提醒"></el-option>
|
||||
<!-- 添加其他选项 -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 通知模板 -->
|
||||
<el-form-item label="通知模板" :required="true">
|
||||
<el-input type="textarea" v-model="form.templateContent" placeholder="请输入通知内容" :maxlength="200" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode">
|
||||
<el-input v-model="deviceInfo.unifiedSocialCreditCode"></el-input>
|
||||
<!-- 接收角色 -->
|
||||
<el-form-item label="接收角色" :required="true">
|
||||
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色">
|
||||
<el-option v-for="item in dutyList" :label="item.dutyName" :value="item.dutyId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序appID" prop="appId">
|
||||
<el-input v-model="deviceInfo.appId"></el-input>
|
||||
|
||||
<!-- 模板状态 -->
|
||||
<el-form-item label="模板状态" :required="true">
|
||||
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="密钥" prop="appKey">
|
||||
<el-input v-model="deviceInfo.appKey"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人姓名" prop="legalRepresentativeName">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人微信号" prop="legalRepresentativeWeChat">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeWeChat"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人联系方式" prop="legalRepresentativeContact">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeContact"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序状态" prop="appStatus">
|
||||
<el-switch
|
||||
v-model="deviceInfo.appStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
|
||||
<!-- 发送条件 -->
|
||||
<el-form-item label="发送条件" style="margin-bottom: 10px">
|
||||
<div v-for="(condition, index) in form.conditions" :key="index" class="condition-group">
|
||||
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 150px;margin-right: 10px">
|
||||
<el-option label="系统到期日期" value="系统到期日期"></el-option>
|
||||
<el-option label="剩余交易量" value="剩余交易量"></el-option>
|
||||
<el-option label="系统服务有效期" value="系统服务有效期"></el-option>
|
||||
<!-- 添加其他选项 -->
|
||||
</el-select>
|
||||
<el-select v-if="condition.field == '系统到期日期'" v-model="condition.operator" placeholder="请选择" style="width: 100px;margin-right: 10px">
|
||||
<el-option label="当日日期" value="当日日期"></el-option>
|
||||
<el-option label="大于" value="大于"></el-option>
|
||||
<el-option label="小于" value="小于"></el-option>
|
||||
<!-- 添加其他选项 -->
|
||||
</el-select>
|
||||
<el-input v-model="condition.value" placeholder="请输入数值" style="width: 150px;margin-right: 10px">
|
||||
<template slot="append">{{ condition.field === '剩余交易量' || condition.field === '系统服务有效期' ? '万元' : '天' }}</template>
|
||||
</el-input>
|
||||
<el-button @click="removeCondition(index)" type="danger" icon="el-icon-delete" circle></el-button>
|
||||
</div>
|
||||
<el-button @click="addCondition" type="primary" icon="el-icon-plus">添加条件</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">保存</el-button>
|
||||
<el-button @click="handleReset">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@ -141,24 +157,32 @@
|
||||
|
||||
|
||||
import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/app";
|
||||
import {dutyList} from "@/api/duty/duty";
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
name: "notify-mode",
|
||||
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
form: {
|
||||
notificationName: '',
|
||||
notificationType: '',
|
||||
templateContent: '',
|
||||
recipientRoles: [],
|
||||
dutyList: [],
|
||||
templateStatus: true,
|
||||
conditions: [
|
||||
{ field: '', operator: '', value: '' }
|
||||
]
|
||||
},
|
||||
deviceInfo: {
|
||||
id: null, // 自增id
|
||||
orgName: '', // 机构名称
|
||||
unifiedSocialCreditCode: '', // 统一社会信用代码
|
||||
appId: '', // 小程序appID
|
||||
appKey: '', // 密钥
|
||||
legalRepresentativeName: '', // 法人姓名
|
||||
legalRepresentativeWeChat: '', // 法人微信
|
||||
legalRepresentativeContact: '', // 法人联系方式
|
||||
appStatus: false, // 小程序状态
|
||||
createByName: '',
|
||||
notificationName: '',//通知名称,字符长度最多100,不能为空
|
||||
notificationType: '',//通知类型
|
||||
templateContent: '',//模板内容
|
||||
recipientRoles: '', // 接收角色,字符长度最多255,不能为空
|
||||
templateStatus: true //模板状态
|
||||
},
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -232,6 +256,8 @@ export default {
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.getDutyList()
|
||||
|
||||
this.title = "增加设备"
|
||||
},
|
||||
edit(e) {
|
||||
@ -265,9 +291,24 @@ export default {
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
addCondition() {
|
||||
this.form.conditions.push({ field: '', operator: '', value: '' });
|
||||
},
|
||||
removeCondition(index) {
|
||||
this.form.conditions.splice(index, 1);
|
||||
},
|
||||
getDutyList(){
|
||||
// this.loading = true;
|
||||
let queryParams1={
|
||||
page: 1,
|
||||
pageSize: 10000
|
||||
}
|
||||
dutyList(queryParams1).then(res => {
|
||||
this.dutyList = res.data.records;
|
||||
// this.total1 = res.data.total;
|
||||
// this.loading = false;
|
||||
})
|
||||
},
|
||||
clean() {
|
||||
this.deviceInfo= {
|
||||
|
@ -2,9 +2,9 @@
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="" prop="orgName">
|
||||
<el-form-item label="" prop="deptName">
|
||||
<el-input
|
||||
v-model="queryParams.orgName"
|
||||
v-model="queryParams.deptName"
|
||||
placeholder="请输入机构名称"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@ -39,29 +39,23 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- -->
|
||||
<!-- 列表信息-->
|
||||
<el-card style="margin-top: 20px" >
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="orgName" label="机构名称"></el-table-column>
|
||||
<el-table-column prop="unifiedSocialCreditCode" label="统一社会信用代码"></el-table-column>
|
||||
<el-table-column prop="appId" label="小程序appID"></el-table-column>
|
||||
<el-table-column prop="appKey" label="密钥"></el-table-column>
|
||||
<el-table-column prop="legalRepresentativeName" label="法人姓名"></el-table-column>
|
||||
<el-table-column prop="legalRepresentativeWeChat" label="法人微信号"></el-table-column>
|
||||
<el-table-column prop="legalRepresentativeContact" label="法人联系方式"></el-table-column>
|
||||
<el-table-column prop="appStatus" label="小程序状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.appStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="notificationName" label="通知名称"></el-table-column>
|
||||
<el-table-column prop="notificationType" label="通知类型"></el-table-column>
|
||||
<el-table-column prop="templateContent" label="通知内容"></el-table-column>
|
||||
<el-table-column prop="recipientRoles" label="接收角色"></el-table-column>
|
||||
<el-table-column prop="recipientRoles" label="接收用户"></el-table-column>
|
||||
<el-table-column prop="recipientRoles" label="通知状态"></el-table-column>
|
||||
<el-table-column prop="recipientRoles" label="通知状态"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="createByName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column prop="createTime" label="发送时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -90,48 +84,73 @@
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :model="deviceInfo" label-width="80px">
|
||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px">
|
||||
<el-form-item label="机构名称" prop="orgName">
|
||||
<el-input v-model="deviceInfo.orgName" style="width: 300px"></el-input>
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<!-- 通知名称 -->
|
||||
<el-form-item label="通知名称" :required="true">
|
||||
<el-input v-model="form.notificationName" placeholder="请输入通知名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="机构名称" prop="orgName">-->
|
||||
<!-- <el-input v-model="deviceInfo.orgName" style="width: 300px"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- -->
|
||||
<!-- 通知类型 -->
|
||||
<el-form-item label="通知类型" :required="true">
|
||||
<el-select v-model="form.notificationType" placeholder="请选择通知类型">
|
||||
<el-option label="到期提醒" value="到期提醒"></el-option>
|
||||
<el-option label="库存预警" value="库存预警"></el-option>
|
||||
<!-- 添加其他选项 -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 通知模板 -->
|
||||
<el-form-item label="通知模板" :required="true">
|
||||
<el-input type="textarea" v-model="form.templateContent" placeholder="请输入通知内容" :maxlength="200" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode">
|
||||
<el-input v-model="deviceInfo.unifiedSocialCreditCode"></el-input>
|
||||
<!-- 接收角色 -->
|
||||
<el-form-item label="接收角色" :required="true">
|
||||
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色">
|
||||
<el-option v-for="item in dutyList" :label="item.dutyName" :value="item.dutyId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序appID" prop="appId">
|
||||
<el-input v-model="deviceInfo.appId"></el-input>
|
||||
<el-form-item label="接收用户" :required="true">
|
||||
<div style="border: 1px solid #DCDFE6;;width: 100%;height: 100px; border-radius: 4px;">
|
||||
<div @click="clickAdd" style=" display: flex;margin: 10px">
|
||||
<div style="height: 32px;display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
align-items: center; /* 垂直居中 */ ">
|
||||
<img src="../../notify/page/img/icon-adduser@3x.png">
|
||||
</div>
|
||||
<div v-for="item in form.recipientUser" :key="item.id">
|
||||
<el-badge value="x" class="item" style="margin-left: 10px">
|
||||
<el-button @click="clickUser(item.id)" size="mini" >{{item.userName}}</el-button>
|
||||
</el-badge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="密钥" prop="appKey">
|
||||
<el-input v-model="deviceInfo.appKey"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人姓名" prop="legalRepresentativeName">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人微信号" prop="legalRepresentativeWeChat">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeWeChat"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人联系方式" prop="legalRepresentativeContact">
|
||||
<el-input v-model="deviceInfo.legalRepresentativeContact"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序状态" prop="appStatus">
|
||||
<el-switch
|
||||
v-model="deviceInfo.appStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
||||
|
||||
<!-- 模板状态 -->
|
||||
<el-form-item label="模板状态" :required="true">
|
||||
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open1" width="50%" append-to-body>
|
||||
<el-table v-loading="" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||
<el-table-column label="用户角色" align="center" key="roleName" prop="roleName" />
|
||||
|
||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-button type="primary" @click="userEnter">确定</el-button>
|
||||
<el-button @click="userCe">取消</el-button>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@ -141,37 +160,73 @@
|
||||
|
||||
|
||||
import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/app";
|
||||
import {listUser} from "@/api/system/Site/site";
|
||||
import {dutyList} from "@/api/duty/duty";
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
name: "notify-record",
|
||||
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
form: {
|
||||
notificationName: '',
|
||||
notificationType: '',
|
||||
templateContent: '',
|
||||
recipientRoles: [],
|
||||
templateStatus: true,
|
||||
|
||||
conditions: [
|
||||
{ field: '', operator: '', value: '' }
|
||||
],
|
||||
recipientUser:[
|
||||
{
|
||||
id: 1,
|
||||
userName: '张三',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
userName: '李四',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
userName: '王五',
|
||||
}
|
||||
]
|
||||
},
|
||||
dutyList:[],
|
||||
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
deviceInfo: {
|
||||
id: null, // 自增id
|
||||
orgName: '', // 机构名称
|
||||
unifiedSocialCreditCode: '', // 统一社会信用代码
|
||||
appId: '', // 小程序appID
|
||||
appKey: '', // 密钥
|
||||
legalRepresentativeName: '', // 法人姓名
|
||||
legalRepresentativeWeChat: '', // 法人微信
|
||||
legalRepresentativeContact: '', // 法人联系方式
|
||||
appStatus: false, // 小程序状态
|
||||
createByName: '',
|
||||
notificationName: '',//通知名称,字符长度最多100,不能为空
|
||||
notificationType: '',//通知类型
|
||||
templateContent: '',//模板内容
|
||||
recipientRoles: '', // 接收角色,字符长度最多255,不能为空
|
||||
templateStatus: true //模板状态
|
||||
|
||||
},
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open1: false,
|
||||
title:"",
|
||||
total:0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
orgName:'',
|
||||
deptName:'',
|
||||
legalRepresentativeContact:'',
|
||||
appStatus:'',
|
||||
},
|
||||
// 查询参数
|
||||
queryParamsUser: {
|
||||
page: 1,
|
||||
pageSize: 10000
|
||||
|
||||
},
|
||||
linshicunshu:[],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -232,6 +287,8 @@ export default {
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.getDutyList()
|
||||
|
||||
this.title = "增加设备"
|
||||
},
|
||||
edit(e) {
|
||||
@ -265,9 +322,57 @@ export default {
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
console.log("val",val)
|
||||
val.forEach(item => {
|
||||
this.linshicunshu.push(
|
||||
{
|
||||
staffId:val.staffId,
|
||||
realName:val.realName
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
onlyGetUser(){
|
||||
// this.loading = true;
|
||||
// console.log(this.queryParams,222)
|
||||
// this.addDateRange(this.queryParams, this.dateRange)
|
||||
listUser(this.queryParamsUser).then(response => {
|
||||
this.userList = response.data.records;
|
||||
// this.total = response.data.total;
|
||||
// this.total = response.data.total;
|
||||
// this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
clickUser(id) {
|
||||
this.form.recipientUser = this.form.recipientUser.filter(item => item.id !== id);
|
||||
},
|
||||
clickAdd() {
|
||||
this.linshicunshu = []
|
||||
this.open1 = true;
|
||||
this.onlyGetUser()
|
||||
},
|
||||
userEnter(){
|
||||
this.open1 = false
|
||||
this.form.recipientUser = this.linshicunshu
|
||||
} ,
|
||||
userCe(){
|
||||
this.open1 = false
|
||||
this.linshicunshu = []
|
||||
},
|
||||
getDutyList(){
|
||||
// this.loading = true;
|
||||
let queryParams1={
|
||||
page: 1,
|
||||
pageSize: 10000
|
||||
}
|
||||
dutyList(queryParams1).then(res => {
|
||||
this.dutyList = res.data.records;
|
||||
// this.total1 = res.data.total;
|
||||
// this.loading = false;
|
||||
})
|
||||
},
|
||||
clean() {
|
||||
this.deviceInfo= {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.api.fuyou.entity;
|
||||
|
||||
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.fuint.framework.entity.BaseEntity;
|
||||
@ -38,6 +39,8 @@ public class MerchantConfig extends BaseEntity implements Serializable {
|
||||
* 机构号
|
||||
*/
|
||||
private String insCd;
|
||||
@TableField(exist = false)
|
||||
private String deptType;
|
||||
/**
|
||||
* 商户号
|
||||
*/
|
||||
@ -78,5 +81,9 @@ public class MerchantConfig extends BaseEntity implements Serializable {
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
private String contact;
|
||||
private String information;
|
||||
private String paymentChannel;
|
||||
private String paymentChannelType;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.fuint.business.deptPay.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptPriceInfo;
|
||||
import com.fuint.business.deptPay.service.DeptPriceInfoService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储年付费的表(DeptPriceInfo)表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("deptPriceInfo")
|
||||
public class DeptPriceInfoController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private DeptPriceInfoService deptPriceInfoService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptPriceInfo 筛选条件
|
||||
* @param pageNo 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("deptPriceInfo") DeptPriceInfo deptPriceInfo) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< DeptPriceInfo> iPageList = this.deptPriceInfoService.queryByPage(page, deptPriceInfo);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(this.deptPriceInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptPriceInfo 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody DeptPriceInfo deptPriceInfo) {
|
||||
return getSuccessResult(this.deptPriceInfoService.insert(deptPriceInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param deptPriceInfo 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody DeptPriceInfo deptPriceInfo) {
|
||||
return getSuccessResult(this.deptPriceInfoService.update(deptPriceInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject deleteById(Integer id) {
|
||||
return getSuccessResult(this.deptPriceInfoService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.fuint.business.deptPay.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptServiceFeeInfo;
|
||||
import com.fuint.business.deptPay.service.DeptServiceFeeInfoService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储后付费的表(DeptServiceFeeInfo)表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:41
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("deptServiceFeeInfo")
|
||||
public class DeptServiceFeeInfoController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private DeptServiceFeeInfoService deptServiceFeeInfoService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptServiceFeeInfo 筛选条件
|
||||
* @param pageNo 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("deptServiceFeeInfo") DeptServiceFeeInfo deptServiceFeeInfo) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< DeptServiceFeeInfo> iPageList = this.deptServiceFeeInfoService.queryByPage(page, deptServiceFeeInfo);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(this.deptServiceFeeInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody DeptServiceFeeInfo deptServiceFeeInfo) {
|
||||
return getSuccessResult(this.deptServiceFeeInfoService.insert(deptServiceFeeInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody DeptServiceFeeInfo deptServiceFeeInfo) {
|
||||
return getSuccessResult(this.deptServiceFeeInfoService.update(deptServiceFeeInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject deleteById(Integer id) {
|
||||
return getSuccessResult(this.deptServiceFeeInfoService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.fuint.business.deptPay.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptTransactionInfo;
|
||||
import com.fuint.business.deptPay.service.DeptTransactionInfoService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储预付费的表(DeptTransactionInfo)表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:43:00
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("deptTransactionInfo")
|
||||
public class DeptTransactionInfoController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private DeptTransactionInfoService deptTransactionInfoService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptTransactionInfo 筛选条件
|
||||
* @param pageNo 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("deptTransactionInfo") DeptTransactionInfo deptTransactionInfo) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< DeptTransactionInfo> iPageList = this.deptTransactionInfoService.queryByPage(page, deptTransactionInfo);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(this.deptTransactionInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptTransactionInfo 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody DeptTransactionInfo deptTransactionInfo) {
|
||||
return getSuccessResult(this.deptTransactionInfoService.insert(deptTransactionInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param deptTransactionInfo 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody DeptTransactionInfo deptTransactionInfo) {
|
||||
return getSuccessResult(this.deptTransactionInfoService.update(deptTransactionInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject deleteById(Integer id) {
|
||||
return getSuccessResult(this.deptTransactionInfoService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
package com.fuint.business.deptPay.entity;
|
||||
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 存储年付费的表(DeptPriceInfo)实体类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:05
|
||||
*/
|
||||
@Data
|
||||
public class DeptPriceInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = -91185763933321448L;
|
||||
/**
|
||||
* 自增的主键,用于唯一标识每条记录
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 价格,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double price;
|
||||
/**
|
||||
* 预付金额,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double prepaidAmount;
|
||||
/**
|
||||
* 系统有效期,整数,表示天数,不能为空
|
||||
*/
|
||||
private Integer systemValidityPeriod;
|
||||
/**
|
||||
* 状态,布尔类型,不能为空
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.fuint.business.deptPay.entity;
|
||||
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 存储后付费的表(DeptServiceFeeInfo)实体类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:41
|
||||
*/
|
||||
@Data
|
||||
public class DeptServiceFeeInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 618795520733116752L;
|
||||
/**
|
||||
* 自增的主键,用于唯一标识每条记录
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 扣点费率,百分比表示,最多5位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double deductionRate;
|
||||
/**
|
||||
* 收款金额,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double paymentAmount;
|
||||
/**
|
||||
* 易发生交易流量,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double likelyTransactionVolume;
|
||||
/**
|
||||
* 系统服务费统计,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double serviceFeeStatistics;
|
||||
/**
|
||||
* 系统服务费限制,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double serviceFeeLimit;
|
||||
/**
|
||||
* 状态,布尔类型,不能为空
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
package com.fuint.business.deptPay.entity;
|
||||
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 存储预付费的表(DeptTransactionInfo)实体类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:43:00
|
||||
*/
|
||||
@Data
|
||||
public class DeptTransactionInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 127239354139419399L;
|
||||
/**
|
||||
* 自增的主键,用于唯一标识每条记录
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 预付金额,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double prepaidAmount;
|
||||
/**
|
||||
* 扣点费率,百分比表示,最多5位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double deductionRate;
|
||||
/**
|
||||
* 预估交易流量,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double estimatedTransactionVolume;
|
||||
/**
|
||||
* 剩余交易流量,最多10位数字,其中2位小数,不能为空
|
||||
*/
|
||||
private Double remainingTransactionVolume;
|
||||
/**
|
||||
* 状态,布尔类型,不能为空
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.fuint.business.deptPay.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptPriceInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储年付费的表(DeptPriceInfo)表数据库访问层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:02
|
||||
*/
|
||||
public interface DeptPriceInfoMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptPriceInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param deptPriceInfo 查询条件
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<DeptPriceInfo> queryAllByLimit(@Param("page") Page page, DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param deptPriceInfo 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptPriceInfo 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<DeptPriceInfo> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<DeptPriceInfo> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<DeptPriceInfo> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<DeptPriceInfo> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptPriceInfo 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.fuint.business.deptPay.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptServiceFeeInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储后付费的表(DeptServiceFeeInfo)表数据库访问层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:41
|
||||
*/
|
||||
public interface DeptServiceFeeInfoMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptServiceFeeInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 查询条件
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<DeptServiceFeeInfo> queryAllByLimit(@Param("page") Page page, DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param deptServiceFeeInfo 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<DeptServiceFeeInfo> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<DeptServiceFeeInfo> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<DeptServiceFeeInfo> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<DeptServiceFeeInfo> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.fuint.business.deptPay.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptTransactionInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储预付费的表(DeptTransactionInfo)表数据库访问层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:43:00
|
||||
*/
|
||||
public interface DeptTransactionInfoMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptTransactionInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param deptTransactionInfo 查询条件
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<DeptTransactionInfo> queryAllByLimit(@Param("page") Page page, DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param deptTransactionInfo 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptTransactionInfo 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<DeptTransactionInfo> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<DeptTransactionInfo> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<DeptTransactionInfo> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<DeptTransactionInfo> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptTransactionInfo 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.deptPay.mapper.DeptPriceInfoMapper">
|
||||
|
||||
<resultMap type="com.fuint.business.deptPay.entity.DeptPriceInfo" id="DeptPriceInfoMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="price" column="price" jdbcType="NUMERIC"/>
|
||||
<result property="prepaidAmount" column="prepaid_amount" jdbcType="NUMERIC"/>
|
||||
<result property="systemValidityPeriod" column="system_validity_period" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="DeptPriceInfoMap">
|
||||
select
|
||||
id,price,prepaid_amount,system_validity_period,status
|
||||
from dept_price_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="DeptPriceInfoMap">
|
||||
select
|
||||
id,price,prepaid_amount,system_validity_period,status
|
||||
from dept_price_info
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="price != null">
|
||||
and price = #{price}
|
||||
</if>
|
||||
<if test="prepaidAmount != null">
|
||||
and prepaid_amount = #{prepaidAmount}
|
||||
</if>
|
||||
<if test="systemValidityPeriod != null">
|
||||
and system_validity_period = #{systemValidityPeriod}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from dept_price_info
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="price != null">
|
||||
and price = #{price}
|
||||
</if>
|
||||
<if test="prepaidAmount != null">
|
||||
and prepaid_amount = #{prepaidAmount}
|
||||
</if>
|
||||
<if test="systemValidityPeriod != null">
|
||||
and system_validity_period = #{systemValidityPeriod}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_price_info(price,prepaid_amount,system_validity_period,status
|
||||
)
|
||||
values (#{price}#{prepaidAmount}#{systemValidityPeriod}#{status})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_price_info(price,prepaid_amount,system_validity_period,status
|
||||
)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.price}#{entity.prepaidAmount}#{entity.systemValidityPeriod}#{entity.status})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_price_info(price,prepaid_amount,system_validity_period,status
|
||||
)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.price}#{entity.prepaidAmount}#{entity.systemValidityPeriod}#{entity.status})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
price = values(price)prepaid_amount = values(prepaid_amount)system_validity_period = values(system_validity_period)status = values(status)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update dept_price_info
|
||||
<set>
|
||||
<if test="price != null">
|
||||
price = #{price},
|
||||
</if>
|
||||
<if test="prepaidAmount != null">
|
||||
prepaid_amount = #{prepaidAmount},
|
||||
</if>
|
||||
<if test="systemValidityPeriod != null">
|
||||
system_validity_period = #{systemValidityPeriod},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from dept_price_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.deptPay.mapper.DeptServiceFeeInfoMapper">
|
||||
|
||||
<resultMap type="com.fuint.business.deptPay.entity.DeptServiceFeeInfo" id="DeptServiceFeeInfoMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="deductionRate" column="deduction_rate" jdbcType="NUMERIC"/>
|
||||
<result property="paymentAmount" column="payment_amount" jdbcType="NUMERIC"/>
|
||||
<result property="likelyTransactionVolume" column="likely_transaction_volume" jdbcType="NUMERIC"/>
|
||||
<result property="serviceFeeStatistics" column="service_fee_statistics" jdbcType="NUMERIC"/>
|
||||
<result property="serviceFeeLimit" column="service_fee_limit" jdbcType="NUMERIC"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="DeptServiceFeeInfoMap">
|
||||
select
|
||||
id,deduction_rate,payment_amount,likely_transaction_volume,service_fee_statistics,service_fee_limit,status
|
||||
from dept_service_fee_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="DeptServiceFeeInfoMap">
|
||||
select
|
||||
id,deduction_rate,payment_amount,likely_transaction_volume,service_fee_statistics,service_fee_limit,status
|
||||
|
||||
|
||||
from dept_service_fee_info
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="deductionRate != null">
|
||||
and deduction_rate = #{deductionRate}
|
||||
</if>
|
||||
<if test="paymentAmount != null">
|
||||
and payment_amount = #{paymentAmount}
|
||||
</if>
|
||||
<if test="likelyTransactionVolume != null">
|
||||
and likely_transaction_volume = #{likelyTransactionVolume}
|
||||
</if>
|
||||
<if test="serviceFeeStatistics != null">
|
||||
and service_fee_statistics = #{serviceFeeStatistics}
|
||||
</if>
|
||||
<if test="serviceFeeLimit != null">
|
||||
and service_fee_limit = #{serviceFeeLimit}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from dept_service_fee_info
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="deductionRate != null">
|
||||
and deduction_rate = #{deductionRate}
|
||||
</if>
|
||||
<if test="paymentAmount != null">
|
||||
and payment_amount = #{paymentAmount}
|
||||
</if>
|
||||
<if test="likelyTransactionVolume != null">
|
||||
and likely_transaction_volume = #{likelyTransactionVolume}
|
||||
</if>
|
||||
<if test="serviceFeeStatistics != null">
|
||||
and service_fee_statistics = #{serviceFeeStatistics}
|
||||
</if>
|
||||
<if test="serviceFeeLimit != null">
|
||||
and service_fee_limit = #{serviceFeeLimit}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_service_fee_info(deduction_rate,payment_amount,likely_transaction_volume,service_fee_statistics,service_fee_limit,status
|
||||
|
||||
)
|
||||
values (#{deductionRate},#{paymentAmount},#{likelyTransactionVolume},#{serviceFeeStatistics},#{serviceFeeLimit}#{status})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_service_fee_info(deduction_rate,payment_amount,likely_transaction_volume,service_fee_statistics,service_fee_limit,status
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.deductionRate},#{entity.paymentAmount},#{entity.likelyTransactionVolume},#{entity.serviceFeeStatistics},#{entity.serviceFeeLimit},#{entity.status})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_service_fee_info(deduction_rate,payment_amount,likely_transaction_volume,service_fee_statistics,service_fee_limit,status
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.deductionRate},#{entity.paymentAmount},#{entity.likelyTransactionVolume},#{entity.serviceFeeStatistics},#{entity.serviceFeeLimit},#{entity.status})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
deduction_rate = values(deduction_rate)payment_amount = values(payment_amount)likely_transaction_volume = values(likely_transaction_volume)service_fee_statistics = values(service_fee_statistics)service_fee_limit = values(service_fee_limit)status = values(status)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update dept_service_fee_info
|
||||
<set>
|
||||
<if test="deductionRate != null">
|
||||
deduction_rate = #{deductionRate},
|
||||
</if>
|
||||
<if test="paymentAmount != null">
|
||||
payment_amount = #{paymentAmount},
|
||||
</if>
|
||||
<if test="likelyTransactionVolume != null">
|
||||
likely_transaction_volume = #{likelyTransactionVolume},
|
||||
</if>
|
||||
<if test="serviceFeeStatistics != null">
|
||||
service_fee_statistics = #{serviceFeeStatistics},
|
||||
</if>
|
||||
<if test="serviceFeeLimit != null">
|
||||
service_fee_limit = #{serviceFeeLimit},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from dept_service_fee_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.deptPay.mapper.DeptTransactionInfoMapper">
|
||||
|
||||
<resultMap type="com.fuint.business.deptPay.entity.DeptTransactionInfo" id="DeptTransactionInfoMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="prepaidAmount" column="prepaid_amount" jdbcType="NUMERIC"/>
|
||||
<result property="deductionRate" column="deduction_rate" jdbcType="NUMERIC"/>
|
||||
<result property="estimatedTransactionVolume" column="estimated_transaction_volume" jdbcType="NUMERIC"/>
|
||||
<result property="remainingTransactionVolume" column="remaining_transaction_volume" jdbcType="NUMERIC"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="DeptTransactionInfoMap">
|
||||
select
|
||||
id,prepaid_amount,deduction_rate,estimated_transaction_volume,remaining_transaction_volume,status
|
||||
from dept_transaction_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="DeptTransactionInfoMap">
|
||||
select
|
||||
id,prepaid_amount,deduction_rate,estimated_transaction_volume,remaining_transaction_volume,status
|
||||
from dept_transaction_info
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="prepaidAmount != null">
|
||||
and prepaid_amount = #{prepaidAmount}
|
||||
</if>
|
||||
<if test="deductionRate != null">
|
||||
and deduction_rate = #{deductionRate}
|
||||
</if>
|
||||
<if test="estimatedTransactionVolume != null">
|
||||
and estimated_transaction_volume = #{estimatedTransactionVolume}
|
||||
</if>
|
||||
<if test="remainingTransactionVolume != null">
|
||||
and remaining_transaction_volume = #{remainingTransactionVolume}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from dept_transaction_info
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="prepaidAmount != null">
|
||||
and prepaid_amount = #{prepaidAmount}
|
||||
</if>
|
||||
<if test="deductionRate != null">
|
||||
and deduction_rate = #{deductionRate}
|
||||
</if>
|
||||
<if test="estimatedTransactionVolume != null">
|
||||
and estimated_transaction_volume = #{estimatedTransactionVolume}
|
||||
</if>
|
||||
<if test="remainingTransactionVolume != null">
|
||||
and remaining_transaction_volume = #{remainingTransactionVolume}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_transaction_info(prepaid_amount,deduction_rate,estimated_transaction_volume,remaining_transaction_volume,status
|
||||
)
|
||||
values (#{prepaidAmount},#{deductionRate},#{estimatedTransactionVolume},#{remainingTransactionVolume},#{status})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_transaction_info(prepaid_amount,deduction_rate,estimated_transaction_volume,remaining_transaction_volume,status
|
||||
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.prepaidAmount},#{entity.deductionRate},#{entity.estimatedTransactionVolume},#{entity.remainingTransactionVolume},#{entity.status})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dept_transaction_info(prepaid_amount,deduction_rate,estimated_transaction_volume,remaining_transaction_volume,status
|
||||
|
||||
|
||||
)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.prepaidAmount},#{entity.deductionRate},#{entity.estimatedTransactionVolume},#{entity.remainingTransactionVolume},#{entity.status})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
prepaid_amount = values(prepaid_amount)deduction_rate = values(deduction_rate)estimated_transaction_volume = values(estimated_transaction_volume)remaining_transaction_volume = values(remaining_transaction_volume)status = values(status)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update dept_transaction_info
|
||||
<set>
|
||||
<if test="prepaidAmount != null">
|
||||
prepaid_amount = #{prepaidAmount},
|
||||
</if>
|
||||
<if test="deductionRate != null">
|
||||
deduction_rate = #{deductionRate},
|
||||
</if>
|
||||
<if test="estimatedTransactionVolume != null">
|
||||
estimated_transaction_volume = #{estimatedTransactionVolume},
|
||||
</if>
|
||||
<if test="remainingTransactionVolume != null">
|
||||
remaining_transaction_volume = #{remainingTransactionVolume},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from dept_transaction_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.deptPay.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptPriceInfo;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
/**
|
||||
* 存储年付费的表(DeptPriceInfo)表服务接口
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:07
|
||||
*/
|
||||
public interface DeptPriceInfoService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptPriceInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptPriceInfo 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<DeptPriceInfo> queryByPage(@Param("page") Page page, DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptPriceInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptPriceInfo insert(DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptPriceInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptPriceInfo update(DeptPriceInfo deptPriceInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.deptPay.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptServiceFeeInfo;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
/**
|
||||
* 存储后付费的表(DeptServiceFeeInfo)表服务接口
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:41
|
||||
*/
|
||||
public interface DeptServiceFeeInfoService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptServiceFeeInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptServiceFeeInfo 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<DeptServiceFeeInfo> queryByPage(@Param("page") Page page, DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptServiceFeeInfo insert(DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptServiceFeeInfo update(DeptServiceFeeInfo deptServiceFeeInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.deptPay.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptTransactionInfo;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
/**
|
||||
* 存储预付费的表(DeptTransactionInfo)表服务接口
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:43:00
|
||||
*/
|
||||
public interface DeptTransactionInfoService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptTransactionInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptTransactionInfo 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<DeptTransactionInfo> queryByPage(@Param("page") Page page, DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptTransactionInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptTransactionInfo insert(DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptTransactionInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
DeptTransactionInfo update(DeptTransactionInfo deptTransactionInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.fuint.business.deptPay.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptPriceInfo;
|
||||
import com.fuint.business.deptPay.mapper.DeptPriceInfoMapper;
|
||||
import com.fuint.business.deptPay.service.DeptPriceInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储年付费的表(DeptPriceInfo)表服务实现类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:08
|
||||
*/
|
||||
@Service("deptPriceInfoService")
|
||||
public class DeptPriceInfoServiceImpl implements DeptPriceInfoService {
|
||||
@Resource
|
||||
private DeptPriceInfoMapper deptPriceInfoMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptPriceInfo queryById(Integer id) {
|
||||
return this.deptPriceInfoMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptPriceInfo 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<DeptPriceInfo> queryByPage(@Param("page") Page page, DeptPriceInfo deptPriceInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
deptPriceInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.deptPriceInfoMapper.queryAllByLimit(page, deptPriceInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptPriceInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptPriceInfo insert(DeptPriceInfo deptPriceInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
deptPriceInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
this.deptPriceInfoMapper.insert(deptPriceInfo);
|
||||
return deptPriceInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptPriceInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptPriceInfo update(DeptPriceInfo deptPriceInfo) {
|
||||
this.deptPriceInfoMapper.update(deptPriceInfo);
|
||||
return this.queryById(deptPriceInfo.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.deptPriceInfoMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.fuint.business.deptPay.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptServiceFeeInfo;
|
||||
import com.fuint.business.deptPay.mapper.DeptServiceFeeInfoMapper;
|
||||
import com.fuint.business.deptPay.service.DeptServiceFeeInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储后付费的表(DeptServiceFeeInfo)表服务实现类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:42:41
|
||||
*/
|
||||
@Service("deptServiceFeeInfoService")
|
||||
public class DeptServiceFeeInfoServiceImpl implements DeptServiceFeeInfoService {
|
||||
@Resource
|
||||
private DeptServiceFeeInfoMapper deptServiceFeeInfoMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptServiceFeeInfo queryById(Integer id) {
|
||||
return this.deptServiceFeeInfoMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptServiceFeeInfo 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<DeptServiceFeeInfo> queryByPage(@Param("page") Page page, DeptServiceFeeInfo deptServiceFeeInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
deptServiceFeeInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.deptServiceFeeInfoMapper.queryAllByLimit(page, deptServiceFeeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptServiceFeeInfo insert(DeptServiceFeeInfo deptServiceFeeInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
deptServiceFeeInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
this.deptServiceFeeInfoMapper.insert(deptServiceFeeInfo);
|
||||
return deptServiceFeeInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptServiceFeeInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptServiceFeeInfo update(DeptServiceFeeInfo deptServiceFeeInfo) {
|
||||
this.deptServiceFeeInfoMapper.update(deptServiceFeeInfo);
|
||||
return this.queryById(deptServiceFeeInfo.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.deptServiceFeeInfoMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.fuint.business.deptPay.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deptPay.entity.DeptTransactionInfo;
|
||||
import com.fuint.business.deptPay.mapper.DeptTransactionInfoMapper;
|
||||
import com.fuint.business.deptPay.service.DeptTransactionInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储预付费的表(DeptTransactionInfo)表服务实现类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 17:43:00
|
||||
*/
|
||||
@Service("deptTransactionInfoService")
|
||||
public class DeptTransactionInfoServiceImpl implements DeptTransactionInfoService {
|
||||
@Resource
|
||||
private DeptTransactionInfoMapper deptTransactionInfoMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptTransactionInfo queryById(Integer id) {
|
||||
return this.deptTransactionInfoMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param deptTransactionInfo 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<DeptTransactionInfo> queryByPage(@Param("page") Page page, DeptTransactionInfo deptTransactionInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
deptTransactionInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.deptTransactionInfoMapper.queryAllByLimit(page, deptTransactionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param deptTransactionInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptTransactionInfo insert(DeptTransactionInfo deptTransactionInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
deptTransactionInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
this.deptTransactionInfoMapper.insert(deptTransactionInfo);
|
||||
return deptTransactionInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param deptTransactionInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public DeptTransactionInfo update(DeptTransactionInfo deptTransactionInfo) {
|
||||
this.deptTransactionInfoMapper.update(deptTransactionInfo);
|
||||
return this.queryById(deptTransactionInfo.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.deptTransactionInfoMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.fuint.business.sys.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import com.fuint.business.sys.service.SysNotificationlogService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储发送之后通知记录的表(SysNotificationlog)表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:33
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sysNotificationlog")
|
||||
public class SysNotificationlogController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private SysNotificationlogService sysNotificationlogService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotificationlog 筛选条件
|
||||
* @param pageNo 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("sysNotificationlog") SysNotificationlog sysNotificationlog) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< SysNotificationlog> iPageList = this.sysNotificationlogService.queryByPage(page, sysNotificationlog);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(this.sysNotificationlogService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotificationlog 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody SysNotificationlog sysNotificationlog) {
|
||||
return getSuccessResult(this.sysNotificationlogService.insert(sysNotificationlog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param sysNotificationlog 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody SysNotificationlog sysNotificationlog) {
|
||||
return getSuccessResult(this.sysNotificationlogService.update(sysNotificationlog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject deleteById(Integer id) {
|
||||
return getSuccessResult(this.sysNotificationlogService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.fuint.business.sys.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotify;
|
||||
import com.fuint.business.sys.service.SysNotifyService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储通知信息的表(SysNotify)表控制层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sysNotify")
|
||||
public class SysNotifyController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private SysNotifyService sysNotifyService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotify 筛选条件
|
||||
* @param pageNo 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("sysNotify") SysNotify sysNotify) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< SysNotify> iPageList = this.sysNotifyService.queryByPage(page, sysNotify);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(this.sysNotifyService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotify 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody SysNotify sysNotify) {
|
||||
return getSuccessResult(this.sysNotifyService.insert(sysNotify));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param sysNotify 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody SysNotify sysNotify) {
|
||||
return getSuccessResult(this.sysNotifyService.update(sysNotify));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject deleteById(Integer id) {
|
||||
return getSuccessResult(this.sysNotifyService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
package com.fuint.business.sys.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 存储发送之后通知记录的表(SysNotificationlog)实体类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:33
|
||||
*/
|
||||
@Data
|
||||
public class SysNotificationlog extends BaseEntity {
|
||||
private static final long serialVersionUID = -33459052755154289L;
|
||||
/**
|
||||
* 自增的主键,用于唯一标识每条记录
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 通知ID,关联Notification表的主键
|
||||
*/
|
||||
private Integer notifyId;
|
||||
/**
|
||||
* 接收者,字符长度最多255,不能为空
|
||||
*/
|
||||
private String sentTo;
|
||||
/**
|
||||
* 发送时间,时间戳,默认为当前时间
|
||||
*/
|
||||
private Date sentAt;
|
||||
/**
|
||||
* 发送状态,枚举类型,可选值为"成功"和"失败"
|
||||
*/
|
||||
private Boolean status;
|
||||
/**
|
||||
* 错误信息,不限字符长度,可以为空
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
package com.fuint.business.sys.entity;
|
||||
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 存储通知信息的表(SysNotify)实体类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:13
|
||||
*/
|
||||
@Data
|
||||
public class SysNotify extends BaseEntity {
|
||||
private static final long serialVersionUID = -82920120425249472L;
|
||||
/**
|
||||
* 自增的主键,用于唯一标识每条记录
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 通知名称,字符长度最多100,不能为空
|
||||
*/
|
||||
private String notificationName;
|
||||
/**
|
||||
* 通知类型,字符长度最多50,不能为空
|
||||
*/
|
||||
private String notificationType;
|
||||
/**
|
||||
* 模板内容,不限字符长度,不能为空
|
||||
*/
|
||||
private String templateContent;
|
||||
/**
|
||||
* 接收角色,字符长度最多255,不能为空
|
||||
*/
|
||||
private String recipientRoles;
|
||||
/**
|
||||
* 模板状态,布尔类型,不能为空
|
||||
*/
|
||||
private Boolean templateStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.fuint.business.sys.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储发送之后通知记录的表(SysNotificationlog)表数据库访问层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:33
|
||||
*/
|
||||
public interface SysNotificationlogMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotificationlog queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param sysNotificationlog 查询条件
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<SysNotificationlog> queryAllByLimit(@Param("page") Page page, SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param sysNotificationlog 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotificationlog 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<SysNotificationlog> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<SysNotificationlog> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<SysNotificationlog> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<SysNotificationlog> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysNotificationlog 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.fuint.business.sys.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotify;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储通知信息的表(SysNotify)表数据库访问层
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:13
|
||||
*/
|
||||
public interface SysNotifyMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotify queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param sysNotify 查询条件
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<SysNotify> queryAllByLimit(@Param("page") Page page, SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param sysNotify 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotify 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<SysNotify> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<SysNotify> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<SysNotify> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<SysNotify> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysNotify 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.sys.mapper.SysNotificationlogMapper">
|
||||
|
||||
<resultMap type="com.fuint.business.sys.entity.SysNotificationlog" id="SysNotificationlogMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="notifyId" column="notify_id" jdbcType="INTEGER"/>
|
||||
<result property="sentTo" column="sent_to" jdbcType="VARCHAR"/>
|
||||
<result property="sentAt" column="sent_at" jdbcType="TIMESTAMP"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="errorMessage" column="error_message" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="SysNotificationlogMap">
|
||||
select
|
||||
id,notify_id,sent_to,sent_at,status,error_message
|
||||
from sys_notificationlog
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="SysNotificationlogMap">
|
||||
select
|
||||
id,notify_id,sent_to,sent_at,status,error_message
|
||||
from sys_notificationlog
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="notifyId != null">
|
||||
and notify_id = #{notifyId}
|
||||
</if>
|
||||
<if test="sentTo != null and sentTo != ''">
|
||||
and sent_to = #{sentTo}
|
||||
</if>
|
||||
<if test="sentAt != null">
|
||||
and sent_at = #{sentAt}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="errorMessage != null and errorMessage != ''">
|
||||
and error_message = #{errorMessage}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from sys_notificationlog
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="notifyId != null">
|
||||
and notify_id = #{notifyId}
|
||||
</if>
|
||||
<if test="sentTo != null and sentTo != ''">
|
||||
and sent_to = #{sentTo}
|
||||
</if>
|
||||
<if test="sentAt != null">
|
||||
and sent_at = #{sentAt}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="errorMessage != null and errorMessage != ''">
|
||||
and error_message = #{errorMessage}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_notificationlog(notify_id,sent_to,sent_at,status,error_message)
|
||||
values (#{notifyId}#{sentTo}#{sentAt}#{status}#{errorMessage})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_notificationlog(notify_id,sent_to,sent_at,status,error_message)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.notifyId}#{entity.sentTo}#{entity.sentAt}#{entity.status}#{entity.errorMessage})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_notificationlog(notify_id,sent_to,sent_at,status,error_message)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.notifyId}#{entity.sentTo}#{entity.sentAt}#{entity.status}#{entity.errorMessage})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
notify_id = values(notify_id)sent_to = values(sent_to)sent_at = values(sent_at)status = values(status)error_message = values(error_message)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update sys_notificationlog
|
||||
<set>
|
||||
<if test="notifyId != null">
|
||||
notify_id = #{notifyId},
|
||||
</if>
|
||||
<if test="sentTo != null and sentTo != ''">
|
||||
sent_to = #{sentTo},
|
||||
</if>
|
||||
<if test="sentAt != null">
|
||||
sent_at = #{sentAt},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="errorMessage != null and errorMessage != ''">
|
||||
error_message = #{errorMessage},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from sys_notificationlog where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.sys.mapper.SysNotifyMapper">
|
||||
|
||||
<resultMap type="com.fuint.business.sys.entity.SysNotify" id="SysNotifyMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="notificationName" column="notification_name" jdbcType="VARCHAR"/>
|
||||
<result property="notificationType" column="notification_type" jdbcType="VARCHAR"/>
|
||||
<result property="templateContent" column="template_content" jdbcType="VARCHAR"/>
|
||||
<result property="recipientRoles" column="recipient_roles" jdbcType="VARCHAR"/>
|
||||
<result property="templateStatus" column="template_status" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="SysNotifyMap">
|
||||
select
|
||||
id,notification_name,notification_type,template_content,recipient_roles,template_status
|
||||
from sys_notify
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="SysNotifyMap">
|
||||
select
|
||||
id,notification_name,notification_type,template_content,recipient_roles,template_status
|
||||
|
||||
from sys_notify
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="notificationName != null and notificationName != ''">
|
||||
and notification_name = #{notificationName}
|
||||
</if>
|
||||
<if test="notificationType != null and notificationType != ''">
|
||||
and notification_type = #{notificationType}
|
||||
</if>
|
||||
<if test="templateContent != null and templateContent != ''">
|
||||
and template_content = #{templateContent}
|
||||
</if>
|
||||
<if test="recipientRoles != null and recipientRoles != ''">
|
||||
and recipient_roles = #{recipientRoles}
|
||||
</if>
|
||||
<if test="templateStatus != null">
|
||||
and template_status = #{templateStatus}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from sys_notify
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="notificationName != null and notificationName != ''">
|
||||
and notification_name = #{notificationName}
|
||||
</if>
|
||||
<if test="notificationType != null and notificationType != ''">
|
||||
and notification_type = #{notificationType}
|
||||
</if>
|
||||
<if test="templateContent != null and templateContent != ''">
|
||||
and template_content = #{templateContent}
|
||||
</if>
|
||||
<if test="recipientRoles != null and recipientRoles != ''">
|
||||
and recipient_roles = #{recipientRoles}
|
||||
</if>
|
||||
<if test="templateStatus != null">
|
||||
and template_status = #{templateStatus}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_notify(notification_name,notification_type,template_content,recipient_roles,template_status)
|
||||
values (#{notificationName}#{notificationType}#{templateContent}#{recipientRoles}#{templateStatus})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_notify(notification_name,notification_type,template_content,recipient_roles,template_status)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.notificationName}#{entity.notificationType}#{entity.templateContent}#{entity.recipientRoles}#{entity.templateStatus})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_notify(notification_name,notification_type,template_content,recipient_roles,template_status)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.notificationName}#{entity.notificationType}#{entity.templateContent}#{entity.recipientRoles}#{entity.templateStatus})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
notification_name = values(notification_name)notification_type = values(notification_type)template_content = values(template_content)recipient_roles = values(recipient_roles)template_status = values(template_status)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update sys_notify
|
||||
<set>
|
||||
<if test="notificationName != null and notificationName != ''">
|
||||
notification_name = #{notificationName},
|
||||
</if>
|
||||
<if test="notificationType != null and notificationType != ''">
|
||||
notification_type = #{notificationType},
|
||||
</if>
|
||||
<if test="templateContent != null and templateContent != ''">
|
||||
template_content = #{templateContent},
|
||||
</if>
|
||||
<if test="recipientRoles != null and recipientRoles != ''">
|
||||
recipient_roles = #{recipientRoles},
|
||||
</if>
|
||||
<if test="templateStatus != null">
|
||||
template_status = #{templateStatus},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from sys_notify where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.sys.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
/**
|
||||
* 存储发送之后通知记录的表(SysNotificationlog)表服务接口
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:33
|
||||
*/
|
||||
public interface SysNotificationlogService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotificationlog queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotificationlog 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<SysNotificationlog> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotificationlog 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotificationlog insert(SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysNotificationlog 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotificationlog update(SysNotificationlog sysNotificationlog);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.sys.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotify;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
/**
|
||||
* 存储通知信息的表(SysNotify)表服务接口
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:13
|
||||
*/
|
||||
public interface SysNotifyService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotify queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotify 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<SysNotify> queryByPage(@Param("page") Page page, SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotify 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotify insert(SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysNotify 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
SysNotify update(SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.fuint.business.sys.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotificationlog;
|
||||
import com.fuint.business.sys.mapper.SysNotificationlogMapper;
|
||||
import com.fuint.business.sys.service.SysNotificationlogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储发送之后通知记录的表(SysNotificationlog)表服务实现类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:33
|
||||
*/
|
||||
@Service("sysNotificationlogService")
|
||||
public class SysNotificationlogServiceImpl implements SysNotificationlogService {
|
||||
@Resource
|
||||
private SysNotificationlogMapper sysNotificationlogMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SysNotificationlog queryById(Integer id) {
|
||||
return this.sysNotificationlogMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotificationlog 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<SysNotificationlog> queryByPage(@Param("page") Page page, SysNotificationlog sysNotificationlog) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// sysNotificationlog.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.sysNotificationlogMapper.queryAllByLimit(page, sysNotificationlog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotificationlog 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SysNotificationlog insert(SysNotificationlog sysNotificationlog) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// sysNotificationlog.setStoreId(nowAccountInfo.getStoreId());
|
||||
this.sysNotificationlogMapper.insert(sysNotificationlog);
|
||||
return sysNotificationlog;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysNotificationlog 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SysNotificationlog update(SysNotificationlog sysNotificationlog) {
|
||||
this.sysNotificationlogMapper.update(sysNotificationlog);
|
||||
return this.queryById(sysNotificationlog.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.sysNotificationlogMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.fuint.business.sys.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.sys.entity.SysNotify;
|
||||
import com.fuint.business.sys.mapper.SysNotifyMapper;
|
||||
import com.fuint.business.sys.service.SysNotifyService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 存储通知信息的表(SysNotify)表服务实现类
|
||||
*
|
||||
* @author wangh
|
||||
* @since 2024-07-22 10:56:13
|
||||
*/
|
||||
@Service("sysNotifyService")
|
||||
public class SysNotifyServiceImpl implements SysNotifyService {
|
||||
@Resource
|
||||
private SysNotifyMapper sysNotifyMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SysNotify queryById(Integer id) {
|
||||
return this.sysNotifyMapper.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotify 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<SysNotify> queryByPage(@Param("page") Page page, SysNotify sysNotify) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// sysNotify.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.sysNotifyMapper.queryAllByLimit(page, sysNotify);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param sysNotify 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SysNotify insert(SysNotify sysNotify) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// sysNotify.setStoreId(nowAccountInfo.getStoreId());
|
||||
this.sysNotifyMapper.insert(sysNotify);
|
||||
return sysNotify;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param sysNotify 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SysNotify update(SysNotify sysNotify) {
|
||||
this.sysNotifyMapper.update(sysNotify);
|
||||
return this.queryById(sysNotify.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.sysNotifyMapper.deleteById(id) > 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user