| @ -0,0 +1,44 @@ | |||||
| import request from '@/utils/request' | |||||
| // 查询伴宠师认证列表 | |||||
| export function listAppletUsersTeacher(query) { | |||||
| return request({ | |||||
| url: '/model/AppletUsersTeacher/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| // 查询伴宠师认证详细 | |||||
| export function getAppletUsersTeacher(id) { | |||||
| return request({ | |||||
| url: '/model/AppletUsersTeacher/' + id, | |||||
| method: 'get' | |||||
| }) | |||||
| } | |||||
| // 新增伴宠师认证 | |||||
| export function addAppletUsersTeacher(data) { | |||||
| return request({ | |||||
| url: '/model/AppletUsersTeacher', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 修改伴宠师认证 | |||||
| export function updateAppletUsersTeacher(data) { | |||||
| return request({ | |||||
| url: '/model/AppletUsersTeacher', | |||||
| method: 'put', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 删除伴宠师认证 | |||||
| export function delAppletUsersTeacher(id) { | |||||
| return request({ | |||||
| url: '/model/AppletUsersTeacher/' + id, | |||||
| method: 'delete' | |||||
| }) | |||||
| } | |||||
| @ -0,0 +1,393 @@ | |||||
| <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="userId"> | |||||
| <el-input | |||||
| v-model="queryParams.userId" | |||||
| placeholder="请输入关联用户" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <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 label="身份证" prop="idCard"> | |||||
| <el-input | |||||
| v-model="queryParams.idCard" | |||||
| placeholder="请输入身份证" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="性别" prop="sex"> | |||||
| <el-select v-model="queryParams.sex" placeholder="请选择性别" clearable size="small"> | |||||
| </el-select> | |||||
| </el-form-item> | |||||
| <el-form-item label="手机号" prop="phone"> | |||||
| <el-input | |||||
| v-model="queryParams.phone" | |||||
| placeholder="请输入手机号" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="养宠经验" prop="experience"> | |||||
| <el-input | |||||
| v-model="queryParams.experience" | |||||
| placeholder="请输入养宠经验" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="是否有专业执照" prop="isHave"> | |||||
| <el-input | |||||
| v-model="queryParams.isHave" | |||||
| placeholder="请输入是否有专业执照" | |||||
| clearable | |||||
| size="small" | |||||
| @keyup.enter.native="handleQuery" | |||||
| /> | |||||
| </el-form-item> | |||||
| <el-form-item label="个人宠物类型" prop="petType"> | |||||
| <el-select v-model="queryParams.petType" placeholder="请选择个人宠物类型" clearable size="small"> | |||||
| </el-select> | |||||
| </el-form-item> | |||||
| <el-form-item label="审核状态" prop="status"> | |||||
| <el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable size="small"> | |||||
| </el-select> | |||||
| </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:AppletUsersTeacher: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:AppletUsersTeacher: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:AppletUsersTeacher: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:AppletUsersTeacher:export']" | |||||
| >导出</el-button> | |||||
| </el-col> | |||||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||||
| </el-row> | |||||
| <el-table v-loading="loading" :data="AppletUsersTeacherList" @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="userId" v-if="columns[0].visible"/> | |||||
| <el-table-column label="姓名" align="center" prop="name" v-if="columns[1].visible"/> | |||||
| <el-table-column label="身份证" align="center" prop="idCard" v-if="columns[2].visible"/> | |||||
| <el-table-column label="性别" align="center" prop="sex" v-if="columns[3].visible"/> | |||||
| <el-table-column label="手机号" align="center" prop="phone" v-if="columns[4].visible"/> | |||||
| <el-table-column label="养宠经验" align="center" prop="experience" v-if="columns[5].visible"/> | |||||
| <el-table-column label="是否有专业执照" align="center" prop="isHave" v-if="columns[6].visible"/> | |||||
| <el-table-column label="个人宠物类型" align="center" prop="petType" v-if="columns[7].visible"/> | |||||
| <el-table-column label="审核状态" align="center" prop="status" v-if="columns[8].visible"/> | |||||
| <el-table-column label="审核图片" align="center" prop="images" v-if="columns[9].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:AppletUsersTeacher:edit']" | |||||
| >修改</el-button> | |||||
| <el-button | |||||
| size="mini" | |||||
| type="text" | |||||
| icon="el-icon-delete" | |||||
| @click="handleDelete(scope.row)" | |||||
| v-hasPermi="['model:AppletUsersTeacher: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="userId"> | |||||
| <el-input v-model="form.userId" placeholder="请输入关联用户" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="姓名" prop="name"> | |||||
| <el-input v-model="form.name" placeholder="请输入姓名" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="身份证" prop="idCard"> | |||||
| <el-input v-model="form.idCard" placeholder="请输入身份证" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="手机号" prop="phone"> | |||||
| <el-input v-model="form.phone" placeholder="请输入手机号" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="养宠经验" prop="experience"> | |||||
| <el-input v-model="form.experience" placeholder="请输入养宠经验" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="是否有专业执照" prop="isHave"> | |||||
| <el-input v-model="form.isHave" placeholder="请输入是否有专业执照" /> | |||||
| </el-form-item> | |||||
| <el-form-item label="审核图片"> | |||||
| <imageUpload v-model="form.images"/> | |||||
| </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 { listAppletUsersTeacher, getAppletUsersTeacher, delAppletUsersTeacher, addAppletUsersTeacher, updateAppletUsersTeacher, exportAppletUsersTeacher } from "@/api/model/AppletUsersTeacher"; | |||||
| export default { | |||||
| name: "AppletUsersTeacher", | |||||
| data() { | |||||
| return { | |||||
| // 遮罩层 | |||||
| loading: true, | |||||
| // 导出遮罩层 | |||||
| exportLoading: false, | |||||
| // 选中数组 | |||||
| ids: [], | |||||
| // 非单个禁用 | |||||
| single: true, | |||||
| // 非多个禁用 | |||||
| multiple: true, | |||||
| // 显示搜索条件 | |||||
| showSearch: true, | |||||
| // 总条数 | |||||
| total: 0, | |||||
| // 伴宠师认证表格数据 | |||||
| AppletUsersTeacherList: [], | |||||
| // 弹出层标题 | |||||
| title: "", | |||||
| // 是否显示弹出层 | |||||
| open: false, | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| pageNum: 1, | |||||
| pageSize: 10, | |||||
| userId: null, | |||||
| name: null, | |||||
| idCard: null, | |||||
| sex: null, | |||||
| phone: null, | |||||
| experience: null, | |||||
| isHave: null, | |||||
| petType: null, | |||||
| status: null, | |||||
| images: null, | |||||
| }, | |||||
| // 表单参数 | |||||
| form: {}, | |||||
| // 表单校验 | |||||
| rules: { | |||||
| }, | |||||
| columns: [ | |||||
| { key: 1, label: "关联用户", visible: true }, | |||||
| { key: 2, label: "姓名", visible: true }, | |||||
| { key: 3, label: "身份证", visible: true }, | |||||
| { 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: "审核状态", visible: true }, | |||||
| { key: 10, label: "审核图片", visible: false }, | |||||
| ], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| this.getList(); | |||||
| }, | |||||
| methods: { | |||||
| /** 查询伴宠师认证列表 */ | |||||
| getList() { | |||||
| this.loading = true; | |||||
| listAppletUsersTeacher(this.queryParams).then(response => { | |||||
| this.AppletUsersTeacherList = response.rows; | |||||
| this.total = response.total; | |||||
| this.loading = false; | |||||
| }); | |||||
| }, | |||||
| // 取消按钮 | |||||
| cancel() { | |||||
| this.open = false; | |||||
| this.reset(); | |||||
| }, | |||||
| // 表单重置 | |||||
| reset() { | |||||
| this.form = { | |||||
| id: null, | |||||
| userId: null, | |||||
| name: null, | |||||
| idCard: null, | |||||
| sex: null, | |||||
| phone: null, | |||||
| experience: null, | |||||
| isHave: null, | |||||
| petType: null, | |||||
| status: 0, | |||||
| images: null, | |||||
| createTime: null, | |||||
| updateTime: 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 | |||||
| getAppletUsersTeacher(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) { | |||||
| updateAppletUsersTeacher(this.form).then(response => { | |||||
| this.$modal.msgSuccess("修改成功"); | |||||
| this.open = false; | |||||
| this.getList(); | |||||
| }); | |||||
| } else { | |||||
| addAppletUsersTeacher(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 delAppletUsersTeacher(ids); | |||||
| }).then(() => { | |||||
| this.getList(); | |||||
| this.$modal.msgSuccess("删除成功"); | |||||
| }).catch(() => {}); | |||||
| }, | |||||
| /** 导出按钮操作 */ | |||||
| handleExport() { | |||||
| const queryParams = this.queryParams; | |||||
| this.$modal.confirm('是否确认导出所有伴宠师认证数据项?').then(() => { | |||||
| this.exportLoading = true; | |||||
| return exportAppletUsersTeacher(queryParams); | |||||
| }).then(response => { | |||||
| this.download(response.msg); | |||||
| this.exportLoading = false; | |||||
| }).catch(() => {}); | |||||
| } | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| @ -0,0 +1,104 @@ | |||||
| 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.AppletUsersTeacher; | |||||
| import com.ruoyi.model.service.IAppletUsersTeacherService; | |||||
| import com.ruoyi.common.utils.poi.ExcelUtil; | |||||
| import com.ruoyi.common.core.page.TableDataInfo; | |||||
| /** | |||||
| * 伴宠师认证Controller | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-27 | |||||
| */ | |||||
| @RestController | |||||
| @RequestMapping("/model/AppletUsersTeacher") | |||||
| public class AppletUsersTeacherController extends BaseController | |||||
| { | |||||
| @Autowired | |||||
| private IAppletUsersTeacherService appletUsersTeacherService; | |||||
| /** | |||||
| * 查询伴宠师认证列表 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:list')") | |||||
| @GetMapping("/list") | |||||
| public TableDataInfo list(AppletUsersTeacher appletUsersTeacher) | |||||
| { | |||||
| startPage(); | |||||
| List<AppletUsersTeacher> list = appletUsersTeacherService.selectAppletUsersTeacherList(appletUsersTeacher); | |||||
| return getDataTable(list); | |||||
| } | |||||
| /** | |||||
| * 导出伴宠师认证列表 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:export')") | |||||
| @Log(title = "伴宠师认证", businessType = BusinessType.EXPORT) | |||||
| @PostMapping("/export") | |||||
| public void export(HttpServletResponse response, AppletUsersTeacher appletUsersTeacher) throws IOException { | |||||
| List<AppletUsersTeacher> list = appletUsersTeacherService.selectAppletUsersTeacherList(appletUsersTeacher); | |||||
| ExcelUtil<AppletUsersTeacher> util = new ExcelUtil<AppletUsersTeacher>(AppletUsersTeacher.class); | |||||
| util.exportExcel(response, list, "伴宠师认证数据"); | |||||
| } | |||||
| /** | |||||
| * 获取伴宠师认证详细信息 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:query')") | |||||
| @GetMapping(value = "/{id}") | |||||
| public AjaxResult getInfo(@PathVariable("id") Long id) | |||||
| { | |||||
| return success(appletUsersTeacherService.selectAppletUsersTeacherById(id)); | |||||
| } | |||||
| /** | |||||
| * 新增伴宠师认证 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:add')") | |||||
| @Log(title = "伴宠师认证", businessType = BusinessType.INSERT) | |||||
| @PostMapping | |||||
| public AjaxResult add(@RequestBody AppletUsersTeacher appletUsersTeacher) | |||||
| { | |||||
| return toAjax(appletUsersTeacherService.insertAppletUsersTeacher(appletUsersTeacher)); | |||||
| } | |||||
| /** | |||||
| * 修改伴宠师认证 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:edit')") | |||||
| @Log(title = "伴宠师认证", businessType = BusinessType.UPDATE) | |||||
| @PutMapping | |||||
| public AjaxResult edit(@RequestBody AppletUsersTeacher appletUsersTeacher) | |||||
| { | |||||
| return toAjax(appletUsersTeacherService.updateAppletUsersTeacher(appletUsersTeacher)); | |||||
| } | |||||
| /** | |||||
| * 删除伴宠师认证 | |||||
| */ | |||||
| @PreAuthorize("@ss.hasPermi('model:AppletUsersTeacher:remove')") | |||||
| @Log(title = "伴宠师认证", businessType = BusinessType.DELETE) | |||||
| @DeleteMapping("/{ids}") | |||||
| public AjaxResult remove(@PathVariable Long[] ids) | |||||
| { | |||||
| return toAjax(appletUsersTeacherService.deleteAppletUsersTeacherByIds(ids)); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,179 @@ | |||||
| 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; | |||||
| /** | |||||
| * 伴宠师认证对象 applet_users_teacher | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-27 | |||||
| */ | |||||
| public class AppletUsersTeacher extends BaseEntity | |||||
| { | |||||
| private static final long serialVersionUID = 1L; | |||||
| /** 标识 */ | |||||
| private Long id; | |||||
| /** 关联用户 */ | |||||
| @Excel(name = "关联用户") | |||||
| private Long userId; | |||||
| /** 姓名 */ | |||||
| @Excel(name = "姓名") | |||||
| private String name; | |||||
| /** 身份证 */ | |||||
| @Excel(name = "身份证") | |||||
| private String idCard; | |||||
| /** 性别 */ | |||||
| @Excel(name = "性别") | |||||
| private Long sex; | |||||
| /** 手机号 */ | |||||
| @Excel(name = "手机号") | |||||
| private String phone; | |||||
| /** 养宠经验 */ | |||||
| @Excel(name = "养宠经验") | |||||
| private String experience; | |||||
| /** 是否有专业执照 */ | |||||
| @Excel(name = "是否有专业执照") | |||||
| private Long isHave; | |||||
| /** 个人宠物类型 */ | |||||
| @Excel(name = "个人宠物类型") | |||||
| private Long petType; | |||||
| /** 审核状态 */ | |||||
| @Excel(name = "审核状态") | |||||
| private Long status; | |||||
| /** 审核图片 */ | |||||
| @Excel(name = "审核图片") | |||||
| private String images; | |||||
| public void setId(Long id) | |||||
| { | |||||
| this.id = id; | |||||
| } | |||||
| public Long getId() | |||||
| { | |||||
| return id; | |||||
| } | |||||
| public void setUserId(Long userId) | |||||
| { | |||||
| this.userId = userId; | |||||
| } | |||||
| public Long getUserId() | |||||
| { | |||||
| return userId; | |||||
| } | |||||
| public void setName(String name) | |||||
| { | |||||
| this.name = name; | |||||
| } | |||||
| public String getName() | |||||
| { | |||||
| return name; | |||||
| } | |||||
| public void setIdCard(String idCard) | |||||
| { | |||||
| this.idCard = idCard; | |||||
| } | |||||
| public String getIdCard() | |||||
| { | |||||
| return idCard; | |||||
| } | |||||
| public void setSex(Long sex) | |||||
| { | |||||
| this.sex = sex; | |||||
| } | |||||
| public Long getSex() | |||||
| { | |||||
| return sex; | |||||
| } | |||||
| public void setPhone(String phone) | |||||
| { | |||||
| this.phone = phone; | |||||
| } | |||||
| public String getPhone() | |||||
| { | |||||
| return phone; | |||||
| } | |||||
| public void setExperience(String experience) | |||||
| { | |||||
| this.experience = experience; | |||||
| } | |||||
| public String getExperience() | |||||
| { | |||||
| return experience; | |||||
| } | |||||
| public void setIsHave(Long isHave) | |||||
| { | |||||
| this.isHave = isHave; | |||||
| } | |||||
| public Long getIsHave() | |||||
| { | |||||
| return isHave; | |||||
| } | |||||
| public void setPetType(Long petType) | |||||
| { | |||||
| this.petType = petType; | |||||
| } | |||||
| public Long getPetType() | |||||
| { | |||||
| return petType; | |||||
| } | |||||
| public void setStatus(Long status) | |||||
| { | |||||
| this.status = status; | |||||
| } | |||||
| public Long getStatus() | |||||
| { | |||||
| return status; | |||||
| } | |||||
| public void setImages(String images) | |||||
| { | |||||
| this.images = images; | |||||
| } | |||||
| public String getImages() | |||||
| { | |||||
| return images; | |||||
| } | |||||
| @Override | |||||
| public String toString() { | |||||
| return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||||
| .append("id", getId()) | |||||
| .append("userId", getUserId()) | |||||
| .append("name", getName()) | |||||
| .append("idCard", getIdCard()) | |||||
| .append("sex", getSex()) | |||||
| .append("phone", getPhone()) | |||||
| .append("experience", getExperience()) | |||||
| .append("isHave", getIsHave()) | |||||
| .append("petType", getPetType()) | |||||
| .append("status", getStatus()) | |||||
| .append("images", getImages()) | |||||
| .append("createTime", getCreateTime()) | |||||
| .append("updateTime", getUpdateTime()) | |||||
| .toString(); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,61 @@ | |||||
| package com.ruoyi.model.mapper; | |||||
| import java.util.List; | |||||
| import com.ruoyi.model.domain.AppletUsersTeacher; | |||||
| /** | |||||
| * 伴宠师认证Mapper接口 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-27 | |||||
| */ | |||||
| public interface AppletUsersTeacherMapper | |||||
| { | |||||
| /** | |||||
| * 查询伴宠师认证 | |||||
| * | |||||
| * @param id 伴宠师认证主键 | |||||
| * @return 伴宠师认证 | |||||
| */ | |||||
| public AppletUsersTeacher selectAppletUsersTeacherById(Long id); | |||||
| /** | |||||
| * 查询伴宠师认证列表 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 伴宠师认证集合 | |||||
| */ | |||||
| public List<AppletUsersTeacher> selectAppletUsersTeacherList(AppletUsersTeacher appletUsersTeacher); | |||||
| /** | |||||
| * 新增伴宠师认证 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int insertAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher); | |||||
| /** | |||||
| * 修改伴宠师认证 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int updateAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher); | |||||
| /** | |||||
| * 删除伴宠师认证 | |||||
| * | |||||
| * @param id 伴宠师认证主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppletUsersTeacherById(Long id); | |||||
| /** | |||||
| * 批量删除伴宠师认证 | |||||
| * | |||||
| * @param ids 需要删除的数据主键集合 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppletUsersTeacherByIds(Long[] ids); | |||||
| } | |||||
| @ -0,0 +1,61 @@ | |||||
| package com.ruoyi.model.service; | |||||
| import java.util.List; | |||||
| import com.ruoyi.model.domain.AppletUsersTeacher; | |||||
| /** | |||||
| * 伴宠师认证Service接口 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-27 | |||||
| */ | |||||
| public interface IAppletUsersTeacherService | |||||
| { | |||||
| /** | |||||
| * 查询伴宠师认证 | |||||
| * | |||||
| * @param id 伴宠师认证主键 | |||||
| * @return 伴宠师认证 | |||||
| */ | |||||
| public AppletUsersTeacher selectAppletUsersTeacherById(Long id); | |||||
| /** | |||||
| * 查询伴宠师认证列表 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 伴宠师认证集合 | |||||
| */ | |||||
| public List<AppletUsersTeacher> selectAppletUsersTeacherList(AppletUsersTeacher appletUsersTeacher); | |||||
| /** | |||||
| * 新增伴宠师认证 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int insertAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher); | |||||
| /** | |||||
| * 修改伴宠师认证 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int updateAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher); | |||||
| /** | |||||
| * 批量删除伴宠师认证 | |||||
| * | |||||
| * @param ids 需要删除的伴宠师认证主键集合 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppletUsersTeacherByIds(Long[] ids); | |||||
| /** | |||||
| * 删除伴宠师认证信息 | |||||
| * | |||||
| * @param id 伴宠师认证主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| public int deleteAppletUsersTeacherById(Long id); | |||||
| } | |||||
| @ -0,0 +1,96 @@ | |||||
| package com.ruoyi.model.service.impl; | |||||
| import java.util.List; | |||||
| import com.ruoyi.common.utils.DateUtils; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| import com.ruoyi.model.mapper.AppletUsersTeacherMapper; | |||||
| import com.ruoyi.model.domain.AppletUsersTeacher; | |||||
| import com.ruoyi.model.service.IAppletUsersTeacherService; | |||||
| /** | |||||
| * 伴宠师认证Service业务层处理 | |||||
| * | |||||
| * @author ruoyi | |||||
| * @date 2025-03-27 | |||||
| */ | |||||
| @Service | |||||
| public class AppletUsersTeacherServiceImpl implements IAppletUsersTeacherService | |||||
| { | |||||
| @Autowired | |||||
| private AppletUsersTeacherMapper appletUsersTeacherMapper; | |||||
| /** | |||||
| * 查询伴宠师认证 | |||||
| * | |||||
| * @param id 伴宠师认证主键 | |||||
| * @return 伴宠师认证 | |||||
| */ | |||||
| @Override | |||||
| public AppletUsersTeacher selectAppletUsersTeacherById(Long id) | |||||
| { | |||||
| return appletUsersTeacherMapper.selectAppletUsersTeacherById(id); | |||||
| } | |||||
| /** | |||||
| * 查询伴宠师认证列表 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 伴宠师认证 | |||||
| */ | |||||
| @Override | |||||
| public List<AppletUsersTeacher> selectAppletUsersTeacherList(AppletUsersTeacher appletUsersTeacher) | |||||
| { | |||||
| return appletUsersTeacherMapper.selectAppletUsersTeacherList(appletUsersTeacher); | |||||
| } | |||||
| /** | |||||
| * 新增伴宠师认证 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int insertAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher) | |||||
| { | |||||
| appletUsersTeacher.setCreateTime(DateUtils.getNowDate()); | |||||
| return appletUsersTeacherMapper.insertAppletUsersTeacher(appletUsersTeacher); | |||||
| } | |||||
| /** | |||||
| * 修改伴宠师认证 | |||||
| * | |||||
| * @param appletUsersTeacher 伴宠师认证 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int updateAppletUsersTeacher(AppletUsersTeacher appletUsersTeacher) | |||||
| { | |||||
| appletUsersTeacher.setUpdateTime(DateUtils.getNowDate()); | |||||
| return appletUsersTeacherMapper.updateAppletUsersTeacher(appletUsersTeacher); | |||||
| } | |||||
| /** | |||||
| * 批量删除伴宠师认证 | |||||
| * | |||||
| * @param ids 需要删除的伴宠师认证主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int deleteAppletUsersTeacherByIds(Long[] ids) | |||||
| { | |||||
| return appletUsersTeacherMapper.deleteAppletUsersTeacherByIds(ids); | |||||
| } | |||||
| /** | |||||
| * 删除伴宠师认证信息 | |||||
| * | |||||
| * @param id 伴宠师认证主键 | |||||
| * @return 结果 | |||||
| */ | |||||
| @Override | |||||
| public int deleteAppletUsersTeacherById(Long id) | |||||
| { | |||||
| return appletUsersTeacherMapper.deleteAppletUsersTeacherById(id); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,111 @@ | |||||
| <?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.AppletUsersTeacherMapper"> | |||||
| <resultMap type="AppletUsersTeacher" id="AppletUsersTeacherResult"> | |||||
| <result property="id" column="id" /> | |||||
| <result property="userId" column="user_id" /> | |||||
| <result property="name" column="name" /> | |||||
| <result property="idCard" column="id_card" /> | |||||
| <result property="sex" column="sex" /> | |||||
| <result property="phone" column="phone" /> | |||||
| <result property="experience" column="experience" /> | |||||
| <result property="isHave" column="is_have" /> | |||||
| <result property="petType" column="pet_type" /> | |||||
| <result property="status" column="status" /> | |||||
| <result property="images" column="images" /> | |||||
| <result property="createTime" column="create_time" /> | |||||
| <result property="updateTime" column="update_time" /> | |||||
| </resultMap> | |||||
| <sql id="selectAppletUsersTeacherVo"> | |||||
| select id, user_id, name, id_card, sex, phone, experience, is_have, pet_type, status, images, create_time, update_time from applet_users_teacher | |||||
| </sql> | |||||
| <select id="selectAppletUsersTeacherList" parameterType="AppletUsersTeacher" resultMap="AppletUsersTeacherResult"> | |||||
| <include refid="selectAppletUsersTeacherVo"/> | |||||
| <where> | |||||
| <if test="userId != null "> and user_id = #{userId}</if> | |||||
| <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |||||
| <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if> | |||||
| <if test="sex != null "> and sex = #{sex}</if> | |||||
| <if test="phone != null and phone != ''"> and phone = #{phone}</if> | |||||
| <if test="experience != null and experience != ''"> and experience = #{experience}</if> | |||||
| <if test="isHave != null "> and is_have = #{isHave}</if> | |||||
| <if test="petType != null "> and pet_type = #{petType}</if> | |||||
| <if test="status != null "> and status = #{status}</if> | |||||
| <if test="images != null and images != ''"> and images = #{images}</if> | |||||
| </where> | |||||
| </select> | |||||
| <select id="selectAppletUsersTeacherById" parameterType="Long" resultMap="AppletUsersTeacherResult"> | |||||
| <include refid="selectAppletUsersTeacherVo"/> | |||||
| where id = #{id} | |||||
| </select> | |||||
| <insert id="insertAppletUsersTeacher" parameterType="AppletUsersTeacher"> | |||||
| insert into applet_users_teacher | |||||
| <trim prefix="(" suffix=")" suffixOverrides=","> | |||||
| <if test="id != null">id,</if> | |||||
| <if test="userId != null">user_id,</if> | |||||
| <if test="name != null">name,</if> | |||||
| <if test="idCard != null">id_card,</if> | |||||
| <if test="sex != null">sex,</if> | |||||
| <if test="phone != null">phone,</if> | |||||
| <if test="experience != null">experience,</if> | |||||
| <if test="isHave != null">is_have,</if> | |||||
| <if test="petType != null">pet_type,</if> | |||||
| <if test="status != null">status,</if> | |||||
| <if test="images != null">images,</if> | |||||
| <if test="createTime != null">create_time,</if> | |||||
| <if test="updateTime != null">update_time,</if> | |||||
| </trim> | |||||
| <trim prefix="values (" suffix=")" suffixOverrides=","> | |||||
| <if test="id != null">#{id},</if> | |||||
| <if test="userId != null">#{userId},</if> | |||||
| <if test="name != null">#{name},</if> | |||||
| <if test="idCard != null">#{idCard},</if> | |||||
| <if test="sex != null">#{sex},</if> | |||||
| <if test="phone != null">#{phone},</if> | |||||
| <if test="experience != null">#{experience},</if> | |||||
| <if test="isHave != null">#{isHave},</if> | |||||
| <if test="petType != null">#{petType},</if> | |||||
| <if test="status != null">#{status},</if> | |||||
| <if test="images != null">#{images},</if> | |||||
| <if test="createTime != null">#{createTime},</if> | |||||
| <if test="updateTime != null">#{updateTime},</if> | |||||
| </trim> | |||||
| </insert> | |||||
| <update id="updateAppletUsersTeacher" parameterType="AppletUsersTeacher"> | |||||
| update applet_users_teacher | |||||
| <trim prefix="SET" suffixOverrides=","> | |||||
| <if test="userId != null">user_id = #{userId},</if> | |||||
| <if test="name != null">name = #{name},</if> | |||||
| <if test="idCard != null">id_card = #{idCard},</if> | |||||
| <if test="sex != null">sex = #{sex},</if> | |||||
| <if test="phone != null">phone = #{phone},</if> | |||||
| <if test="experience != null">experience = #{experience},</if> | |||||
| <if test="isHave != null">is_have = #{isHave},</if> | |||||
| <if test="petType != null">pet_type = #{petType},</if> | |||||
| <if test="status != null">status = #{status},</if> | |||||
| <if test="images != null">images = #{images},</if> | |||||
| <if test="createTime != null">create_time = #{createTime},</if> | |||||
| <if test="updateTime != null">update_time = #{updateTime},</if> | |||||
| </trim> | |||||
| where id = #{id} | |||||
| </update> | |||||
| <delete id="deleteAppletUsersTeacherById" parameterType="Long"> | |||||
| delete from applet_users_teacher where id = #{id} | |||||
| </delete> | |||||
| <delete id="deleteAppletUsersTeacherByIds" parameterType="String"> | |||||
| delete from applet_users_teacher where id in | |||||
| <foreach item="id" collection="array" open="(" separator="," close=")"> | |||||
| #{id} | |||||
| </foreach> | |||||
| </delete> | |||||
| </mapper> | |||||