2 Commits

Author SHA1 Message Date
  CYF 7eab31e3ff Merge branch 'master' of http://175.178.51.79:3000/Augcl/pet-admin 3 weeks ago
  CYF 091292a965 CYF 3 weeks ago
18 changed files with 262 additions and 524 deletions
Unified View
  1. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletConfig.js
  2. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletOrder.js
  3. +36
    -23
      CatmDogd-Mall-Front-test/src/views/model/AppletConfig/index.vue
  4. +0
    -270
      CatmDogd-Mall-Front-test/src/views/model/AppletIncrease/index.vue
  5. +19
    -15
      CatmDogd-Mall-Front-test/src/views/model/AppletOrder/index.vue
  6. +7
    -7
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletConfigController.java
  7. +6
    -7
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletOrderController.java
  8. +0
    -104
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletTrainController.java
  9. +80
    -11
      ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletConfig.java
  10. +13
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletOrder.java
  11. +7
    -7
      ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletConfigMapper.java
  12. +6
    -7
      ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletOrderMapper.java
  13. +7
    -7
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletConfigService.java
  14. +6
    -7
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletOrderService.java
  15. +13
    -10
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletConfigServiceImpl.java
  16. +9
    -10
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletOrderServiceImpl.java
  17. +32
    -20
      ruoyi-catdog/src/main/resources/mapper/model/AppletConfigMapper.xml
  18. +13
    -11
      ruoyi-catdog/src/main/resources/mapper/model/AppletOrderMapper.xml

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletConfig.js View File

@ -10,9 +10,9 @@ export function listAppletConfig(query) {
} }
// 查询配置信息详细 // 查询配置信息详细
export function getAppletConfig(paramCode) {
export function getAppletConfig(id) {
return request({ return request({
url: '/model/AppletConfig/' + paramCode,
url: '/model/AppletConfig/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletConfig(data) {
} }
// 删除配置信息 // 删除配置信息
export function delAppletConfig(paramCode) {
export function delAppletConfig(id) {
return request({ return request({
url: '/model/AppletConfig/' + paramCode,
url: '/model/AppletConfig/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletOrder.js View File

@ -10,9 +10,9 @@ export function listAppletOrder(query) {
} }
// 查询订单信息详细 // 查询订单信息详细
export function getAppletOrder(createTime) {
export function getAppletOrder(id) {
return request({ return request({
url: '/model/AppletOrder/' + createTime,
url: '/model/AppletOrder/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletOrder(data) {
} }
// 删除订单信息 // 删除订单信息
export function delAppletOrder(createTime) {
export function delAppletOrder(id) {
return request({ return request({
url: '/model/AppletOrder/' + createTime,
url: '/model/AppletOrder/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 36
- 23
CatmDogd-Mall-Front-test/src/views/model/AppletConfig/index.vue View File

@ -83,16 +83,11 @@
<el-table v-loading="loading" :data="AppletConfigList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletConfigList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="参数编码" align="center" prop="paramCode" />
<el-table-column label="参数说明" align="center" prop="paramValue" />
<el-table-column label="参数值-普通文本" align="center" prop="paramValueText" />
<!-- <el-table-column label="参数值-图片" align="center" prop="paramValueImage" />-->
<el-table-column label="参数值-图片" align="center" prop="userImage">
<template slot-scope="{ row }">
<el-image v-if="row.paramValueImage" :src="row.paramValueImage" :preview-src-list="[row.paramValueImage]" class="small-img circle-img"/>
</template>
</el-table-column>
<!-- <el-table-column label="参数值-富文本" align="center" prop="paramValueArea"/>-->
<el-table-column label="唯一标识" align="center" prop="id" />
<el-table-column label="参数编码" align="center" prop="paramCode" v-if="columns[0].visible"/>
<el-table-column label="参数值-普通文本" align="center" prop="paramValueText" v-if="columns[1].visible"/>
<el-table-column label="参数值-图片" align="center" prop="paramValueImage" v-if="columns[2].visible"/>
<el-table-column label="参数值-富文本" align="center" prop="paramValueArea" v-if="columns[3].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -131,12 +126,14 @@
<el-input v-model="form.paramValueText" placeholder="请输入参数值-普通文本" /> <el-input v-model="form.paramValueText" placeholder="请输入参数值-普通文本" />
</el-form-item> </el-form-item>
<el-form-item label="参数值-图片"> <el-form-item label="参数值-图片">
<!-- <imageUpload v-model="form.paramValueImage"/>-->
<oss-image-upload v-model="form.paramValueImage" :limit="1"></oss-image-upload>
<imageUpload v-model="form.paramValueImage"/>
</el-form-item> </el-form-item>
<el-form-item label="参数值-富文本" prop="paramValueArea"> <el-form-item label="参数值-富文本" prop="paramValueArea">
<el-input v-model="form.paramValueArea" placeholder="请输入参数值-富文本" /> <el-input v-model="form.paramValueArea" placeholder="请输入参数值-富文本" />
</el-form-item> </el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -190,12 +187,16 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
}, },
columns: [ columns: [
{ key: 0, label: "参数编码", visible: true },
{ key: 1, label: "参数值-普通文本", visible: true },
{ key: 2, label: "参数值-图片", visible: false },
{ key: 3, label: "参数值-富文本", visible: true },
{ key: 1, label: "参数编码", visible: true },
{ key: 2, label: "参数值-普通文本", visible: true },
{ key: 3, label: "参数值-图片", visible: false },
{ key: 4, label: "参数值-富文本", visible: true },
], ],
}; };
}, },
@ -220,6 +221,8 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
id: null,
paramCode: null, paramCode: null,
paramValueText: null, paramValueText: null,
@ -228,6 +231,16 @@ export default {
paramValueArea: null, paramValueArea: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -243,7 +256,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.paramCode)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -256,8 +269,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const paramCode = row.paramCode || this.ids
getAppletConfig(paramCode).then(response => {
const id = row.id || this.ids
getAppletConfig(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改配置信息"; this.title = "修改配置信息";
@ -267,7 +280,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.paramCode != null) {
if (this.form.id != null) {
updateAppletConfig(this.form).then(response => { updateAppletConfig(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -285,9 +298,9 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const paramCodes = row.paramCode || this.ids;
this.$modal.confirm('是否确认删除配置信息编号为"' + paramCodes + '"的数据项?').then(function() {
return delAppletConfig(paramCodes);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除配置信息编号为"' + ids + '"的数据项?').then(function() {
return delAppletConfig(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");


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

@ -1,270 +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="title">
<el-input
v-model="queryParams.title"
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:AppletIncrease: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:AppletIncrease: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:AppletIncrease: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:AppletIncrease:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="AppletIncreaseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/>
<el-table-column label="详情" align="center" prop="detail" 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:AppletIncrease:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['model:AppletIncrease: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="title">
<el-input v-model="form.title" placeholder="请输入标题" />
</el-form-item>
<el-form-item label="详情" prop="detail">
<el-input v-model="form.detail" type="textarea" 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 { listAppletIncrease, getAppletIncrease, delAppletIncrease, addAppletIncrease, updateAppletIncrease, exportAppletIncrease } from "@/api/model/AppletIncrease";
export default {
name: "AppletIncrease",
data() {
return {
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
AppletIncreaseList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
title: null,
detail: null,
},
//
form: {},
//
rules: {
title: [
{ required: true, message: "标题不能为空", trigger: "blur" }
],
},
columns: [
{ key: 0, label: "标题", visible: true },
{ key: 1, label: "详情", visible: true },
],
};
},
created() {
this.getList();
},
methods: {
/** 查询增值服务列表 */
getList() {
this.loading = true;
listAppletIncrease(this.queryParams).then(response => {
this.AppletIncreaseList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
title: null,
detail: 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.title)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加增值服务";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const title = row.title || this.ids
getAppletIncrease(title).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改增值服务";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.title != null) {
updateAppletIncrease(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addAppletIncrease(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const titles = row.title || this.ids;
this.$modal.confirm('是否确认删除增值服务编号为"' + titles + '"的数据项?').then(function() {
return delAppletIncrease(titles);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$modal.confirm('是否确认导出所有增值服务数据项?').then(() => {
this.exportLoading = true;
return exportAppletIncrease(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

+ 19
- 15
CatmDogd-Mall-Front-test/src/views/model/AppletOrder/index.vue View File

@ -7,6 +7,7 @@
size="small" size="small"
v-model="queryParams.payTime" v-model="queryParams.payTime"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择支付时间"> placeholder="选择支付时间">
</el-date-picker> </el-date-picker>
@ -106,6 +107,7 @@
<el-table v-loading="loading" :data="AppletOrderList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletOrderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="唯一标识" align="center" prop="id" />
<el-table-column label="支付时间" align="center" prop="payTime" width="180" v-if="columns[0].visible"> <el-table-column label="支付时间" align="center" prop="payTime" width="180" v-if="columns[0].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.payTime, '')}}</span> <span>{{ parseTime(scope.row.payTime, '')}}</span>
@ -136,7 +138,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -256,13 +258,13 @@ export default {
}, },
columns: [ columns: [
{ key: 4, label: "支付时间", visible: true },
{ key: 5, label: "本单酬劳", visible: true },
{ key: 6, label: "地址", visible: true },
{ key: 7, label: "订单类型", visible: true },
{ key: 8, label: "无法接单原因", visible: true },
{ key: 9, label: "关联服务者ID", visible: true },
{ key: 10, label: "关联宠物ID", visible: false },
{ key: 5, label: "支付时间", visible: true },
{ key: 6, label: "本单酬劳", visible: true },
{ key: 7, label: "地址", visible: true },
{ key: 8, label: "订单类型", visible: true },
{ key: 9, label: "无法接单原因", visible: true },
{ key: 10, label: "关联服务者ID", visible: false },
{ key: 11, label: "关联宠物ID", visible: false },
], ],
}; };
}, },
@ -287,6 +289,8 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
id: null,
createTime: null, createTime: null,
createBy: null, createBy: null,
@ -324,7 +328,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.createTime)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -337,8 +341,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const createTime = row.createTime || this.ids
getAppletOrder(createTime).then(response => {
const id = row.id || this.ids
getAppletOrder(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改订单信息"; this.title = "修改订单信息";
@ -348,7 +352,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.createTime != null) {
if (this.form.id != null) {
updateAppletOrder(this.form).then(response => { updateAppletOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -366,9 +370,9 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const createTimes = row.createTime || this.ids;
this.$modal.confirm('是否确认删除订单信息编号为"' + createTimes + '"的数据项?').then(function() {
return delAppletOrder(createTimes);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除订单信息编号为"' + ids + '"的数据项?').then(function() {
return delAppletOrder(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");


+ 7
- 7
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletConfigController.java View File

@ -26,7 +26,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* 配置信息Controller * 配置信息Controller
* *
* @author ruoyi * @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/ */
@RestController @RestController
@RequestMapping("/model/AppletConfig") @RequestMapping("/model/AppletConfig")
@ -63,10 +63,10 @@ public class AppletConfigController extends BaseController
* 获取配置信息详细信息 * 获取配置信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('model:AppletConfig:query')") @PreAuthorize("@ss.hasPermi('model:AppletConfig:query')")
@GetMapping(value = "/{paramCode}")
public AjaxResult getInfo(@PathVariable("paramCode") String paramCode)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
return success(appletConfigService.selectAppletConfigByParamCode(paramCode));
return success(appletConfigService.selectAppletConfigById(id));
} }
/** /**
@ -96,9 +96,9 @@ public class AppletConfigController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('model:AppletConfig:remove')") @PreAuthorize("@ss.hasPermi('model:AppletConfig:remove')")
@Log(title = "配置信息", businessType = BusinessType.DELETE) @Log(title = "配置信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{paramCodes}")
public AjaxResult remove(@PathVariable String[] paramCodes)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(appletConfigService.deleteAppletConfigByParamCodes(paramCodes));
return toAjax(appletConfigService.deleteAppletConfigByIds(ids));
} }
} }

+ 6
- 7
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletOrderController.java View File

@ -1,7 +1,6 @@
package com.ruoyi.model.controller; package com.ruoyi.model.controller;
import java.io.IOException; import java.io.IOException;
import java.util.Date;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -64,10 +63,10 @@ public class AppletOrderController extends BaseController
* 获取订单信息详细信息 * 获取订单信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('model:AppletOrder:query')") @PreAuthorize("@ss.hasPermi('model:AppletOrder:query')")
@GetMapping(value = "/{createTime}")
public AjaxResult getInfo(@PathVariable("createTime") Date createTime)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
return success(appletOrderService.selectAppletOrderByCreateTime(createTime));
return success(appletOrderService.selectAppletOrderById(id));
} }
/** /**
@ -97,9 +96,9 @@ public class AppletOrderController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('model:AppletOrder:remove')") @PreAuthorize("@ss.hasPermi('model:AppletOrder:remove')")
@Log(title = "订单信息", businessType = BusinessType.DELETE) @Log(title = "订单信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{createTimes}")
public AjaxResult remove(@PathVariable Date[] createTimes)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(appletOrderService.deleteAppletOrderByCreateTimes(createTimes));
return toAjax(appletOrderService.deleteAppletOrderByIds(ids));
} }
} }

+ 0
- 104
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletTrainController.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.AppletTrain;
import com.ruoyi.model.service.IAppletTrainService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 服务培训Controller
*
* @author ruoyi
* @date 2025-03-28
*/
@RestController
@RequestMapping("/model/AppletTrain")
public class AppletTrainController extends BaseController
{
@Autowired
private IAppletTrainService appletTrainService;
/**
* 查询服务培训列表
*/
@PreAuthorize("@ss.hasPermi('model:AppletTrain:list')")
@GetMapping("/list")
public TableDataInfo list(AppletTrain appletTrain)
{
startPage();
List<AppletTrain> list = appletTrainService.selectAppletTrainList(appletTrain);
return getDataTable(list);
}
/**
* 导出服务培训列表
*/
@PreAuthorize("@ss.hasPermi('model:AppletTrain:export')")
@Log(title = "服务培训", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AppletTrain appletTrain) throws IOException {
List<AppletTrain> list = appletTrainService.selectAppletTrainList(appletTrain);
ExcelUtil<AppletTrain> util = new ExcelUtil<AppletTrain>(AppletTrain.class);
util.exportExcel(response, list, "服务培训数据");
}
/**
* 获取服务培训详细信息
*/
@PreAuthorize("@ss.hasPermi('model:AppletTrain:query')")
@GetMapping(value = "/{title}")
public AjaxResult getInfo(@PathVariable("title") String title)
{
return success(appletTrainService.selectAppletTrainByTitle(title));
}
/**
* 新增服务培训
*/
@PreAuthorize("@ss.hasPermi('model:AppletTrain:add')")
@Log(title = "服务培训", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AppletTrain appletTrain)
{
return toAjax(appletTrainService.insertAppletTrain(appletTrain));
}
/**
* 修改服务培训
*/
@PreAuthorize("@ss.hasPermi('model:AppletTrain:edit')")
@Log(title = "服务培训", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AppletTrain appletTrain)
{
return toAjax(appletTrainService.updateAppletTrain(appletTrain));
}
/**
* 删除服务培训
*/
@PreAuthorize("@ss.hasPermi('model:AppletTrain:remove')")
@Log(title = "服务培训", businessType = BusinessType.DELETE)
@DeleteMapping("/{titles}")
public AjaxResult remove(@PathVariable String[] titles)
{
return toAjax(appletTrainService.deleteAppletTrainByTitles(titles));
}
}

+ 80
- 11
ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletConfig.java View File

@ -1,20 +1,23 @@
package com.ruoyi.model.domain; package com.ruoyi.model.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 配置信息表对象 applet_config
*
* @author daixiande
* 配置信息对象 applet_config
*
* @author ruoyi
* @date 2025-03-28
*/ */
@Data
public class AppletConfig {
public class AppletConfig extends BaseEntity
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 唯一标识 */
private Long id;
/** 参数编码 */ /** 参数编码 */
@Excel(name = "参数编码") @Excel(name = "参数编码")
private String paramCode; private String paramCode;
@ -31,11 +34,77 @@ public class AppletConfig {
@Excel(name = "参数值-富文本") @Excel(name = "参数值-富文本")
private String paramValueArea; private String paramValueArea;
/** 标识 */
private Long id;
/** 删除标识 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setParamCode(String paramCode)
{
this.paramCode = paramCode;
}
public String getParamCode()
{
return paramCode;
}
public void setParamValueText(String paramValueText)
{
this.paramValueText = paramValueText;
}
public String getParamValueText()
{
return paramValueText;
}
public void setParamValueImage(String paramValueImage)
{
this.paramValueImage = paramValueImage;
}
public String getParamValueImage()
{
return paramValueImage;
}
public void setParamValueArea(String paramValueArea)
{
this.paramValueArea = paramValueArea;
}
public String getParamValueArea()
{
return paramValueArea;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
/** 参数说明 */
@Excel(name = "参数说明")
private String paramValue;
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("paramCode", getParamCode())
.append("paramValueText", getParamValueText())
.append("paramValueImage", getParamValueImage())
.append("paramValueArea", getParamValueArea())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
} }

+ 13
- 0
ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletOrder.java View File

@ -18,6 +18,9 @@ public class AppletOrder extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 唯一标识 */
private Long id;
/** 支付时间 */ /** 支付时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
@ -47,6 +50,15 @@ public class AppletOrder extends BaseEntity
@Excel(name = "关联宠物ID") @Excel(name = "关联宠物ID")
private Long petId; private Long petId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPayTime(Date payTime) public void setPayTime(Date payTime)
{ {
this.payTime = payTime; this.payTime = payTime;
@ -114,6 +126,7 @@ public class AppletOrder extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())


+ 7
- 7
ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletConfigMapper.java View File

@ -7,17 +7,17 @@ import com.ruoyi.model.domain.AppletConfig;
* 配置信息Mapper接口 * 配置信息Mapper接口
* *
* @author ruoyi * @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/ */
public interface AppletConfigMapper public interface AppletConfigMapper
{ {
/** /**
* 查询配置信息 * 查询配置信息
* *
* @param paramCode 配置信息主键
* @param id 配置信息主键
* @return 配置信息 * @return 配置信息
*/ */
public AppletConfig selectAppletConfigByParamCode(String paramCode);
public AppletConfig selectAppletConfigById(Long id);
/** /**
* 查询配置信息列表 * 查询配置信息列表
@ -46,16 +46,16 @@ public interface AppletConfigMapper
/** /**
* 删除配置信息 * 删除配置信息
* *
* @param paramCode 配置信息主键
* @param id 配置信息主键
* @return 结果 * @return 结果
*/ */
public int deleteAppletConfigByParamCode(String paramCode);
public int deleteAppletConfigById(Long id);
/** /**
* 批量删除配置信息 * 批量删除配置信息
* *
* @param paramCodes 需要删除的数据主键集合
* @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteAppletConfigByParamCodes(String[] paramCodes);
public int deleteAppletConfigByIds(Long[] ids);
} }

+ 6
- 7
ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletOrderMapper.java View File

@ -1,6 +1,5 @@
package com.ruoyi.model.mapper; package com.ruoyi.model.mapper;
import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.model.domain.AppletOrder; import com.ruoyi.model.domain.AppletOrder;
@ -15,10 +14,10 @@ public interface AppletOrderMapper
/** /**
* 查询订单信息 * 查询订单信息
* *
* @param createTime 订单信息主键
* @param id 订单信息主键
* @return 订单信息 * @return 订单信息
*/ */
public AppletOrder selectAppletOrderByCreateTime(Date createTime);
public AppletOrder selectAppletOrderById(Long id);
/** /**
* 查询订单信息列表 * 查询订单信息列表
@ -47,16 +46,16 @@ public interface AppletOrderMapper
/** /**
* 删除订单信息 * 删除订单信息
* *
* @param createTime 订单信息主键
* @param id 订单信息主键
* @return 结果 * @return 结果
*/ */
public int deleteAppletOrderByCreateTime(Date createTime);
public int deleteAppletOrderById(Long id);
/** /**
* 批量删除订单信息 * 批量删除订单信息
* *
* @param createTimes 需要删除的数据主键集合
* @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteAppletOrderByCreateTimes(Date[] createTimes);
public int deleteAppletOrderByIds(Long[] ids);
} }

+ 7
- 7
ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletConfigService.java View File

@ -7,17 +7,17 @@ import com.ruoyi.model.domain.AppletConfig;
* 配置信息Service接口 * 配置信息Service接口
* *
* @author ruoyi * @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/ */
public interface IAppletConfigService public interface IAppletConfigService
{ {
/** /**
* 查询配置信息 * 查询配置信息
* *
* @param paramCode 配置信息主键
* @param id 配置信息主键
* @return 配置信息 * @return 配置信息
*/ */
public AppletConfig selectAppletConfigByParamCode(String paramCode);
public AppletConfig selectAppletConfigById(Long id);
/** /**
* 查询配置信息列表 * 查询配置信息列表
@ -46,16 +46,16 @@ public interface IAppletConfigService
/** /**
* 批量删除配置信息 * 批量删除配置信息
* *
* @param paramCodes 需要删除的配置信息主键集合
* @param ids 需要删除的配置信息主键集合
* @return 结果 * @return 结果
*/ */
public int deleteAppletConfigByParamCodes(String[] paramCodes);
public int deleteAppletConfigByIds(Long[] ids);
/** /**
* 删除配置信息信息 * 删除配置信息信息
* *
* @param paramCode 配置信息主键
* @param id 配置信息主键
* @return 结果 * @return 结果
*/ */
public int deleteAppletConfigByParamCode(String paramCode);
public int deleteAppletConfigById(Long id);
} }

+ 6
- 7
ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletOrderService.java View File

@ -1,6 +1,5 @@
package com.ruoyi.model.service; package com.ruoyi.model.service;
import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.model.domain.AppletOrder; import com.ruoyi.model.domain.AppletOrder;
@ -15,10 +14,10 @@ public interface IAppletOrderService
/** /**
* 查询订单信息 * 查询订单信息
* *
* @param createTime 订单信息主键
* @param id 订单信息主键
* @return 订单信息 * @return 订单信息
*/ */
public AppletOrder selectAppletOrderByCreateTime(Date createTime);
public AppletOrder selectAppletOrderById(Long id);
/** /**
* 查询订单信息列表 * 查询订单信息列表
@ -47,16 +46,16 @@ public interface IAppletOrderService
/** /**
* 批量删除订单信息 * 批量删除订单信息
* *
* @param createTimes 需要删除的订单信息主键集合
* @param ids 需要删除的订单信息主键集合
* @return 结果 * @return 结果
*/ */
public int deleteAppletOrderByCreateTimes(Date[] createTimes);
public int deleteAppletOrderByIds(Long[] ids);
/** /**
* 删除订单信息信息 * 删除订单信息信息
* *
* @param createTime 订单信息主键
* @param id 订单信息主键
* @return 结果 * @return 结果
*/ */
public int deleteAppletOrderByCreateTime(Date createTime);
public int deleteAppletOrderById(Long id);
} }

+ 13
- 10
ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletConfigServiceImpl.java View File

@ -1,6 +1,7 @@
package com.ruoyi.model.service.impl; package com.ruoyi.model.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletConfigMapper; import com.ruoyi.model.mapper.AppletConfigMapper;
@ -11,7 +12,7 @@ import com.ruoyi.model.service.IAppletConfigService;
* 配置信息Service业务层处理 * 配置信息Service业务层处理
* *
* @author ruoyi * @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/ */
@Service @Service
public class AppletConfigServiceImpl implements IAppletConfigService public class AppletConfigServiceImpl implements IAppletConfigService
@ -22,13 +23,13 @@ public class AppletConfigServiceImpl implements IAppletConfigService
/** /**
* 查询配置信息 * 查询配置信息
* *
* @param paramCode 配置信息主键
* @param id 配置信息主键
* @return 配置信息 * @return 配置信息
*/ */
@Override @Override
public AppletConfig selectAppletConfigByParamCode(String paramCode)
public AppletConfig selectAppletConfigById(Long id)
{ {
return appletConfigMapper.selectAppletConfigByParamCode(paramCode);
return appletConfigMapper.selectAppletConfigById(id);
} }
/** /**
@ -52,6 +53,7 @@ public class AppletConfigServiceImpl implements IAppletConfigService
@Override @Override
public int insertAppletConfig(AppletConfig appletConfig) public int insertAppletConfig(AppletConfig appletConfig)
{ {
appletConfig.setCreateTime(DateUtils.getNowDate());
return appletConfigMapper.insertAppletConfig(appletConfig); return appletConfigMapper.insertAppletConfig(appletConfig);
} }
@ -64,30 +66,31 @@ public class AppletConfigServiceImpl implements IAppletConfigService
@Override @Override
public int updateAppletConfig(AppletConfig appletConfig) public int updateAppletConfig(AppletConfig appletConfig)
{ {
appletConfig.setUpdateTime(DateUtils.getNowDate());
return appletConfigMapper.updateAppletConfig(appletConfig); return appletConfigMapper.updateAppletConfig(appletConfig);
} }
/** /**
* 批量删除配置信息 * 批量删除配置信息
* *
* @param paramCodes 需要删除的配置信息主键
* @param ids 需要删除的配置信息主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteAppletConfigByParamCodes(String[] paramCodes)
public int deleteAppletConfigByIds(Long[] ids)
{ {
return appletConfigMapper.deleteAppletConfigByParamCodes(paramCodes);
return appletConfigMapper.deleteAppletConfigByIds(ids);
} }
/** /**
* 删除配置信息信息 * 删除配置信息信息
* *
* @param paramCode 配置信息主键
* @param id 配置信息主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteAppletConfigByParamCode(String paramCode)
public int deleteAppletConfigById(Long id)
{ {
return appletConfigMapper.deleteAppletConfigByParamCode(paramCode);
return appletConfigMapper.deleteAppletConfigById(id);
} }
} }

+ 9
- 10
ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletOrderServiceImpl.java View File

@ -1,6 +1,5 @@
package com.ruoyi.model.service.impl; package com.ruoyi.model.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -24,13 +23,13 @@ public class AppletOrderServiceImpl implements IAppletOrderService
/** /**
* 查询订单信息 * 查询订单信息
* *
* @param createTime 订单信息主键
* @param id 订单信息主键
* @return 订单信息 * @return 订单信息
*/ */
@Override @Override
public AppletOrder selectAppletOrderByCreateTime(Date createTime)
public AppletOrder selectAppletOrderById(Long id)
{ {
return appletOrderMapper.selectAppletOrderByCreateTime(createTime);
return appletOrderMapper.selectAppletOrderById(id);
} }
/** /**
@ -74,24 +73,24 @@ public class AppletOrderServiceImpl implements IAppletOrderService
/** /**
* 批量删除订单信息 * 批量删除订单信息
* *
* @param createTimes 需要删除的订单信息主键
* @param ids 需要删除的订单信息主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteAppletOrderByCreateTimes(Date[] createTimes)
public int deleteAppletOrderByIds(Long[] ids)
{ {
return appletOrderMapper.deleteAppletOrderByCreateTimes(createTimes);
return appletOrderMapper.deleteAppletOrderByIds(ids);
} }
/** /**
* 删除订单信息信息 * 删除订单信息信息
* *
* @param createTime 订单信息主键
* @param id 订单信息主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteAppletOrderByCreateTime(Date createTime)
public int deleteAppletOrderById(Long id)
{ {
return appletOrderMapper.deleteAppletOrderByCreateTime(createTime);
return appletOrderMapper.deleteAppletOrderById(id);
} }
} }

+ 32
- 20
ruoyi-catdog/src/main/resources/mapper/model/AppletConfigMapper.xml View File

@ -7,50 +7,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="AppletConfig" id="AppletConfigResult"> <resultMap type="AppletConfig" id="AppletConfigResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="paramCode" column="param_code" /> <result property="paramCode" column="param_code" />
<result property="paramValue" column="param_value" />
<result property="paramValueText" column="param_value_text" /> <result property="paramValueText" column="param_value_text" />
<result property="paramValueImage" column="param_value_image" /> <result property="paramValueImage" column="param_value_image" />
<result property="paramValueArea" column="param_value_area" /> <result property="paramValueArea" column="param_value_area" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap> </resultMap>
<sql id="selectAppletConfigVo"> <sql id="selectAppletConfigVo">
select id,param_code,param_value, param_value_text, param_value_image, param_value_area from applet_config
select id, param_code, param_value_text, param_value_image, param_value_area, del_flag, create_by, create_time, update_by, update_time from applet_config
</sql> </sql>
<select id="selectAppletConfigList" parameterType="AppletConfig" resultMap="AppletConfigResult"> <select id="selectAppletConfigList" parameterType="AppletConfig" resultMap="AppletConfigResult">
<include refid="selectAppletConfigVo"/> <include refid="selectAppletConfigVo"/>
<where>
<where>
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> <if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
<if test="paramValue != null and param_value != ''"> and param_value = #{param_value}</if>
<if test="paramValueText != null and paramValueText != ''"> and param_value_text = #{paramValueText}</if> <if test="paramValueText != null and paramValueText != ''"> and param_value_text = #{paramValueText}</if>
<if test="paramValueImage != null and paramValueImage != ''"> and param_value_image = #{paramValueImage}</if> <if test="paramValueImage != null and paramValueImage != ''"> and param_value_image = #{paramValueImage}</if>
<if test="paramValueArea != null and paramValueArea != ''"> and param_value_area = #{paramValueArea}</if> <if test="paramValueArea != null and paramValueArea != ''"> and param_value_area = #{paramValueArea}</if>
</where> </where>
</select> </select>
<select id="selectAppletConfigByParamCode" parameterType="String" resultMap="AppletConfigResult">
<select id="selectAppletConfigById" parameterType="Long" resultMap="AppletConfigResult">
<include refid="selectAppletConfigVo"/> <include refid="selectAppletConfigVo"/>
where param_code = #{paramCode}
where id = #{id}
</select> </select>
<insert id="insertAppletConfig" parameterType="AppletConfig">
<insert id="insertAppletConfig" parameterType="AppletConfig" useGeneratedKeys="true" keyProperty="id">
insert into applet_config insert into applet_config
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="paramCode != null">param_code,</if> <if test="paramCode != null">param_code,</if>
<if test="paramValue != null">param_value,</if>
<if test="paramValueText != null">param_value_text,</if> <if test="paramValueText != null">param_value_text,</if>
<if test="paramValueImage != null">param_value_image,</if> <if test="paramValueImage != null">param_value_image,</if>
<if test="paramValueArea != null">param_value_area,</if> <if test="paramValueArea != null">param_value_area,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="paramCode != null">#{paramCode},</if> <if test="paramCode != null">#{paramCode},</if>
<if test="paramValue != null">#{paramCode},</if>
<if test="paramValueText != null">#{paramValueText},</if> <if test="paramValueText != null">#{paramValueText},</if>
<if test="paramValueImage != null">#{paramValueImage},</if> <if test="paramValueImage != null">#{paramValueImage},</if>
<if test="paramValueArea != null">#{paramValueArea},</if> <if test="paramValueArea != null">#{paramValueArea},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
@ -58,22 +66,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update applet_config update applet_config
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="paramCode != null">param_code = #{paramCode},</if> <if test="paramCode != null">param_code = #{paramCode},</if>
<if test="paramValue != null">param_value = #{paramValue},</if>
<if test="paramValueText != null">param_value_text = #{paramValueText},</if> <if test="paramValueText != null">param_value_text = #{paramValueText},</if>
<if test="paramValueImage != null">param_value_image = #{paramValueImage},</if> <if test="paramValueImage != null">param_value_image = #{paramValueImage},</if>
<if test="paramValueArea != null">param_value_area = #{paramValueArea},</if> <if test="paramValueArea != null">param_value_area = #{paramValueArea},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim> </trim>
where param_code = #{paramCode}
where id = #{id}
</update> </update>
<delete id="deleteAppletConfigByParamCode" parameterType="String">
delete from applet_config where param_code = #{paramCode}
<delete id="deleteAppletConfigById" parameterType="Long">
delete from applet_config where id = #{id}
</delete> </delete>
<delete id="deleteAppletConfigByParamCodes" parameterType="String">
delete from applet_config where param_code in
<foreach item="paramCode" collection="array" open="(" separator="," close=")">
#{paramCode}
<delete id="deleteAppletConfigByIds" parameterType="String">
delete from applet_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>

+ 13
- 11
ruoyi-catdog/src/main/resources/mapper/model/AppletOrderMapper.xml View File

@ -5,6 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.model.mapper.AppletOrderMapper"> <mapper namespace="com.ruoyi.model.mapper.AppletOrderMapper">
<resultMap type="AppletOrder" id="AppletOrderResult"> <resultMap type="AppletOrder" id="AppletOrderResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectAppletOrderVo"> <sql id="selectAppletOrderVo">
select create_time, create_by, update_time, update_by, pay_time, price, address, type, reason, user_id, pet_id from applet_order
select id, create_time, create_by, update_time, update_by, pay_time, price, address, type, reason, user_id, pet_id from applet_order
</sql> </sql>
<select id="selectAppletOrderList" parameterType="AppletOrder" resultMap="AppletOrderResult"> <select id="selectAppletOrderList" parameterType="AppletOrder" resultMap="AppletOrderResult">
@ -35,12 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectAppletOrderByCreateTime" parameterType="Date" resultMap="AppletOrderResult">
<select id="selectAppletOrderById" parameterType="Long" resultMap="AppletOrderResult">
<include refid="selectAppletOrderVo"/> <include refid="selectAppletOrderVo"/>
where create_time = #{createTime}
where id = #{id}
</select> </select>
<insert id="insertAppletOrder" parameterType="AppletOrder">
<insert id="insertAppletOrder" parameterType="AppletOrder" useGeneratedKeys="true" keyProperty="id">
insert into applet_order insert into applet_order
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateAppletOrder" parameterType="AppletOrder"> <update id="updateAppletOrder" parameterType="AppletOrder">
update applet_order update applet_order
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
@ -84,17 +86,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">user_id = #{userId},</if> <if test="userId != null">user_id = #{userId},</if>
<if test="petId != null">pet_id = #{petId},</if> <if test="petId != null">pet_id = #{petId},</if>
</trim> </trim>
where create_time = #{createTime}
where id = #{id}
</update> </update>
<delete id="deleteAppletOrderByCreateTime" parameterType="Date">
delete from applet_order where create_time = #{createTime}
<delete id="deleteAppletOrderById" parameterType="Long">
delete from applet_order where id = #{id}
</delete> </delete>
<delete id="deleteAppletOrderByCreateTimes" parameterType="String">
delete from applet_order where create_time in
<foreach item="createTime" collection="array" open="(" separator="," close=")">
#{createTime}
<delete id="deleteAppletOrderByIds" parameterType="String">
delete from applet_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>

Loading…
Cancel
Save