Browse Source

更改

tb-branch
CYF 1 month ago
parent
commit
058f19a3c7
12 changed files with 54 additions and 1112 deletions
  1. +0
    -44
      CatmDogd-Mall-Front-test/api/model/AppTourist.js
  2. +0
    -44
      CatmDogd-Mall-Front-test/src/api/model/Wallet.js
  3. +0
    -278
      CatmDogd-Mall-Front-test/src/views/model/Wallet/index.vue
  4. +0
    -269
      CatmDogd-Mall-Front-test/views/model/AppTourist/index.vue
  5. +24
    -3
      ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/AppletUserController.java
  6. +30
    -5
      ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/AppletWalletController.java
  7. +0
    -104
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/WalletController.java
  8. +0
    -65
      ruoyi-catdog/src/main/java/com/ruoyi/model/domain/Wallet.java
  9. +0
    -68
      ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/WalletMapper.java
  10. +0
    -68
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/IWalletService.java
  11. +0
    -98
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/WalletServiceImpl.java
  12. +0
    -66
      ruoyi-catdog/src/main/resources/mapper/model/WalletMapper.xml

+ 0
- 44
CatmDogd-Mall-Front-test/api/model/AppTourist.js View File

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询游客列表
export function listAppTourist(query) {
return request({
url: '/model/AppTourist/list',
method: 'get',
params: query
})
}
// 查询游客详细
export function getAppTourist(id) {
return request({
url: '/model/AppTourist/' + id,
method: 'get'
})
}
// 新增游客
export function addAppTourist(data) {
return request({
url: '/model/AppTourist',
method: 'post',
data: data
})
}
// 修改游客
export function updateAppTourist(data) {
return request({
url: '/model/AppTourist',
method: 'put',
data: data
})
}
// 删除游客
export function delAppTourist(id) {
return request({
url: '/model/AppTourist/' + id,
method: 'delete'
})
}

+ 0
- 44
CatmDogd-Mall-Front-test/src/api/model/Wallet.js View File

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询钱包列表
export function listWallet(query) {
return request({
url: '/model/Wallet/list',
method: 'get',
params: query
})
}
// 查询钱包详细
export function getWallet(id) {
return request({
url: '/model/Wallet/' + id,
method: 'get'
})
}
// 新增钱包
export function addWallet(data) {
return request({
url: '/model/Wallet',
method: 'post',
data: data
})
}
// 修改钱包
export function updateWallet(data) {
return request({
url: '/model/Wallet',
method: 'put',
data: data
})
}
// 删除钱包
export function delWallet(id) {
return request({
url: '/model/Wallet/' + id,
method: 'delete'
})
}

+ 0
- 278
CatmDogd-Mall-Front-test/src/views/model/Wallet/index.vue View File

@ -1,278 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
<el-form-item label="钱包金额" prop="price">
<el-input
v-model="queryParams.price"
placeholder="请输入钱包金额"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="交易明细编号" prop="tid">
<el-input
v-model="queryParams.tid"
placeholder="请输入交易明细编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item class="flex_one tr">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['model:Wallet:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['model:Wallet:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['model:Wallet:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['model:Wallet:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="WalletList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="钱包编号" align="center" prop="id" />
<el-table-column label="钱包金额" align="center" prop="price" v-if="columns[0].visible"/>
<el-table-column label="交易明细编号" align="center" prop="tid" v-if="columns[1].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['model:Wallet:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['model:Wallet:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改钱包对话框 -->
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
<el-form-item label="钱包金额" prop="price">
<el-input v-model="form.price" placeholder="请输入钱包金额" />
</el-form-item>
<el-form-item label="交易明细编号" prop="tid">
<el-input v-model="form.tid" placeholder="请输入交易明细编号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listWallet, getWallet, delWallet, addWallet, updateWallet, exportWallet } from "@/api/model/Wallet";
export default {
name: "Wallet",
data() {
return {
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
WalletList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
price: null,
tid: null,
},
//
form: {},
//
rules: {
},
columns: [
{ key: 1, label: "钱包金额", visible: true },
{ key: 2, label: "交易明细编号", visible: true },
],
};
},
created() {
this.getList();
},
methods: {
/** 查询钱包列表 */
getList() {
this.loading = true;
listWallet(this.queryParams).then(response => {
this.WalletList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
price: null,
tid: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加钱包";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getWallet(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改钱包";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateWallet(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addWallet(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除钱包编号为"' + ids + '"的数据项?').then(function() {
return delWallet(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$modal.confirm('是否确认导出所有钱包数据项?').then(() => {
this.exportLoading = true;
return exportWallet(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

+ 0
- 269
CatmDogd-Mall-Front-test/views/model/AppTourist/index.vue View File

@ -1,269 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
<el-form-item label="游客昵称为未登录" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入游客昵称为未登录"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item class="flex_one tr">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['model:AppTourist:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['model:AppTourist:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['model:AppTourist:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['model:AppTourist:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="AppTouristList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="${comment}" align="center" prop="id" />
<el-table-column label="游客昵称为未登录" align="center" prop="name" v-if="columns[0].visible"/>
<el-table-column label="默认小程序logo" align="center" prop="icon" v-if="columns[1].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['model:AppTourist:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['model:AppTourist:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改游客对话框 -->
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
<el-form-item label="游客昵称为未登录" prop="name">
<el-input v-model="form.name" placeholder="请输入游客昵称为未登录" />
</el-form-item>
<el-form-item label="默认小程序logo">
<imageUpload v-model="form.icon"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listAppTourist, getAppTourist, delAppTourist, addAppTourist, updateAppTourist, exportAppTourist } from "@/api/model/AppTourist";
export default {
name: "AppTourist",
data() {
return {
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
AppTouristList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
icon: null,
},
//
form: {},
//
rules: {
},
columns: [
{ key: 1, label: "游客昵称为未登录", visible: true },
{ key: 2, label: "默认小程序logo", visible: false },
],
};
},
created() {
this.getList();
},
methods: {
/** 查询游客列表 */
getList() {
this.loading = true;
listAppTourist(this.queryParams).then(response => {
this.AppTouristList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
name: null,
icon: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加游客";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getAppTourist(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改游客";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateAppTourist(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addAppTourist(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除游客编号为"' + ids + '"的数据项?').then(function() {
return delAppTourist(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$modal.confirm('是否确认导出所有游客数据项?').then(() => {
this.exportLoading = true;
return exportAppTourist(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

+ 24
- 3
ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/AppletUserController.java View File

@ -2,13 +2,14 @@ package com.ruoyi.applet.contoller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.domain.AppUsers;
import com.ruoyi.model.service.IAppTouristService;
import com.ruoyi.model.service.IAppUsersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@Api(description = "用户")
@RestController
@ -18,9 +19,29 @@ public class AppletUserController extends BaseController {
@Autowired
private IAppTouristService appTouristService;
@Autowired
private IAppUsersService appUsersService;
@ApiOperation("游客模式")
@GetMapping("/touristOne")
public AjaxResult getTouristOne(){
return AjaxResult.success(appTouristService.getAppTouristLimitOne());
}
@ApiOperation("单个用户")
@GetMapping("/userById/{id}")
public AjaxResult getUserById(@PathVariable Long id){
return AjaxResult.success(appUsersService.selectAppUsersByUserId(id));
}
/**
* 带条件查询所有用户
* @param appUsers
* @return
*/
@ApiOperation("所有用户")
@GetMapping("/allUsers")
public TableDataInfo selectAllUsers(@RequestBody AppUsers appUsers){
return getDataTable(appUsersService.selectAppUsersList(appUsers));
}
}

+ 30
- 5
ruoyi-catdog/src/main/java/com/ruoyi/applet/contoller/AppletWalletController.java View File

@ -1,13 +1,17 @@
package com.ruoyi.applet.contoller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.service.IAppTransactionDetailsService;
import com.ruoyi.model.service.IAppWalletService;
import com.ruoyi.model.service.IAppWithdrawalConfigService;
import com.ruoyi.model.service.ITransactionDetailsService;
import com.ruoyi.model.service.IWalletService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -15,13 +19,22 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/applet/wallet")
public class AppletWalletController extends BaseController {
//钱包
@Autowired
private IAppWalletService appWalletService;
//钱包提现配置
@Autowired
private IAppWithdrawalConfigService appWithdrawalConfigService;
@Autowired
private IWalletService walletService;
private IAppTransactionDetailsService appTransactionDetailsService;
@ApiOperation("钱包列表")
@GetMapping("/getWalletList")
public TableDataInfo getWalletList(){
return getDataTable(walletService.getWalletList());
@GetMapping("/getWalletList/{userId}")
public TableDataInfo getAppWalletByUserId(@PathVariable Long userId){
return getDataTable(appWalletService.getAppWalletByUserId(userId));
}
@Autowired
private ITransactionDetailsService transactionDetailsService;
@ -31,4 +44,16 @@ public class AppletWalletController extends BaseController {
public TableDataInfo getTransactionDetailsList(){
return getDataTable(transactionDetailsService.getTransactionDetailsList());
}
@ApiOperation("钱包提现规则")
@GetMapping("/getAppWithdrawal")
public AjaxResult getAppWithdrawalConfig(){
return AjaxResult.success(appWithdrawalConfigService.getAppWithdrawalConfig());
}
@ApiOperation("交易明细记录")
@GetMapping("/getTransactionDetails/{wid}")
public TableDataInfo getAppTransactionDetailsByWid(@PathVariable Long wid){
return getDataTable(appTransactionDetailsService.getAppTransactionDetailsByWid(wid));
}
}

+ 0
- 104
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/WalletController.java View File

@ -1,104 +0,0 @@
package com.ruoyi.model.controller;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.model.domain.Wallet;
import com.ruoyi.model.service.IWalletService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 钱包Controller
*
* @author ruoyi
* @date 2025-03-05
*/
@RestController
@RequestMapping("/model/Wallet")
public class WalletController extends BaseController
{
@Autowired
private IWalletService walletService;
/**
* 查询钱包列表
*/
@PreAuthorize("@ss.hasPermi('model:Wallet:list')")
@GetMapping("/list")
public TableDataInfo list(Wallet wallet)
{
startPage();
List<Wallet> list = walletService.selectWalletList(wallet);
return getDataTable(list);
}
/**
* 导出钱包列表
*/
@PreAuthorize("@ss.hasPermi('model:Wallet:export')")
@Log(title = "钱包", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Wallet wallet) throws IOException {
List<Wallet> list = walletService.selectWalletList(wallet);
ExcelUtil<Wallet> util = new ExcelUtil<Wallet>(Wallet.class);
util.exportExcel(response, list, "钱包数据");
}
/**
* 获取钱包详细信息
*/
@PreAuthorize("@ss.hasPermi('model:Wallet:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(walletService.selectWalletById(id));
}
/**
* 新增钱包
*/
@PreAuthorize("@ss.hasPermi('model:Wallet:add')")
@Log(title = "钱包", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Wallet wallet)
{
return toAjax(walletService.insertWallet(wallet));
}
/**
* 修改钱包
*/
@PreAuthorize("@ss.hasPermi('model:Wallet:edit')")
@Log(title = "钱包", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Wallet wallet)
{
return toAjax(walletService.updateWallet(wallet));
}
/**
* 删除钱包
*/
@PreAuthorize("@ss.hasPermi('model:Wallet:remove')")
@Log(title = "钱包", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(walletService.deleteWalletByIds(ids));
}
}

+ 0
- 65
ruoyi-catdog/src/main/java/com/ruoyi/model/domain/Wallet.java View File

@ -1,65 +0,0 @@
package com.ruoyi.model.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 钱包对象 wallet
*
* @author ruoyi
* @date 2025-03-05
*/
public class Wallet extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 钱包编号 */
private Long id;
/** 钱包金额 */
@Excel(name = "钱包金额")
private Long price;
/** 交易明细编号 */
@Excel(name = "交易明细编号")
private Long tid;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPrice(Long price)
{
this.price = price;
}
public Long getPrice()
{
return price;
}
public void setTid(Long tid)
{
this.tid = tid;
}
public Long getTid()
{
return tid;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("price", getPrice())
.append("tid", getTid())
.toString();
}
}

+ 0
- 68
ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/WalletMapper.java View File

@ -1,68 +0,0 @@
package com.ruoyi.model.mapper;
import java.util.List;
import com.ruoyi.model.domain.Wallet;
/**
* 钱包Mapper接口
*
* @author ruoyi
* @date 2025-03-05
*/
public interface WalletMapper
{
/**
* 查询钱包
*
* @param id 钱包主键
* @return 钱包
*/
public Wallet selectWalletById(Long id);
/**
* 查询钱包列表
*
* @param wallet 钱包
* @return 钱包集合
*/
public List<Wallet> selectWalletList(Wallet wallet);
/**
* 新增钱包
*
* @param wallet 钱包
* @return 结果
*/
public int insertWallet(Wallet wallet);
/**
* 修改钱包
*
* @param wallet 钱包
* @return 结果
*/
public int updateWallet(Wallet wallet);
/**
* 删除钱包
*
* @param id 钱包主键
* @return 结果
*/
public int deleteWalletById(Long id);
/**
* 批量删除钱包
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteWalletByIds(Long[] ids);
/**
* 查询钱包列表
*
* @return 钱包集合
*/
public List<Wallet> getWalletList();
}

+ 0
- 68
ruoyi-catdog/src/main/java/com/ruoyi/model/service/IWalletService.java View File

@ -1,68 +0,0 @@
package com.ruoyi.model.service;
import java.util.List;
import com.ruoyi.model.domain.Wallet;
/**
* 钱包Service接口
*
* @author ruoyi
* @date 2025-03-05
*/
public interface IWalletService
{
/**
* 查询钱包
*
* @param id 钱包主键
* @return 钱包
*/
public Wallet selectWalletById(Long id);
/**
* 查询钱包列表
*
* @param wallet 钱包
* @return 钱包集合
*/
public List<Wallet> selectWalletList(Wallet wallet);
/**
* 新增钱包
*
* @param wallet 钱包
* @return 结果
*/
public int insertWallet(Wallet wallet);
/**
* 修改钱包
*
* @param wallet 钱包
* @return 结果
*/
public int updateWallet(Wallet wallet);
/**
* 批量删除钱包
*
* @param ids 需要删除的钱包主键集合
* @return 结果
*/
public int deleteWalletByIds(Long[] ids);
/**
* 删除钱包信息
*
* @param id 钱包主键
* @return 结果
*/
public int deleteWalletById(Long id);
/**
* 查询钱包列表
*
* @return 钱包集合
*/
public List<Wallet> getWalletList();
}

+ 0
- 98
ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/WalletServiceImpl.java View File

@ -1,98 +0,0 @@
package com.ruoyi.model.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.WalletMapper;
import com.ruoyi.model.domain.Wallet;
import com.ruoyi.model.service.IWalletService;
/**
* 钱包Service业务层处理
*
* @author ruoyi
* @date 2025-03-05
*/
@Service
public class WalletServiceImpl implements IWalletService
{
@Autowired
private WalletMapper walletMapper;
/**
* 查询钱包
*
* @param id 钱包主键
* @return 钱包
*/
@Override
public Wallet selectWalletById(Long id)
{
return walletMapper.selectWalletById(id);
}
/**
* 查询钱包列表
*
* @param wallet 钱包
* @return 钱包
*/
@Override
public List<Wallet> selectWalletList(Wallet wallet)
{
return walletMapper.selectWalletList(wallet);
}
/**
* 新增钱包
*
* @param wallet 钱包
* @return 结果
*/
@Override
public int insertWallet(Wallet wallet)
{
return walletMapper.insertWallet(wallet);
}
/**
* 修改钱包
*
* @param wallet 钱包
* @return 结果
*/
@Override
public int updateWallet(Wallet wallet)
{
return walletMapper.updateWallet(wallet);
}
/**
* 批量删除钱包
*
* @param ids 需要删除的钱包主键
* @return 结果
*/
@Override
public int deleteWalletByIds(Long[] ids)
{
return walletMapper.deleteWalletByIds(ids);
}
/**
* 删除钱包信息
*
* @param id 钱包主键
* @return 结果
*/
@Override
public int deleteWalletById(Long id)
{
return walletMapper.deleteWalletById(id);
}
@Override
public List<Wallet> getWalletList() {
return walletMapper.getWalletList();
}
}

+ 0
- 66
ruoyi-catdog/src/main/resources/mapper/model/WalletMapper.xml View File

@ -1,66 +0,0 @@
<?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.ruoyi.model.mapper.WalletMapper">
<resultMap type="Wallet" id="WalletResult">
<result property="id" column="id" />
<result property="price" column="price" />
<result property="tid" column="tid" />
</resultMap>
<sql id="selectWalletVo">
select id, price, tid from wallet
</sql>
<select id="selectWalletList" parameterType="Wallet" resultMap="WalletResult">
<include refid="selectWalletVo"/>
<where>
<if test="price != null "> and price = #{price}</if>
<if test="tid != null "> and tid = #{tid}</if>
</where>
</select>
<select id="selectWalletById" parameterType="Long" resultMap="WalletResult">
<include refid="selectWalletVo"/>
where id = #{id}
</select>
<select id="getWalletList" resultType="com.ruoyi.model.domain.Wallet">
<include refid="selectWalletVo"/>
</select>
<insert id="insertWallet" parameterType="Wallet">
insert into wallet
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="price != null">price,</if>
<if test="tid != null">tid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="price != null">#{price},</if>
<if test="tid != null">#{tid},</if>
</trim>
</insert>
<update id="updateWallet" parameterType="Wallet">
update wallet
<trim prefix="SET" suffixOverrides=",">
<if test="price != null">price = #{price},</if>
<if test="tid != null">tid = #{tid},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWalletById" parameterType="Long">
delete from wallet where id = #{id}
</delete>
<delete id="deleteWalletByIds" parameterType="String">
delete from wallet where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

Loading…
Cancel
Save