This commit is contained in:
cun-nan 2024-07-24 10:19:41 +08:00
parent 1807a175bf
commit 1b73d2178b
22 changed files with 763 additions and 218 deletions

View File

@ -19,6 +19,16 @@ export function listMerchant2(query) {
})
}
// 查询商户列表
export function listMerchantPage(query) {
return request({
url: '/api/merchantConfig',
method: 'get',
params: query,
})
}
// 修改商户使用状态
export function editMerchant(data) {
return request({
@ -63,3 +73,12 @@ export function deleteMerchant(id) {
})
}
// 根据id删除商户配置信息
export function getMerchant(id) {
return request({
url: '/api/merchantConfig/selectInfo/'+id,
method: 'get',
})
}

View File

@ -0,0 +1,57 @@
import request from '@/utils/request'
// 查询支付参数配置信息
export function listPaymentParameterPage(query) {
return request({
url: '/paymentParameterConfig',
method: 'get',
params: query,
})
}
// 修改支付参数配置信息
export function editPaymentParameter(data) {
return request({
url: '/paymentParameterConfig',
method: 'put',
data: data,
})
}
// 添加支付参数配置信息
export function addPaymentParameter(data) {
return request({
url: '/paymentParameterConfig',
method: 'post',
data: data,
})
}
// 根据id查询支付参数配置信息
export function paymentParameterInfo(id) {
return request({
url: '/paymentParameterConfig/'+id,
method: 'get',
})
}
// 根据id删除支付参数配置信息
export function deletePaymentParameter(id) {
return request({
url: '/paymentParameterConfig/'+id,
method: 'delete',
})
}
// 根据id查询支付参数配置信息
export function getPaymentParameter(id) {
return request({
url: '/paymentParameterConfig/getInfo/'+id,
method: 'get',
})
}

View File

@ -1,7 +1,11 @@
<script >
import {Userlist} from "@/api/system/Site/site";
import Yearff from "@/views/Site/components/yearff.vue";
import Beforeff from "@/views/Site/components/before.vue";
import Afterff from "@/views/Site/components/afterff.vue";
export default {
components: {Afterff, Beforeff, Yearff},
props:['deptId'],
data() {
return {
@ -70,149 +74,11 @@ export default {
<div v-if="storeDeptInfo.turnoverType==6">可创建油站站点数量</div>
</div>
<!-- 年付费 -->
<el-table
:data="tableData"
border
style="width: 70%;margin-left: 20px;margin-bottom: 20px">
<el-table-column
type="index"
align="center"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="date"
align="center"
label="价格(元)"
width="180">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="付款金额(元)"
width="180">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="系统生效时间">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="状态">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="创建时间">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="创建人">
</el-table-column>
</el-table>
<yearff v-if="storeDeptInfo.turnoverType==5" :deptId="this.deptId"></yearff>
<!-- 预付费 -->
<el-table
v-if="false"
:data="tableData"
border
style="width: 75%;margin-left: 20px;margin-bottom: 20px">
<el-table-column
type="index"
align="center"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="date"
align="center"
label="预付金额(元)"
width="180">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="扣点费率(‱)"
width="180">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="预估交易流量(万元)">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="剩余交易流量(万元)">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="状态">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="创建时间">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="创建人">
</el-table-column>
</el-table>
<beforeff v-if="storeDeptInfo.turnoverType==3" :deptId="this.deptId"></beforeff>
<!-- 后付费 -->
<el-table
v-if="false"
:data="tableData"
border
style="width: 75%;margin-left: 20px;margin-bottom: 20px">
<el-table-column
type="index"
align="center"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="date"
align="center"
label="预付金额(元)"
width="180">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="已发生交易流量(万元)"
width="180">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="系统服务费统计(元)">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="已付金额(元)">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="状态">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="创建时间">
</el-table-column>
<el-table-column
prop="name"
align="center"
label="创建人">
</el-table-column>
</el-table>
<afterff v-if="storeDeptInfo.turnoverType==4" :deptId="this.deptId"></afterff>
<!-- 时间限制限制 -->
<div class="d-s" v-if="storeDeptInfo.turnoverType==2">
<div class="left-size">开始时间</div>
@ -220,6 +86,11 @@ export default {
<div class="left-size">结束时间</div>
<div>{{ storeDeptInfo.turnoverEndTime }}</div>
</div>
<!-- 可创建油站站点数量 -->
<div class="d-s" v-if="storeDeptInfo.turnoverType==6">
<div class="left-size">可创建油站站点数量</div>
<div>{{ storeDeptInfo.storeNum }}</div>
</div>
<div class="d-s">
<div class="left-size">机构状态</div>
<div>

View File

@ -242,7 +242,7 @@ export default {
})
},
getHardwareList(){
getListApi({page: 1, pageSize: 3,}).then(res=>{
getListApi({page: 1, pageSize: 3,status:'1'}).then(res=>{
this.hardwareList = res.data.records;
this.hardwareList.forEach(item => {
if (item.image.includes(",")){

View File

@ -248,7 +248,7 @@ export default {
})
},
getHardwareList(){
getListApi({page: 1, pageSize: 3,}).then(res=>{
getListApi({page: 1, pageSize: 3,status:'1'}).then(res=>{
this.hardwareList = res.data.records;
this.hardwareList.forEach(item => {
if (item.image.includes(",")){

View File

@ -246,7 +246,7 @@ export default {
})
},
getHardwareList(){
getListApi({page: 1, pageSize: 3,}).then(res=>{
getListApi({page: 1, pageSize: 3,status:'1'}).then(res=>{
this.hardwareList = res.data.records;
this.hardwareList.forEach(item => {
if (item.image.includes(",")){

View File

@ -2,32 +2,50 @@
<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 label="" prop="deptId">
<!-- <el-input-->
<!-- v-model="queryParams.deptId"-->
<!-- placeholder="请选择机构名称"-->
<!-- clearable-->
<!-- style="width: 240px;"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<el-select v-model="queryParams.deptId" placeholder="请选择机构名称" clearable>
<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="legalRepresentativeContact">
<el-input
v-model="queryParams.legalRepresentativeContact"
placeholder="请输入法人联系方式"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="" prop="deptType">
<el-select v-model="queryParams.deptType" placeholder="请选择机构类型" clearable>
<el-option label="代理商" value="1"></el-option>
<el-option label="连锁店" value="2"></el-option>
<el-option label="基本门店" value="3"></el-option>
<el-option label="三方机构" value="4"></el-option>
</el-select>
</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 label="" prop="paymentChannel">
<el-select v-model="queryParams.paymentChannel" placeholder="请选择支付通道" clearable>
<el-option
v-for="dict in dict.type.payment_channel"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择支付通道状态" clearable style="width: 200px;margin-right: 15px;">
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -35,7 +53,7 @@
<el-button
type="primary"
@click="handleAdd"
>新增小程序配置</el-button>
>新增支付参数</el-button>
</el-form-item>
</el-form>
</el-card>
@ -45,16 +63,42 @@
<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="deptType" label="机构类型">
<template slot-scope="scope">
<div v-if="scope.row.deptType==1">代理商</div>
<div v-if="scope.row.deptType==2">连锁店</div>
<div v-if="scope.row.deptType==3">基本门店</div>
<div v-if="scope.row.deptType==4">三方机构</div>
</template>
</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 prop="publicKey" label="公钥">
<template slot-scope="scope">
<div class="single-row">{{scope.row.publicKey}}</div>
</template>
</el-table-column>
<el-table-column prop="privateKey" label="私钥">
<template slot-scope="scope">
<div class="single-row">{{scope.row.privateKey}}</div>
</template>
</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="paymentChannelType" label="支付通道状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="qy"
inactive-value="jy"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="realName" 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">
@ -84,15 +128,10 @@
</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 :model="deviceInfo" ref="deviceForm" label-width="120px" :rules="rules">
<el-form-item label="机构名称" prop="unifiedSocialCreditCode">
<el-select v-model="deviceInfo.deptId" multiple placeholder="请选择机构">
<el-form-item label="机构名称" prop="deptId">
<el-select v-model="deviceInfo.deptId" placeholder="请选择机构" @change="chooseDept(deviceInfo.deptId)">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -101,24 +140,41 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="机构类型" prop="appId">
<el-input v-model="deviceInfo.appId"></el-input>
<el-form-item label="机构类型" prop="deptType">
<el-select v-model="deviceInfo.deptType" placeholder="请选择机构类型" clearable disabled>
<el-option label="代理商" value="1"></el-option>
<el-option label="连锁店" value="2"></el-option>
<el-option label="基本门店" value="3"></el-option>
<el-option label="三方机构" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="支付通道" prop="appKey">
<el-input v-model="deviceInfo.appKey"></el-input>
<el-form-item label="支付通道" prop="paymentChannel">
<el-select v-model="deviceInfo.paymentChannel" placeholder="请选择支付通道" clearable>
<el-option
v-for="dict in dict.type.payment_channel"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="公钥" prop="legalRepresentativeName">
<el-input v-model="deviceInfo.legalRepresentativeName"></el-input>
<el-form-item label="公钥" prop="publicKey">
<el-input v-model="deviceInfo.publicKey"></el-input>
</el-form-item>
<el-form-item label="私钥" prop="legalRepresentativeWeChat">
<el-input v-model="deviceInfo.legalRepresentativeWeChat"></el-input>
<el-form-item label="私钥" prop="privateKey">
<el-input v-model="deviceInfo.privateKey"></el-input>
</el-form-item>
<el-form-item label="联系人" prop="legalRepresentativeContact">
<el-input v-model="deviceInfo.legalRepresentativeContact"></el-input>
<el-form-item label="联系人" prop="contact">
<el-input v-model="deviceInfo.contact"></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="information">
<el-input v-model="deviceInfo.information"></el-input>
</el-form-item>
<el-form-item label="支付状态" prop="appStatus">
<el-switch
v-model="deviceInfo.appStatus"
v-model="deviceInfo.status"
active-value="qy"
inactive-value="jy"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
@ -127,7 +183,6 @@
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
</el-form-item>
</el-form>
</el-form>
</el-dialog>
</div>
@ -138,23 +193,30 @@
import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/app";
import {selectChildByDeptId} from "@/api/system/Site/site";
import {addMerchantApi, editMerchantRemark, getMerchant, listMerchantPage} from "@/api/payConfig/merchantconfig";
import {
addPaymentParameter, deletePaymentParameter,
editPaymentParameter,
getPaymentParameter,
listPaymentParameterPage
} from "@/api/payConfig/paymentParameter";
export default {
name: "printIndex",
dicts: ['zhzt','payment_channel'],
data() {
return {
tableData: [],
deviceInfo: {
deptName:'',
deptId:'',
deptType:'',
paymentChannel:'',
publicKey:'',
contact:'',
information:'',
paymentChannelType:'',
createByName:'',
createTime:'',
status:"qy"
},
deptListSelect:[],
@ -166,18 +228,46 @@ export default {
queryParams: {
page: 1,
pageSize: 10,
orgName:'',
legalRepresentativeContact:'',
appStatus:'',
},
rules: {
deptId: [
{required: true, message: '请选择机构名称', trigger: 'blur'},
],
deptType: [
{required: true, message: '请选择机构类型', trigger: 'blur'},
],
paymentChannel: [
{required: true, message: '请选择支付通道', trigger: 'blur'},
],
publicKey: [
{required: true, message: '请填写公钥信息', trigger: 'blur'},
],
privateKey: [
{required: true, message: '请填写私钥信息', trigger: 'blur'},
],
contact: [
{required: true, message: '请填写联系人信息', trigger: 'blur'},
],
information: [
{required: true, message: '请填写联系人方式', trigger: 'blur'},
],
}
};
},
created() {
this.getList()
this.selectChildByDeptIdApi()
},
methods: {
chooseDept(deptId){
this.deptListSelect.forEach(item => {
if (item.deptId == deptId){
this.deviceInfo.deptType = item.deptType
}
})
},
getList(){
getAppListApi(this.queryParams).then(res=>{
listPaymentParameterPage(this.queryParams).then(res=>{
this.tableData = res.data.records;
this.total = res.data.total
})
@ -187,6 +277,7 @@ export default {
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
this.deviceInfo.merchantName = this.deviceInfo.paymentChannel
//
// API
this.submitDeviceInfo();
@ -200,18 +291,23 @@ export default {
//
console.log('提交设备信息数据:', this.deviceInfo);
if (this.deviceInfo.id) {
updateAppApi(this.deviceInfo).then(res=>{
if(res.code === 200) {
editPaymentParameter(this.deviceInfo).then(res => {
if (res.data === 1) {
this.$modal.msgSuccess("修改成功")
this.getList()
this.open = false
}
})
}else {
saveAppApi(this.deviceInfo).then(res=>{
if(res.code === 200) {
addPaymentParameter(this.deviceInfo).then(res => {
if (res.data == 1) {
this.$modal.msgSuccess("添加成功");
this.getList()
this.open = false
} else if (res.data == 0) {
this.$modal.msgError("添加失败,当前通道未配置")
}else {
this.$modal.msgError("商户编号不可重复")
}
})
}
@ -231,15 +327,18 @@ export default {
this.clean()
this.open = true;
this.title = "增加设备"
this.selectChildByDeptIdApi();
// this.selectChildByDeptIdApi();
},
edit(e) {
this.clean()
this.open = true;
this.title = "编辑设备"
this.deviceInfo = e
console.log('提交设备信息数据:', this.deviceInfo);
// this.open = true;
// this.title = ""
// this.deviceInfo = e
getPaymentParameter(e.id).then(res => {
this.open = true;
this.title = "编辑设备"
this.deviceInfo = res.data
})
},
selectChildByDeptIdApi() {
selectChildByDeptId().then(res=>{
@ -254,7 +353,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteAppApi(e.id).then(res=>{
deletePaymentParameter(e.id).then(res=>{
if (res.code == 200) {
this.$message({
type: 'success',
@ -277,15 +376,13 @@ export default {
clean() {
this.deviceInfo= {
id: null, // id
deptName:'',
deptId:'',
deptType:'',
paymentChannel:'',
publicKey:'',
contact:'',
information:'',
paymentChannelType:'',
createByName:'',
createTime:'',
status:'qy'
}
},
}
@ -297,5 +394,13 @@ export default {
height: 50px;
line-height: 60px;
}
.app-container{
height: 100%;
}
.single-row {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>

View File

@ -1,7 +1,9 @@
package com.fuint.api.fuyou.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.api.fuyou.vo.MerchantConfigVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -20,6 +22,18 @@ public class MerchantConfigController extends BaseController {
@Autowired
private MerchantConfigService merchantConfigService;
/**
* 获取商户列表信息
* @return
*/
@GetMapping
public ResponseObject selectListPage(MerchantConfigVo merchantConfigVo,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
return getSuccessResult(merchantConfigService.selectListPage(page,merchantConfigVo));
}
/**
* 获取商户列表信息
* @return
@ -85,4 +99,9 @@ public class MerchantConfigController extends BaseController {
public ResponseObject delete(@PathVariable Integer id){
return getSuccessResult(merchantConfigService.deleteMerch(id));
}
@GetMapping("selectInfo/{id}")
public ResponseObject selectInfo(@PathVariable Integer id){
return getSuccessResult(merchantConfigService.selectInfo(id));
}
}

View File

@ -0,0 +1,92 @@
package com.fuint.api.fuyou.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.api.fuyou.entity.PaymentParameterConfig;
import com.fuint.api.fuyou.service.PaymentParameterConfigService;
import com.fuint.api.fuyou.vo.PaymentParameterConfigVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 支付参数配置表(PaymentParameterConfig)表控制层
*
* @author makejava
* @since 2024-07-24 09:18:04
*/
@RestController
@RequestMapping("paymentParameterConfig")
public class PaymentParameterConfigController extends BaseController {
/**
* 服务对象
*/
@Resource
private PaymentParameterConfigService paymentParameterConfigService;
/**
* 分页查询
*
* @param paymentParameterConfig 筛选条件
* @return 查询结果
*/
@GetMapping
public ResponseObject queryByPage(PaymentParameterConfigVo paymentParameterConfig,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize) {
Page page =new Page(pageNo,pageSize);
return getSuccessResult(paymentParameterConfigService.selectListPage(page,paymentParameterConfig));
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("{id}")
public ResponseObject queryById(@PathVariable("id") Integer id) {
return getSuccessResult(this.paymentParameterConfigService.queryById(id));
}
/**
* 新增数据
*
* @param paymentParameterConfig 实体
* @return 新增结果
*/
@PostMapping
public ResponseObject add(@RequestBody PaymentParameterConfigVo paymentParameterConfig) {
return getSuccessResult(this.paymentParameterConfigService.insert(paymentParameterConfig));
}
/**
* 编辑数据
*
* @param paymentParameterConfig 实体
* @return 编辑结果
*/
@PutMapping
public ResponseObject edit(@RequestBody PaymentParameterConfig paymentParameterConfig) {
return getSuccessResult(this.paymentParameterConfigService.update(paymentParameterConfig));
}
/**
* 删除数据
*
* @param id 主键
* @return 删除是否成功
*/
@DeleteMapping("/{id}")
public ResponseObject deleteById(@PathVariable Integer id) {
return getSuccessResult(this.paymentParameterConfigService.deleteById(id));
}
@GetMapping("getInfo/{id}")
public ResponseObject selectInfoById(@PathVariable Integer id){
return getSuccessResult(paymentParameterConfigService.selectInfoById(id));
}
}

View File

@ -81,9 +81,25 @@ public class MerchantConfig extends BaseEntity implements Serializable {
* 备注信息
*/
private String remark;
/**
* 联系人
*/
private String contact;
/**
* 联系电话
*/
private String information;
/**
* 支付通道
*/
private String paymentChannel;
/**
* 支付类型
*/
private String paymentChannelType;
/**
* 支付类型
*/
private String status;
}

View File

@ -0,0 +1,77 @@
package com.fuint.api.fuyou.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 支付参数配置表(PaymentParameterConfig)实体类
*
* @author makejava
* @since 2024-07-24 09:18:13
*/
@Data
@TableName("payment_parameter_config")
@ApiModel(value = "PaymentParameterConfig", description = "支付参数配置表")
public class PaymentParameterConfig extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 机构id
*/
private Integer deptId;
/**
* 支付通道数据字典
*/
private String paymentChannel;
/**
* 公钥
*/
private String publicKey;
/**
* 私钥
*/
private String privateKey;
/**
* 联系人
*/
private String contact;
/**
* 联系方式
*/
private String information;
/**
* 支付通道状态
*/
private String status;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建用户
*/
private String createBy;
/**
* 修改用户
*/
private String updateBy;
}

View File

@ -1,6 +1,8 @@
package com.fuint.api.fuyou.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.vo.MerchantConfigVo;
import org.apache.ibatis.annotations.Param;
@ -12,4 +14,8 @@ public interface MerchantConfigMapper extends BaseMapper<MerchantConfig> {
int subtractAmount(@Param("id") Integer id,@Param("changeTheAmount") Double changeTheAmount);
List<MerchantConfigVo> selectList1(@Param("merchantConfig") MerchantConfigVo merchantConfig);
IPage<MerchantConfigVo> selectListPage(Page page,@Param("merchantConfig") MerchantConfigVo merchantConfig);
MerchantConfigVo selectInfo(@Param("id") Integer id);
}

View File

@ -0,0 +1,23 @@
package com.fuint.api.fuyou.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.api.fuyou.entity.PaymentParameterConfig;
import com.fuint.api.fuyou.vo.PaymentParameterConfigVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* 支付参数配置表(PaymentParameterConfig)表数据库访问层
*
* @author makejava
* @since 2024-07-24 09:18:04
*/
public interface PaymentParameterConfigMapper extends BaseMapper<PaymentParameterConfig> {
IPage<PaymentParameterConfigVo> selectListPage(Page page,@Param("entity") PaymentParameterConfigVo paymentParameterConfigVo);
PaymentParameterConfigVo selectInfoById(@Param("id") Integer id);
}

View File

@ -23,4 +23,33 @@
mc.store_id = #{merchantConfig.storeId}
</where>
</select>
<select id="selectListPage" resultType="com.fuint.api.fuyou.vo.MerchantConfigVo">
SELECT mc.*,sd.dept_name,sd.dept_type,ta.real_name FROM `merchant_config` mc
LEFT JOIN sys_dept sd ON mc.dept_id = sd.dept_id
LEFT JOIN t_account ta ON mc.create_by = ta.acct_id
<where>
<if test="merchantConfig.deptId != null and merchantConfig.deptId != ''">
and mc.dept_id = #{merchantConfig.deptId}
</if>
<if test="merchantConfig.deptName != null and merchantConfig.deptName != ''">
and sd.dept_name like CONCAT('%',#{merchantConfig.deptName},'%')
</if>
<if test="merchantConfig.deptType != null and merchantConfig.deptType != ''">
and sd.dept_type = #{merchantConfig.deptType}
</if>
<if test="merchantConfig.paymentChannel != null and merchantConfig.paymentChannel != ''">
and mc.payment_channel = #{merchantConfig.paymentChannel}
</if>
<if test="merchantConfig.status != null and merchantConfig.status != ''">
and mc.status = #{merchantConfig.status}
</if>
</where>
</select>
<select id="selectInfo" resultType="com.fuint.api.fuyou.vo.MerchantConfigVo"
parameterType="java.lang.Integer">
SELECT mc.*,sd.dept_name,sd.dept_type,ta.real_name FROM `merchant_config` mc
LEFT JOIN sys_dept sd ON mc.dept_id = sd.dept_id
LEFT JOIN t_account ta ON mc.create_by = ta.acct_id
where mc.id = #{id}
</select>
</mapper>

View File

@ -0,0 +1,34 @@
<?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.api.fuyou.mapper.PaymentParameterConfigMapper">
<select id="selectListPage" resultType="com.fuint.api.fuyou.vo.PaymentParameterConfigVo">
SELECT ppc.*,sd.dept_name,sd.dept_type,ta.real_name FROM `payment_parameter_config` ppc
LEFT JOIN sys_dept sd ON ppc.dept_id = sd.dept_id
LEFT JOIN t_account ta ON ppc.create_by = ta.acct_id
<where>
<if test="entity.deptId != null and entity.deptId != ''">
and ppc.dept_id = #{entity.deptId}
</if>
<if test="entity.deptName != null and entity.deptName != ''">
and sd.dept_name like CONCAT('%',#{entity.deptName},'%')
</if>
<if test="entity.deptType != null and entity.deptType != ''">
and sd.dept_type = #{entity.deptType}
</if>
<if test="entity.paymentChannel != null and entity.paymentChannel != ''">
and ppc.payment_channel = #{entity.paymentChannel}
</if>
<if test="entity.status != null and entity.status != ''">
and ppc.status = #{entity.status}
</if>
</where>
</select>
<select id="selectInfoById" resultType="com.fuint.api.fuyou.vo.PaymentParameterConfigVo">
SELECT ppc.*,sd.dept_name,sd.dept_type,ta.real_name FROM `payment_parameter_config` ppc
LEFT JOIN sys_dept sd ON ppc.dept_id = sd.dept_id
LEFT JOIN t_account ta ON ppc.create_by = ta.acct_id
where ppc.id = #{id}
</select>
</mapper>

View File

@ -1,9 +1,12 @@
package com.fuint.api.fuyou.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.vo.MerchantConfigVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -126,4 +129,14 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
* @return
*/
Double selectAllAmount(String merchantName,List<Integer> storeIds);
/**
* 分页查询
* @param page
* @param merchantConfig
* @return
*/
IPage<MerchantConfigVo> selectListPage(Page page, MerchantConfigVo merchantConfig);
MerchantConfigVo selectInfo(Integer id);
}

View File

@ -0,0 +1,54 @@
package com.fuint.api.fuyou.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.api.fuyou.entity.PaymentParameterConfig;
import com.fuint.api.fuyou.vo.PaymentParameterConfigVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.PageRequest;
/**
* 支付参数配置表(PaymentParameterConfig)表服务接口
*
* @author makejava
* @since 2024-07-24 09:18:17
*/
public interface PaymentParameterConfigService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
PaymentParameterConfig queryById(Integer id);
/**
* 新增数据
*
* @param paymentParameterConfig 实例对象
* @return 实例对象
*/
int insert(PaymentParameterConfigVo paymentParameterConfig);
/**
* 修改数据
*
* @param paymentParameterConfig 实例对象
* @return 实例对象
*/
int update(PaymentParameterConfig paymentParameterConfig);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
int deleteById(Integer id);
IPage<PaymentParameterConfigVo> selectListPage(Page page, PaymentParameterConfigVo paymentParameterConfigVo);
PaymentParameterConfigVo selectInfoById(Integer id);
}

View File

@ -2,6 +2,8 @@ package com.fuint.api.fuyou.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.api.fuyou.entity.FuYouPublicMerchant;
import com.fuint.api.fuyou.entity.MerchantConfig;
@ -11,6 +13,8 @@ import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.api.fuyou.service.OilConfigService;
import com.fuint.api.fuyou.service.PaymentRuleConfigService;
import com.fuint.api.fuyou.vo.MerchantConfigVo;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.RedisLock;
import com.fuint.common.util.TokenUtil;
@ -36,6 +40,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
@Lazy
private PaymentRuleConfigService paymentRuleConfigService;
@Autowired
@Lazy
private ILJStoreService storeService;
@Override
public MerchantConfig selectMeChByIsUse(String isUse) {
QueryWrapper queryWrapper = new QueryWrapper<>();
@ -212,6 +220,7 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
merchantConfig.setInsCd(FuYouPublicMerchant.insCd);
merchantConfig.setPublicKey(FuYouPublicMerchant.publicKey);
merchantConfig.setPrivateKey(FuYouPublicMerchant.privateKey);
merchantConfig.setPaymentChannel(merchantConfig.getMerchantName());
}else {
row = 0;
return row;
@ -276,5 +285,15 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
return amount;
}
@Override
public IPage<MerchantConfigVo> selectListPage(Page page, MerchantConfigVo merchantConfig) {
return baseMapper.selectListPage(page,merchantConfig);
}
@Override
public MerchantConfigVo selectInfo(Integer id) {
return baseMapper.selectInfo(id);
}
}

View File

@ -0,0 +1,78 @@
package com.fuint.api.fuyou.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.api.fuyou.entity.PaymentParameterConfig;
import com.fuint.api.fuyou.mapper.PaymentParameterConfigMapper;
import com.fuint.api.fuyou.service.PaymentParameterConfigService;
import com.fuint.api.fuyou.vo.PaymentParameterConfigVo;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import javax.annotation.Resource;
/**
* 支付参数配置表(PaymentParameterConfig)表服务实现类
*
* @author makejava
* @since 2024-07-24 09:18:17
*/
@Service("paymentParameterConfigService")
public class PaymentParameterConfigServiceImpl extends ServiceImpl<PaymentParameterConfigMapper,PaymentParameterConfig> implements PaymentParameterConfigService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public PaymentParameterConfig queryById(Integer id) {
return this.baseMapper.selectById(id);
}
/**
* 新增数据
*
* @param paymentParameterConfig 实例对象
* @return 实例对象
*/
@Override
public int insert(PaymentParameterConfigVo paymentParameterConfig) {
return baseMapper.insert(paymentParameterConfig);
}
/**
* 修改数据
*
* @param paymentParameterConfig 实例对象
* @return 实例对象
*/
@Override
public int update(PaymentParameterConfig paymentParameterConfig) {
return baseMapper.updateById(paymentParameterConfig);
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public int deleteById(Integer id) {
return this.baseMapper.deleteById(id);
}
@Override
public IPage<PaymentParameterConfigVo> selectListPage(Page page, PaymentParameterConfigVo paymentParameterConfigVo) {
return baseMapper.selectListPage(page,paymentParameterConfigVo);
}
@Override
public PaymentParameterConfigVo selectInfoById(Integer id) {
return baseMapper.selectInfoById(id);
}
}

View File

@ -9,6 +9,18 @@ public class MerchantConfigVo extends MerchantConfig {
* 机构名称
*/
private String deptName;
/**
* 机构类型
*/
private String deptType;
/**
* 联系人
*/
private String leaderName;
/**
* 联系电话
*/
private String leaderPhone;
/**
* 创建人名称
*/

View File

@ -0,0 +1,20 @@
package com.fuint.api.fuyou.vo;
import com.fuint.api.fuyou.entity.PaymentParameterConfig;
import lombok.Data;
@Data
public class PaymentParameterConfigVo extends PaymentParameterConfig {
/**
* 机构名称
*/
private String deptName;
/**
* 机构类型
*/
private String deptType;
/**
* 创建人名称
*/
private String realName;
}

View File

@ -1,6 +1,7 @@
package com.fuint.business.order.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.fasterxml.jackson.annotation.JsonFormat;
@ -92,7 +93,7 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
*/
private String refOrderNo;
private String refBy;
@TableField(exist = false)
List<allorderVOo> fenxiByDaili2;
}