diff --git a/.env.development b/.env.development index 2280663..2659f98 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com -#VITE_SERVER_URL=https://server.gxwebsoft.com/api -#VITE_THINK_URL=https://gxtyzx-api.websoft.top/api +VITE_SERVER_URL=https://server.gxwebsoft.com/api +VITE_THINK_URL=https://gxtyzx-api.websoft.top/api #VITE_API_URL=https://modules.gxwebsoft.com/api -VITE_SERVER_URL=https://server.gxwebsoft.com/api -VITE_API_URL=http://127.0.0.1:9091/api -VITE_THINK_URL=http://127.0.0.1:9099/api +#VITE_SERVER_URL=http://127.0.0.1:30000/api +VITE_API_URL=http://127.0.0.1:9002/api +#VITE_THINK_URL=http://127.0.0.1:9099/api #/booking/bookingItem diff --git a/.env.production b/.env.production index 8f9990d..b356e41 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com -VITE_SERVER_URL=https://common-api.websoft.top/api +VITE_SERVER_URL=https://server.gxwebsoft.com/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api VITE_API_URL=https://modules.gxwebsoft.com/api diff --git a/src/api/cms/cmsProductComment/index.ts b/src/api/cms/cmsProductComment/index.ts new file mode 100644 index 0000000..cd00370 --- /dev/null +++ b/src/api/cms/cmsProductComment/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { CmsProductComment, CmsProductCommentParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询产品评论 + */ +export async function pageCmsProductComment(params: CmsProductCommentParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/cms-product-comment/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询产品评论列表 + */ +export async function listCmsProductComment(params?: CmsProductCommentParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-comment', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加产品评论 + */ +export async function addCmsProductComment(data: CmsProductComment) { + const res = await request.post>( + MODULES_API_URL + '/cms/cms-product-comment', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改产品评论 + */ +export async function updateCmsProductComment(data: CmsProductComment) { + const res = await request.put>( + MODULES_API_URL + '/cms/cms-product-comment', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除产品评论 + */ +export async function removeCmsProductComment(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-comment/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除产品评论 + */ +export async function removeBatchCmsProductComment(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-comment/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询产品评论 + */ +export async function getCmsProductComment(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-comment/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/cmsProductComment/model/index.ts b/src/api/cms/cmsProductComment/model/index.ts new file mode 100644 index 0000000..83e2776 --- /dev/null +++ b/src/api/cms/cmsProductComment/model/index.ts @@ -0,0 +1,31 @@ +import type { PageParam } from '@/api'; + +/** + * 产品评论 + */ +export interface CmsProductComment { + // ID + id?: number; + // 产品ID + productId?: number; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 评论内容 + comments?: string; + // 状态 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 产品评论搜索条件 + */ +export interface CmsProductCommentParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/cmsProductRecord/index.ts b/src/api/cms/cmsProductRecord/index.ts new file mode 100644 index 0000000..8806c66 --- /dev/null +++ b/src/api/cms/cmsProductRecord/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { CmsProductRecord, CmsProductRecordParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询插件安装明细 + */ +export async function pageCmsProductRecord(params: CmsProductRecordParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/cms-product-record/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询插件安装明细列表 + */ +export async function listCmsProductRecord(params?: CmsProductRecordParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-record', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加插件安装明细 + */ +export async function addCmsProductRecord(data: CmsProductRecord) { + const res = await request.post>( + MODULES_API_URL + '/cms/cms-product-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改插件安装明细 + */ +export async function updateCmsProductRecord(data: CmsProductRecord) { + const res = await request.put>( + MODULES_API_URL + '/cms/cms-product-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除插件安装明细 + */ +export async function removeCmsProductRecord(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-record/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除插件安装明细 + */ +export async function removeBatchCmsProductRecord(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/cms-product-record/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询插件安装明细 + */ +export async function getCmsProductRecord(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/cms-product-record/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/cmsProductRecord/model/index.ts b/src/api/cms/cmsProductRecord/model/index.ts new file mode 100644 index 0000000..5c6670a --- /dev/null +++ b/src/api/cms/cmsProductRecord/model/index.ts @@ -0,0 +1,31 @@ +import type { PageParam } from '@/api'; + +/** + * 插件安装明细 + */ +export interface CmsProductRecord { + // ID + id?: number; + // 产品ID + productId?: number; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0待处理, 1已完成 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 插件安装明细搜索条件 + */ +export interface CmsProductRecordParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/design/model/index.ts b/src/api/cms/design/model/index.ts index 4bd18bc..32134fa 100644 --- a/src/api/cms/design/model/index.ts +++ b/src/api/cms/design/model/index.ts @@ -49,6 +49,7 @@ export interface Design { demoUrl?: string; account?: string; docUrl?: string; + merchantId?: number; } /** diff --git a/src/api/cms/form-record/model/index.ts b/src/api/cms/form-record/model/index.ts index c8aa781..466aaf4 100644 --- a/src/api/cms/form-record/model/index.ts +++ b/src/api/cms/form-record/model/index.ts @@ -6,7 +6,12 @@ import type { PageParam } from '@/api'; export interface FormRecord { formRecordId?: number; formId?: number; + type?: string; name?: string; + phone?: string; + age?: number; + extra?: string; + dateTime?: string; formData?: string; formObj?: Object; userId?: number; diff --git a/src/api/cms/link/model/index.ts b/src/api/cms/link/model/index.ts index 40f5988..bfd69bb 100644 --- a/src/api/cms/link/model/index.ts +++ b/src/api/cms/link/model/index.ts @@ -18,6 +18,7 @@ export interface Link { deleted?: number; status?: number; createTime?: number; + merchantId?: number; } /** diff --git a/src/api/cms/navigation/model/index.ts b/src/api/cms/navigation/model/index.ts index 8d379c7..1ff7053 100644 --- a/src/api/cms/navigation/model/index.ts +++ b/src/api/cms/navigation/model/index.ts @@ -42,6 +42,7 @@ export interface Navigation { label?: string; value?: number; style?: string; + merchantId?: number; } /** @@ -52,5 +53,6 @@ export interface NavigationParam { path?: string; authority?: string; parentId?: number; + merchantId?: number; navigationId?: number; } diff --git a/src/api/cms/website/field/model/index.ts b/src/api/cms/website/field/model/index.ts index 1fe6ad1..785f3c4 100644 --- a/src/api/cms/website/field/model/index.ts +++ b/src/api/cms/website/field/model/index.ts @@ -61,5 +61,6 @@ export interface Config { kefu1?: string; email?: string; loginTitle?: string; + sysName?: string; sysLogo?: string; } diff --git a/src/api/index.ts b/src/api/index.ts index 9077748..33d2816 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -47,9 +47,9 @@ export interface PageParam { // 搜素关键词 keywords?: string; // 起始时间 - createTimeStart?: number; + createTimeStart?: string; // 结束时间 - createTimeEnd?: number; + createTimeEnd?: string; timeStart?: number; timeEnd?: number; isExpireTime?: number; diff --git a/src/api/shop/shopMerchant/index.ts b/src/api/shop/shopMerchant/index.ts new file mode 100644 index 0000000..5ed8e11 --- /dev/null +++ b/src/api/shop/shopMerchant/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchant, ShopMerchantParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户 + */ +export async function pageShopMerchant(params: ShopMerchantParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户列表 + */ +export async function listShopMerchant(params?: ShopMerchantParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户 + */ +export async function addShopMerchant(data: ShopMerchant) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户 + */ +export async function updateShopMerchant(data: ShopMerchant) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户 + */ +export async function removeShopMerchant(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户 + */ +export async function removeBatchShopMerchant(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户 + */ +export async function getShopMerchant(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchant/model/index.ts b/src/api/shop/shopMerchant/model/index.ts new file mode 100644 index 0000000..52d4543 --- /dev/null +++ b/src/api/shop/shopMerchant/model/index.ts @@ -0,0 +1,87 @@ +import type { PageParam } from '@/api'; + +/** + * 商户 + */ +export interface ShopMerchant { + // ID + merchantId?: number; + // 商户名称 + merchantName?: string; + // 商户编号 + merchantCode?: string; + // 商户类型 + type?: number; + // 商户图标 + image?: string; + // 商户手机号 + phone?: string; + // 商户姓名 + realName?: string; + // 店铺类型 + shopType?: string; + // 项目分类 + itemType?: string; + // 商户分类 + category?: string; + // 商户经营分类 + merchantCategoryId?: number; + // 商户分类 + merchantCategoryTitle?: string; + // 经纬度 + lngAndLat?: string; + // + lng?: string; + // + lat?: string; + // 所在省份 + province?: string; + // 所在城市 + city?: string; + // 所在辖区 + region?: string; + // 详细地址 + address?: string; + // 手续费 + commission?: string; + // 关键字 + keywords?: string; + // 资质图片 + files?: string; + // 营业时间 + businessTime?: string; + // 文章内容 + content?: string; + // 每小时价格 + price?: string; + // 是否自营 + ownStore?: number; + // 是否推荐 + recommend?: number; + // 是否需要审核 + goodsReview?: number; + // 管理入口 + adminUrl?: string; + // 备注 + comments?: string; + // 所有人 + userId?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户搜索条件 + */ +export interface ShopMerchantParam extends PageParam { + merchantId?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantAccount/index.ts b/src/api/shop/shopMerchantAccount/index.ts new file mode 100644 index 0000000..eff50c4 --- /dev/null +++ b/src/api/shop/shopMerchantAccount/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantAccount, ShopMerchantAccountParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户账号 + */ +export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-account/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户账号列表 + */ +export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-account', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户账号 + */ +export async function addShopMerchantAccount(data: ShopMerchantAccount) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-account', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户账号 + */ +export async function updateShopMerchantAccount(data: ShopMerchantAccount) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-account', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户账号 + */ +export async function removeShopMerchantAccount(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-account/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户账号 + */ +export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-account/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户账号 + */ +export async function getShopMerchantAccount(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-account/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantAccount/model/index.ts b/src/api/shop/shopMerchantAccount/model/index.ts new file mode 100644 index 0000000..6dbada0 --- /dev/null +++ b/src/api/shop/shopMerchantAccount/model/index.ts @@ -0,0 +1,39 @@ +import type { PageParam } from '@/api'; + +/** + * 商户账号 + */ +export interface ShopMerchantAccount { + // ID + id?: number; + // 商户手机号 + phone?: string; + // 真实姓名 + realName?: string; + // 商户ID + merchantId?: number; + // 角色ID + roleId?: number; + // 角色名称 + roleName?: string; + // 用户ID + userId?: number; + // 备注 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户账号搜索条件 + */ +export interface ShopMerchantAccountParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantApply/index.ts b/src/api/shop/shopMerchantApply/index.ts new file mode 100644 index 0000000..b26ed11 --- /dev/null +++ b/src/api/shop/shopMerchantApply/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantApply, ShopMerchantApplyParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户入驻申请 + */ +export async function pageShopMerchantApply(params: ShopMerchantApplyParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-apply/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户入驻申请列表 + */ +export async function listShopMerchantApply(params?: ShopMerchantApplyParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-apply', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户入驻申请 + */ +export async function addShopMerchantApply(data: ShopMerchantApply) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-apply', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户入驻申请 + */ +export async function updateShopMerchantApply(data: ShopMerchantApply) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-apply', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户入驻申请 + */ +export async function removeShopMerchantApply(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-apply/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户入驻申请 + */ +export async function removeBatchShopMerchantApply(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-apply/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户入驻申请 + */ +export async function getShopMerchantApply(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-apply/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantApply/model/index.ts b/src/api/shop/shopMerchantApply/model/index.ts new file mode 100644 index 0000000..81a85f0 --- /dev/null +++ b/src/api/shop/shopMerchantApply/model/index.ts @@ -0,0 +1,59 @@ +import type { PageParam } from '@/api'; + +/** + * 商户入驻申请 + */ +export interface ShopMerchantApply { + // ID + applyId?: number; + // 商户名称 + merchantName?: string; + // 商户图标 + image?: string; + // 商户手机号 + phone?: string; + // 商户姓名 + realName?: string; + // 身份证号码 + idCard?: string; + // 店铺类型 + shopType?: string; + // 商户分类 + category?: string; + // 手续费 + commission?: string; + // 关键字 + keywords?: string; + // 资质图片 + files?: string; + // 所有人 + userId?: number; + // 是否自营 + ownStore?: number; + // 是否推荐 + recommend?: number; + // 是否需要审核 + goodsReview?: number; + // 工作负责人 + name2?: string; + // 驳回原因 + reason?: string; + // 备注 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户入驻申请搜索条件 + */ +export interface ShopMerchantApplyParam extends PageParam { + applyId?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantCount/index.ts b/src/api/shop/shopMerchantCount/index.ts new file mode 100644 index 0000000..74229e9 --- /dev/null +++ b/src/api/shop/shopMerchantCount/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantCount, ShopMerchantCountParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询门店销售统计表 + */ +export async function pageShopMerchantCount(params: ShopMerchantCountParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-count/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询门店销售统计表列表 + */ +export async function listShopMerchantCount(params?: ShopMerchantCountParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-count', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加门店销售统计表 + */ +export async function addShopMerchantCount(data: ShopMerchantCount) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-count', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改门店销售统计表 + */ +export async function updateShopMerchantCount(data: ShopMerchantCount) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-count', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除门店销售统计表 + */ +export async function removeShopMerchantCount(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-count/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除门店销售统计表 + */ +export async function removeBatchShopMerchantCount(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-count/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询门店销售统计表 + */ +export async function getShopMerchantCount(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-count/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantCount/model/index.ts b/src/api/shop/shopMerchantCount/model/index.ts new file mode 100644 index 0000000..ea27a60 --- /dev/null +++ b/src/api/shop/shopMerchantCount/model/index.ts @@ -0,0 +1,29 @@ +import type { PageParam } from '@/api'; + +/** + * 门店销售统计表 + */ +export interface ShopMerchantCount { + // ID + id?: number; + // 店铺名称 + name?: string; + // 店铺说明 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 门店销售统计表搜索条件 + */ +export interface ShopMerchantCountParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/shop/shopMerchantType/index.ts b/src/api/shop/shopMerchantType/index.ts new file mode 100644 index 0000000..2070c5e --- /dev/null +++ b/src/api/shop/shopMerchantType/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopMerchantType, ShopMerchantTypeParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询商户类型 + */ +export async function pageShopMerchantType(params: ShopMerchantTypeParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-merchant-type/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询商户类型列表 + */ +export async function listShopMerchantType(params?: ShopMerchantTypeParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-type', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加商户类型 + */ +export async function addShopMerchantType(data: ShopMerchantType) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-merchant-type', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改商户类型 + */ +export async function updateShopMerchantType(data: ShopMerchantType) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-merchant-type', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除商户类型 + */ +export async function removeShopMerchantType(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-type/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除商户类型 + */ +export async function removeBatchShopMerchantType(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-merchant-type/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询商户类型 + */ +export async function getShopMerchantType(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-merchant-type/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopMerchantType/model/index.ts b/src/api/shop/shopMerchantType/model/index.ts new file mode 100644 index 0000000..c051169 --- /dev/null +++ b/src/api/shop/shopMerchantType/model/index.ts @@ -0,0 +1,29 @@ +import type { PageParam } from '@/api'; + +/** + * 商户类型 + */ +export interface ShopMerchantType { + // ID + id?: number; + // 店铺类型 + name?: string; + // 店铺入驻条件 + comments?: string; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 商户类型搜索条件 + */ +export interface ShopMerchantTypeParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/system/website/field/index.ts b/src/api/system/website/field/index.ts index 962ece8..d71b76a 100644 --- a/src/api/system/website/field/index.ts +++ b/src/api/system/website/field/index.ts @@ -5,7 +5,7 @@ import type { WebsiteField, WebsiteFieldParam } from '@/api/cms/website/field/model'; -import { SERVER_API_URL } from '@/config/setting'; +import { MODULES_API_URL, SERVER_API_URL } from "@/config/setting"; /** * 分页查询项目参数 @@ -134,7 +134,7 @@ export async function checkExistence( */ export async function configWebsiteField(params?: WebsiteFieldParam) { const res = await request.get>( - SERVER_API_URL + '/cms/website-field/config', + MODULES_API_URL + '/cms/website-field/config', { params } diff --git a/src/api/system/website/field/model/index.ts b/src/api/system/website/field/model/index.ts index cf32e49..94f92cc 100644 --- a/src/api/system/website/field/model/index.ts +++ b/src/api/system/website/field/model/index.ts @@ -60,4 +60,5 @@ export interface Config { email?: string; loginTitle?: string; sysLogo?: string; + sysName?: string; } diff --git a/src/components/SelectMerchant/components/select-data.vue b/src/components/SelectMerchant/components/select-data.vue index e0439a8..52ba8a2 100644 --- a/src/components/SelectMerchant/components/select-data.vue +++ b/src/components/SelectMerchant/components/select-data.vue @@ -27,13 +27,16 @@ />