修改预约模块

This commit is contained in:
sonjinyon 2024-09-29 20:43:59 +08:00
parent 1e0ee79fb9
commit 1382e792eb
50 changed files with 4201 additions and 541 deletions

View File

@ -0,0 +1,55 @@
import request from '@/config/axios'
// 门店管理 VO
export interface LitemallBrandVO {
id: number // 门店id
userId: string // 门店管理员id
phone: string // 联系电话
name: string // 门店名称
mail: string // 门店邮箱
picUrl: string // 门店图片
address: string // 门店地址
depict: string // 门店简介
status: number // 门店状态
weight: number // 权重
remark: string // 备注
}
// 门店管理 API
export const LitemallBrandApi = {
// 查询门店管理分页
getLitemallBrandPage: async (params: any) => {
return await request.get({ url: `/subscribe/litemall-brand/page`, params })
},
// 查询门店管理详情
getLitemallBrand: async (id: number) => {
return await request.get({ url: `/subscribe/litemall-brand/get?id=` + id })
},
// 新增门店管理
createLitemallBrand: async (data: LitemallBrandVO) => {
return await request.post({ url: `/subscribe/litemall-brand/create`, data })
},
// 修改门店管理
updateLitemallBrand: async (data: LitemallBrandVO) => {
return await request.put({ url: `/subscribe/litemall-brand/update`, data })
},
// 删除门店管理
deleteLitemallBrand: async (id: number) => {
return await request.delete({ url: `/subscribe/litemall-brand/delete?id=` + id })
},
// 导出门店管理 Excel
exportLitemallBrand: async (params) => {
return await request.download({ url: `/subscribe/litemall-brand/export-excel`, params })
},
// 查询机构名称数据
getOrganizations: async () => {
return await request.get({ url: `/subscribe/litemall-brand/getOrganization`})
},
}

View File

@ -0,0 +1,51 @@
import request from '@/config/axios'
// 预约订单 VO
export interface LitemallReservationVO {
id: number // id
userId: number // 用户id
nickname: string
type: number // 预约类型
brandId: string // 门店id
brandName: string
technicianId: string // 人员id
technicianName: string
reAddTime: Date // 预约时间
hsstr: string // 预约时间段
reStatus: number // 预约状态
status: number // 审核状态
remark: string // 备注
}
// 预约订单 API
export const LitemallReservationApi = {
// 查询预约订单分页
getLitemallReservationPage: async (params: any) => {
return await request.get({ url: `/subscribe/litemall-reservation/page`, params })
},
// 查询预约订单详情
getLitemallReservation: async (id: number) => {
return await request.get({ url: `/subscribe/litemall-reservation/get?id=` + id })
},
// 新增预约订单
createLitemallReservation: async (data: LitemallReservationVO) => {
return await request.post({ url: `/subscribe/litemall-reservation/create`, data })
},
// 修改预约订单
updateLitemallReservation: async (data: LitemallReservationVO) => {
return await request.put({ url: `/subscribe/litemall-reservation/update`, data })
},
// 删除预约订单
deleteLitemallReservation: async (id: number) => {
return await request.delete({ url: `/subscribe/litemall-reservation/delete?id=` + id })
},
// 导出预约订单 Excel
exportLitemallReservation: async (params) => {
return await request.download({ url: `/subscribe/litemall-reservation/export-excel`, params })
}
}

View File

@ -0,0 +1,59 @@
import request from '@/config/axios'
// 人员管理 VO
export interface LitemallTechnicianVO {
id: number // id
techSn: string // 人员编号
type: number // 人员类型
technicianName: string // 人员名称
brandId: number // 门店id
brandName: string
sex: number // 性别
photo: string // 照片
serviceTime: string // 服务时间段
serviceScope: string // 服务范围
phone: string // 手机号
ym: number // 约满标记
status: number // 状态
content: string // 介绍
remark: string // 备注
serviceTimeArray: string
}
// 人员管理 API
export const LitemallTechnicianApi = {
// 查询人员管理分页
getLitemallTechnicianPage: async (params: any) => {
return await request.get({ url: `/subscribe/litemall-technician/page`, params })
},
// 查询人员管理详情
getLitemallTechnician: async (id: number) => {
return await request.get({ url: `/subscribe/litemall-technician/get?id=` + id })
},
// 新增人员管理
createLitemallTechnician: async (data: LitemallTechnicianVO) => {
return await request.post({ url: `/subscribe/litemall-technician/create`, data })
},
// 修改人员管理
updateLitemallTechnician: async (data: LitemallTechnicianVO) => {
return await request.put({ url: `/subscribe/litemall-technician/update`, data })
},
// 删除人员管理
deleteLitemallTechnician: async (id: number) => {
return await request.delete({ url: `/subscribe/litemall-technician/delete?id=` + id })
},
// 导出人员管理 Excel
exportLitemallTechnician: async (params) => {
return await request.download({ url: `/subscribe/litemall-technician/export-excel`, params })
},
// 查询机构名称数据
getTechnicianName: async () => {
return await request.get({ url: `/subscribe/litemall-technician/getTechnicianName`})
},
}

View File

@ -113,6 +113,17 @@ export enum DICT_TYPE {
TERMINAL = 'terminal', // 终端
DATE_INTERVAL = 'date_interval', // 数据间隔
//门店管理
BRAND_STATUS = 'brand_status',
//预约订单
TYPE = 'type',
RE_STATUS = 're_status',
STATUS = 'status',
//人员
TYPES = 'types',
TECHNICIAN_STATUS = 'technician_status',
SEX = 'sex',
//预约:人员管理
STALL_SEX = 'stall_sex',

View File

@ -7,35 +7,43 @@
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="机构名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入机构名称" />
<!-- <el-form-item label="门店管理员id" prop="userId">-->
<!-- <el-input v-model="formData.userId" placeholder="请输入门店管理员id" />-->
<!-- </el-form-item>-->
<el-form-item label="联系电话" prop="phone">
<el-input v-model="formData.phone" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="机构电话" prop="phone">
<el-input v-model="formData.phone" placeholder="请输入机构电话" />
<el-form-item label="门店名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入门店名称" />
</el-form-item>
<el-form-item label="机构邮箱" prop="email">
<el-input v-model="formData.email" placeholder="请输入机构邮箱" />
<el-form-item label="门店邮箱" prop="mail">
<el-input v-model="formData.mail" placeholder="请输入门店邮箱" />
</el-form-item>
<el-form-item label="机构图片" prop="picture">
<UploadImg v-model="formData.picture" />
<el-form-item label="门店图片" prop="picUrl">
<UploadImg v-model="formData.picUrl" />
</el-form-item>
<el-form-item label="机构地址" prop="address">
<el-input v-model="formData.address" placeholder="请输入机构地址" />
<el-form-item label="门店地址" prop="address">
<el-input v-model="formData.address" placeholder="请输入门店地址" />
</el-form-item>
<el-form-item label="状态" prop="status" >
<el-select v-model="formData.status" placeholder="请选择状态" >
<el-form-item label="门店简介" prop="depict">
<Editor v-model="formData.depict" height="150px" />
</el-form-item>
<el-form-item label="门店状态" prop="status">
<el-select v-model="formData.status" placeholder="请选择门店状态">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ORGANIZATION_STATUS)"
v-for="dict in getIntDictOptions(DICT_TYPE.BRAND_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="机构简介" prop="depict">
<Editor v-model="formData.depict" height="300px" />
<!-- <el-form-item label="权重" prop="weight">-->
<!-- <el-input v-model="formData.weight" placeholder="请输入权重" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
@ -45,10 +53,10 @@
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
/** 机构 表单 */
defineOptions({ name: 'OrganizationForm' })
/** 门店管理 表单 */
defineOptions({ name: 'LitemallBrandForm' })
const { t } = useI18n() //
const message = useMessage() //
@ -59,22 +67,23 @@ const formLoading = ref(false) // 表单的加载中1修改时的数据加
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
name: undefined,
userId: undefined,
phone: undefined,
email: undefined,
picture: undefined,
name: undefined,
mail: undefined,
picUrl: undefined,
address: undefined,
depict: undefined,
status: undefined,
weight: undefined,
remark: undefined
})
const formRules = reactive({
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
phone: [{ required: true, message: '手机号不能为空', trigger: 'blur' }],
email: [{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
picturre: [{ required: true, message: '图片不能为空', trigger: 'blur' }],
address: [{ required: true, message: '地址不能为空', trigger: 'blur' }],
depict: [{ required: true, message: '简介不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
phone: [{ required: true, message: '联系电话不能为空', trigger: 'blur' }],
name: [{ required: true, message: '门店名称不能为空', trigger: 'blur' }],
mail: [{ required: true, message: '门店邮箱不能为空', trigger: 'blur' }],
address: [{ required: true, message: '门店地址不能为空', trigger: 'blur' }],
status: [{ required: true, message: '门店状态不能为空', trigger: 'change' }]
})
const formRef = ref() // Ref
@ -88,7 +97,7 @@ const open = async (type: string, id?: number) => {
if (id) {
formLoading.value = true
try {
formData.value = await OrganizationApi.getOrganization(id)
formData.value = await LitemallBrandApi.getLitemallBrand(id)
} finally {
formLoading.value = false
}
@ -104,12 +113,12 @@ const submitForm = async () => {
//
formLoading.value = true
try {
const data = formData.value as unknown as OrganizationVO
const data = formData.value as unknown as LitemallBrandVO
if (formType.value === 'create') {
await OrganizationApi.createOrganization(data)
await LitemallBrandApi.createLitemallBrand(data)
message.success(t('common.createSuccess'))
} else {
await OrganizationApi.updateOrganization(data)
await LitemallBrandApi.updateLitemallBrand(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
@ -124,14 +133,17 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: undefined,
name: undefined,
userId: undefined,
phone: undefined,
email: undefined,
picture: undefined,
name: undefined,
mail: undefined,
picUrl: undefined,
address: undefined,
depict: undefined,
status: undefined,
weight: undefined,
remark: undefined
}
formRef.value?.resetFields()
}
</script>
</script>

View File

@ -8,57 +8,75 @@
:inline="true"
label-width="68px"
>
<el-form-item label="机构名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入机构名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="机构电话" prop="phone">
<!-- <el-form-item label="门店管理员id" prop="userId">-->
<!-- <el-input-->
<!-- v-model="queryParams.userId"-->
<!-- placeholder="请输入门店管理员id"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入机构电话"
placeholder="请输入联系电话"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="机构邮箱" prop="email">
<el-form-item label="门店名称" prop="name">
<el-input
v-model="queryParams.email"
placeholder="请输入机构邮箱"
v-model="queryParams.name"
placeholder="请输入门店名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="机构地址" prop="address">
<el-form-item label="门店邮箱" prop="mail">
<el-input
v-model="queryParams.mail"
placeholder="请输入门店邮箱"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="门店地址" prop="address">
<el-input
v-model="queryParams.address"
placeholder="请输入机构地址"
placeholder="请输入门店地址"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-form-item label="门店状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择状态"
placeholder="请选择门店状态"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ORGANIZATION_STATUS)"
v-for="dict in getIntDictOptions(DICT_TYPE.BRAND_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="权重" prop="weight">-->
<!-- <el-input-->
<!-- v-model="queryParams.weight"-->
<!-- placeholder="请输入权重"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
@ -77,7 +95,7 @@
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['subscribe:organization:create']"
v-hasPermi="['subscribe:litemall-brand:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
@ -86,7 +104,7 @@
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['subscribe:organization:export']"
v-hasPermi="['subscribe:litemall-brand:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
@ -98,28 +116,35 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="机构名称" align="center" prop="name" />
<el-table-column label="机构电话" align="center" prop="phone"/>
<el-table-column label="机构邮箱" align="center" prop="email" />
<el-table-column label="机构图片" align="center" prop="picture">
<template #default="{ row }">
<div class="flex">
<el-image
fit="cover"
:src="row.picture"
class="flex-none w-50px h-50px"
@click="imagePreview(row.picture)"
/>
</div>
</template>
</el-table-column>
<el-table-column label="机构地址" align="center" prop="address" />
<el-table-column label="机构简介" align="center" prop="depict" />
<el-table-column label="状态" align="center" prop="status">
<!-- <el-table-column label="门店管理员" align="center" prop="userId" />-->
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="门店名称" align="center" prop="name" />
<el-table-column label="门店邮箱" align="center" prop="mail" />
<el-table-column label="门店图片" align="center" prop="picUrl" >
<template #default="{ row }">
<div class="flex">
<el-image
fit="cover"
:src="row.picUrl"
class="flex-none w-50px h-50px"
@click="imagePreview(row.picUrl)"
/>
</div>
</template>
</el-table-column>
<el-table-column label="门店地址" align="center" prop="address" />
<el-table-column label="门店简介" align="center" prop="depict" >
<template #default="scope">
<div v-html="scope.row.depict"></div>
</template>
</el-table-column>
<el-table-column label="门店状态" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.ORGANIZATION_STATUS" :value="scope.row.status" />
<dict-tag :type="DICT_TYPE.BRAND_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<!-- <el-table-column label="权重" align="center" prop="weight" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="创建时间"
align="center"
@ -127,13 +152,13 @@
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center" fixed="right" width="110">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['subscribe:organization:update']"
v-hasPermi="['subscribe:litemall-brand:update']"
>
编辑
</el-button>
@ -141,7 +166,7 @@
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['subscribe:organization:delete']"
v-hasPermi="['subscribe:litemall-brand:delete']"
>
删除
</el-button>
@ -149,7 +174,7 @@
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@ -158,37 +183,40 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<OrganizationForm ref="formRef" @success="getList" />
<LitemallBrandForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
import OrganizationForm from './OrganizationForm.vue'
import {createImageViewer} from "@/components/ImageViewer";
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
import LitemallBrandForm from './LitemallBrandForm.vue'
/** 机构 列表 */
defineOptions({ name: 'Organization' })
/** 门店管理 列表 */
defineOptions({ name: 'LitemallBrand' })
const message = useMessage() //
const { t } = useI18n() //
import {createImageViewer} from "@/components/ImageViewer";
const loading = ref(true) //
const list = ref<OrganizationVO[]>([]) //
const list = ref<LitemallBrandVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
userId: undefined,
phone: undefined,
email: undefined,
picture: undefined,
name: undefined,
mail: undefined,
picUrl: undefined,
address: undefined,
depict: undefined,
status: undefined,
createTime: [],
weight: undefined,
remark: undefined,
createTime: []
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
@ -197,7 +225,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
const data = await OrganizationApi.getOrganizationPage(queryParams)
const data = await LitemallBrandApi.getLitemallBrandPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
@ -235,7 +263,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await OrganizationApi.deleteOrganization(id)
await LitemallBrandApi.deleteLitemallBrand(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -249,8 +277,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await OrganizationApi.exportOrganization(queryParams)
download.excel(data, '机构.xls')
const data = await LitemallBrandApi.exportLitemallBrand(queryParams)
download.excel(data, '门店管理.xls')
} catch {
} finally {
exportLoading.value = false
@ -261,4 +289,4 @@ const handleExport = async () => {
onMounted(() => {
getList()
})
</script>
</script>

View File

@ -0,0 +1,198 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="用户" prop="userId">
<el-input v-model="formData.userId" placeholder="请输入用户" />
</el-form-item>
<el-form-item label="预约类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择预约类型">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="门店" prop="brandId">
<!-- <el-input v-model="formData.brandId" placeholder="请输入门店id" />-->
<el-select v-model="formData.brandId" placeholder="请选择机构" clearable class="!w-240px">
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="人员id" prop="technicianId">
<!-- <el-input v-model="formData.technicianId" placeholder="请输入人员id" /> -->
<el-select v-model="formData.technicianId" placeholder="请选择人员" clearable class="!w-240px">
<el-option v-for="organizationNameOptions in options" :key="organizationNameOptions.id"
:label="organizationNameOptions.technicianName" :value="organizationNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="预约时间" prop="reAddTime">
<el-date-picker
v-model="formData.reAddTime"
type="date"
value-format="x"
placeholder="选择预约时间"
/>
</el-form-item>
<el-form-item label="预约时间段" prop="hsstr">
<el-input v-model="formData.hsstr" placeholder="请输入预约时间段" />
</el-form-item>
<el-form-item label="预约状态" prop="reStatus">
<el-select v-model="formData.reStatus" placeholder="请选择预约状态">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.RE_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select v-model="formData.status" placeholder="请选择审核状态">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { LitemallReservationApi, LitemallReservationVO } from '@/api/subscribe/reservation'
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
/** 预约订单 表单 */
defineOptions({ name: 'LitemallReservationForm' })
const { t } = useI18n() //
const message = useMessage() //
const option = ref<LitemallBrandVO[]>([]);
const options = ref<LitemallTechniacianVO[]>([]);
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
userId: undefined,
type: undefined,
brandId: undefined,
technicianId: undefined,
reAddTime: undefined,
hsstr: undefined,
reStatus: undefined,
status: undefined,
remark: undefined
})
const formRules = reactive({
// userId: [{ required: true, message: 'id', trigger: 'blur' }],
type: [{ required: true, message: '预约类型不能为空', trigger: 'change' }],
brandId: [{ required: true, message: '门店不能为空', trigger: 'blur' }],
technicianId: [{ required: true, message: '人员不能为空', trigger: 'blur' }],
reAddTime: [{ required: true, message: '预约时间不能为空', trigger: 'blur' }],
// hsstr: [{ required: true, message: '', trigger: 'blur' }],
reStatus: [{ required: true, message: '预约状态不能为空', trigger: 'change' }],
status: [{ required: true, message: '审核状态不能为空', trigger: 'change' }]
})
const formRef = ref() // Ref
//
const getOrganizations = async () => {
try {
option.value = await LitemallBrandApi.getOrganizations()
} finally {
}
}
const getTechnicianName = async () => {
try {
options.value = await LitemallTechnicianApi.getTechnicianName()
} finally {
}
}
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await LitemallReservationApi.getLitemallReservation(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as LitemallReservationVO
if (formType.value === 'create') {
await LitemallReservationApi.createLitemallReservation(data)
message.success(t('common.createSuccess'))
} else {
await LitemallReservationApi.updateLitemallReservation(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getOrganizations()
})
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
userId: undefined,
type: undefined,
brandId: undefined,
technicianId: undefined,
reAddTime: undefined,
hsstr: undefined,
reStatus: undefined,
status: undefined,
remark: undefined
}
formRef.value?.resetFields()
}
</script>

View File

@ -6,17 +6,17 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
label-width="68px"
>
<!-- <el-form-item label="用户" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入用户"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<!-- <el-form-item label="用户id" prop="userId">-->
<!-- <el-input-->
<!-- v-model="queryParams.userId"-->
<!-- placeholder="请输入用户id"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="预约类型" prop="type">
<el-select
v-model="queryParams.type"
@ -25,57 +25,75 @@
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_TYPE)"
v-for="dict in getIntDictOptions(DICT_TYPE.TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="预约人员" prop="staffName">
<el-input
v-model="queryParams.staffName"
placeholder="请输入预约人员"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<!-- <el-form-item label="预约时间" prop="subscribeTime">
<el-date-picker
v-model="queryParams.subscribeTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="预约状态" prop="subscribeStatus">
<!-- <el-form-item label="门店id" prop="brandId">-->
<!-- <el-input-->
<!-- v-model="queryParams.brandId"-->
<!-- placeholder="请输入门店id"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="人员id" prop="technicianId">-->
<!-- <el-input-->
<!-- v-model="queryParams.technicianId"-->
<!-- placeholder="请输入人员id"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预约时间" prop="reAddTime">-->
<!-- <el-date-picker-->
<!-- v-model="queryParams.reAddTime"-->
<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
<!-- type="daterange"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预约时间段" prop="hsstr">-->
<!-- <el-input-->
<!-- v-model="queryParams.hsstr"-->
<!-- placeholder="请输入预约时间段"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="预约状态" prop="reStatus">
<el-select
v-model="queryParams.subscribeStatus"
v-model="queryParams.reStatus"
placeholder="请选择预约状态"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_STATUS)"
v-for="dict in getIntDictOptions(DICT_TYPE.RE_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="checkStatus">
<el-form-item label="审核状态" prop="status">
<el-select
v-model="queryParams.checkStatus"
v-model="queryParams.status"
placeholder="请选择审核状态"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_CHECK_STATUS)"
v-for="dict in getIntDictOptions(DICT_TYPE.STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -100,7 +118,7 @@
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['subscribe:manage:create']"
v-hasPermi="['subscribe:litemall-reservation:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
@ -109,7 +127,7 @@
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['subscribe:manage:export']"
v-hasPermi="['subscribe:litemall-reservation:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
@ -121,26 +139,33 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="用户" align="center" prop="userId" />
<el-table-column label="用户" align="center" prop="nickname" />
<el-table-column label="预约类型" align="center" prop="type">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SUBSCRIBE_TYPE" :value="scope.row.type" />
<dict-tag :type="DICT_TYPE.TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="预约人员" align="center" prop="staffId" />
<el-table-column label="门店" align="center" prop="brandName" />
<el-table-column label="预约人员" align="center" prop="technicianName" />
<el-table-column
label="预约时间"
align="center"
prop="subscribeTime"
prop="reAddTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="预约状态" align="center" prop="subscribeStatus" />
<el-table-column label="审核状态" align="center" prop="checkStatus">
<el-table-column label="预约时间段" align="center" prop="hsstr" />
<el-table-column label="预约状态" align="center" prop="reStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SUBSCRIBE_CHECK_STATUS" :value="scope.row.checkStatus" />
<dict-tag :type="DICT_TYPE.RE_STATUS" :value="scope.row.reStatus" />
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="创建时间"
align="center"
@ -148,13 +173,13 @@
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center" fixed="right" width="110">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['subscribe:manage:update']"
v-hasPermi="['subscribe:litemall-reservation:update']"
>
编辑
</el-button>
@ -162,7 +187,7 @@
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['subscribe:manage:delete']"
v-hasPermi="['subscribe:litemall-reservation:delete']"
>
删除
</el-button>
@ -179,36 +204,38 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ManageForm ref="formRef" @success="getList" />
<LitemallReservationForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ManageApi, ManageVO } from '@/api/subscribe/subscribemanage'
import ManageForm from './ManageForm.vue'
import { LitemallReservationApi, LitemallReservationVO } from '@/api/subscribe/reservation'
import LitemallReservationForm from './LitemallReservationForm.vue'
/** 预约 列表 */
defineOptions({ name: 'SubscribeManage' })
/** 预约订单 列表 */
defineOptions({ name: 'LitemallReservation' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<ManageVO[]>([]) //
const list = ref<LitemallReservationVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
userId: undefined,
type: undefined,
staffId: undefined,
staffName: undefined,
subscribeTime: [],
subscribeStatus: undefined,
checkStatus: undefined,
createTime: [],
brandId: undefined,
technicianId: undefined,
reAddTime: [],
hsstr: undefined,
reStatus: undefined,
status: undefined,
remark: undefined,
createTime: []
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
@ -217,7 +244,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
const data = await ManageApi.getManagePage(queryParams)
const data = await LitemallReservationApi.getLitemallReservationPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
@ -249,7 +276,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await ManageApi.deleteManage(id)
await LitemallReservationApi.deleteLitemallReservation(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -263,8 +290,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ManageApi.exportManage(queryParams)
download.excel(data, '预约.xls')
const data = await LitemallReservationApi.exportLitemallReservation(queryParams)
download.excel(data, '预约订单.xls')
} catch {
} finally {
exportLoading.value = false
@ -274,5 +301,6 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
})
</script>
</script>

View File

@ -1,174 +0,0 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="用户id" prop="userId">
<el-input v-model="formData.userId" placeholder="请输入用户id" />
</el-form-item>
<el-form-item label="预约类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择预约类型">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="所属机构" prop="organizationId">
<el-select v-model="formData.organizationId" placeholder="请选择机构" clearable class="!w-240px">
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="预约人员id" prop="staffId">
<el-input v-model="formData.staffId" placeholder="请输入预约人员id" />
</el-form-item>
<el-form-item label="预约时间" prop="subscribeTime">
<el-date-picker
v-model="formData.subscribeTime"
type="date"
value-format="x"
placeholder="选择预约时间"
/>
</el-form-item>
<!-- <el-form-item label="预约状态" prop="subscribeStatus">
<el-radio-group v-model="formData.subscribeStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item> -->
<el-form-item label="预约状态" prop="subscribeStatus">
<el-select v-model="formData.subscribeStatus" placeholder="请选择预约状态">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="checkStatus">
<el-select v-model="formData.checkStatus" placeholder="请选择审核状态">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_CHECK_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { ManageApi, ManageVO } from '@/api/subscribe/subscribemanage'
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
/** 预约 表单 */
defineOptions({ name: 'ManageForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const option = ref<OrganizationVO[]>([]);
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
userId: undefined,
type: undefined,
staffId: undefined,
subscribeTime: undefined,
subscribeStatus: undefined,
checkStatus: undefined,
})
const formRules = reactive({
userId: [{ required: true, message: '用户不能为空', trigger: 'blur' }],
type: [{ required: true, message: '预约类型不能为空', trigger: 'blur' }],
staffId: [{ required: true, message: '预约人员不能为空', trigger: 'blur' }],
subscribeTime: [{ required: true, message: '预约时间不能为空', trigger: 'blur' }],
subscribeStatus: [{ required: true, message: '预约状态不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
//
const getOrganizations = async () => {
try {
option.value = await OrganizationApi.getOrganizations()
} finally {
}
}
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ManageApi.getManage(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ManageVO
if (formType.value === 'create') {
await ManageApi.createManage(data)
message.success(t('common.createSuccess'))
} else {
await ManageApi.updateManage(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getOrganizations()
})
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
userId: undefined,
type: undefined,
staffId: undefined,
subscribeTime: undefined,
subscribeStatus: undefined,
checkStatus: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,244 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
<!-- <el-form-item label="人员编号" prop="techSn">-->
<!-- <el-input v-model="formData.techSn" placeholder="请输入人员编号" />-->
<!-- </el-form-item>-->
<el-form-item label="人员类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择人员类型">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TYPES)" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="人员名称" prop="technicianName">
<el-input v-model="formData.technicianName" placeholder="请输入人员名称" />
</el-form-item>
<el-form-item label="门店" prop="brandId">
<!-- <el-input v-model="formData.brandId" placeholder="请输入门店id" />-->
<el-select v-model="formData.brandId" placeholder="请选择门店" clearable class="!w-240px">
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-select v-model="formData.sex" placeholder="请选择性别">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.SEX)" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="照片" prop="photo">
<UploadImg v-model="formData.photo" />
</el-form-item>
<el-form-item label="服务时间段" prop="serviceTime">
<div v-for="(item, index) in timeRanges" :key="index" class="time-range">
<div class="left">
<el-time-select v-model="item.start" :max-time="item.end" class="mr-4" placeholder="开始时间"
start="07:00" step="00:05" end="23:30" />
</div>
<div class="center">
-
</div>
<div class="right">
<el-time-select v-model="item.end" :min-time="item.start" placeholder="结束时间" start="07:00"
step="00:05" end="23:30" />
</div>
<el-button @click="removeTime(index)" type="danger" size="mini">移除</el-button>
</div>
<el-button @click="addTime" type="primary" size="small">添加时间段</el-button>
</el-form-item>
<el-form-item label="服务范围" prop="serviceScope">
<el-input v-model="formData.serviceScope" placeholder="请输入服务范围" />
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="formData.phone" placeholder="请输入手机号" />
</el-form-item>
<!-- <el-form-item label="约满标记" prop="ym">-->
<!-- <el-input v-model="formData.ym" placeholder="请输入约满标记" />-->
<!-- </el-form-item>-->
<el-form-item label="状态" prop="status">
<el-select v-model="formData.status" placeholder="请选择状态">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TECHNICIAN_STATUS)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="介绍" prop="content">
<Editor v-model="formData.content" height="150px" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
/** 人员管理 表单 */
defineOptions({ name: 'LitemallTechnicianForm' })
const { t } = useI18n() //
const message = useMessage() //
const option = ref<LitemallBrandVO[]>([]);
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
// techSn: undefined,
type: undefined,
technicianName: undefined,
brandId: undefined,
sex: undefined,
photo: undefined,
serviceTime: '',
serviceTimeArray: [{}],
serviceScope: undefined,
phone: undefined,
// ym: undefined,
status: undefined,
content: undefined,
remark: undefined,
})
const formRules = reactive({
// techSn: [{ required: true, message: '', trigger: 'blur' }],
type: [{ required: true, message: '人员类型不能为空', trigger: 'change' }],
technicianName: [{ required: true, message: '人员名称不能为空', trigger: 'blur' }],
brandId: [{ required: true, message: '门店不能为空', trigger: 'blur' }],
// status: [{ required: true, message: '', trigger: 'change' }]
})
const formRef = ref() // Ref
const timeRanges = ref([{ start: '', end: '' }]);
const addTime = () => {
timeRanges.value.push({ start: '', end: '' });
};
const removeTime = (index : number) => {
if (timeRanges.value.length > 1) {
timeRanges.value.splice(index, 1);
}
};
//
const getOrganizations = async () => {
try {
option.value = await LitemallBrandApi.getOrganizations()
} finally {
}
}
/** 打开弹窗 */
const open = async (type : string, id ?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
timeRanges.value = ([]) //timeRanges
timeRanges.value.push({ start: '', end: '' }); //timeRaanges{ start: '', end: '' }
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
timeRanges.value = ([]); //
formData.value = await LitemallTechnicianApi.getLitemallTechnician(id)
const timeRange = JSON.parse(formData.value.serviceTime)
for (var i = 0; i < timeRange.length; i++) {
timeRanges.value.push(timeRange[i]); //push
}
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
formData.value.serviceTime = JSON.stringify(timeRanges.value);
const data = formData.value as unknown as LitemallTechnicianVO
if (formType.value === 'create') {
await LitemallTechnicianApi.createLitemallTechnician(data)
message.success(t('common.createSuccess'))
} else {
await LitemallTechnicianApi.updateLitemallTechnician(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
// techSn: undefined,
type: undefined,
technicianName: undefined,
brandId: undefined,
sex: undefined,
photo: undefined,
serviceTime: '',
serviceScope: undefined,
phone: undefined,
// ym: undefined,
status: undefined,
content: undefined,
remark: undefined,
serviceTimeArray: [{}],
}
formRef.value?.resetFields()
}
/** 初始化 **/
onMounted(() => {
getOrganizations()
})
</script>
<style>
.time-range {
margin-bottom: 10px;
margin-right: 40px;
/* width: 300px;
height: 150px; */
display: flex;
/* justify-content: space-between; */
}
.left {
width: 150px;
}
.center {
width: 20px;
text-align: center;
}
.right {
width: 150px;
margin-right: 20px;
}
</style>

View File

@ -6,71 +6,98 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-form-item label="所属机构" prop="organizationId">
<el-select
v-model="queryParams.organizationId"
placeholder="请选择机构"
clearable
class="!w-240px"
>
<el-option
v-for="organizationNameOptions in option"
:key="organizationNameOptions.id"
:label="organizationNameOptions.name"
:value="organizationNameOptions.id"
/>
</el-select>
</el-form-item>
<el-form-item label="编号" prop="serialNumber">
label-width="68px"
>
<el-form-item label="人员编号" prop="techSn">
<el-input
v-model="queryParams.serialNumber"
placeholder="请输入编号"
v-model="queryParams.techSn"
placeholder="请输入人员编号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-form-item label="人员类型" prop="type">
<el-select
v-model="queryParams.type"
placeholder="请选择类型"
placeholder="请选择人员类型"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_TYPE)"
v-for="dict in getIntDictOptions(DICT_TYPE.TYPES)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-form-item label="人员名称" prop="technicianName">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
v-model="queryParams.technicianName"
placeholder="请输入人员名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-form-item label="所属门店" prop="brandId">
<!-- <el-input-->
<!-- v-model="queryParams.brandId"-->
<!-- placeholder="请输入门店id"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<el-select
v-model="queryParams.sex"
placeholder="请选择性别"
v-model="queryParams.brandId"
placeholder="请选择门店"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STALL_SEX)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="organizationNameOptions in option"
:key="organizationNameOptions.id"
:label="organizationNameOptions.name"
:value="organizationNameOptions.id"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="性别" prop="sex">-->
<!-- <el-select-->
<!-- v-model="queryParams.sex"-->
<!-- placeholder="请选择性别"-->
<!-- clearable-->
<!-- class="!w-240px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in getIntDictOptions(DICT_TYPE.SEX)"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="服务时间段" prop="serviceTime">-->
<!-- <el-date-picker-->
<!-- v-model="queryParams.serviceTime"-->
<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
<!-- type="daterange"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="服务范围" prop="serviceScope">-->
<!-- <el-input-->
<!-- v-model="queryParams.serviceScope"-->
<!-- placeholder="请输入服务范围"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="手机号" prop="phone">
<el-input
v-model="queryParams.phone"
@ -80,41 +107,15 @@
class="!w-240px"
/>
</el-form-item>
<!-- <el-form-item label="服务时间段" prop="serviceTime">
<el-date-picker
v-model="queryParams.serviceTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="服务范围" prop="serviceScope">
<el-input
v-model="queryParams.serviceScope"
placeholder="请输入服务范围"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="约满标记" prop="sign">
<el-select
v-model="queryParams.sign"
placeholder="请选择约满标记"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_FULL)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="约满标记" prop="ym">-->
<!-- <el-input-->
<!-- v-model="queryParams.ym"-->
<!-- placeholder="请输入约满标记"-->
<!-- clearable-->
<!-- @keyup.enter="handleQuery"-->
<!-- class="!w-240px"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
@ -123,7 +124,7 @@
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STAFF_STATUS)"
v-for="dict in getIntDictOptions(DICT_TYPE.TECHNICIAN_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -141,6 +142,7 @@
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
@ -148,7 +150,7 @@
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['subscribe:staff:create']"
v-hasPermi="['subscribe:litemall-technician:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
@ -157,63 +159,58 @@
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['subscribe:staff:export']"
v-hasPermi="['subscribe:litemall-technician:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="所属机构" align="center" prop="organizationName" />
<el-table-column label="编号" align="center" prop="serialNumber" />
<el-table-column label="类型" align="center" prop="type" width="100">
<el-table-column label="人员编号" align="center" prop="techSn" />
<el-table-column label="人员类型" align="center" prop="type">
<template #default="scope">
<dict-tag :type="DICT_TYPE.STAFF_TYPE" :value="scope.row.type" />
<dict-tag :type="DICT_TYPE.TYPES" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="人员名称" align="center" prop="technicianName" />
<el-table-column label="门店" align="center" prop="brandName" />
<el-table-column label="性别" align="center" prop="sex">
<template #default="scope">
<dict-tag :type="DICT_TYPE.STALL_SEX" :value="scope.row.sex" />
<dict-tag :type="DICT_TYPE.SEX" :value="scope.row.sex" />
</template>
</el-table-column>
<el-table-column label="照片" align="center" prop="photo">
<template #default="{ row }">
<div class="flex">
<el-image
fit="cover"
:src="row.photo"
class="flex-none w-50px h-50px"
@click="imagePreview(row.photo)"
/>
</div>
</template>
</el-table-column>
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="服务时间段" align="center" prop="serviceTimeArray" width="200" />
<el-table-column label="照片" align="center" prop="photo" >
<template #default="{ row }">
<div class="flex">
<el-image
fit="cover"
:src="row.photo"
class="flex-none w-50px h-50px"
@click="imagePreview(row.photo)"
/>
</div>
</template>
</el-table-column>
<el-table-column label="服务时间段" align="center" prop="serviceTimeArray" width="200" />
<el-table-column label="服务范围" align="center" prop="serviceScope" />
<el-table-column label="约满标记" align="center" prop="sign" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.STAFF_FULL" :value="scope.row.sign" />
</template>
</el-table-column>
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="约满标记" align="center" prop="ym" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.STAFF_STATUS" :value="scope.row.status" />
<dict-tag :type="DICT_TYPE.TECHNICIAN_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="介绍" align="center" prop="content" >
<template #default="scope">
<div v-html="scope.row.content"></div>
</template>
</el-table-column>
<template #default="scope">
<div v-html="scope.row.content"></div>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="创建时间"
align="center"
@ -221,13 +218,13 @@
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center" fixed="right" width="110">
<el-table-column label="操作" align="center" fixed="right" width="110">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['subscribe:staff:update']"
v-hasPermi="['subscribe:litemall-technician:update']"
>
编辑
</el-button>
@ -235,7 +232,7 @@
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['subscribe:staff:delete']"
v-hasPermi="['subscribe:litemall-technician:delete']"
>
删除
</el-button>
@ -252,44 +249,44 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<StaffForm ref="formRef" @success="getList" />
<LitemallTechnicianForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { StaffApi, StaffVO } from '@/api/subscribe/staff'
import StaffForm from './StaffForm.vue'
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
import LitemallTechnicianForm from './LitemallTechnicianForm.vue'
import {createImageViewer} from "@/components/ImageViewer";
import { OrganizationApi, OrganizationVO } from '@/api/subscribe/organization'
/** 预约人员 列表 */
defineOptions({ name: 'Staff' })
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
/** 人员管理 列表 */
defineOptions({ name: 'LitemallTechnician' })
const message = useMessage() //
const { t } = useI18n() //
const option = ref<LitemallBrandVO[]>([]);
const loading = ref(true) //
const list = ref<StaffVO[]>([]) //
const list = ref<LitemallTechnicianVO[]>([]) //
const total = ref(0) //
const option = ref<OrganizationVO[]>([]);
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
organizationId: undefined,
serialNumber: undefined,
techSn: undefined,
type: undefined,
name: undefined,
technicianName: undefined,
brandId: undefined,
sex: undefined,
photo: undefined,
phone: undefined,
serviceTime: undefined,
serviceTime: [],
serviceScope: undefined,
sign: undefined,
phone: undefined,
ym: undefined,
status: undefined,
content: undefined,
remark: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
@ -298,7 +295,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
const data = await StaffApi.getStaffPage(queryParams)
const data = await LitemallTechnicianApi.getLitemallTechnicianPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
@ -306,17 +303,17 @@ const getList = async () => {
}
}
//
const getOrganization = async () => {
loading.value = true
try {
option.value = await OrganizationApi.getOrganizations()
option.value = await LitemallBrandApi.getOrganizations()
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
@ -328,25 +325,24 @@ const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
const imagePreview = (imgUrl: string) => {
createImageViewer({
urlList: [imgUrl]
})
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
const imagePreview = (imgUrl: string) => {
createImageViewer({
urlList: [imgUrl]
})
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await StaffApi.deleteStaff(id)
await LitemallTechnicianApi.deleteLitemallTechnician(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -360,8 +356,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await StaffApi.exportStaff(queryParams)
download.excel(data, '预约人员.xls')
const data = await LitemallTechnicianApi.exportLitemallTechnician(queryParams)
download.excel(data, '人员管理.xls')
} catch {
} finally {
exportLoading.value = false

View File

@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "用户 APP - 装修页面")
@ -35,4 +37,13 @@ public class AppDiyPageController {
return success(BeanUtils.toBean(diyPage, AppDiyPagePropertyRespVO.class));
}
@GetMapping("/getDiyPage")
public CommonResult<List<AppDiyPagePropertyRespVO>> getPromotion() {
List<DiyPageDO> diyPage = diyPageService.getDiyPage();
return success(BeanUtils.toBean(diyPage, AppDiyPagePropertyRespVO.class));
}
}

View File

@ -79,4 +79,6 @@ public interface DiyPageService {
*/
List<DiyPageDO> getDiyPageByTemplateId(Long templateId);
List<DiyPageDO> getDiyPage();
}

View File

@ -117,6 +117,11 @@ public class DiyPageServiceImpl implements DiyPageService {
return diyPageMapper.selectListByTemplateId(templateId);
}
@Override
public List<DiyPageDO> getDiyPage() {
return diyPageMapper.selectList();
}
@Override
public void updateDiyPageProperty(DiyPagePropertyUpdateRequestVO updateReqVO) {
// 校验存在

View File

@ -4,8 +4,10 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
public interface ErrorCodeConstants {
ErrorCode MANAGE_NOT_EXISTS = new ErrorCode(11111, "预约不存在");
ErrorCode STAFF_NOT_EXISTS = new ErrorCode(22222, "预约人员不存在");
ErrorCode ORGANIZATION_NOT_EXISTS = new ErrorCode(33333, "机构不存在");
ErrorCode LITEMALL_TECHNICIAN_NOT_EXISTS = new ErrorCode(111, "人员管理不存在");
ErrorCode LITEMALL_BRAND_NOT_EXISTS = new ErrorCode(222, "门店管理不存在");
ErrorCode LITEMALL_RESERVATION_NOT_EXISTS = new ErrorCode(333, "预约订单不存在");
}

View File

@ -25,6 +25,12 @@
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-member-biz</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
@ -42,6 +48,7 @@
<artifactId>yudao-spring-boot-starter-security</artifactId>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
@ -63,6 +70,13 @@
<groupId>cn.com.kingbase</groupId>
<artifactId>kingbase8</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -0,0 +1,106 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.brand;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandRespVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import cn.iocoder.yudao.module.srbscribe.service.brand.LitemallBrandService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 门店管理")
@RestController
@RequestMapping("/subscribe/litemall-brand")
@Validated
public class LitemallBrandController {
@Resource
private LitemallBrandService litemallBrandService;
@PostMapping("/create")
@Operation(summary = "创建门店管理")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-brand:create')")
public CommonResult<Integer> createLitemallBrand(@Valid @RequestBody LitemallBrandSaveReqVO createReqVO) {
return success(litemallBrandService.createLitemallBrand(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新门店管理")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-brand:update')")
public CommonResult<Boolean> updateLitemallBrand(@Valid @RequestBody LitemallBrandSaveReqVO updateReqVO) {
litemallBrandService.updateLitemallBrand(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除门店管理")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('subscribe:litemall-brand:delete')")
public CommonResult<Boolean> deleteLitemallBrand(@RequestParam("id") Integer id) {
litemallBrandService.deleteLitemallBrand(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得门店管理")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-brand:query')")
public CommonResult<LitemallBrandRespVO> getLitemallBrand(@RequestParam("id") Integer id) {
LitemallBrandDO litemallBrand = litemallBrandService.getLitemallBrand(id);
return success(BeanUtils.toBean(litemallBrand, LitemallBrandRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得门店管理分页")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-brand:query')")
public CommonResult<PageResult<LitemallBrandRespVO>> getLitemallBrandPage(@Valid LitemallBrandPageReqVO pageReqVO) {
PageResult<LitemallBrandDO> pageResult = litemallBrandService.getLitemallBrandPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, LitemallBrandRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出门店管理 Excel")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-brand:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportLitemallBrandExcel(@Valid LitemallBrandPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<LitemallBrandDO> list = litemallBrandService.getLitemallBrandPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "门店管理.xls", "数据", LitemallBrandRespVO.class,
BeanUtils.toBean(list, LitemallBrandRespVO.class));
}
@GetMapping("/getOrganization")
@Operation(summary = "获得机构名称数据")
public CommonResult<List<LitemallBrandDO>> getOrganization() {
List<LitemallBrandDO> organization = litemallBrandService.getOrganization();
return success(organization);
}
}

View File

@ -0,0 +1,52 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 门店管理分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class LitemallBrandPageReqVO extends PageParam {
@Schema(description = "门店管理员id", example = "227")
private String userId;
@Schema(description = "联系电话")
private String phone;
@Schema(description = "门店名称", example = "李四")
private String name;
@Schema(description = "门店邮箱")
private String mail;
@Schema(description = "门店图片", example = "https://www.iocoder.cn")
private String picUrl;
@Schema(description = "门店地址")
private String address;
@Schema(description = "门店简介")
private String depict;
@Schema(description = "门店状态", example = "2")
private Integer status;
@Schema(description = "权重")
private Integer weight;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,66 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 门店管理 Response VO")
@Data
@ExcelIgnoreUnannotated
public class LitemallBrandRespVO {
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31133")
@ExcelProperty("门店id")
private Integer id;
@Schema(description = "门店管理员id", example = "227")
@ExcelProperty("门店管理员id")
private String userId;
@Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("联系电话")
private String phone;
@Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
@ExcelProperty("门店名称")
private String name;
@Schema(description = "门店邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("门店邮箱")
private String mail;
@Schema(description = "门店图片", example = "https://www.iocoder.cn")
@ExcelProperty("门店图片")
private String picUrl;
@Schema(description = "门店地址", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("门店地址")
private String address;
@Schema(description = "门店简介")
@ExcelProperty("门店简介")
private String depict;
@Schema(description = "门店状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty(value = "门店状态", converter = DictConvert.class)
@DictFormat("brand_status") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer status;
@Schema(description = "权重")
@ExcelProperty("权重")
private Integer weight;
@Schema(description = "备注", example = "你说的对")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,50 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 门店管理新增/修改 Request VO")
@Data
public class LitemallBrandSaveReqVO {
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31133")
private Integer id;
@Schema(description = "门店管理员id", example = "227")
private String userId;
@Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "联系电话不能为空")
private String phone;
@Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
@NotEmpty(message = "门店名称不能为空")
private String name;
@Schema(description = "门店邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "门店邮箱不能为空")
private String mail;
@Schema(description = "门店图片", example = "https://www.iocoder.cn")
private String picUrl;
@Schema(description = "门店地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "门店地址不能为空")
private String address;
@Schema(description = "门店简介")
private String depict;
@Schema(description = "门店状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "门店状态不能为空")
private Integer status;
@Schema(description = "权重")
private Integer weight;
@Schema(description = "备注", example = "你说的对")
private String remark;
}

View File

@ -0,0 +1,97 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.reservation;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationRespVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import cn.iocoder.yudao.module.srbscribe.service.reservation.LitemallReservationService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 预约订单")
@RestController
@RequestMapping("/subscribe/litemall-reservation")
@Validated
public class LitemallReservationController {
@Resource
private LitemallReservationService litemallReservationService;
@PostMapping("/create")
@Operation(summary = "创建预约订单")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-reservation:create')")
public CommonResult<Long> createLitemallReservation(@Valid @RequestBody LitemallReservationSaveReqVO createReqVO) {
return success(litemallReservationService.createLitemallReservation(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新预约订单")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-reservation:update')")
public CommonResult<Boolean> updateLitemallReservation(@Valid @RequestBody LitemallReservationSaveReqVO updateReqVO) {
litemallReservationService.updateLitemallReservation(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除预约订单")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('subscribe:litemall-reservation:delete')")
public CommonResult<Boolean> deleteLitemallReservation(@RequestParam("id") Long id) {
litemallReservationService.deleteLitemallReservation(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得预约订单")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-reservation:query')")
public CommonResult<LitemallReservationRespVO> getLitemallReservation(@RequestParam("id") Long id) {
LitemallReservationDO litemallReservation = litemallReservationService.getLitemallReservation(id);
return success(BeanUtils.toBean(litemallReservation, LitemallReservationRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得预约订单分页")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-reservation:query')")
public CommonResult<PageResult<LitemallReservationRespVO>> getLitemallReservationPage(@Valid LitemallReservationPageReqVO pageReqVO) {
PageResult<LitemallReservationDO> pageResult = litemallReservationService.getLitemallReservationPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, LitemallReservationRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出预约订单 Excel")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-reservation:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportLitemallReservationExcel(@Valid LitemallReservationPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<LitemallReservationDO> list = litemallReservationService.getLitemallReservationPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "预约订单.xls", "数据", LitemallReservationRespVO.class,
BeanUtils.toBean(list, LitemallReservationRespVO.class));
}
}

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.subscribemanage.vo;
package cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo;
import lombok.*;
import java.util.*;
@ -9,35 +9,42 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 预约分页 Request VO")
@Schema(description = "管理后台 - 预约订单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SubscribeManagePageReqVO extends PageParam {
public class LitemallReservationPageReqVO extends PageParam {
@Schema(description = "用户id", example = "20637")
@Schema(description = "用户id", example = "27338")
private Long userId;
@Schema(description = "预约类型", example = "2")
private Integer type;
@Schema(description = "预约人员id", example = "23520")
private Long staffId;
@Schema(description = "门店id", example = "9453")
private String brandId;
@Schema(description = "人员id", example = "2596")
private String technicianId;
@Schema(description = "预约时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] subscribeTime;
private LocalDateTime[] reAddTime;
@Schema(description = "预约状态", example = "1")
private String subscribeStatus;
@Schema(description = "预约时间段")
private String hsstr;
@Schema(description = "审核状态", example = "1")
private Integer checkStatus;
@Schema(description = "预约状态", example = "2")
private Integer reStatus;
@Schema(description = "审核状态", example = "2")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
private String staffName;
}

View File

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 预约订单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class LitemallReservationRespVO {
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3149")
@ExcelProperty("id")
private Long id;
@Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27338")
@ExcelProperty("用户id")
private Long userId;
@Schema(description = "预约类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty(value = "预约类型", converter = DictConvert.class)
@DictFormat("type") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer type;
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9453")
@ExcelProperty("门店id")
private String brandId;
@Schema(description = "人员id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2596")
@ExcelProperty("人员id")
private String technicianId;
@Schema(description = "预约时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("预约时间")
private LocalDateTime reAddTime;
@Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("预约时间段")
private String hsstr;
@Schema(description = "预约状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty(value = "预约状态", converter = DictConvert.class)
@DictFormat("re_status") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer reStatus;
@Schema(description = "审核状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty(value = "审核状态", converter = DictConvert.class)
@DictFormat("status") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer status;
@Schema(description = "备注", example = "随便")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelProperty("用户名称")
private String nickname;
@ExcelProperty("门店")
private String brandName;
}

View File

@ -0,0 +1,49 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 预约订单新增/修改 Request VO")
@Data
public class LitemallReservationSaveReqVO {
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3149")
private Long id;
@Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27338")
private Long userId;
@Schema(description = "预约类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "预约类型不能为空")
private Integer type;
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9453")
@NotEmpty(message = "门店不能为空")
private String brandId;
@Schema(description = "人员id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2596")
@NotEmpty(message = "人员不能为空")
private String technicianId;
@Schema(description = "预约时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "预约时间不能为空")
private LocalDateTime reAddTime;
@Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotNull(message = "预约时间段不能为空")
private String hsstr;
@Schema(description = "预约状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer reStatus;
@Schema(description = "审核状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
}

View File

@ -0,0 +1,108 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.technician;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianRespVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
import cn.iocoder.yudao.module.srbscribe.service.technician.LitemallTechnicianService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.io.IOException;
import java.util.List;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
@Tag(name = "管理后台 - 人员管理")
@RestController
@RequestMapping("/subscribe/litemall-technician")
@Validated
public class LitemallTechnicianController {
@Resource
private LitemallTechnicianService litemallTechnicianService;
@PostMapping("/create")
@Operation(summary = "创建人员管理")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-technician:create')")
public CommonResult<Long> createLitemallTechnician(@Valid @RequestBody LitemallTechnicianSaveReqVO createReqVO) {
return success(litemallTechnicianService.createLitemallTechnician(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新人员管理")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-technician:update')")
public CommonResult<Boolean> updateLitemallTechnician(@Valid @RequestBody LitemallTechnicianSaveReqVO updateReqVO) {
litemallTechnicianService.updateLitemallTechnician(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除人员管理")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('subscribe:litemall-technician:delete')")
public CommonResult<Boolean> deleteLitemallTechnician(@RequestParam("id") Long id) {
litemallTechnicianService.deleteLitemallTechnician(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得人员管理")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-technician:query')")
public CommonResult<LitemallTechnicianRespVO> getLitemallTechnician(@RequestParam("id") Long id) {
LitemallTechnicianDO litemallTechnician = litemallTechnicianService.getLitemallTechnician(id);
return success(BeanUtils.toBean(litemallTechnician, LitemallTechnicianRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得人员管理分页")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-technician:query')")
public CommonResult<PageResult<LitemallTechnicianRespVO>> getLitemallTechnicianPage(@Valid LitemallTechnicianPageReqVO pageReqVO) {
PageResult<LitemallTechnicianDO> pageResult = litemallTechnicianService.getLitemallTechnicianPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, LitemallTechnicianRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出人员管理 Excel")
@PreAuthorize("@ss.hasPermission('subscribe:litemall-technician:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportLitemallTechnicianExcel(@Valid LitemallTechnicianPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<LitemallTechnicianDO> list = litemallTechnicianService.getLitemallTechnicianPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "人员管理.xls", "数据", LitemallTechnicianRespVO.class,
BeanUtils.toBean(list, LitemallTechnicianRespVO.class));
}
@GetMapping("/getTechnicianName")
public CommonResult<List<LitemallTechnicianDO>> getTechnicianName() {
List<LitemallTechnicianDO> technicianName = litemallTechnicianService.getTechnicianName();
return success(technicianName);
}
}

View File

@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo;
package cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
@ -10,23 +9,23 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 预约人员分页 Request VO")
@Schema(description = "管理后台 - 人员管理分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class StaffPageReqVO extends PageParam {
public class LitemallTechnicianPageReqVO extends PageParam {
@Schema(description = "机构id", example = "26075")
private Long organizationId;
@Schema(description = "人员编号")
private String techSn;
@Schema(description = "编号")
private String serialNumber;
@Schema(description = "类型", example = "1")
@Schema(description = "人员类型", example = "1")
private Integer type;
@Schema(description = "名称", example = "张三")
private String name;
@Schema(description = "人员名称", example = "赵六")
private String technicianName;
@Schema(description = "门店id", example = "28184")
private Long brandId;
@Schema(description = "性别")
private Integer sex;
@ -34,31 +33,32 @@ public class StaffPageReqVO extends PageParam {
@Schema(description = "照片")
private String photo;
@Schema(description = "手机号")
private String phone;
@Schema(description = "服务时间段")
private String serviceTime;
// @Schema(description = "服务开始时间")
// private String serviceStartTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] serviceTime;
@Schema(description = "服务范围")
private String serviceScope;
@Schema(description = "约满标记")
private Integer sign;
@Schema(description = "手机号")
private String phone;
@Schema(description = "状态", example = "2")
@Schema(description = "约满标记")
private Integer ym;
@Schema(description = "状态", example = "1")
private Integer status;
@Schema(description = "介绍")
private String content;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,89 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 人员管理 Response VO")
@Data
@ExcelIgnoreUnannotated
public class LitemallTechnicianRespVO {
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26372")
@ExcelProperty("id")
private Long id;
@Schema(description = "人员编号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("人员编号")
private String techSn;
@Schema(description = "人员类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty(value = "人员类型", converter = DictConvert.class)
@DictFormat("types") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer type;
@Schema(description = "人员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@ExcelProperty("人员名称")
private String technicianName;
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28184")
@ExcelProperty("门店id")
private Long brandId;
@Schema(description = "性别")
@ExcelProperty(value = "性别", converter = DictConvert.class)
@DictFormat("sex") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer sex;
@Schema(description = "照片")
@ExcelProperty("照片")
private String photo;
@Schema(description = "服务时间段")
@ExcelProperty("服务时间段")
private String serviceTime;
@Schema(description = "服务范围")
@ExcelProperty("服务范围")
private String serviceScope;
@Schema(description = "手机号")
@ExcelProperty("手机号")
private String phone;
@Schema(description = "约满标记")
@ExcelProperty("约满标记")
private Integer ym;
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty(value = "状态", converter = DictConvert.class)
@DictFormat("technician_status") // TODO 代码优化建议设置到对应的 DictTypeConstants 枚举类中
private Integer status;
@Schema(description = "介绍")
@ExcelProperty("介绍")
private String content;
@Schema(description = "备注", example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelProperty("门店")
private String brandName;
@ExcelProperty("服务时间段")
private String serviceTimeArray;
}

View File

@ -0,0 +1,59 @@
package cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 人员管理新增/修改 Request VO")
@Data
public class LitemallTechnicianSaveReqVO {
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26372")
private Long id;
@Schema(description = "人员编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String techSn;
@Schema(description = "人员类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "人员类型不能为空")
private Integer type;
@Schema(description = "人员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotEmpty(message = "人员名称不能为空")
private String technicianName;
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28184")
@NotNull(message = "门店不能为空")
private Long brandId;
@Schema(description = "性别")
private Integer sex;
@Schema(description = "照片")
private String photo;
@Schema(description = "服务时间段")
private String serviceTime;
@Schema(description = "服务范围")
private String serviceScope;
@Schema(description = "手机号")
private String phone;
@Schema(description = "约满标记")
private Integer ym;
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态不能为空")
private Integer status;
@Schema(description = "介绍")
private String content;
@Schema(description = "备注", example = "你猜")
private String remark;
}

View File

@ -0,0 +1,87 @@
package cn.iocoder.yudao.module.srbscribe.controller.app.brand;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandRespVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import cn.iocoder.yudao.module.srbscribe.service.brand.LitemallBrandService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* 机构
*/
@RestController
@RequestMapping("/h5/brand")
@Validated
public class AppBrandController {
@Resource
public LitemallBrandService litemallBrandService;
@GetMapping("/getList")
public String getList(){
return "cscscs";
}
/**
* 查询医馆管理列表
*/
@GetMapping("/list")
public Object list(LitemallBrandPageReqVO litemallBrandPageReqVO) {
PageResult<LitemallBrandDO> pageResult = litemallBrandService.getLitemallBrandPage(litemallBrandPageReqVO);
return success(BeanUtils.toBean(pageResult, LitemallBrandRespVO.class));
}
/**
* 导出医馆管理列表
*/
// @PostMapping("/export")
// public void export(HttpServletResponse response, LitemallBrand litemallBrand) throws IOException {
// List<LitemallBrand> list = litemallBrandService.selectLitemallBrandList(litemallBrand);
// ExcelUtil<LitemallBrand> util = new ExcelUtil<LitemallBrand>(LitemallBrand.class);
// util.exportExcel(response, list, "医馆管理数据");
// }
/**
* 获取医馆管理详细信息
*/
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Integer id) {
// OrganizationDO organization = organizationService.getOrganization(id);
// return AjaxResult.success(organization);
// }
/**
* 新增医馆管理
*/
// @PostMapping
// public CommonResult<Integer> add(@RequestBody OrganizationSaveReqVO createReqVO) {
// return success(organizationService.createOrganization(createReqVO));
// }
/**
* 修改医馆管理
*/
// @PutMapping
// public AjaxResult edit(@RequestBody LitemallBrand litemallBrand)
// {
// return toAjax(litemallBrandService.updateLitemallBrand(litemallBrand));
// }
/**
* 删除医馆管理
*/
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(litemallBrandService.deleteLitemallBrandByIds(ids));
// }
}

View File

@ -0,0 +1,109 @@
package cn.iocoder.yudao.module.srbscribe.controller.app.reservation;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationRespVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import cn.iocoder.yudao.module.srbscribe.service.reservation.LitemallReservationService;
import cn.iocoder.yudao.module.srbscribe.util.AjaxResult;
import cn.iocoder.yudao.module.srbscribe.util.StringUtils;
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* 预约管理
*/
@RestController
@RequestMapping("/h5/reservation")
public class AppReservationController {
@Resource
public LitemallReservationService litemallReservationService;
@Resource
public DictDataApi dictDataApi;
/**
* 查询预约管理列表
*/
@GetMapping("/list")
public CommonResult<PageResult<LitemallReservationRespVO>> getLitemallReservationPage(LitemallReservationPageReqVO pageReqVO) {
PageResult<LitemallReservationDO> pageResult = litemallReservationService.getLitemallReservationPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, LitemallReservationRespVO.class));
}
/**
* 根据字典类型查询字典数据信息
*/
@GetMapping(value = "/type")
public AjaxResult dictType() {
// List<SysDictData> data = dictTypeService.selectDictDataByType("tech_type");
List<DictDataRespDTO> dictDataList = dictDataApi.getDictDataList("types");
if (StringUtils.isNull(dictDataList)) {
dictDataList = new ArrayList<DictDataRespDTO>();
}
return AjaxResult.success(dictDataList);
}
/**
* 导出预约管理列表
*/
// @PostMapping("/export")
// public void export(HttpServletResponse response, LitemallReservation litemallReservation) throws IOException
// {
// List<LitemallReservation> list = litemallReservationService.selectLitemallReservationList(litemallReservation);
// ExcelUtil<LitemallReservation> util = new ExcelUtil<LitemallReservation>(LitemallReservation.class);
// util.exportExcel(response, list, "预约管理数据");
// }
// /**
// * 获取预约管理详细信息
// */
// @GetMapping(value = "/{id}")
// public CommonResult<SubscribeManageRespVO> getManage(@PathVariable("id") Long id) {
// SubscribeManageDO manage = subscribeManageService.getManage(id);
// return success(BeanUtils.toBean(manage, SubscribeManageRespVO.class));
// }
//
/**
* 新增预约管理
*/
@PostMapping
public CommonResult<Long> createLitemallReservation(@RequestBody LitemallReservationSaveReqVO createReqVO) {
return success(litemallReservationService.createLitemallReservation(createReqVO));
}
// /**
// * 修改预约管理
// */
// @PutMapping
// public CommonResult<Boolean> updateManage( @RequestBody SubscribeManageSaveReqVO updateReqVO) {
// subscribeManageService.updateManage(updateReqVO);
// return success(true);
// }
//
// /**
// * 删除预约管理
// */
// @DeleteMapping("/{ids}")
// public CommonResult<Boolean> deleteManage(@PathVariable("ids") Long[] ids) {
// subscribeManageService.deleteList(ids);
// return success(true);
// }
}

View File

@ -0,0 +1,171 @@
package cn.iocoder.yudao.module.srbscribe.controller.app.technician;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationRespVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianRespVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
import cn.iocoder.yudao.module.srbscribe.service.reservation.LitemallReservationService;
import cn.iocoder.yudao.module.srbscribe.service.technician.LitemallTechnicianService;
import org.json.JSONException;
import org.springframework.web.bind.annotation.*;
import org.json.JSONArray;
import javax.annotation.Resource;
import javax.validation.Valid;
import com.alibaba.fastjson.JSON;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* 人员
*/
@RestController
@RequestMapping("/h5/technician")
public class AppTechnicianController {
@Resource
public LitemallTechnicianService litemallTechnicianService;
@Resource
public LitemallReservationService litemallReservationService;
/**
* 查询技师管理列表
*/
@GetMapping("/list")
public CommonResult<PageResult<LitemallTechnicianRespVO>> getLitemallTechnicianPage( LitemallTechnicianPageReqVO pageReqVO) {
PageResult<LitemallTechnicianDO> pageResult = litemallTechnicianService.getLitemallTechnicianPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, LitemallTechnicianRespVO.class));
}
// /**
// * 首页查询技师管理列表名称去重
// */
// @GetMapping("/listmain")
// public CommonResult<PageResult<LitemallTechnicianRespVO>> listmain(LitemallTechnicianPageReqVO pageReqVO) {
// PageResult<LitemallTechnicianDO> pageResult = litemallTechnicianService.getLitemallTechnicianPage(pageReqVO);
// return success(BeanUtils.toBean(pageResult, LitemallTechnicianRespVO.class));
// }
// /**
// * 查询技师管理列表
// */
// @GetMapping("/list")
// public TableDataInfo list(LitemallTechnician litemallTechnician)
// {
// startPage();
// List<LitemallTechnician> list = litemallTechnicianService.selectLitemallTechnicianList(litemallTechnician);
// return getDataTable(list);
// }
// /**
// * 首页查询技师管理列表名称去重
// */
// @GetMapping("/listmain")
// public TableDataInfo listmain(LitemallTechnician litemallTechnician)
// {
// startPage();
// List<LitemallTechnician> list = litemallTechnicianService.selectLitemallTechnicianListmian(litemallTechnician);
// return getDataTable(list);
// }
/**
* 查询技师管理详情
*/
@GetMapping("/h5xq")
public Object h5xq(LitemallTechnicianDO litemallTechnician) throws JSONException {
LitemallTechnicianDO litemallTechnicianDO = new LitemallTechnicianDO();
litemallTechnicianDO = litemallTechnicianService.getLitemallTechnician(litemallTechnician.getId());
litemallTechnicianDO.getAddDate();
String serviceTime = litemallTechnicianDO.getServiceTime();
JSONArray jsonArray = new JSONArray(serviceTime);
List<Object> relist = new ArrayList<>();
for (int i = 0; i < jsonArray.length(); i++) {
Map maps = (Map) JSON.parse(jsonArray.get(i).toString());
String serviceTime1 = maps.get("startTime") + "-" + maps.get("endTime");
LitemallReservationDO litemallReservationDO = new LitemallReservationDO();
litemallReservationDO.setTechnicianId(String.valueOf(litemallTechnician.getId()));
litemallReservationDO.setReAddTime(litemallTechnician.getAddDate());
litemallReservationDO.setHsstr(serviceTime1);
List<LitemallReservationDO> list = litemallReservationService.selectLitemallReservationList(litemallReservationDO);
if (list.size() != 0) {
// if (list.size()!=0||litemallTechnician2.getYm().equals("1")){
maps.put("ym", "true");
} else {
maps.put("ym", "false");
}
relist.add(maps);
}
litemallTechnicianDO.setServiceTime(relist.toString());
return success(litemallTechnicianDO);
}
/**
* 导出技师管理列表
*/
// @PostMapping("/export")
// public void export(HttpServletResponse response, LitemallTechnician litemallTechnician) throws IOException
// {
// List<LitemallTechnician> list = litemallTechnicianService.selectLitemallTechnicianList(litemallTechnician);
// ExcelUtil<LitemallTechnician> util = new ExcelUtil<LitemallTechnician>(LitemallTechnician.class);
// util.exportExcel(response, list, "技师管理数据");
// }
// /**
// * 获取技师管理详细信息
// */
// @GetMapping(value = "/{id}")
// public CommonResult<StaffRespVO> getInfo(@PathVariable("id") Long id) {
// StaffDO staff = staffService.getStaff(id);
// return success(BeanUtils.toBean(staff, StaffRespVO.class));
// }
//
// /**
// * 新增技师管理
// */
// @PostMapping
// public CommonResult<Long> add(@Valid @RequestBody StaffSaveReqVO createReqVO) {
// return success(staffService.createStaff(createReqVO));
// }
//
// /**
// * 修改技师管理
// */
// @PutMapping
// public CommonResult<Boolean> updateStaff( @RequestBody StaffSaveReqVO updateReqVO) {
// staffService.updateStaff(updateReqVO);
// return success(true);
// }
//
// /**
// * 删除技师管理
// */
// @DeleteMapping("/{ids}")
// public CommonResult<Boolean> deleteStaff(@PathVariable("ids") Long id) {
// staffService.deleteStaff(id);
// return success(true);
// }
}

View File

@ -0,0 +1,73 @@
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 门店管理 DO
*
* @author 管理员
*/
@TableName("subscribe_brand")
@KeySequence("subscribe_brand_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LitemallBrandDO extends BaseDO {
/**
* 门店id
*/
@TableId
private Integer id;
/**
* 门店管理员id
*/
private String userId;
/**
* 联系电话
*/
private String phone;
/**
* 门店名称
*/
private String name;
/**
* 门店邮箱
*/
private String mail;
/**
* 门店图片
*/
private String picUrl;
/**
* 门店地址
*/
private String address;
/**
* 门店简介
*/
private String depict;
/**
* 门店状态
*
* 枚举 {@link TODO brand_status 对应的类}
*/
private Integer status;
/**
* 权重
*/
private Integer weight;
/**
* 备注
*/
private String remark;
}

View File

@ -0,0 +1,95 @@
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 预约订单 DO
*
* @author 管理员
*/
@TableName("subscribe_reservation")
@KeySequence("subscribe_reservation_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LitemallReservationDO extends BaseDO {
/**
* id
*/
@TableId
private Long id;
/**
* 用户id
*/
private Long userId;
@TableField(exist = false)
private String memberphone;
@TableField(exist = false)
private String nickname;
/**
* 预约类型
*
* 枚举 {@link TODO type 对应的类}
*/
private Integer type;
@TableField(exist = false)
private String typeName;
/**
* 门店id
*/
private String brandId;
@TableField(exist = false)
private String brandName;
@TableField(exist = false)
private String brandphone;
@TableField(exist = false)
private String brandaddress;
/**
* 人员id
*/
private String technicianId;
@TableField(exist = false)
private String technicianName;
/**
* 预约时间
*/
private String reAddTime;
/**
* 预约时间段
*/
private String hsstr;
/**
* 预约状态
*
* 枚举 {@link TODO re_status 对应的类}
*/
private Integer reStatus;
/**
* 审核状态
*
* 枚举 {@link TODO status 对应的类}
*/
private Integer status;
/**
* 备注
*/
private String remark;
}

View File

@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.staff;
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician;
import cn.iocoder.yudao.module.srbscribe.controller.admin.staff.vo.ServiceTimeVO;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
@ -10,19 +9,19 @@ import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 预约人员 DO
* 人员管理 DO
*
* @author 管理员
*/
@TableName("subscribe_staff")
@KeySequence("subscribe_staff_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@TableName("subscribe_technician")
@KeySequence("subscribe_technician_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StaffDO extends BaseDO {
public class LitemallTechnicianDO extends BaseDO {
/**
* id
@ -30,37 +29,33 @@ public class StaffDO extends BaseDO {
@TableId
private Long id;
/**
* 机构id
* 人员编号
*/
private Long organizationId;
private String techSn;
/**
* 编号
*/
private String serialNumber;
/**
* 类型
* 人员类型
*
* 枚举 {@link TODO staff_type 对应的类}
* 枚举 {@link TODO types 对应的类}
*/
private Integer type;
/**
* 名称
* 人员名称
*/
private String name;
private String technicianName;
/**
* 门店id
*/
private Long brandId;
/**
* 性别
*
* 枚举 {@link TODO stall_sex 对应的类}
* 枚举 {@link TODO sex 对应的类}
*/
private Integer sex;
/**
* 照片
*/
private String photo;
/**
* 手机号
*/
private String phone;
/**
* 服务时间段
*/
@ -70,27 +65,40 @@ public class StaffDO extends BaseDO {
*/
private String serviceScope;
/**
* 约满标记
*
* 枚举 {@link TODO staff_full 对应的类}
* 手机号
*/
private Integer sign;
private String phone;
/**
* 约满标记
*/
private Integer ym;
/**
* 状态
*
* 枚举 {@link TODO staff_status 对应的类}
* 枚举 {@link TODO technician_status 对应的类}
*/
private Integer status;
/**
* 介绍
*/
private String content;
/**
* 备注
*/
private String remark;
/**
* 预约日期*
*/
@TableField(exist = false)
private String addDate;
//机构名称
@TableField(exist = false)
private String organizationName;
private String brandName;
@TableField(exist = false)
private String serviceTimeArray ;
private String serviceTimeArray;
}

View File

@ -0,0 +1,35 @@
package cn.iocoder.yudao.module.srbscribe.dal.mysql.brand;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandPageReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 门店管理 Mapper
*
* @author 管理员
*/
@Mapper
public interface LitemallBrandMapper extends BaseMapperX<LitemallBrandDO> {
default PageResult<LitemallBrandDO> selectPage(LitemallBrandPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<LitemallBrandDO>()
.eqIfPresent(LitemallBrandDO::getUserId, reqVO.getUserId())
.eqIfPresent(LitemallBrandDO::getPhone, reqVO.getPhone())
.likeIfPresent(LitemallBrandDO::getName, reqVO.getName())
.eqIfPresent(LitemallBrandDO::getMail, reqVO.getMail())
.eqIfPresent(LitemallBrandDO::getPicUrl, reqVO.getPicUrl())
.eqIfPresent(LitemallBrandDO::getAddress, reqVO.getAddress())
.eqIfPresent(LitemallBrandDO::getDepict, reqVO.getDepict())
.eqIfPresent(LitemallBrandDO::getStatus, reqVO.getStatus())
.eqIfPresent(LitemallBrandDO::getWeight, reqVO.getWeight())
.eqIfPresent(LitemallBrandDO::getRemark, reqVO.getRemark())
.betweenIfPresent(LitemallBrandDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(LitemallBrandDO::getId));
}
}

View File

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.srbscribe.dal.mysql.reservation;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationPageReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 预约订单 Mapper
*
* @author 管理员
*/
@Mapper
public interface LitemallReservationMapper extends BaseMapperX<LitemallReservationDO> {
default PageResult<LitemallReservationDO> selectPage(LitemallReservationPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<LitemallReservationDO>()
.eqIfPresent(LitemallReservationDO::getUserId, reqVO.getUserId())
.eqIfPresent(LitemallReservationDO::getType, reqVO.getType())
.eqIfPresent(LitemallReservationDO::getBrandId, reqVO.getBrandId())
.eqIfPresent(LitemallReservationDO::getTechnicianId, reqVO.getTechnicianId())
.betweenIfPresent(LitemallReservationDO::getReAddTime, reqVO.getReAddTime())
.eqIfPresent(LitemallReservationDO::getHsstr, reqVO.getHsstr())
.eqIfPresent(LitemallReservationDO::getReStatus, reqVO.getReStatus())
.eqIfPresent(LitemallReservationDO::getStatus, reqVO.getStatus())
.eqIfPresent(LitemallReservationDO::getRemark, reqVO.getRemark())
.betweenIfPresent(LitemallReservationDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(LitemallReservationDO::getId));
}
/**
* 查询预约管理列表
*
* @param litemallReservation 预约管理
* @return 预约管理集合
*/
@Select({
"<script>",
"SELECT r.id, r.user_id, m.mobile AS memberphone, m.name AS nickname, r.type, d.label AS typeName,",
"r.brand_id, b.name AS brandName, b.phone AS brandphone, b.address AS brandaddress, r.technician_id,",
"t.technician_name AS technicianName, r.re_add_time, r.hsstr, r.re_status, r.status, r.creator,",
"r.create_time, r.update_time, r.remark",
"FROM subscribe_reservation r",
"LEFT JOIN subscribe_brand b ON r.brand_id = b.id",
"LEFT JOIN subscribe_technician t ON r.technician_id = t.id",
"LEFT JOIN member_user m ON m.id = r.user_id",
"LEFT JOIN (SELECT sort, label, value, dict_type, css_class FROM system_dict_data WHERE dict_type = 'types') d ON d.sort = t.type",
"<where>",
"<if test='userId != null and userId != \"\"'>AND r.user_id = #{userId}</if>",
"<if test='type != null'>AND r.type = #{type}</if>",
"<if test='brandId != null and brandId != \"\"'>AND r.brand_id = #{brandId}</if>",
"<if test='technicianId != null and technicianId != \"\"'>AND r.technician_id = #{technicianId}</if>",
"<if test='hsstr != null and hsstr != \"\"'>AND r.hsstr = #{hsstr}</if>",
"<if test='reAddTime != null'>AND r.re_add_time = #{reAddTime}</if>",
"<if test='reStatus != null'>AND r.re_status = #{reStatus}</if>",
"<if test='status != null'>AND r.status = #{status}</if>",
"</where>",
"ORDER BY r.create_time DESC",
"</script>"
})
List<LitemallReservationDO> selectLitemallTechnicianList(LitemallReservationDO litemallReservation);
}

View File

@ -0,0 +1,139 @@
<!--<?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="cn.iocoder.yudao.module.srbscribe.dal.mysql.reservation.LitemallReservationMapper">-->
<!--&lt;!&ndash; <resultMap type="LitemallReservationDO" id="LitemallReservationResult">&ndash;&gt;-->
<!--&lt;!&ndash; <result property="id" column="id" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="userId" column="user_id" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="type" column="type" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="brandId" column="brand_id" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="technicianId" column="technician_id" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="reAddTime" column="re_add_time" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="hsstr" column="hsstr" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="reStatus" column="re_status" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="status" column="status" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="createBy" column="create_by" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="createTime" column="create_time" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="updateBy" column="update_by" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="updateTime" column="update_time" />&ndash;&gt;-->
<!--&lt;!&ndash; <result property="remark" column="remark" />&ndash;&gt;-->
<!--&lt;!&ndash; </resultMap>&ndash;&gt;-->
<!-- <sql id="selectLitemallReservationVo">-->
<!-- select r.id, r.user_id,m.mobile memberphone,m.name nickname, r.type,d.label typeName,-->
<!-- r.brand_id,b.name brandName,b.phone brandphone,b.address brandaddress,r.technician_id,-->
<!-- t.technician_name technicianName,r.re_add_time,r.hsstr, r.re_status, r.status, r.creator,-->
<!-- r.create_time, r.update_time, r.update_time, r.remark-->
<!-- from subscribe_reservation r-->
<!-- left join subscribe_brand b on r.brand_id = b.id-->
<!-- left join subscribe_technician t on r.technician_id = t.id-->
<!-- left join member_user m on m.id =r.user_id-->
<!-- left join (SELECT sort,label,value,dict_type,css_class FROM system_dict_data WHERE dict_type = "types" ) d ON d.sort = t.type-->
<!-- </sql>-->
<!-- <select id="selectLitemallTechnicianList" resultType="cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO">-->
<!-- <include refid="selectLitemallReservationVo"/>-->
<!-- <where>-->
<!-- <trim prefix="WHERE" suffixOverrides="AND |OR ">-->
<!-- <if test="userId != null and userId != ''">AND r.user_id = #{userId}</if>-->
<!-- <if test="type != null">AND r.type = #{type}</if>-->
<!-- <if test="brandId != null and brandId != ''">AND r.brand_id = #{brandId}</if>-->
<!-- <if test="technicianId != null and technicianId != ''">AND r.technician_id = #{technicianId}</if>-->
<!-- <if test="hsstr != null and hsstr != ''">AND r.hsstr = #{hsstr}</if>-->
<!-- <if test="reAddTime != null">AND r.re_add_time = #{reAddTime}</if>-->
<!-- <if test="reStatus != null">AND r.re_status = #{reStatus}</if>-->
<!-- <if test="status != null">AND r.status = #{status}</if>-->
<!-- </trim>-->
<!-- </where>-->
<!-- order by r.create_time DESC-->
<!-- </select>-->
<!--&lt;!&ndash; <select id="selectLitemallReservationList" parameterType="LitemallReservation" resultMap="LitemallReservationResult">&ndash;&gt;-->
<!--&lt;!&ndash; <include refid="selectLitemallReservationVo"/>&ndash;&gt;-->
<!--&lt;!&ndash; <where>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="userId != null and userId != ''"> and r.user_id = #{userId}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="type != null "> and r.type = #{type}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="brandId != null and brandId != ''"> and r.brand_id = #{brandId}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="technicianId != null and technicianId != ''"> and r.technician_id = #{technicianId}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="hsstr != null and hsstr != ''"> and r.hsstr = #{hsstr}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reAddTime != null "> and r.re_add_time = #{reAddTime}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reStatus != null "> and r.re_status = #{reStatus}</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="status != null "> and r.status = #{status}</if>&ndash;&gt;-->
<!--&lt;!&ndash; </where>&ndash;&gt;-->
<!--&lt;!&ndash; order by r.create_time DESC&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!--&lt;!&ndash; <select id="selectLitemallReservationById" parameterType="Long" resultMap="LitemallReservationResult">&ndash;&gt;-->
<!--&lt;!&ndash; <include refid="selectLitemallReservationVo"/>&ndash;&gt;-->
<!--&lt;!&ndash; where r.id = #{id}&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!--&lt;!&ndash; &ndash;&gt;-->
<!--&lt;!&ndash; <insert id="insertLitemallReservation" parameterType="LitemallReservation" useGeneratedKeys="true" keyProperty="id">&ndash;&gt;-->
<!--&lt;!&ndash; insert into litemall_reservation&ndash;&gt;-->
<!--&lt;!&ndash; <trim prefix="(" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<!--&lt;!&ndash; <if test="userId != null">user_id,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="type != null">type,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="brandId != null">brand_id,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="technicianId != null">technician_id,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reAddTime != null">re_add_time,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="hsstr != null">hsstr,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reStatus != null">re_status,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="status != null">status,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="createBy != null">create_by,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="createTime != null">create_time,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="updateBy != null">update_by,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="updateTime != null">update_time,</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="remark != null">remark,</if>&ndash;&gt;-->
<!--&lt;!&ndash; </trim>&ndash;&gt;-->
<!--&lt;!&ndash; <trim prefix="values (" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<!--&lt;!&ndash; <if test="userId != null">#{userId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="type != null">#{type},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="brandId != null">#{brandId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="technicianId != null">#{technicianId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reAddTime != null">#{reAddTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="hsstr != null">#{hsstr},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reStatus != null">#{reStatus},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="status != null">#{status},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="createBy != null">#{createBy},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="createTime != null">#{createTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="updateBy != null">#{updateBy},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="updateTime != null">#{updateTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="remark != null">#{remark},</if>&ndash;&gt;-->
<!--&lt;!&ndash; </trim>&ndash;&gt;-->
<!--&lt;!&ndash; </insert>&ndash;&gt;-->
<!--&lt;!&ndash; <update id="updateLitemallReservation" parameterType="LitemallReservation">&ndash;&gt;-->
<!--&lt;!&ndash; update litemall_reservation&ndash;&gt;-->
<!--&lt;!&ndash; <trim prefix="SET" suffixOverrides=",">&ndash;&gt;-->
<!--&lt;!&ndash; <if test="userId != null">user_id = #{userId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="type != null">type = #{type},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="brandId != null">brand_id = #{brandId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="technicianId != null">technician_id = #{technicianId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reAddTime != null">re_add_time = #{reAddTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="hsstr != null">hsstr = #{hsstr},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="reStatus != null">re_status = #{reStatus},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="status != null">status = #{status},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="createBy != null">create_by = #{createBy},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="createTime != null">create_time = #{createTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="updateBy != null">update_by = #{updateBy},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="updateTime != null">update_time = #{updateTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="remark != null">remark = #{remark},</if>&ndash;&gt;-->
<!--&lt;!&ndash; </trim>&ndash;&gt;-->
<!--&lt;!&ndash; where id = #{id}&ndash;&gt;-->
<!--&lt;!&ndash; </update>&ndash;&gt;-->
<!--&lt;!&ndash; <delete id="deleteLitemallReservationById" parameterType="Long">&ndash;&gt;-->
<!--&lt;!&ndash; delete from litemall_reservation where id = #{id}&ndash;&gt;-->
<!--&lt;!&ndash; </delete>&ndash;&gt;-->
<!--&lt;!&ndash; <delete id="deleteLitemallReservationByIds" parameterType="String">&ndash;&gt;-->
<!--&lt;!&ndash; delete from litemall_reservation where id in&ndash;&gt;-->
<!--&lt;!&ndash; <foreach item="id" collection="array" open="(" separator="," close=")">&ndash;&gt;-->
<!--&lt;!&ndash; #{id}&ndash;&gt;-->
<!--&lt;!&ndash; </foreach>&ndash;&gt;-->
<!--&lt;!&ndash; </delete>&ndash;&gt;-->
<!--</mapper>-->

View File

@ -0,0 +1,52 @@
package cn.iocoder.yudao.module.srbscribe.dal.mysql.technician;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianPageReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 人员管理 Mapper
*
* @author 管理员
*/
@Mapper
public interface LitemallTechnicianMapper extends BaseMapperX<LitemallTechnicianDO> {
default PageResult<LitemallTechnicianDO> selectPage(LitemallTechnicianPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<LitemallTechnicianDO>()
.eqIfPresent(LitemallTechnicianDO::getTechSn, reqVO.getTechSn())
.eqIfPresent(LitemallTechnicianDO::getType, reqVO.getType())
.likeIfPresent(LitemallTechnicianDO::getTechnicianName, reqVO.getTechnicianName())
.eqIfPresent(LitemallTechnicianDO::getBrandId, reqVO.getBrandId())
.eqIfPresent(LitemallTechnicianDO::getSex, reqVO.getSex())
.eqIfPresent(LitemallTechnicianDO::getPhoto, reqVO.getPhoto())
.betweenIfPresent(LitemallTechnicianDO::getServiceTime, reqVO.getServiceTime())
.eqIfPresent(LitemallTechnicianDO::getServiceScope, reqVO.getServiceScope())
.eqIfPresent(LitemallTechnicianDO::getPhone, reqVO.getPhone())
.eqIfPresent(LitemallTechnicianDO::getYm, reqVO.getYm())
.eqIfPresent(LitemallTechnicianDO::getStatus, reqVO.getStatus())
.eqIfPresent(LitemallTechnicianDO::getContent, reqVO.getContent())
.eqIfPresent(LitemallTechnicianDO::getRemark, reqVO.getRemark())
.betweenIfPresent(LitemallTechnicianDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(LitemallTechnicianDO::getId));
}
/**
* 查询技师管理列表
*
* @param litemallTechnician 技师管理
* @return 技师管理集合
*/
List<LitemallTechnicianDO> selectLitemallTechnicianList(LitemallTechnicianDO litemallTechnician);
List<LitemallTechnicianDO> selectLitemallTechnicianListmian(LitemallTechnicianDO litemallTechnician);
}

View File

@ -0,0 +1,162 @@
<!--<?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="cn.iocoder.yudao.module.srbscribe.dal.mysql.technician.LitemallTechnicianMapper">-->
<!-- -->
<!-- <resultMap type="LitemallTechnician" id="LitemallTechnicianResult">-->
<!-- <result property="id" column="id" />-->
<!-- <result property="techSn" column="tech_sn" />-->
<!-- <result property="type" column="type" />-->
<!-- <result property="technicianName" column="technician_name" />-->
<!-- <result property="brandId" column="brand_id" />-->
<!-- <result property="sex" column="sex" />-->
<!-- <result property="photo" column="photo" />-->
<!-- <result property="serviceTime" column="service_time" />-->
<!-- <result property="serviceScope" column="service_scope" />-->
<!-- <result property="phone" column="phone" />-->
<!-- <result property="ym" column="ym" />-->
<!-- <result property="status" column="status" />-->
<!-- <result property="content" column="content" />-->
<!-- <result property="createBy" column="create_by" />-->
<!-- <result property="createTime" column="create_time" />-->
<!-- <result property="updateBy" column="update_by" />-->
<!-- <result property="updateTime" column="update_time" />-->
<!-- <result property="remark" column="remark" />-->
<!-- </resultMap>-->
<!-- <sql id="selectLitemallTechnicianVo">-->
<!-- SELECT t.id,t.tech_sn,t.type,d.label typeName,t.technician_name,t.brand_id,b.NAME brandName,-->
<!-- t.sex,t.photo,t.service_scope,t.service_time,t.ym,t.phone,t.STATUS,t.content,t.create_time,-->
<!-- t.update_time,t.update_time,t.remark-->
<!-- FROM-->
<!-- subscribe_technician t-->
<!-- LEFT JOIN subscribe_brand b ON t.brand_id = b.id-->
<!-- LEFT JOIN (-->
<!-- SELECT sort,label,value,dict_type,css_class-->
<!-- FROM system_dict_data WHERE-->
<!-- dict_type = "types" ) d ON d.sort = t.type-->
<!-- </sql>-->
<!-- <select id="selectLitemallTechnicianList" parameterType="LitemallTechnician" resultMap="LitemallTechnicianResult">-->
<!-- <include refid="selectLitemallTechnicianVo"/>-->
<!-- <where> -->
<!-- <if test="techSn != null and techSn != ''"> and t.tech_sn = #{techSn}</if>-->
<!-- <if test="type != null "> and t.type = #{type}</if>-->
<!-- <if test="technicianName != null and technicianName != ''"> and t.technician_name like concat('%', #{technicianName}, '%')</if>-->
<!-- <if test="brandId != null "> and t.brand_id = #{brandId}</if>-->
<!-- <if test="sex != null "> and t.sex = #{sex}</if>-->
<!-- <if test="ym != null "> and t.ym = #{ym}</if>-->
<!-- <if test="photo != null and photo != ''"> and t.photo = #{photo}</if>-->
<!-- <if test="serviceScope != null and serviceScope != ''"> and t.service_scope = #{serviceScope}</if>-->
<!-- <if test="serviceTime != null and serviceTime != ''"> and t.service_time like concat('%', #{serviceTime}, '%')}</if>-->
<!-- <if test="phone != null and phone != ''"> and t.phone = #{phone}</if>-->
<!-- <if test="status != null "> and t.status = #{status}</if>-->
<!-- <if test="content != null and content != ''"> and t.content = #{content}</if>-->
<!-- </where>-->
<!-- </select>-->
<!-- <select id="selectLitemallTechnicianListmian" parameterType="LitemallTechnician" resultMap="LitemallTechnicianResult">-->
<!-- <include refid="selectLitemallTechnicianVo"/>-->
<!-- <where>-->
<!-- <if test="techSn != null and techSn != ''"> and t.tech_sn = #{techSn}</if>-->
<!-- <if test="type != null "> and t.type = #{type}</if>-->
<!-- <if test="technicianName != null and technicianName != ''"> and t.technician_name like concat('%', #{technicianName}, '%')</if>-->
<!-- <if test="brandId != null "> and t.brand_id = #{brandId}</if>-->
<!-- <if test="sex != null "> and t.sex = #{sex}</if>-->
<!-- <if test="ym != null "> and t.ym = #{ym}</if>-->
<!-- <if test="photo != null and photo != ''"> and t.photo = #{photo}</if>-->
<!-- <if test="serviceScope != null and serviceScope != ''"> and t.service_scope = #{serviceScope}</if>-->
<!-- <if test="serviceTime != null and serviceTime != ''"> and t.service_time like concat('%', #{serviceTime}, '%')}</if>-->
<!-- <if test="phone != null and phone != ''"> and t.phone = #{phone}</if>-->
<!-- <if test="status != null "> and t.status = #{status}</if>-->
<!-- <if test="content != null and content != ''"> and t.content = #{content}</if>-->
<!-- and NOT EXISTS (-->
<!-- SELECT 1-->
<!-- FROM subscribe_technician t2-->
<!-- WHERE t.technician_name = t2.technician_name-->
<!-- AND t.id > t2.id-->
<!-- );-->
<!-- </where>-->
<!-- </select>-->
<!-- <select id="selectLitemallTechnicianById" parameterType="Long" resultMap="LitemallTechnicianResult">-->
<!-- <include refid="selectLitemallTechnicianVo"/>-->
<!-- where t.id = #{id}-->
<!-- </select>-->
<!-- -->
<!-- <insert id="insertLitemallTechnician" parameterType="LitemallTechnician" useGeneratedKeys="true" keyProperty="id">-->
<!-- insert into litemall_technician-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="techSn != null">tech_sn,</if>-->
<!-- <if test="type != null">type,</if>-->
<!-- <if test="ym != null">ym,</if>-->
<!-- <if test="technicianName != null">technician_name,</if>-->
<!-- <if test="brandId != null">brand_id,</if>-->
<!-- <if test="sex != null">sex,</if>-->
<!-- <if test="photo != null">photo,</if>-->
<!-- <if test="serviceTime != null">service_time,</if>-->
<!-- <if test="serviceScope != null">service_scope,</if>-->
<!-- <if test="phone != null">phone,</if>-->
<!-- <if test="status != null">status,</if>-->
<!-- <if test="content != null">content,</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>-->
<!-- <if test="remark != null">remark,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="techSn != null">#{techSn},</if>-->
<!-- <if test="type != null">#{type},</if>-->
<!-- <if test="ym != null">#{ym},</if>-->
<!-- <if test="technicianName != null">#{technicianName},</if>-->
<!-- <if test="brandId != null">#{brandId},</if>-->
<!-- <if test="sex != null">#{sex},</if>-->
<!-- <if test="photo != null">#{photo},</if>-->
<!-- <if test="serviceTime != null">#{serviceTime},</if>-->
<!-- <if test="serviceScope != null">#{serviceScope},</if>-->
<!-- <if test="phone != null">#{phone},</if>-->
<!-- <if test="status != null">#{status},</if>-->
<!-- <if test="content != null">#{content},</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>-->
<!-- <if test="remark != null">#{remark},</if>-->
<!-- </trim>-->
<!-- </insert>-->
<!-- <update id="updateLitemallTechnician" parameterType="LitemallTechnician">-->
<!-- update litemall_technician-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- <if test="techSn != null">tech_sn = #{techSn},</if>-->
<!-- <if test="type != null">type = #{type},</if>-->
<!-- <if test="ym != null">ym = #{ym},</if>-->
<!-- <if test="technicianName != null">technician_name = #{technicianName},</if>-->
<!-- <if test="brandId != null">brand_id = #{brandId},</if>-->
<!-- <if test="sex != null">sex = #{sex},</if>-->
<!-- <if test="photo != null">photo = #{photo},</if>-->
<!-- <if test="serviceTime != null">service_time = #{serviceTime},</if>-->
<!-- <if test="serviceScope != null">service_scope = #{serviceScope},</if>-->
<!-- <if test="phone != null">phone = #{phone},</if>-->
<!-- <if test="status != null">status = #{status},</if>-->
<!-- <if test="content != null">content = #{content},</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>-->
<!-- <if test="remark != null">remark = #{remark},</if>-->
<!-- </trim>-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <delete id="deleteLitemallTechnicianById" parameterType="Long">-->
<!-- delete from litemall_technician where id = #{id}-->
<!-- </delete>-->
<!-- <delete id="deleteLitemallTechnicianByIds" parameterType="String">-->
<!-- delete from litemall_technician where id in -->
<!-- <foreach item="id" collection="array" open="(" separator="," close=")">-->
<!-- #{id}-->
<!-- </foreach>-->
<!-- </delete>-->
<!--</mapper>-->

View File

@ -0,0 +1,63 @@
package cn.iocoder.yudao.module.srbscribe.service.brand;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import javax.validation.*;
import java.util.List;
/**
* 门店管理 Service 接口
*
* @author 管理员
*/
public interface LitemallBrandService {
/**
* 创建门店管理
*
* @param createReqVO 创建信息
* @return 编号
*/
Integer createLitemallBrand(@Valid LitemallBrandSaveReqVO createReqVO);
/**
* 更新门店管理
*
* @param updateReqVO 更新信息
*/
void updateLitemallBrand(@Valid LitemallBrandSaveReqVO updateReqVO);
/**
* 删除门店管理
*
* @param id 编号
*/
void deleteLitemallBrand(Integer id);
/**
* 获得门店管理
*
* @param id 编号
* @return 门店管理
*/
LitemallBrandDO getLitemallBrand(Integer id);
/**
* 获得门店管理分页
*
* @param pageReqVO 分页查询
* @return 门店管理分页
*/
PageResult<LitemallBrandDO> getLitemallBrandPage(LitemallBrandPageReqVO pageReqVO);
/**
* 获取机构所有数据
*/
List<LitemallBrandDO> getOrganization();
}

View File

@ -0,0 +1,79 @@
package cn.iocoder.yudao.module.srbscribe.service.brand;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import cn.iocoder.yudao.module.srbscribe.dal.mysql.brand.LitemallBrandMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.subscribe.enums.ErrorCodeConstants.*;
/**
* 门店管理 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class LitemallBrandServiceImpl implements LitemallBrandService {
@Resource
private LitemallBrandMapper litemallBrandMapper;
@Override
public Integer createLitemallBrand(LitemallBrandSaveReqVO createReqVO) {
// 插入
LitemallBrandDO litemallBrand = BeanUtils.toBean(createReqVO, LitemallBrandDO.class);
litemallBrandMapper.insert(litemallBrand);
// 返回
return litemallBrand.getId();
}
@Override
public void updateLitemallBrand(LitemallBrandSaveReqVO updateReqVO) {
// 校验存在
validateLitemallBrandExists(updateReqVO.getId());
// 更新
LitemallBrandDO updateObj = BeanUtils.toBean(updateReqVO, LitemallBrandDO.class);
litemallBrandMapper.updateById(updateObj);
}
@Override
public void deleteLitemallBrand(Integer id) {
// 校验存在
validateLitemallBrandExists(id);
// 删除
litemallBrandMapper.deleteById(id);
}
private void validateLitemallBrandExists(Integer id) {
if (litemallBrandMapper.selectById(id) == null) {
throw exception(LITEMALL_BRAND_NOT_EXISTS);
}
}
@Override
public LitemallBrandDO getLitemallBrand(Integer id) {
return litemallBrandMapper.selectById(id);
}
@Override
public PageResult<LitemallBrandDO> getLitemallBrandPage(LitemallBrandPageReqVO pageReqVO) {
return litemallBrandMapper.selectPage(pageReqVO);
}
@Override
public List<LitemallBrandDO> getOrganization() {
return litemallBrandMapper.selectList();
}
}

View File

@ -0,0 +1,68 @@
package cn.iocoder.yudao.module.srbscribe.service.reservation;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import javax.validation.*;
import java.util.List;
/**
* 预约订单 Service 接口
*
* @author 管理员
*/
public interface LitemallReservationService {
/**
* 查询预约管理列表
*
* @param litemallReservation 预约管理
* @return 预约管理集合
*/
public List<LitemallReservationDO> selectLitemallReservationList(LitemallReservationDO litemallReservation);
/**
* 创建预约订单
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createLitemallReservation(@Valid LitemallReservationSaveReqVO createReqVO);
/**
* 更新预约订单
*
* @param updateReqVO 更新信息
*/
void updateLitemallReservation(@Valid LitemallReservationSaveReqVO updateReqVO);
/**
* 删除预约订单
*
* @param id 编号
*/
void deleteLitemallReservation(Long id);
/**
* 获得预约订单
*
* @param id 编号
* @return 预约订单
*/
LitemallReservationDO getLitemallReservation(Long id);
/**
* 获得预约订单分页
*
* @param pageReqVO 分页查询
* @return 预约订单分页
*/
PageResult<LitemallReservationDO> getLitemallReservationPage(LitemallReservationPageReqVO pageReqVO);
List<LitemallReservationDO> getLitemallReservationList(LitemallReservationDO litemallReservationDO);
}

View File

@ -0,0 +1,127 @@
package cn.iocoder.yudao.module.srbscribe.service.reservation;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
import cn.iocoder.yudao.module.member.dal.mysql.user.MemberUserMapper;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.ServiceTimeVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
import cn.iocoder.yudao.module.srbscribe.dal.mysql.brand.LitemallBrandMapper;
import cn.iocoder.yudao.module.srbscribe.dal.mysql.reservation.LitemallReservationMapper;
import cn.iocoder.yudao.module.srbscribe.dal.mysql.technician.LitemallTechnicianMapper;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.subscribe.enums.ErrorCodeConstants.*;
/**
* 预约订单 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class LitemallReservationServiceImpl implements LitemallReservationService {
@Resource
private LitemallReservationMapper litemallReservationMapper;
@Resource
private LitemallBrandMapper litemallBrandMapper;
@Resource
private LitemallTechnicianMapper litemallTechnicianMapper;
@Resource
private MemberUserMapper memberUserMapper;
/**
* 查询预约管理列表
*
* @param litemallReservation 预约管理
* @return 预约管理
*/
@Override
public List<LitemallReservationDO> selectLitemallReservationList(LitemallReservationDO litemallReservation)
{
return litemallReservationMapper.selectLitemallTechnicianList(litemallReservation);
}
@Override
public Long createLitemallReservation(LitemallReservationSaveReqVO createReqVO) {
// 插入
LitemallReservationDO litemallReservation = BeanUtils.toBean(createReqVO, LitemallReservationDO.class);
litemallReservationMapper.insert(litemallReservation);
// 返回
return litemallReservation.getId();
}
@Override
public void updateLitemallReservation(LitemallReservationSaveReqVO updateReqVO) {
// 校验存在
validateLitemallReservationExists(updateReqVO.getId());
// 更新
LitemallReservationDO updateObj = BeanUtils.toBean(updateReqVO, LitemallReservationDO.class);
litemallReservationMapper.updateById(updateObj);
}
@Override
public void deleteLitemallReservation(Long id) {
// 校验存在
validateLitemallReservationExists(id);
// 删除
litemallReservationMapper.deleteById(id);
}
private void validateLitemallReservationExists(Long id) {
if (litemallReservationMapper.selectById(id) == null) {
throw exception(LITEMALL_RESERVATION_NOT_EXISTS);
}
}
@Override
public LitemallReservationDO getLitemallReservation(Long id) {
return litemallReservationMapper.selectById(id);
}
@Override
public PageResult<LitemallReservationDO> getLitemallReservationPage(LitemallReservationPageReqVO pageReqVO) {
PageResult<LitemallReservationDO> litemallReservationDOPageResult = litemallReservationMapper.selectPage(pageReqVO);
for (int i = 0; i < litemallReservationDOPageResult.getList().size(); i++) {
LitemallReservationDO litemallReservationDO = litemallReservationDOPageResult.getList().get(i);
LitemallBrandDO litemallBrandDO = litemallBrandMapper.selectOne("id", litemallReservationDO.getBrandId());
litemallReservationDO.setBrandName(litemallBrandDO.getName());
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianMapper.selectOne("id", litemallReservationDO.getId());
litemallReservationDO.setTechnicianName(litemallTechnicianDO.getTechnicianName());
MemberUserDO memberUserDO = memberUserMapper.selectOne("id", litemallReservationDO.getUserId());
litemallReservationDO.setNickname(memberUserDO.getName());
}
return litemallReservationDOPageResult;
}
@Override
public List<LitemallReservationDO> getLitemallReservationList(LitemallReservationDO litemallReservationDO) {
QueryWrapper<LitemallReservationDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type",litemallReservationDO.getType()).eq("brand_id",litemallReservationDO.getBrandId());
List<LitemallReservationDO> litemallReservationDOS = litemallReservationMapper.selectList(queryWrapper);
return litemallReservationDOS;
}
}

View File

@ -0,0 +1,62 @@
package cn.iocoder.yudao.module.srbscribe.service.technician;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
import javax.validation.*;
import java.util.List;
/**
* 人员管理 Service 接口
*
* @author 管理员
*/
public interface LitemallTechnicianService {
public List<LitemallTechnicianDO> selectLitemallTechnicianList(LitemallTechnicianDO litemallTechnician);
public List<LitemallTechnicianDO> selectLitemallTechnicianListmian(LitemallTechnicianDO litemallTechnician);
/**
* 创建人员管理
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createLitemallTechnician(@Valid LitemallTechnicianSaveReqVO createReqVO);
/**
* 更新人员管理
*
* @param updateReqVO 更新信息
*/
void updateLitemallTechnician(@Valid LitemallTechnicianSaveReqVO updateReqVO);
/**
* 删除人员管理
*
* @param id 编号
*/
void deleteLitemallTechnician(Long id);
/**
* 获得人员管理
*
* @param id 编号
* @return 人员管理
*/
LitemallTechnicianDO getLitemallTechnician(Long id);
/**
* 获得人员管理分页
*
* @param pageReqVO 分页查询
* @return 人员管理分页
*/
PageResult<LitemallTechnicianDO> getLitemallTechnicianPage(LitemallTechnicianPageReqVO pageReqVO);
List<LitemallTechnicianDO> getTechnicianName();
}

View File

@ -0,0 +1,140 @@
package cn.iocoder.yudao.module.srbscribe.service.technician;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.srbscribe.controller.admin.brand.vo.LitemallBrandPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianPageReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianSaveReqVO;
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.ServiceTimeVO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
import cn.iocoder.yudao.module.srbscribe.dal.mysql.brand.LitemallBrandMapper;
import cn.iocoder.yudao.module.srbscribe.dal.mysql.technician.LitemallTechnicianMapper;
import cn.iocoder.yudao.module.srbscribe.service.brand.LitemallBrandService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.subscribe.enums.ErrorCodeConstants.*;
/**
* 人员管理 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class LitemallTechnicianServiceImpl implements LitemallTechnicianService {
@Resource
private LitemallTechnicianMapper litemallTechnicianMapper;
@Resource
private LitemallBrandMapper litemallBrandMapper;
/**
* 查询技师管理列表
*
* @param litemallTechnician 技师管理
* @return 技师管理
*/
@Override
public List<LitemallTechnicianDO> selectLitemallTechnicianList(LitemallTechnicianDO litemallTechnician)
{
return litemallTechnicianMapper.selectLitemallTechnicianList(litemallTechnician);
}
/**
* 查询技师管理列表
*
* @param litemallTechnician 技师管理
* @return 技师管理
*/
@Override
public List<LitemallTechnicianDO> selectLitemallTechnicianListmian(LitemallTechnicianDO litemallTechnician)
{
return litemallTechnicianMapper.selectLitemallTechnicianListmian(litemallTechnician);
}
@Override
public Long createLitemallTechnician(LitemallTechnicianSaveReqVO createReqVO) {
// 插入
LitemallTechnicianDO litemallTechnician = BeanUtils.toBean(createReqVO, LitemallTechnicianDO.class);
litemallTechnicianMapper.insert(litemallTechnician);
// 返回
return litemallTechnician.getId();
}
@Override
public void updateLitemallTechnician(LitemallTechnicianSaveReqVO updateReqVO) {
// 校验存在
validateLitemallTechnicianExists(updateReqVO.getId());
// 更新
LitemallTechnicianDO updateObj = BeanUtils.toBean(updateReqVO, LitemallTechnicianDO.class);
litemallTechnicianMapper.updateById(updateObj);
}
@Override
public void deleteLitemallTechnician(Long id) {
// 校验存在
validateLitemallTechnicianExists(id);
// 删除
litemallTechnicianMapper.deleteById(id);
}
private void validateLitemallTechnicianExists(Long id) {
if (litemallTechnicianMapper.selectById(id) == null) {
throw exception(LITEMALL_TECHNICIAN_NOT_EXISTS);
}
}
@Override
public LitemallTechnicianDO getLitemallTechnician(Long id) {
return litemallTechnicianMapper.selectById(id);
}
@Override
public PageResult<LitemallTechnicianDO> getLitemallTechnicianPage(LitemallTechnicianPageReqVO pageReqVO) {
PageResult<LitemallTechnicianDO> litemallTechnicianDOPageResult = litemallTechnicianMapper.selectPage(pageReqVO);
String serviceTime = "";
for (int i = 0; i < litemallTechnicianDOPageResult.getList().size(); i++) {
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianDOPageResult.getList().get(i);
LitemallBrandDO litemallBrandDO = litemallBrandMapper.selectOne("id", litemallTechnicianDO.getBrandId());
litemallTechnicianDO.setBrandName(litemallBrandDO.getName());
if(litemallTechnicianDO.getServiceTime() != null && litemallTechnicianDO.getServiceTime() != ""){
//把StringJSON格式serviceTime转成对象
List<ServiceTimeVO> serviceTimeVOS = JSON.parseObject(litemallTechnicianDO.getServiceTime(), new TypeReference<List<ServiceTimeVO>>() {});
for (int j = 0; j < serviceTimeVOS.size(); j++) {
ServiceTimeVO serviceTimeVO = serviceTimeVOS.get(j);
serviceTime = serviceTime + serviceTimeVO.getStart() + " - " + serviceTimeVO.getEnd() + " , ";
}
String replaceAll = serviceTime.replaceAll(",\\s*$", "");
litemallTechnicianDO.setServiceTimeArray(replaceAll);
serviceTime = "";
}
}
return litemallTechnicianDOPageResult;
}
@Override
public List<LitemallTechnicianDO> getTechnicianName() {
return litemallTechnicianMapper.selectList();
}
}

View File

@ -0,0 +1,164 @@
package cn.iocoder.yudao.module.srbscribe.util;
import java.util.HashMap;
/**
* 操作消息提醒
*
* @author ruoyi
*/
public class AjaxResult extends HashMap<String, Object>
{
private static final long serialVersionUID = 1L;
/** 状态码 */
public static final String CODE_TAG = "code";
/** 返回内容 */
public static final String MSG_TAG = "msg";
/** 数据对象 */
public static final String DATA_TAG = "data";
/**
* 初始化一个新创建的 AjaxResult 对象使其表示一个空消息
*/
public AjaxResult()
{
}
/**
* 初始化一个新创建的 AjaxResult 对象
*
* @param code 状态码
* @param msg 返回内容
*/
public AjaxResult(int code, String msg)
{
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
}
/**
* 初始化一个新创建的 AjaxResult 对象
*
* @param code 状态码
* @param msg 返回内容
* @param data 数据对象
*/
public AjaxResult(int code, String msg, Object data)
{
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
if (StringUtils.isNotNull(data))
{
super.put(DATA_TAG, data);
}
}
/**
* 返回成功消息
*
* @return 成功消息
*/
public static AjaxResult success()
{
return AjaxResult.success("操作成功");
}
/**
* 返回成功数据
*
* @return 成功消息
*/
public static AjaxResult success(Object data)
{
return AjaxResult.success("操作成功", data);
}
public static AjaxResult successData(Object data)
{
return AjaxResult.success("操作成功", data);
}
/**
* 返回成功消息
*
* @param msg 返回内容
* @return 成功消息
*/
public static AjaxResult success(String msg)
{
return AjaxResult.success(msg, null);
}
/**
* 返回成功消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 成功消息
*/
public static AjaxResult success(String msg, Object data)
{
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
}
/**
* 返回错误消息
*
* @return
*/
public static AjaxResult error()
{
return AjaxResult.error("操作失败");
}
/**
* 返回错误消息
*
* @param msg 返回内容
* @return 警告消息
*/
public static AjaxResult error(String msg)
{
return AjaxResult.error(msg, null);
}
/**
* 返回错误消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 警告消息
*/
public static AjaxResult error(String msg, Object data)
{
return new AjaxResult(HttpStatus.ERROR, msg, data);
}
/**
* 返回错误消息
*
* @param code 状态码
* @param msg 返回内容
* @return 警告消息
*/
public static AjaxResult error(int code, String msg)
{
return new AjaxResult(code, msg, null);
}
/**
* 方便链式调用
*
* @param key
* @param value
* @return 数据对象
*/
@Override
public AjaxResult put(String key, Object value)
{
super.put(key, value);
return this;
}
}

View File

@ -0,0 +1,89 @@
package cn.iocoder.yudao.module.srbscribe.util;
/**
* 返回状态码
*
* @author ruoyi
*/
public class HttpStatus
{
/**
* 操作成功
*/
public static final int SUCCESS = 200;
/**
* 对象创建成功
*/
public static final int CREATED = 201;
/**
* 请求已经被接受
*/
public static final int ACCEPTED = 202;
/**
* 操作已经执行成功但是没有返回数据
*/
public static final int NO_CONTENT = 204;
/**
* 资源已被移除
*/
public static final int MOVED_PERM = 301;
/**
* 重定向
*/
public static final int SEE_OTHER = 303;
/**
* 资源没有被修改
*/
public static final int NOT_MODIFIED = 304;
/**
* 参数列表错误缺少格式不匹配
*/
public static final int BAD_REQUEST = 400;
/**
* 未授权
*/
public static final int UNAUTHORIZED = 401;
/**
* 访问受限授权过期
*/
public static final int FORBIDDEN = 403;
/**
* 资源服务未找到
*/
public static final int NOT_FOUND = 404;
/**
* 不允许的http方法
*/
public static final int BAD_METHOD = 405;
/**
* 资源冲突或者资源被锁
*/
public static final int CONFLICT = 409;
/**
* 不支持的数据媒体类型
*/
public static final int UNSUPPORTED_TYPE = 415;
/**
* 系统内部错误
*/
public static final int ERROR = 500;
/**
* 接口未实现
*/
public static final int NOT_IMPLEMENTED = 501;
}

View File

@ -0,0 +1,45 @@
package cn.iocoder.yudao.module.srbscribe.util;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class StaffVO {
/** id */
private Long id;
/** 用户id */
private String userId;
private String memberphone;
private String nickname;
/** 预约类型 */
private Long type;
private String typeName;
/** 医馆id */
private Long brandId;
private String brandName;
private String brandphone;
private String brandaddress;
/** 技师id */
private Long technicianId;
private String technicianName;
/** 预约时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date reAddTime;
/** 预约时间段 */
private String hsstr;
/** 预约状态 */
private Long reStatus;
/** 审核状态 */
private Long status;
}

View File

@ -0,0 +1,527 @@
package cn.iocoder.yudao.module.srbscribe.util;
import cn.hutool.core.text.StrFormatter;
import org.springframework.util.AntPathMatcher;
import java.util.*;
/**
* 字符串工具类
*
* @author ruoyi
*/
public class StringUtils extends org.apache.commons.lang3.StringUtils
{
/** 空字符串 */
private static final String NULLSTR = "";
/** 下划线 */
private static final char SEPARATOR = '_';
/**
* 获取参数不为空值
*
* @param value defaultValue 要判断的value
* @return value 返回值
*/
public static <T> T nvl(T value, T defaultValue)
{
return value != null ? value : defaultValue;
}
/**
* * 判断一个Collection是否为空 包含ListSetQueue
*
* @param coll 要判断的Collection
* @return true为空 false非空
*/
public static boolean isEmpty(Collection<?> coll)
{
return isNull(coll) || coll.isEmpty();
}
/**
* * 判断一个Collection是否非空包含ListSetQueue
*
* @param coll 要判断的Collection
* @return true非空 false
*/
public static boolean isNotEmpty(Collection<?> coll)
{
return !isEmpty(coll);
}
/**
* * 判断一个对象数组是否为空
*
* @param objects 要判断的对象数组
** @return true为空 false非空
*/
public static boolean isEmpty(Object[] objects)
{
return isNull(objects) || (objects.length == 0);
}
/**
* * 判断一个对象数组是否非空
*
* @param objects 要判断的对象数组
* @return true非空 false
*/
public static boolean isNotEmpty(Object[] objects)
{
return !isEmpty(objects);
}
/**
* * 判断一个Map是否为空
*
* @param map 要判断的Map
* @return true为空 false非空
*/
public static boolean isEmpty(Map<?, ?> map)
{
return isNull(map) || map.isEmpty();
}
/**
* * 判断一个Map是否为空
*
* @param map 要判断的Map
* @return true非空 false
*/
public static boolean isNotEmpty(Map<?, ?> map)
{
return !isEmpty(map);
}
/**
* * 判断一个字符串是否为空串
*
* @param str String
* @return true为空 false非空
*/
public static boolean isEmpty(String str)
{
return isNull(str) || NULLSTR.equals(str.trim());
}
/**
* * 判断一个字符串是否为非空串
*
* @param str String
* @return true非空串 false空串
*/
public static boolean isNotEmpty(String str)
{
return !isEmpty(str);
}
/**
* * 判断一个对象是否为空
*
* @param object Object
* @return true为空 false非空
*/
public static boolean isNull(Object object)
{
return object == null;
}
/**
* * 判断一个对象是否非空
*
* @param object Object
* @return true非空 false
*/
public static boolean isNotNull(Object object)
{
return !isNull(object);
}
/**
* * 判断一个对象是否是数组类型Java基本型别的数组
*
* @param object 对象
* @return true是数组 false不是数组
*/
public static boolean isArray(Object object)
{
return isNotNull(object) && object.getClass().isArray();
}
/**
* 去空格
*/
public static String trim(String str)
{
return (str == null ? "" : str.trim());
}
/**
* 截取字符串
*
* @param str 字符串
* @param start 开始
* @return 结果
*/
public static String substring(final String str, int start)
{
if (str == null)
{
return NULLSTR;
}
if (start < 0)
{
start = str.length() + start;
}
if (start < 0)
{
start = 0;
}
if (start > str.length())
{
return NULLSTR;
}
return str.substring(start);
}
/**
* 截取字符串
*
* @param str 字符串
* @param start 开始
* @param end 结束
* @return 结果
*/
public static String substring(final String str, int start, int end)
{
if (str == null)
{
return NULLSTR;
}
if (end < 0)
{
end = str.length() + end;
}
if (start < 0)
{
start = str.length() + start;
}
if (end > str.length())
{
end = str.length();
}
if (start > end)
{
return NULLSTR;
}
if (start < 0)
{
start = 0;
}
if (end < 0)
{
end = 0;
}
return str.substring(start, end);
}
/**
* 格式化文本, {} 表示占位符<br>
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
* 如果想输出 {} 使用 \\转义 { 即可如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
* <br>
* 通常使用format("this is {} for {}", "a", "b") -> this is a for b<br>
* 转义{} format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
* 转义\ format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
*
* @param template 文本模板被替换的部分用 {} 表示
* @param params 参数值
* @return 格式化后的文本
*/
public static String format(String template, Object... params)
{
if (isEmpty(params) || isEmpty(template))
{
return template;
}
return StrFormatter.format(template, params);
}
/**
* 是否为http(s)://开头
*
* @param link 链接
* @return 结果
*/
/**
* 字符串转set
*
* @param str 字符串
* @param sep 分隔符
* @return set集合
*/
public static final Set<String> str2Set(String str, String sep)
{
return new HashSet<String>(str2List(str, sep, true, false));
}
/**
* 字符串转list
*
* @param str 字符串
* @param sep 分隔符
* @param filterBlank 过滤纯空白
* @param trim 去掉首尾空白
* @return list集合
*/
public static final List<String> str2List(String str, String sep, boolean filterBlank, boolean trim)
{
List<String> list = new ArrayList<String>();
if (StringUtils.isEmpty(str))
{
return list;
}
// 过滤空白字符串
if (filterBlank && StringUtils.isBlank(str))
{
return list;
}
String[] split = str.split(sep);
for (String string : split)
{
if (filterBlank && StringUtils.isBlank(string))
{
continue;
}
if (trim)
{
string = string.trim();
}
list.add(string);
}
return list;
}
/**
* 查找指定字符串是否包含指定字符串列表中的任意一个字符串同时串忽略大小写
*
* @param cs 指定字符串
* @param searchCharSequences 需要检查的字符串数组
* @return 是否包含任意一个字符串
*/
public static boolean containsAnyIgnoreCase(CharSequence cs, CharSequence... searchCharSequences)
{
if (isEmpty(cs) || isEmpty(searchCharSequences))
{
return false;
}
for (CharSequence testStr : searchCharSequences)
{
if (containsIgnoreCase(cs, testStr))
{
return true;
}
}
return false;
}
/**
* 驼峰转下划线命名
*/
public static String toUnderScoreCase(String str)
{
if (str == null)
{
return null;
}
StringBuilder sb = new StringBuilder();
// 前置字符是否大写
boolean preCharIsUpperCase = true;
// 当前字符是否大写
boolean curreCharIsUpperCase = true;
// 下一字符是否大写
boolean nexteCharIsUpperCase = true;
for (int i = 0; i < str.length(); i++)
{
char c = str.charAt(i);
if (i > 0)
{
preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
}
else
{
preCharIsUpperCase = false;
}
curreCharIsUpperCase = Character.isUpperCase(c);
if (i < (str.length() - 1))
{
nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
}
if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase)
{
sb.append(SEPARATOR);
}
else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase)
{
sb.append(SEPARATOR);
}
sb.append(Character.toLowerCase(c));
}
return sb.toString();
}
/**
* 是否包含字符串
*
* @param str 验证字符串
* @param strs 字符串组
* @return 包含返回true
*/
public static boolean inStringIgnoreCase(String str, String... strs)
{
if (str != null && strs != null)
{
for (String s : strs)
{
if (str.equalsIgnoreCase(trim(s)))
{
return true;
}
}
}
return false;
}
/**
* 将下划线大写方式命名的字符串转换为驼峰式如果转换前的下划线大写方式命名的字符串为空则返回空字符串 例如HELLO_WORLD->HelloWorld
*
* @param name 转换前的下划线大写方式命名的字符串
* @return 转换后的驼峰式命名的字符串
*/
public static String convertToCamelCase(String name)
{
StringBuilder result = new StringBuilder();
// 快速检查
if (name == null || name.isEmpty())
{
// 没必要转换
return "";
}
else if (!name.contains("_"))
{
// 不含下划线仅将首字母大写
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
// 用下划线将原始字符串分割
String[] camels = name.split("_");
for (String camel : camels)
{
// 跳过原始字符串中开头结尾的下换线或双重下划线
if (camel.isEmpty())
{
continue;
}
// 首字母大写
result.append(camel.substring(0, 1).toUpperCase());
result.append(camel.substring(1).toLowerCase());
}
return result.toString();
}
/**
* 驼峰式命名法 例如user_name->userName
*/
public static String toCamelCase(String s)
{
if (s == null)
{
return null;
}
s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length());
boolean upperCase = false;
for (int i = 0; i < s.length(); i++)
{
char c = s.charAt(i);
if (c == SEPARATOR)
{
upperCase = true;
}
else if (upperCase)
{
sb.append(Character.toUpperCase(c));
upperCase = false;
}
else
{
sb.append(c);
}
}
return sb.toString();
}
/**
* 查找指定字符串是否匹配指定字符串列表中的任意一个字符串
*
* @param str 指定字符串
* @param strs 需要检查的字符串数组
* @return 是否匹配
*/
public static boolean matches(String str, List<String> strs)
{
if (isEmpty(str) || isEmpty(strs))
{
return false;
}
for (String pattern : strs)
{
if (isMatch(pattern, str))
{
return true;
}
}
return false;
}
/**
* 判断url是否与规则配置:
* ? 表示单个字符;
* * 表示一层路径内的任意字符串不可跨层级;
* ** 表示任意层路径;
*
* @param pattern 匹配规则
* @param url 需要匹配的url
* @return
*/
public static boolean isMatch(String pattern, String url)
{
AntPathMatcher matcher = new AntPathMatcher();
return matcher.match(pattern, url);
}
@SuppressWarnings("unchecked")
public static <T> T cast(Object obj)
{
return (T) obj;
}
}