diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json new file mode 100644 index 0000000..01a1271 --- /dev/null +++ b/.workbuddy/expert-history.json @@ -0,0 +1,17 @@ +{ + "version": 2, + "sessions": { + "f4c6db2b9dcf4c329722a3d2d50b4d44": [ + { + "expertId": "SeniorDeveloper", + "name": "吴八哥", + "profession": "高级开发工程师", + "avatarUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/avatars/02-Engineering/SeniorDeveloper/SeniorDeveloper.png", + "promptUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/experts/02-Engineering/SeniorDeveloper/SeniorDeveloper_zh.md", + "usedAt": 1776933111908, + "industryId": "02-Engineering" + } + ] + }, + "lastUpdated": 1776933527123 +} \ No newline at end of file diff --git a/.workbuddy/memory/2026-04-23.md b/.workbuddy/memory/2026-04-23.md new file mode 100644 index 0000000..b30c3c6 --- /dev/null +++ b/.workbuddy/memory/2026-04-23.md @@ -0,0 +1,44 @@ +# 2026-04-23 工作日志 + +## 项目框架整理 + +### 决策咨询网 (jczxw-pc) +从 websopy 模板复制过来的项目,完成框架整理: + +**删除内容:** +- developer 相关(开发者中心、小程序/App开发平台) +- console 相关(企业控制台) +- 无关页面:ai-agent、miniapp、openclaw、apps、products、shop、deploy、flow、platform、create-app、qr-confirm、wx-scan、oa +- market 和 invite 模块 +- public 中无关资源:docs、icons、videos、wx-scan +- 无关 API:developer、miniprogram、payment、ticket、shop + +**保留内容:** +- admin 管理后台(重新规划功能) +- 核心框架和基础组件 + +**新建内容:** +1. 导航配置更新 (`app/config/nav.ts`):政策要闻、决策咨询、决策参考、专家资讯、智库观察、建言献策、会员服务、翰墨文谈、关于我们 + +2. SiteHeader 简化:移除开发者相关菜单,更新 Logo + +3. Admin 管理后台: + - `admin/index.vue`:仪表盘(文章统计、专家待审、会员待审、建言待处理) + - `admin/articles/`:文章管理 + - `admin/experts/`:专家管理(含审核) + - `admin/members/`:会员管理(企业/个人,含审核) + - `admin/suggestions/`:建言管理 + +4. 前台栏目页面: + - `news/`:政策要闻 + - `consultation/`:决策咨询 + - `reference/`:决策参考(含VIP数据服务) + - `expert/`:专家资讯 + apply.vue 申请 + - `think-tank/`:智库观察 + - `suggestions/`:建言献策 + - `membership/`:会员服务 + - `hanmo/`:翰墨文谈 + - `about/`:关于我们 + join/ 子页面(企业会员、个人会员申请) + +**配置文件更新:** +- nuxt.config.ts:移除 market SSR 规则,更新 titleTemplate diff --git a/.workbuddy/memory/MEMORY.md b/.workbuddy/memory/MEMORY.md new file mode 100644 index 0000000..e69de29 diff --git a/app/api/developer/index.ts b/app/api/developer/index.ts deleted file mode 100644 index 7b10fb6..0000000 --- a/app/api/developer/index.ts +++ /dev/null @@ -1,259 +0,0 @@ -import request from '@/utils/request' - -// ========== 权限申请接口 ========== - -/** - * 获取权限申请列表 - */ -export function getPermissionRequests(params?: { - page?: number - size?: number - status?: 'pending' | 'approved' | 'rejected' -}) { - return request.get<{ - code: number - message: string - data: { - records: Array<{ - id: string | number - repo: string - repoName: string - reason: string - status: 'pending' | 'approved' | 'rejected' - gitUsername: string - createdAt: string - reviewedAt?: string - reviewerName?: string - rejectReason?: string - }> - total: number - } - }>('/api/app/developer/permission-requests', { params }) -} - -/** - * 提交权限申请 - */ -export function createPermissionRequest(data: { - repo: string - reason: string - gitUsername?: string -}) { - return request.post<{ - code: number - message: string - data: { - id: string | number - repo: string - repoName: string - reason: string - status: 'pending' - createdAt: string - } - }>('/api/app/developer/permission-requests', data) -} - -/** - * 获取权限申请统计 - */ -export function getPermissionRequestStats() { - return request.get<{ - code: number - message: string - data: { - pending: number - approved: number - rejected: number - total: number - } - }>('/api/app/developer/permission-requests/stats') -} - -/** - * 获取可申请的仓库列表 - */ -export function getAvailableRepositories() { - return request.get<{ - code: number - message: string - data: Array<{ - value: string - label: string - description: string - accessLevel?: 'read' | 'write' | 'admin' - isAccessible: boolean - }> - }>('/api/app/developer/permission-requests/available-repos') -} - -// ========== Git账号绑定接口 ========== - -/** - * 保存Git账号绑定信息 - */ -export function saveGitAccount(data: { - username: string - email?: string - remark?: string -}) { - return request.post<{ - code: number - message: string - data: { - userId: number - gitUsername: string - email?: string - remark?: string - savedAt: string - status: 'pending' | 'verified' | 'rejected' - } - }>('/api/app/developer/git-account', data) -} - -/** - * 获取Git账号绑定状态 - */ -export function getGitAccountStatus() { - return request.get<{ - code: number - message: string - data: { - username?: string - email?: string - remark?: string - status: 'pending' | 'verified' | 'rejected' | 'not_bound' - lastUpdatedAt?: string - verificationNote?: string - } - }>('/api/app/developer/git-account/status') -} - -/** - * 获取Gitea服务器信息 - */ -export function getGiteaServerInfo() { - return request.get<{ - code: number - message: string - data: { - url: string - version: string - registrationEnabled: boolean - requireEmailConfirmation: boolean - maxRepoCreation: number - } - }>('/api/app/developer/gitea-info') -} - -// ========== 管理端 - Git账号审核接口 ========== - -export interface GitAccountItem { - id: number - userId: number - username: string - email?: string - remark?: string - status: 'pending' | 'verified' | 'rejected' - verificationNote?: string - createTime: string - updateTime: string - tenantId: number -} - -/** - * 分页查询Git账号绑定列表(管理端) - */ -export function pageGitAccounts(params?: { - page?: number - size?: number - status?: string - keyword?: string -}) { - return request.get<{ - code: number - message: string - data: { - records: GitAccountItem[] - total: number - current: number - size: number - } - }>('/api/app/developer/git-account/list', { params }) -} - -/** - * 审核Git账号绑定 - 通过 - */ -export function approveGitAccount(id: number, note?: string) { - return request.put<{ - code: number - message: string - }>(`/api/app/developer/git-account/${id}/approve`, { note }) -} - -/** - * 审核Git账号绑定 - 拒绝 - */ -export function rejectGitAccount(id: number, reason: string) { - return request.put<{ - code: number - message: string - }>(`/api/app/developer/git-account/${id}/reject`, { reason }) -} - -// ========== 管理端 - 权限申请审核接口 ========== - -export interface PermissionRequestItem { - id: number - userId: number - gitUsername: string - repo: string - repoName: string - reason: string - status: 'pending' | 'approved' | 'rejected' - createdAt: string - reviewedAt?: string - reviewerName?: string - rejectReason?: string -} - -/** - * 分页查询权限申请列表(管理端) - */ -export function pagePermissionRequestsAdmin(params?: { - page?: number - size?: number - status?: string - keyword?: string -}) { - return request.get<{ - code: number - message: string - data: { - records: PermissionRequestItem[] - total: number - current: number - size: number - } - }>('/api/app/developer/permission-requests/page', { params }) -} - -/** - * 审核权限申请 - 通过 - */ -export function approvePermissionRequest(id: number, note?: string) { - return request.put<{ - code: number - message: string - }>(`/api/app/developer/permission-requests/${id}/approve`, { note }) -} - -/** - * 审核权限申请 - 拒绝 - */ -export function rejectPermissionRequest(id: number, reason: string) { - return request.put<{ - code: number - message: string - }>(`/api/app/developer/permission-requests/${id}/reject`, { reason }) -} \ No newline at end of file diff --git a/app/api/miniprogram/index.ts b/app/api/miniprogram/index.ts deleted file mode 100644 index 8cfbbc9..0000000 --- a/app/api/miniprogram/index.ts +++ /dev/null @@ -1,50 +0,0 @@ -import {MODULES_API_URL} from '@/config/setting'; - -/** - * 小程序码参数 - */ -export interface MiniProgramCodeParam { - page?: string; - scene: string; - width?: number; - checkPath?: boolean; - envVersion?: 'release' | 'trial' | 'develop'; -} - -/** - * 生成小程序码 - */ -export async function generateMiniProgramCode(data: MiniProgramCodeParam) { - try { - const url = '/wx-login/getOrderQRCodeUnlimited/' + data.scene; - const fullUrl = MODULES_API_URL + `${url}`; - - console.log('生成小程序码URL:', fullUrl); - console.log('小程序码参数:', data); - console.log('scene 参数:', data.scene); - - // 直接返回URL,让浏览器处理图片加载 - // scene 参数中包含了租户ID信息 - return fullUrl; - } catch (error: any) { - console.error('生成小程序码失败:', error); - throw new Error(error.message || '生成小程序码失败'); - } -} - -/** - * 生成邀请小程序码 - */ -export async function generateInviteCode(inviterId: number) { - const scene = `uid_${inviterId}`; - - console.log('生成邀请小程序码 scene:', scene); - - return generateMiniProgramCode({ - page: 'pages/index/index', - scene: scene, - width: 180, - checkPath: true, - envVersion: 'trial' - }); -} diff --git a/app/api/payment/index.ts b/app/api/payment/index.ts deleted file mode 100644 index 613959b..0000000 --- a/app/api/payment/index.ts +++ /dev/null @@ -1,344 +0,0 @@ -/** - * 支付模块 API 封装 - * 支持:微信 JSAPI / 支付宝 / Native / 余额 - */ -import request from '@/utils/request' -import type { ApiResult } from '@/api' -import { SERVER_API_URL } from '@/config/setting' - -/** 支付方式 */ -export type PayType = 'wechat' | 'alipay' | 'native' | 'balance' | number - -/** 支付渠道 */ -export type PayChannel = 'wechat_jsapi' | 'alipay_wap' | 'wechat_native' | 'balance' - -/** 支付参数 */ -export interface PayParams { - orderNo: string - orderId?: number - payType: PayChannel - /** 微信 JSAPI 必填:用户 openid */ - openId?: string - /** 微信 JSAPI 必填:支付主体类型 */ - subject?: string - /** 支付主体描述 */ - body?: string - /** 支付金额(分) */ - totalAmount?: number - /** 前端回调 URL */ - returnUrl?: string -} - -/** 微信 JSAPI 支付参数 */ -export interface WechatJsapiParams { - orderNo: string - openId: string - subject: string - body?: string - totalAmount?: number - returnUrl?: string -} - -/** 支付宝 WAP/Web 支付参数 */ -export interface AlipayParams { - orderNo: string - subject: string - body?: string - totalAmount?: number - returnUrl?: string -} - -/** Native 支付参数 */ -export interface NativeParams { - orderNo: string - subject: string - body?: string - totalAmount?: number -} - -/** 支付结果 */ -export interface PayResult { - codeUrl?: string // Native 支付二维码链接 - qrcode?: string // 二维码内容 - paymentUrl?: string // 跳转支付链接 - payUrl?: string // 支付链接 - prepayId?: string // 预支付订单号 - mwebUrl?: string // 微信 H5 支付链接 - tradeNo?: string // 交易流水号 - orderNo?: string // 订单号 - orderId?: number // 订单ID -} - -/** 支付状态 */ -export interface PayStatus { - paid: boolean - payStatus: number // 0 未支付,1 已支付 - orderStatus: number // 订单状态 - payTime?: string // 支付时间 - transactionId?: string // 微信/支付宝交易号 -} - -/** - * 统一支付接口 - * @deprecated 使用具体渠道接口 - */ -export async function createPayment(data: Record): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/payment/create', - data - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 微信 JSAPI 支付 - * 适用于微信内置浏览器 / 公众号 / 小程序环境 - */ -export async function createWechatJsapiPay(params: WechatJsapiParams): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/wx-jsapi-pay/unified-order', - params - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 微信 H5 支付 - * 适用于非微信浏览器 - */ -export async function createWechatH5Pay(params: { orderNo: string; subject: string; body?: string; totalAmount?: number; returnUrl?: string }): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/wx-h5-pay/unified-order', - params - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 微信 Native 支付(扫码支付) - */ -export async function createWechatNativePay(params: NativeParams): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/wx-native-pay/unified-order', - params - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 支付宝 WAP/Web 支付 - */ -export async function createAlipayPay(params: AlipayParams): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/alipay/unified-order', - params - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 查询支付状态 - */ -export async function queryPayStatus(orderNo: string): Promise { - const res = await request.get>( - SERVER_API_URL + '/system/payment/query-status', - { params: { orderNo } } - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 查询充值状态(专门用于充值订单) - */ -export async function queryRechargeStatus(orderNo: string): Promise<{ - paid: boolean - payStatus: number - balance?: number -}> { - const res = await request.get>( - SERVER_API_URL + '/system/wx-native-pay/recharge-status', - { params: { orderNo } } - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 手动确认充值(测试用,生产环境由支付回调触发) - */ -export async function confirmRecharge(orderNo: string): Promise<{ - orderNo: string - paid: boolean - payPrice: number - giftMoney: number - actualMoney: number - balance: number -}> { - const res = await request.post>( - SERVER_API_URL + '/system/wx-native-pay/confirm-recharge', - null, - { params: { orderNo } } - ) - if (res.data.code === 0) { - return res.data.data! - } - return Promise.reject(new Error(res.data.message)) -} - -/** - * 取消订单 - */ -export async function cancelOrder(orderId: number): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/order/cancel', - { orderId } - ) - if (res.data.code !== 0) { - return Promise.reject(new Error(res.data.message)) - } -} - -/** - * 申请退款 - */ -export async function applyRefund(orderId: number, reason?: string): Promise { - const res = await request.post>( - SERVER_API_URL + '/system/order/refund', - { orderId, reason } - ) - if (res.data.code !== 0) { - return Promise.reject(new Error(res.data.message)) - } -} - -/** - * 判断当前环境 - */ -export function detectPayEnvironment(): 'wechat' | 'alipay' | 'desktop' | 'mobile' { - const ua = navigator.userAgent.toLowerCase() - - // 微信环境 - if (/micromessenger/.test(ua)) { - return 'wechat' - } - - // 支付宝环境 - if (/alipayclient/.test(ua)) { - return 'alipay' - } - - // 移动端 - if (/mobile|android|iphone|ipad|tablet/i.test(ua)) { - return 'mobile' - } - - // 桌面端 - return 'desktop' -} - -/** - * 检测是否在微信内置浏览器 - */ -export function isWechatBrowser(): boolean { - return /micromessenger/.test(navigator.userAgent.toLowerCase()) -} - -/** - * 检测是否在支付宝内置浏览器 - */ -export function isAlipayBrowser(): boolean { - return /alipayclient/.test(navigator.userAgent.toLowerCase()) -} - -/** - * 调起微信 JSAPI 支付 - * 需要先引入微信 JSSDK 并完成签名 - */ -export function callWechatJsapi(params: { - appId: string - timestamp: string - nonceStr: string - package: string - signType?: string - paySign: string -}): Promise<'ok'> { - return new Promise((resolve, reject) => { - if (typeof window.WeixinJSBridge === 'undefined') { - // 尝试通过 WeChat JSSDK 调用 - if (typeof window.jWeixin !== 'undefined') { - window.jWeixin.chooseWXPay({ - ...params, - success: () => resolve('ok'), - fail: (err: unknown) => reject(err) - }) - } else { - reject(new Error('微信 JSSDK 未加载')) - } - return - } - - window.WeixinJSBridge.invoke( - 'getBrandWCPayRequest', - { - appId: params.appId, - timeStamp: params.timestamp, - nonceStr: params.nonceStr, - package: params.package, - signType: params.signType || 'MD5', - paySign: params.paySign - }, - (res: { err_msg: string }) => { - if (res.err_msg === 'get_brand_wcpay_request:ok') { - resolve('ok') - } else if (res.err_msg === 'get_brand_wcpay_request:cancel') { - reject(new Error('用户取消支付')) - } else { - reject(new Error(res.err_msg)) - } - } - ) - }) -} - -// 扩展 Window 类型 -declare global { - interface Window { - WeixinJSBridge?: { - invoke: (api: string, params: Record, callback: (res: { err_msg: string }) => void) => void - } - jWeixin?: { - chooseWXPay: (params: Record & { success?: () => void; fail?: (err: unknown) => void }) => void - } - } -} diff --git a/app/api/shop/shopCommissionRole/index.ts b/app/api/shop/shopCommissionRole/index.ts deleted file mode 100644 index 60db05d..0000000 --- a/app/api/shop/shopCommissionRole/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopCommissionRole, ShopCommissionRoleParam } from './model'; - -/** - * 分页查询分红角色 - */ -export async function pageShopCommissionRole(params: ShopCommissionRoleParam) { - const res = await request.get>>( - '/shop/shop-commission-role/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分红角色列表 - */ -export async function listShopCommissionRole(params?: ShopCommissionRoleParam) { - const res = await request.get>( - '/shop/shop-commission-role', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分红角色 - */ -export async function addShopCommissionRole(data: ShopCommissionRole) { - const res = await request.post>( - '/shop/shop-commission-role', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分红角色 - */ -export async function updateShopCommissionRole(data: ShopCommissionRole) { - const res = await request.put>( - '/shop/shop-commission-role', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分红角色 - */ -export async function removeShopCommissionRole(id?: number) { - const res = await request.delete>( - '/shop/shop-commission-role/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分红角色 - */ -export async function removeBatchShopCommissionRole(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-commission-role/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分红角色 - */ -export async function getShopCommissionRole(id: number) { - const res = await request.get>( - '/shop/shop-commission-role/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopCommissionRole/model/index.ts b/app/api/shop/shopCommissionRole/model/index.ts deleted file mode 100644 index 699d24f..0000000 --- a/app/api/shop/shopCommissionRole/model/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分红角色 - */ -export interface ShopCommissionRole { - // - id?: number; - // - title?: string; - // - provinceId?: number; - // - cityId?: number; - // - regionId?: number; - // 状态, 0正常, 1异常 - status?: number; - // 备注 - description?: string; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // - sortNumber?: number; -} - -/** - * 分红角色搜索条件 - */ -export interface ShopCommissionRoleParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopCoupon/index.ts b/app/api/shop/shopCoupon/index.ts deleted file mode 100644 index 0327e4f..0000000 --- a/app/api/shop/shopCoupon/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopCoupon, ShopCouponParam } from './model'; - -/** - * 分页查询优惠券 - */ -export async function pageShopCoupon(params: ShopCouponParam) { - const res = await request.get>>( - '/shop/shop-coupon/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询优惠券列表 - */ -export async function listShopCoupon(params?: ShopCouponParam) { - const res = await request.get>( - '/shop/shop-coupon', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加优惠券 - */ -export async function addShopCoupon(data: ShopCoupon) { - const res = await request.post>( - '/shop/shop-coupon', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改优惠券 - */ -export async function updateShopCoupon(data: ShopCoupon) { - const res = await request.put>( - '/shop/shop-coupon', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除优惠券 - */ -export async function removeShopCoupon(id?: number) { - const res = await request.delete>( - '/shop/shop-coupon/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除优惠券 - */ -export async function removeBatchShopCoupon(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-coupon/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询优惠券 - */ -export async function getShopCoupon(id: number) { - const res = await request.get>( - '/shop/shop-coupon/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopCoupon/model/index.ts b/app/api/shop/shopCoupon/model/index.ts deleted file mode 100644 index 218fc2e..0000000 --- a/app/api/shop/shopCoupon/model/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { PageParam } from '@/api/index'; -import {ShopCouponApplyCate} from "@/api/shop/shopCouponApplyCate/model"; -import {ShopCouponApplyItem} from "@/api/shop/shopCouponApplyItem/model"; - -/** - * 优惠券 - */ -export interface ShopCoupon { - // id - id?: number; - // 优惠券名称 - name?: string; - // 优惠券描述 - description?: string; - // 优惠券类型(10满减券 20折扣券 30免费劵) - type?: number; - // 满减券-减免金额 - reducePrice?: string; - // 折扣券-折扣率(0-100) - discount?: number; - // 最低消费金额 - minPrice?: string; - // 到期类型(10领取后生效 20固定时间) - expireType?: number; - // 领取后生效-有效天数 - expireDay?: number; - // 有效期开始时间 - startTime?: string | Date; - // 有效期结束时间 - endTime?: string | Date; - // 适用范围(10全部商品 20指定商品 30指定分类) - applyRange?: number; - // 适用范围配置(json格式) - applyRangeConfig?: string; - // 是否过期(0未过期 1已过期) - isExpire?: number; - // 排序(数字越小越靠前) - sortNumber?: number; - // 状态, 0正常, 1禁用 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 创建用户ID - userId?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string | Date; - // 修改时间 - updateTime?: string | Date; - // 发放总数量(-1表示无限制) - totalCount?: number; - // 已发放数量 - issuedCount?: number; - // 每人限领数量(-1表示无限制) - limitPerUser?: number; - // 是否启用(0禁用 1启用) - enabled?: string; - couponApplyCateList?: ShopCouponApplyCate[]; - couponApplyItemList?: ShopCouponApplyItem[]; -} - -/** - * 优惠券搜索条件 - */ -export interface ShopCouponParam extends PageParam { - id?: number; - name?: string; - type?: number; - keywords?: string; -} diff --git a/app/api/shop/shopCouponApplyCate/model/index.ts b/app/api/shop/shopCouponApplyCate/model/index.ts deleted file mode 100644 index 2adc829..0000000 --- a/app/api/shop/shopCouponApplyCate/model/index.ts +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * 优惠券 - */ -export interface ShopCouponApplyCate { - id?: number; - couponId?: number; - cateId?: number; - cateLevel?: number; - -} diff --git a/app/api/shop/shopCouponApplyItem/model/index.ts b/app/api/shop/shopCouponApplyItem/model/index.ts deleted file mode 100644 index a9ed201..0000000 --- a/app/api/shop/shopCouponApplyItem/model/index.ts +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * 优惠券 - */ -export interface ShopCouponApplyItem { - id?: number; - couponId?: number; - type?: number; - pk?: number; - -} diff --git a/app/api/shop/shopDealerApply/index.ts b/app/api/shop/shopDealerApply/index.ts deleted file mode 100644 index 1cf1f57..0000000 --- a/app/api/shop/shopDealerApply/index.ts +++ /dev/null @@ -1,158 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerApply, ShopDealerApplyParam } from './model'; - -/** - * 分页查询分销商申请记录表 - */ -export async function pageShopDealerApply(params: ShopDealerApplyParam) { - const res = await request.get>>( - '/shop/shop-dealer-apply/page', - {params} - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商申请记录表列表 - */ -export async function listShopDealerApply(params?: ShopDealerApplyParam) { - const res = await request.get>( - '/shop/shop-dealer-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 addShopDealerApply(data: ShopDealerApply) { - const res = await request.post>( - '/shop/shop-dealer-apply', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商申请记录表 - */ -export async function updateShopDealerApply(data: ShopDealerApply) { - const res = await request.put>( - '/shop/shop-dealer-apply', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商申请记录表 - */ -export async function removeShopDealerApply(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-apply/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商申请记录表 - */ -export async function removeBatchShopDealerApply(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-apply/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商申请记录表 - */ -export async function getShopDealerApply(id: number) { - const res = await request.get>( - '/shop/shop-dealer-apply/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 审核通过分销商申请 - */ -export async function approveShopDealerApply(id: number) { - const res = await request.put>( - `/shop/shop-dealer-apply/${id}/approve` - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 驳回分销商申请 - */ -export async function rejectShopDealerApply(id: number, data: { rejectReason: string }) { - const res = await request.put>( - `/shop/shop-dealer-apply/${id}/reject`, - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量审核通过分销商申请 - */ -export async function batchApproveShopDealerApply(ids: number[]) { - const res = await request.put>( - '/shop/shop-dealer-apply/batch-approve', - { ids } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 导入经销商申请 - */ -export async function importShopDealerApplies(file: File) { - const formData = new FormData(); - formData.append('file', file); - const res = await request.post>( - '/shop/shop-dealer-apply/import', - formData - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopDealerApply/model/index.ts b/app/api/shop/shopDealerApply/model/index.ts deleted file mode 100644 index b49fd06..0000000 --- a/app/api/shop/shopDealerApply/model/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商申请记录表 - */ -export interface ShopDealerApply { - // 主键ID - applyId?: number; - // 类型 - type?: number; - // 用户ID - userId?: number; - // 昵称 - nickName?: string; - // 姓名 - realName?: string; - // 经销商名称 - dealerName?: string; - // 手机号 - mobile?: string; - // 分销比例 - rate?: number; - // 推荐人用户ID - refereeId?: number; - // 推荐人姓名 - refereeName?: string; - // 申请方式(10需后台审核 20无需审核) - applyType?: number; - // 申请时间 - applyTime?: string | number | Date; - // 审核状态 (10待审核 20审核通过 30驳回) - applyStatus?: number; - // 审核时间 - auditTime?: string | number | Date; - // 驳回原因 - rejectReason?: string; - description?: string; - // 商城ID - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 分销商申请记录表搜索条件 - */ -export interface ShopDealerApplyParam extends PageParam { - applyId?: number; - userId?: number; - realName?: string; - dealerName?: string; - mobile?: string; - refereeId?: number; - applyType?: number; - applyStatus?: number; - startTime?: string; - endTime?: string; - keywords?: string; -} diff --git a/app/api/shop/shopDealerCapital/index.ts b/app/api/shop/shopDealerCapital/index.ts deleted file mode 100644 index 1792423..0000000 --- a/app/api/shop/shopDealerCapital/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerCapital, ShopDealerCapitalParam } from './model'; - -/** - * 分页查询分销商资金明细表 - */ -export async function pageShopDealerCapital(params: ShopDealerCapitalParam) { - const res = await request.get>>( - '/shop/shop-dealer-capital/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商资金明细表列表 - */ -export async function listShopDealerCapital(params?: ShopDealerCapitalParam) { - const res = await request.get>( - '/shop/shop-dealer-capital', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商资金明细表 - */ -export async function addShopDealerCapital(data: ShopDealerCapital) { - const res = await request.post>( - '/shop/shop-dealer-capital', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商资金明细表 - */ -export async function updateShopDealerCapital(data: ShopDealerCapital) { - const res = await request.put>( - '/shop/shop-dealer-capital', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商资金明细表 - */ -export async function removeShopDealerCapital(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-capital/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商资金明细表 - */ -export async function removeBatchShopDealerCapital(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-capital/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商资金明细表 - */ -export async function getShopDealerCapital(id: number) { - const res = await request.get>( - '/shop/shop-dealer-capital/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopDealerCapital/model/index.ts b/app/api/shop/shopDealerCapital/model/index.ts deleted file mode 100644 index 6957def..0000000 --- a/app/api/shop/shopDealerCapital/model/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商资金明细表 - */ -export interface ShopDealerCapital { - // 主键ID - id?: number; - // 分销商用户ID - userId?: number; - // 订单ID - orderId?: number; - // 订单编号 - orderNo?: string; - // 资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入) - flowType?: number; - // 金额 - money?: string; - // 描述 - description?: string; - // 对方用户ID - toUserId?: number; - // 商城ID - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 分销商资金明细表搜索条件 - */ -export interface ShopDealerCapitalParam extends PageParam { - id?: number; - userId?: number; - toUserId?: number; - keywords?: string; -} diff --git a/app/api/shop/shopDealerOrder/index.ts b/app/api/shop/shopDealerOrder/index.ts deleted file mode 100644 index dab3b28..0000000 --- a/app/api/shop/shopDealerOrder/index.ts +++ /dev/null @@ -1,221 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerOrder, ShopDealerOrderParam } from './model'; -import { utils, writeFile } from 'xlsx'; -import { message } from 'ant-design-vue'; -import { getTenantId } from '@/utils/domain'; - -/** - * 分页查询分销商订单记录表 - */ -export async function pageShopDealerOrder(params: ShopDealerOrderParam) { - const res = await request.get>>( - '/shop/shop-dealer-order/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商订单记录表列表 - */ -export async function listShopDealerOrder(params?: ShopDealerOrderParam) { - const res = await request.get>( - '/shop/shop-dealer-order', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商订单记录表 - */ -export async function addShopDealerOrder(data: ShopDealerOrder) { - const res = await request.post>( - '/shop/shop-dealer-order', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商订单记录表 - */ -export async function updateShopDealerOrder(data: ShopDealerOrder) { - const res = await request.put>( - '/shop/shop-dealer-order', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商订单记录表 - */ -export async function removeShopDealerOrder(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-order/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商订单记录表 - */ -export async function removeBatchShopDealerOrder(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-order/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商订单记录表 - */ -export async function getShopDealerOrder(id: number) { - const res = await request.get>( - '/shop/shop-dealer-order/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 导入分销商订单 - */ -export async function importShopDealerOrder(file: File) { - const formData = new FormData(); - formData.append('file', file); - const res = await request.post>( - '/shop/shop-dealer-order/import', - formData - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 导出分销商订单 - */ -export async function exportShopDealerOrder(params?: ShopDealerOrderParam) { - // 显示导出加载提示 - message.loading('正在准备导出数据...', 0); - - try { - // 获取数据 - const list = await listShopDealerOrder(params); - - if (!list || list.length === 0) { - message.destroy(); - message.warning('没有数据可以导出'); - return; - } - - // 构建导出数据 - const array: (string | number)[][] = [ - [ - '订单ID', - '买家用户ID', - '订单总金额', - '一级分销商ID', - '一级佣金', - '二级分销商ID', - '二级佣金', - '三级分销商ID', - '三级佣金', - '订单状态', - '结算状态', - '结算时间', - '创建时间' - ] - ]; - - list.forEach((order: ShopDealerOrder) => { - array.push([ - order.orderId || '', - order.userId || '', - order.orderPrice || '0', - order.firstUserId || '', - order.firstMoney || '0', - order.secondUserId || '', - order.secondMoney || '0', - order.thirdUserId || '', - order.thirdMoney || '0', - order.isInvalid === 0 ? '有效' : '失效', - order.isSettled === 0 ? '未结算' : '已结算', - order.settleTime ? new Date(order.settleTime).toLocaleString() : '', - order.createTime || '' - ]); - }); - - // 创建工作簿 - const sheetName = `shop_dealer_order_${getTenantId()}`; - const workbook = { - SheetNames: [sheetName], - Sheets: {} - }; - - const sheet = utils.aoa_to_sheet(array); - workbook.Sheets[sheetName] = sheet; - - // 设置列宽 - sheet['!cols'] = [ - { wch: 15 }, // 订单ID - { wch: 12 }, // 买家用户ID - { wch: 12 }, // 订单总金额 - { wch: 15 }, // 一级分销商ID - { wch: 12 }, // 一级佣金 - { wch: 15 }, // 二级分销商ID - { wch: 12 }, // 二级佣金 - { wch: 15 }, // 三级分销商ID - { wch: 12 }, // 三级佣金 - { wch: 10 }, // 订单状态 - { wch: 10 }, // 结算状态 - { wch: 20 }, // 结算时间 - { wch: 20 } // 创建时间 - ]; - - message.destroy(); - message.loading('正在生成Excel文件...', 0); - - // 延迟写入文件,确保消息提示显示 - setTimeout(() => { - writeFile(workbook, `${sheetName}.xlsx`); - message.destroy(); - message.success(`成功导出 ${list.length} 条记录`); - }, 1000); - - } catch (error: any) { - message.destroy(); - message.error(error.message || '导出失败,请重试'); - } -} diff --git a/app/api/shop/shopDealerOrder/model/index.ts b/app/api/shop/shopDealerOrder/model/index.ts deleted file mode 100644 index d50dc52..0000000 --- a/app/api/shop/shopDealerOrder/model/index.ts +++ /dev/null @@ -1,77 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商订单记录表 - */ -export interface ShopDealerOrder { - // 主键ID - id?: number; - // 买家用户ID - userId?: number; - // 商品名称 - title?: string; - // 买家用户昵称 - nickname?: string; - // 订单编号 - orderNo?: string; - // 订单总金额(不含运费) - orderPrice?: string; - // 结算金额 - settledPrice?: string; - // 换算成度 - degreePrice?: string; - // 支付金额 - payPrice?: string; - // 分销商用户id(一级) - firstUserId?: number; - // 分销商用户id(二级) - secondUserId?: number; - // 分销商用户id(三级) - thirdUserId?: number; - // 分销佣金(一级) - firstMoney?: string; - // 分销佣金(二级) - secondMoney?: string; - // 分销佣金(三级) - thirdMoney?: string; - // 一级分销商昵称 - firstNickname?: string; - // 二级分销商昵称 - secondNickname?: string; - // 三级分销商昵称 - thirdNickname?: string; - // 分销比例 - rate?: number; - // 商品单价 - price?: string; - // 订单月份 - month?: string; - // 订单是否失效(0未失效 1已失效) - isInvalid?: number; - // 佣金结算(0未结算 1已结算) - isSettled?: number; - // 结算时间 - settleTime?: number; - // 订单备注 - description?: string; - // 商城ID - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 分销商订单记录表搜索条件 - */ -export interface ShopDealerOrderParam extends PageParam { - id?: number; - orderNo?: string; - productName?: string; - userId?: number; - isInvalid?: number; - isSettled?: number; - myOrder?: number; - keywords?: string; -} diff --git a/app/api/shop/shopDealerPoster/index.ts b/app/api/shop/shopDealerPoster/index.ts deleted file mode 100644 index d560dcc..0000000 --- a/app/api/shop/shopDealerPoster/index.ts +++ /dev/null @@ -1,131 +0,0 @@ -import request from '@/utils/request'; -import type { ShopDealerPoster, ShopDealerPosterParam } from './model'; - -/** - * 分页查询分销商海报设置 - */ -export async function pageShopDealerPoster(params: ShopDealerPosterParam) { - const res = await request.get('/shop/dealer/poster/page', { params }); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商海报设置列表 - */ -export async function listShopDealerPoster(params?: ShopDealerPosterParam) { - const res = await request.get('/shop/dealer/poster/list', { params }); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商海报设置 - */ -export async function getShopDealerPoster(id: number) { - const res = await request.get('/shop/dealer/poster/' + id); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 获取当前海报配置 - */ -export async function getCurrentPosterConfig() { - const res = await request.get('/shop/dealer/poster/config'); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商海报设置 - */ -export async function addShopDealerPoster(data: ShopDealerPoster) { - const res = await request.post('/shop/dealer/poster', data); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商海报设置 - */ -export async function updateShopDealerPoster(data: ShopDealerPoster) { - const res = await request.put('/shop/dealer/poster', data); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 保存海报配置 - */ -export async function savePosterConfig(data: any) { - const res = await request.post('/shop/dealer/poster/config', data); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商海报设置 - */ -export async function removeShopDealerPoster(id: number) { - const res = await request.delete('/shop/dealer/poster/' + id); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商海报设置 - */ -export async function removeBatchShopDealerPoster(ids: (number | undefined)[]) { - const res = await request.delete('/shop/dealer/poster/batch', { data: ids }); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 生成海报 - */ -export async function generatePoster(userId: number, config?: any) { - const res = await request.post('/shop/dealer/poster/generate', { userId, config }); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 上传海报背景图片 - */ -export async function uploadPosterBackground(file: File) { - const formData = new FormData(); - formData.append('file', file); - - const res = await request.post('/shop/dealer/poster/upload/background', formData, { - headers: { - 'Content-Type': 'multipart/form-data' - } - }); - - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopDealerPoster/model/index.ts b/app/api/shop/shopDealerPoster/model/index.ts deleted file mode 100644 index 06a85f9..0000000 --- a/app/api/shop/shopDealerPoster/model/index.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商海报设置 - */ -export interface ShopDealerPoster { - // 主键ID - id?: number; - // 海报名称 - name?: string; - // 背景图片URL - backgroundImage?: string; - // 海报配置(JSON格式) - config?: string; - // 是否启用 - enabled?: boolean; - // 是否默认 - isDefault?: boolean; - // 排序 - sort?: number; - // 商城ID - tenantId?: number; - // 创建时间 - createTime?: string | Date; - // 修改时间 - updateTime?: string | Date; -} - -/** - * 海报配置 - */ -export interface PosterConfig { - // 背景图片 - backgroundImage?: string; - // 海报尺寸 - width?: number; - height?: number; - // 是否显示头像 - showAvatar?: boolean; - // 头像URL - avatarUrl?: string; - // 头像宽度 - avatarWidth?: number; - // 头像形状 circle|square - avatarShape?: string; - // 是否显示昵称 - showNickname?: boolean; - // 昵称 - nickname?: string; - // 昵称字体大小 - nicknameFontSize?: number; - // 昵称颜色 - nicknameColor?: string; - // 是否显示二维码 - showQrcode?: boolean; - // 二维码URL - qrcodeUrl?: string; - // 二维码宽度 - qrcodeWidth?: number; - // 元素位置配置 - elements?: { - avatar?: { x: number; y: number }; - nickname?: { x: number; y: number }; - qrcode?: { x: number; y: number }; - [key: string]: { x: number; y: number } | undefined; - }; -} - -/** - * 分销商海报设置搜索条件 - */ -export interface ShopDealerPosterParam extends PageParam { - id?: number; - name?: string; - enabled?: boolean; - keywords?: string; -} - -/** - * 海报生成参数 - */ -export interface PosterGenerateParam { - // 用户ID - userId: number; - // 海报配置 - config?: PosterConfig; - // 用户信息 - userInfo?: { - nickname?: string; - avatar?: string; - qrcode?: string; - }; -} diff --git a/app/api/shop/shopDealerRecord/index.ts b/app/api/shop/shopDealerRecord/index.ts deleted file mode 100644 index 3982d39..0000000 --- a/app/api/shop/shopDealerRecord/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerRecord, ShopDealerRecordParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询客户跟进情况 - */ -export async function pageShopDealerRecord(params: ShopDealerRecordParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-dealer-record/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询客户跟进情况列表 - */ -export async function listShopDealerRecord(params?: ShopDealerRecordParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-dealer-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 addShopDealerRecord(data: ShopDealerRecord) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-dealer-record', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改客户跟进情况 - */ -export async function updateShopDealerRecord(data: ShopDealerRecord) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-dealer-record', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除客户跟进情况 - */ -export async function removeShopDealerRecord(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-dealer-record/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除客户跟进情况 - */ -export async function removeBatchShopDealerRecord(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-dealer-record/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询客户跟进情况 - */ -export async function getShopDealerRecord(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-dealer-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/app/api/shop/shopDealerRecord/model/index.ts b/app/api/shop/shopDealerRecord/model/index.ts deleted file mode 100644 index 17de905..0000000 --- a/app/api/shop/shopDealerRecord/model/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 客户跟进情况 - */ -export interface ShopDealerRecord { - // ID - id?: number; - // 上级id, 0是顶级 - parentId?: number; - // 客户ID - dealerId?: number; - // 内容 - content?: string; - // 用户ID - userId?: number; - // 排序(数字越小越靠前) - sortNumber?: number; - // 备注 - description?: string; - // 状态, 0待处理, 1已完成 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 客户跟进情况搜索条件 - */ -export interface ShopDealerRecordParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopDealerReferee/index.ts b/app/api/shop/shopDealerReferee/index.ts deleted file mode 100644 index 351ed7b..0000000 --- a/app/api/shop/shopDealerReferee/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerReferee, ShopDealerRefereeParam } from './model'; - -/** - * 分页查询分销商推荐关系表 - */ -export async function pageShopDealerReferee(params: ShopDealerRefereeParam) { - const res = await request.get>>( - '/shop/shop-dealer-referee/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商推荐关系表列表 - */ -export async function listShopDealerReferee(params?: ShopDealerRefereeParam) { - const res = await request.get>( - '/shop/shop-dealer-referee', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商推荐关系表 - */ -export async function addShopDealerReferee(data: ShopDealerReferee) { - const res = await request.post>( - '/shop/shop-dealer-referee', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商推荐关系表 - */ -export async function updateShopDealerReferee(data: ShopDealerReferee) { - const res = await request.put>( - '/shop/shop-dealer-referee', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商推荐关系表 - */ -export async function removeShopDealerReferee(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-referee/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商推荐关系表 - */ -export async function removeBatchShopDealerReferee(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-referee/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商推荐关系表 - */ -export async function getShopDealerReferee(id: number) { - const res = await request.get>( - '/shop/shop-dealer-referee/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopDealerReferee/model/index.ts b/app/api/shop/shopDealerReferee/model/index.ts deleted file mode 100644 index 7a9f615..0000000 --- a/app/api/shop/shopDealerReferee/model/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商推荐关系表 - */ -export interface ShopDealerReferee { - // 主键ID - id?: number; - // 分销商用户ID - dealerId?: number; - // 分销商名称 - dealerName?: string; - // 分销商头像 - dealerAvatar?: string; - // 分销商手机号 - dealerPhone?: string; - // 用户id(被推荐人) - userId?: number; - // 昵称 - nickname?: string; - // 头像 - avatar?: string; - // 别名 - alias?: string; - // 手机号 - phone?: string; - // 推荐关系层级(1,2,3) - level?: number; - // 商城ID - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 分销商推荐关系表搜索条件 - */ -export interface ShopDealerRefereeParam extends PageParam { - id?: number; - dealerId?: number; - userId?: number; - level?: number; - startTime?: string; - endTime?: string; - keywords?: string; -} \ No newline at end of file diff --git a/app/api/shop/shopDealerSetting/index.ts b/app/api/shop/shopDealerSetting/index.ts deleted file mode 100644 index da0075b..0000000 --- a/app/api/shop/shopDealerSetting/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerSetting, ShopDealerSettingParam } from './model'; - -/** - * 分页查询分销商设置表 - */ -export async function pageShopDealerSetting(params: ShopDealerSettingParam) { - const res = await request.get>>( - '/shop/shop-dealer-setting/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商设置表列表 - */ -export async function listShopDealerSetting(params?: ShopDealerSettingParam) { - const res = await request.get>( - '/shop/shop-dealer-setting', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商设置表 - */ -export async function addShopDealerSetting(data: ShopDealerSetting) { - const res = await request.post>( - '/shop/shop-dealer-setting', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商设置表 - */ -export async function updateShopDealerSetting(data: ShopDealerSetting) { - const res = await request.put>( - '/shop/shop-dealer-setting', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商设置表 - */ -export async function removeShopDealerSetting(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-setting/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商设置表 - */ -export async function removeBatchShopDealerSetting(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-setting/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商设置表 - */ -export async function getShopDealerSetting(id: number) { - const res = await request.get>( - '/shop/shop-dealer-setting/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopDealerSetting/model/index.ts b/app/api/shop/shopDealerSetting/model/index.ts deleted file mode 100644 index ad503ad..0000000 --- a/app/api/shop/shopDealerSetting/model/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商设置表 - */ -export interface ShopDealerSetting { - // 设置项标示 - key?: string; - // 设置项描述 - describe?: string; - // 设置内容(json格式) - values?: string; - // 商城ID - tenantId?: number; - // 更新时间 - updateTime?: number; -} - -/** - * 分销商设置表搜索条件 - */ -export interface ShopDealerSettingParam extends PageParam { - key?: number; - keywords?: string; -} diff --git a/app/api/shop/shopDealerUser/index.ts b/app/api/shop/shopDealerUser/index.ts deleted file mode 100644 index 384aeda..0000000 --- a/app/api/shop/shopDealerUser/index.ts +++ /dev/null @@ -1,140 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerUser, ShopDealerUserParam } from './model'; - -/** - * 分页查询分销商用户记录表 - */ -export async function pageShopDealerUser(params: ShopDealerUserParam) { - const res = await request.get>>( - '/shop/shop-dealer-user/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商用户记录表列表 - */ -export async function listShopDealerUser(params?: ShopDealerUserParam) { - const res = await request.get>( - '/shop/shop-dealer-user', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商用户记录表 - */ -export async function addShopDealerUser(data: ShopDealerUser) { - const res = await request.post>( - '/shop/shop-dealer-user', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商用户记录表 - */ -export async function updateShopDealerUser(data: ShopDealerUser) { - const res = await request.put>( - '/shop/shop-dealer-user', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商用户记录表 - */ -export async function removeShopDealerUser(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-user/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商用户记录表 - */ -export async function removeBatchShopDealerUser(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-user/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商用户记录表 - */ -export async function getShopDealerUser(id: number) { - const res = await request.get>( - '/shop/shop-dealer-user/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 导入分销商用户 - */ -export async function importShopDealerUsers(file: File) { - const formData = new FormData(); - formData.append('file', file); - const res = await request.post>( - '/shop/shop-dealer-user/import', - formData, - { - headers: { - 'Content-Type': 'multipart/form-data' - } - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 导出分销商用户 - */ -export async function exportShopDealerUsers(params?: ShopDealerUserParam) { - const res = await request.get( - '/shop/shop-dealer-user/export', - { - params, - responseType: 'blob' - } - ); - return res.data; -} diff --git a/app/api/shop/shopDealerUser/model/index.ts b/app/api/shop/shopDealerUser/model/index.ts deleted file mode 100644 index 0518d09..0000000 --- a/app/api/shop/shopDealerUser/model/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商用户记录表 - */ -export interface ShopDealerUser { - // 主键ID - id?: number; - // 自增ID - userId?: number; - // 姓名 - realName?: string; - // 手机号 - mobile?: string; - // 支付密码 - payPassword?: string; - // 当前可提现佣金 - money?: string; - // 已冻结佣金 - freezeMoney?: string; - // 累积提现佣金 - totalMoney?: string; - // 佣金比例 - rate?: string; - // 单价 - price?: string; - // 推荐人用户ID - refereeId?: number; - // 成员数量(一级) - firstNum?: number; - // 成员数量(二级) - secondNum?: number; - // 成员数量(三级) - thirdNum?: number; - // 专属二维码 - qrcode?: string; - // 是否删除 - isDelete?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string | Date; - // 修改时间 - updateTime?: string | Date; - // 扩展字段,用于编辑表单 - shopDealerUserId?: number; - shopDealerUserName?: string; - status?: number; - description?: string; - sortNumber?: number; - image?: string; -} - -/** - * 分销商用户记录表搜索条件 - */ -export interface ShopDealerUserParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopDealerWithdraw/index.ts b/app/api/shop/shopDealerWithdraw/index.ts deleted file mode 100644 index 305e1ad..0000000 --- a/app/api/shop/shopDealerWithdraw/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopDealerWithdraw, ShopDealerWithdrawParam } from './model'; - -/** - * 分页查询分销商提现明细表 - */ -export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) { - const res = await request.get>>( - '/shop/shop-dealer-withdraw/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询分销商提现明细表列表 - */ -export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) { - const res = await request.get>( - '/shop/shop-dealer-withdraw', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加分销商提现明细表 - */ -export async function addShopDealerWithdraw(data: ShopDealerWithdraw) { - const res = await request.post>( - '/shop/shop-dealer-withdraw', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改分销商提现明细表 - */ -export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) { - const res = await request.put>( - '/shop/shop-dealer-withdraw', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除分销商提现明细表 - */ -export async function removeShopDealerWithdraw(id?: number) { - const res = await request.delete>( - '/shop/shop-dealer-withdraw/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除分销商提现明细表 - */ -export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-dealer-withdraw/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询分销商提现明细表 - */ -export async function getShopDealerWithdraw(id: number) { - const res = await request.get>( - '/shop/shop-dealer-withdraw/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopDealerWithdraw/model/index.ts b/app/api/shop/shopDealerWithdraw/model/index.ts deleted file mode 100644 index 05278b4..0000000 --- a/app/api/shop/shopDealerWithdraw/model/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 分销商提现明细表 - */ -export interface ShopDealerWithdraw { - // 主键ID - id?: number; - // 分销商用户ID - userId?: number; - // 真实姓名 - realName?: string; - // 昵称 - nickname?: string; - // 手机号码 - phone?: string; - // 头像 - avatar?: string; - // 提现金额 - money?: string; - // 打款方式 (10微信 20支付宝 30银行卡) - payType?: number; - // 支付宝姓名 - alipayName?: string; - // 支付宝账号 - alipayAccount?: string; - // 微信姓名 - wechatAccount?: string; - // 微信账号 - wechatName?: string; - // 开户行名称 - bankName?: string; - // 银行开户名 - bankAccount?: string; - // 银行卡号 - bankCard?: string; - // 申请状态 (10待审核 20审核通过 30驳回 40已打款) - applyStatus?: number; - // 审核时间 - auditTime?: any; - // 驳回原因 - rejectReason?: string; - // 来源客户端(APP、H5、小程序等) - platform?: string; - // 上传支付凭证 - image?: string; - // 备注 - description?: string; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 分销商提现明细表搜索条件 - */ -export interface ShopDealerWithdrawParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopExpress/index.ts b/app/api/shop/shopExpress/index.ts deleted file mode 100644 index 6a154a7..0000000 --- a/app/api/shop/shopExpress/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopExpress, ShopExpressParam } from './model'; - -/** - * 分页查询物流公司 - */ -export async function pageShopExpress(params: ShopExpressParam) { - const res = await request.get>>( - '/shop/shop-express/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询物流公司列表 - */ -export async function listShopExpress(params?: ShopExpressParam) { - const res = await request.get>( - '/shop/shop-express', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加物流公司 - */ -export async function addShopExpress(data: ShopExpress) { - const res = await request.post>( - '/shop/shop-express', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改物流公司 - */ -export async function updateShopExpress(data: ShopExpress) { - const res = await request.put>( - '/shop/shop-express', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除物流公司 - */ -export async function removeShopExpress(id?: number) { - const res = await request.delete>( - '/shop/shop-express/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除物流公司 - */ -export async function removeBatchShopExpress(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-express/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询物流公司 - */ -export async function getShopExpress(id: number) { - const res = await request.get>( - '/shop/shop-express/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopExpress/model/index.ts b/app/api/shop/shopExpress/model/index.ts deleted file mode 100644 index 24d2098..0000000 --- a/app/api/shop/shopExpress/model/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 物流公司 - */ -export interface ShopExpress { - // 物流公司ID - expressId?: number; - // 物流公司名称 - expressName?: string; - // 物流公司编码 (微信) - wxCode?: string; - // 物流公司编码 (快递100) - kuaidi100Code?: string; - // 物流公司编码 (快递鸟) - kdniaoCode?: string; - // 排序号 - sortNumber?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 物流公司搜索条件 - */ -export interface ShopExpressParam extends PageParam { - expressId?: number; - keywords?: string; -} diff --git a/app/api/shop/shopExpressTemplate/index.ts b/app/api/shop/shopExpressTemplate/index.ts deleted file mode 100644 index 51e351f..0000000 --- a/app/api/shop/shopExpressTemplate/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopExpressTemplate, ShopExpressTemplateParam } from './model'; - -/** - * 分页查询运费模板 - */ -export async function pageShopExpressTemplate(params: ShopExpressTemplateParam) { - const res = await request.get>>( - '/shop/shop-express-template/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询运费模板列表 - */ -export async function listShopExpressTemplate(params?: ShopExpressTemplateParam) { - const res = await request.get>( - '/shop/shop-express-template', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加运费模板 - */ -export async function addShopExpressTemplate(data: ShopExpressTemplate) { - const res = await request.post>( - '/shop/shop-express-template', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改运费模板 - */ -export async function updateShopExpressTemplate(data: ShopExpressTemplate) { - const res = await request.put>( - '/shop/shop-express-template', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除运费模板 - */ -export async function removeShopExpressTemplate(id?: number) { - const res = await request.delete>( - '/shop/shop-express-template/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除运费模板 - */ -export async function removeBatchShopExpressTemplate(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-express-template/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询运费模板 - */ -export async function getShopExpressTemplate(id: number) { - const res = await request.get>( - '/shop/shop-express-template/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopExpressTemplate/model/index.ts b/app/api/shop/shopExpressTemplate/model/index.ts deleted file mode 100644 index 5f73a47..0000000 --- a/app/api/shop/shopExpressTemplate/model/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 运费模板 - */ -export interface ShopExpressTemplate { - // - id?: number; - // - type?: string; - // - title?: string; - // 收件价格 - firstAmount?: string; - // 续件价格 - extraAmount?: string; - // 状态, 0已发布, 1待审核 2已驳回 3违规内容 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; - // 排序 - sortNumber?: number; - // 备注 - description?: string; - // 首件数量/重量 - firstNum?: string; - // 续件数量/重量 - extraNum?: string; -} - -/** - * 运费模板搜索条件 - */ -export interface ShopExpressTemplateParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopExpressTemplateDetail/index.ts b/app/api/shop/shopExpressTemplateDetail/index.ts deleted file mode 100644 index 4f44544..0000000 --- a/app/api/shop/shopExpressTemplateDetail/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopExpressTemplateDetail, ShopExpressTemplateDetailParam } from './model'; - -/** - * 分页查询运费模板 - */ -export async function pageShopExpressTemplateDetail(params: ShopExpressTemplateDetailParam) { - const res = await request.get>>( - '/shop/shop-express-template-detail/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询运费模板列表 - */ -export async function listShopExpressTemplateDetail(params?: ShopExpressTemplateDetailParam) { - const res = await request.get>( - '/shop/shop-express-template-detail', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加运费模板 - */ -export async function addShopExpressTemplateDetail(data: ShopExpressTemplateDetail) { - const res = await request.post>( - '/shop/shop-express-template-detail', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改运费模板 - */ -export async function updateShopExpressTemplateDetail(data: ShopExpressTemplateDetail) { - const res = await request.put>( - '/shop/shop-express-template-detail', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除运费模板 - */ -export async function removeShopExpressTemplateDetail(id?: number) { - const res = await request.delete>( - '/shop/shop-express-template-detail/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除运费模板 - */ -export async function removeBatchShopExpressTemplateDetail(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-express-template-detail/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询运费模板 - */ -export async function getShopExpressTemplateDetail(id: number) { - const res = await request.get>( - '/shop/shop-express-template-detail/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopExpressTemplateDetail/model/index.ts b/app/api/shop/shopExpressTemplateDetail/model/index.ts deleted file mode 100644 index 5b74dcc..0000000 --- a/app/api/shop/shopExpressTemplateDetail/model/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 运费模板 - */ -export interface ShopExpressTemplateDetail { - // - id?: number; - // - templateId?: number; - // 0按件 - type?: string; - // - provinceId?: number; - // - cityId?: number; - // 首件数量/重量 - firstNum?: string; - // 收件价格 - firstAmount?: string; - // 续件价格 - extraAmount?: string; - // 续件数量/重量 - extraNum?: string; - // 状态, 0已发布, 1待审核 2已驳回 3违规内容 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; - // - sortNumber?: number; -} - -/** - * 运费模板搜索条件 - */ -export interface ShopExpressTemplateDetailParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopGift/index.ts b/app/api/shop/shopGift/index.ts deleted file mode 100644 index bb798c9..0000000 --- a/app/api/shop/shopGift/index.ts +++ /dev/null @@ -1,130 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api/index'; -import type { ShopGift, ShopGiftParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询礼品卡 - */ -export async function pageShopGift(params: ShopGiftParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-gift/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询礼品卡列表 - */ -export async function listShopGift(params?: ShopGiftParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-gift', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加礼品卡 - */ -export async function addShopGift(data: ShopGift) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-gift', - data - ); - if (res.data.code === 0) { - return res.data.message; - } -} - -/** - * 生成礼品卡 - */ -export async function makeShopGift(data: ShopGift) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-gift/make', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改礼品卡 - */ -export async function updateShopGift(data: ShopGift) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-gift', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除礼品卡 - */ -export async function removeShopGift(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-gift/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除礼品卡 - */ -export async function removeBatchShopGift(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-gift/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询礼品卡 - */ -export async function getShopGift(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-gift/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -export async function exportShopGift(ids?: number[]) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-gift/export', - ids - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGift/model/index.ts b/app/api/shop/shopGift/model/index.ts deleted file mode 100644 index ce57130..0000000 --- a/app/api/shop/shopGift/model/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { PageParam } from '@/api/index'; - -/** - * 礼品卡 - */ -export interface ShopGift { - // - id?: number; - // - name?: string; - // 秘钥 - code?: string; - // 商品ID - goodsId?: number; - // 商品名称 - goodsName?: string; - // 面值 - faceValue?: string; - // 领取时间 - takeTime?: string; - // 核销时间 - verificationTime?: string; - // 操作人ID - operatorUserId?: number; - // 操作人 - operatorUserName?: string; - // 操作备注 - operatorRemarks?: string; - // 使用地址 - useLocation?: string; - // 是否展示 - isShow?: boolean; - // 状态, 0上架 1待上架 2待审核 3审核不通过 - status?: number; - // 备注 - description?: string; - // 排序号 - sortNumber?: number; - // 用户ID - userId?: number; - // 昵称 - nickName?: string; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; - num?: number; -} - -/** - * 礼品卡搜索条件 - */ -export interface ShopGiftParam extends PageParam { - id?: number; - code?: string; - keywords?: string; -} diff --git a/app/api/shop/shopGoods/index.ts b/app/api/shop/shopGoods/index.ts deleted file mode 100644 index 580cd69..0000000 --- a/app/api/shop/shopGoods/index.ts +++ /dev/null @@ -1,116 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopGoods, ShopGoodsParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询商品 - */ -export async function pageShopGoods(params: ShopGoodsParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-goods/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品列表 - */ -export async function listShopGoods(params?: ShopGoodsParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品 - */ -export async function addShopGoods(data: ShopGoods) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-goods', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品 - */ -export async function updateShopGoods(data: ShopGoods) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-goods', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品 - */ -export async function removeShopGoods(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品 - */ -export async function removeBatchShopGoods(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品 - */ -export async function getShopGoods(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -export async function getCount(params: ShopGoodsParam) { - const res = await request.get(MODULES_API_URL + '/shop/shop-goods/data', { - params - }); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGoods/model/index.ts b/app/api/shop/shopGoods/model/index.ts deleted file mode 100644 index 5a377e6..0000000 --- a/app/api/shop/shopGoods/model/index.ts +++ /dev/null @@ -1,148 +0,0 @@ -import type { PageParam } from '@/api'; -import { ShopGoodsSpec } from '@/api/shop/shopGoodsSpec/model'; -import { ShopGoodsSku } from '@/api/shop/shopGoodsSku/model'; -import { ShopGoodsRoleCommission } from '@/api/shop/shopGoodsRoleCommission/model'; - -export interface GoodsCount { - totalNum: number; - totalNum2: number; - totalNum3: number; - totalNum4: number; -} -/** - * 商品记录表 - */ -export interface ShopGoods { - // 自增ID - goodsId?: number; - // 类型 1实物商品 2虚拟商品 - type?: number; - // 商品编码 - code?: string; - // 商品名称 - name?: string; - // 商品标题 - goodsName?: string; - // 商品封面图 - image?: string; - video?: string; - // 商品详情 - content?: string; - canExpress?: number; - // 商品分类 - category?: string; - // 商品分类ID - categoryId?: number; - parentName?: string; - categoryName?: string; - // 一级分类 - categoryParent?: string; - // 二级分类 - categoryChildren?: string; - // 商品规格 0单规格 1多规格 - specs?: number; - commissionRole?: number; - // 货架 - position?: string; - // 进货价 - buyingPrice?: string; - // 商品价格 - price?: string; - originPrice?: string; - // 销售价格 - salePrice?: string; - chainStorePrice?: string; - chainStoreRate?: string; - memberStoreRate?: string; - memberMarketRate?: string; - memberStoreCommission?: string; - supplierCommission?: string; - coopCommission?: string; - memberStorePrice?: string; - memberMarketPrice?: string; - // 经销商价格 - dealerPrice?: string; - // 有赠品 - buyingGift?: boolean; - // 有赠品 - priceGift?: boolean; - // 有赠品 - dealerGift?: boolean; - buyingGiftNum?: number; - priceGiftNum?: number; - priceGiftName?: string; - dealerGiftNum?: number; - // 库存计算方式(10下单减库存 20付款减库存) - deductStockType?: number; - // 封面图 - files?: string; - // 销量 - sales?: number; - isNew?: number; - // 库存 - stock?: number; - // 商品重量 - goodsWeight?: number; - // 消费赚取积分 - gainIntegral?: number; - // 推荐 - recommend?: number; - // 商户ID - merchantId?: number; - // 商户名称 - merchantName?: string; - supplierMerchantId?: number; - supplierName?: string; - // 状态(0:未上架,1:上架) - isShow?: number; - // 状态, 0上架 1待上架 2待审核 3审核不通过 - status?: number; - // 备注 - description?: string; - // 排序号 - sortNumber?: number; - // 用户ID - userId?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; - // 显示规格名 - specName?: string; - // 商品规格 - goodsSpecs?: ShopGoodsSpec[]; - goodsRoleCommission?: ShopGoodsRoleCommission[]; - // 商品sku列表 - goodsSkus?: ShopGoodsSku[]; - // 单位名称 - unitName?: string; - expressTemplateId?: number; - canUseDate?: string; - ensureTag?: string; - expiredDay?: number; -} - -export interface BathSet { - price?: number; - salePrice?: number; - stock?: number; - skuNo?: string; -} - -/** - * 商品记录表搜索条件 - */ -export interface ShopGoodsParam extends PageParam { - parentId?: number; - categoryId?: number; - goodsId?: number; - status?: number; - goodsName?: string; - isShow?: number; - stock?: number; - keywords?: string; -} diff --git a/app/api/shop/shopGoodsCategory/index.ts b/app/api/shop/shopGoodsCategory/index.ts deleted file mode 100644 index dbdf598..0000000 --- a/app/api/shop/shopGoodsCategory/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopGoodsCategory, ShopGoodsCategoryParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询商品分类 - */ -export async function pageShopGoodsCategory(params: ShopGoodsCategoryParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-goods-category/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品分类列表 - */ -export async function listShopGoodsCategory(params?: ShopGoodsCategoryParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-category', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品分类 - */ -export async function addShopGoodsCategory(data: ShopGoodsCategory) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-goods-category', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品分类 - */ -export async function updateShopGoodsCategory(data: ShopGoodsCategory) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-goods-category', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品分类 - */ -export async function removeShopGoodsCategory(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-category/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品分类 - */ -export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-category/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品分类 - */ -export async function getShopGoodsCategory(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-category/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGoodsCategory/model/index.ts b/app/api/shop/shopGoodsCategory/model/index.ts deleted file mode 100644 index 241fc6f..0000000 --- a/app/api/shop/shopGoodsCategory/model/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商品分类 - */ -export interface ShopGoodsCategory { - // 商品分类ID - categoryId?: number; - // 分类标识 - categoryCode?: string; - // 分类名称 - title?: string; - // 类型 0商城分类 1外卖分类 - type?: number; - // 分类图片 - image?: string; - // 上级分类ID - parentId?: number; - // 路由/链接地址 - path?: string; - // 组件路径 - component?: string; - // 绑定的页面 - pageId?: number; - // 用户ID - userId?: number; - // 商品数量 - count?: number; - // 排序(数字越小越靠前) - sortNumber?: number; - // 备注 - description?: string; - // 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单) - hide?: number; - // 是否推荐 - recommend?: number; - // 是否显示在首页 - showIndex?: number; - // 商铺ID - merchantId?: number; - // 状态, 0正常, 1禁用 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 注册时间 - createTime?: string; - // 修改时间 - updateTime?: string; - // 子菜单 - children?: ShopGoodsCategory[]; - key?: number; - value?: number; - label?: string; -} - -/** - * 商品分类搜索条件 - */ -export interface ShopGoodsCategoryParam extends PageParam { - categoryId?: number; - keywords?: string; -} diff --git a/app/api/shop/shopGoodsCoupon/index.ts b/app/api/shop/shopGoodsCoupon/index.ts deleted file mode 100644 index 7eed12d..0000000 --- a/app/api/shop/shopGoodsCoupon/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api/index'; -import type { ShopGoodsCoupon, ShopGoodsCouponParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询商品优惠券表 - */ -export async function pageShopGoodsCoupon(params: ShopGoodsCouponParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-goods-coupon/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品优惠券表列表 - */ -export async function listShopGoodsCoupon(params?: ShopGoodsCouponParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-coupon', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品优惠券表 - */ -export async function addShopGoodsCoupon(data: ShopGoodsCoupon) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-goods-coupon', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品优惠券表 - */ -export async function updateShopGoodsCoupon(data: ShopGoodsCoupon) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-goods-coupon', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品优惠券表 - */ -export async function removeShopGoodsCoupon(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-coupon/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品优惠券表 - */ -export async function removeBatchShopGoodsCoupon(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-coupon/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品优惠券表 - */ -export async function getShopGoodsCoupon(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-coupon/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGoodsCoupon/model/index.ts b/app/api/shop/shopGoodsCoupon/model/index.ts deleted file mode 100644 index 42eafb9..0000000 --- a/app/api/shop/shopGoodsCoupon/model/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { PageParam } from '@/api/index'; - -/** - * 商品优惠券表 - */ -export interface ShopGoodsCoupon { - // - id?: number; - // 商品id - goodsId?: number; - // 优惠劵id - issueCouponId?: number; - // 排序(数字越小越靠前) - sortNumber?: number; - // 状态, 0正常, 1冻结 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 用户ID - userId?: number; - // 租户id - tenantId?: number; - // 注册时间 - createTime?: string; - // 修改时间 - updateTime?: string; - // 备注 - description?: string; -} - -/** - * 商品优惠券表搜索条件 - */ -export interface ShopGoodsCouponParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopGoodsRoleCommission/index.ts b/app/api/shop/shopGoodsRoleCommission/index.ts deleted file mode 100644 index ac3c88b..0000000 --- a/app/api/shop/shopGoodsRoleCommission/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import { MODULES_API_URL } from '@/config/setting'; -import { ShopGoodsRoleCommission, ShopGoodsRoleCommissionParam } from '@/api/shop/shopGoodsRoleCommission/model'; - -/** - * 分页查询商品绑定角色的分润金额 - */ -export async function pageShopGoodsRoleCommission(params: ShopGoodsRoleCommissionParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-goods-role-commission/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品绑定角色的分润金额列表 - */ -export async function listShopGoodsRoleCommission(params?: ShopGoodsRoleCommissionParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-role-commission', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品绑定角色的分润金额 - */ -export async function addShopGoodsRoleCommission(data: ShopGoodsRoleCommission) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-goods-role-commission', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品绑定角色的分润金额 - */ -export async function updateShopGoodsRoleCommission(data: ShopGoodsRoleCommission) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-goods-role-commission', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品绑定角色的分润金额 - */ -export async function removeShopGoodsRoleCommission(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-role-commission/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品绑定角色的分润金额 - */ -export async function removeBatchShopGoodsRoleCommission(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-role-commission/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品绑定角色的分润金额 - */ -export async function getShopGoodsRoleCommission(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-role-commission/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGoodsRoleCommission/model/index.ts b/app/api/shop/shopGoodsRoleCommission/model/index.ts deleted file mode 100644 index 44336ff..0000000 --- a/app/api/shop/shopGoodsRoleCommission/model/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商品绑定角色的分润金额 - */ -export interface ShopGoodsRoleCommission { - // - id?: number; - // - roleId?: number; - // - goodsId?: number; - // - sku?: string; - // - amount?: string; - // 状态, 0正常, 1异常 - status?: number; - // 备注 - description?: string; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // - sortNumber?: number; -} - -/** - * 商品绑定角色的分润金额搜索条件 - */ -export interface ShopGoodsRoleCommissionParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopGoodsSku/index.ts b/app/api/shop/shopGoodsSku/index.ts deleted file mode 100644 index 2d0d926..0000000 --- a/app/api/shop/shopGoodsSku/index.ts +++ /dev/null @@ -1,118 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import { MODULES_API_URL } from '@/config/setting'; -import { ShopGoodsSpec } from '@/api/shop/shopGoodsSpec/model'; -import { ShopGoodsSku, ShopGoodsSkuParam } from '@/api/shop/shopGoodsSku/model'; - -export async function generateGoodsSku(data: ShopGoodsSpec) { - const res = await request.post>( - MODULES_API_URL + '/shop/goods-sku/generateGoodsSku', - data - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 分页查询商品sku列表 - */ -export async function pageShopGoodsSku(params: ShopGoodsSkuParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-goods-sku/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品sku列表列表 - */ -export async function listShopGoodsSku(params?: ShopGoodsSkuParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-sku', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品sku列表 - */ -export async function addShopGoodsSku(data: ShopGoodsSku) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-goods-sku', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品sku列表 - */ -export async function updateShopGoodsSku(data: ShopGoodsSku) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-goods-sku', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品sku列表 - */ -export async function removeShopGoodsSku(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-sku/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品sku列表 - */ -export async function removeBatchShopGoodsSku(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-goods-sku/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品sku列表 - */ -export async function getShopGoodsSku(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-goods-sku/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGoodsSku/model/index.ts b/app/api/shop/shopGoodsSku/model/index.ts deleted file mode 100644 index ab72a8f..0000000 --- a/app/api/shop/shopGoodsSku/model/index.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商品sku列表 - */ -export interface ShopGoodsSku { - // 主键ID - id?: number; - // 商品ID - goodsId?: number; - // 商品属性索引值 (attr_value|attr_value[|....]) - sku?: string; - // 商品图片 - image?: string; - // 商品价格 - price?: string; - // 市场价格 - salePrice?: string; - // 成本价 - cost?: string; - // 库存 - stock?: number; - // sku编码 - skuNo?: string; - // 商品条码 - barCode?: string; - // 重量 - weight?: string; - // 体积 - volume?: string; - // 唯一值 - uuid?: string; - // 状态, 0正常, 1异常 - status?: number; - // 备注 - description?: string; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - images?: string; -} - -/** - * 商品sku列表搜索条件 - */ -export interface ShopGoodsSkuParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopGoodsSpec/index.ts b/app/api/shop/shopGoodsSpec/index.ts deleted file mode 100644 index d7d9ef9..0000000 --- a/app/api/shop/shopGoodsSpec/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopGoodsSpec, ShopGoodsSpecParam } from './model'; - -/** - * 分页查询商品多规格 - */ -export async function pageShopGoodsSpec(params: ShopGoodsSpecParam) { - const res = await request.get>>( - '/shop/shop-goods-spec/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品多规格列表 - */ -export async function listShopGoodsSpec(params?: ShopGoodsSpecParam) { - const res = await request.get>( - '/shop/shop-goods-spec', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品多规格 - */ -export async function addShopGoodsSpec(data: ShopGoodsSpec) { - const res = await request.post>( - '/shop/shop-goods-spec', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品多规格 - */ -export async function updateShopGoodsSpec(data: ShopGoodsSpec) { - const res = await request.put>( - '/shop/shop-goods-spec', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品多规格 - */ -export async function removeShopGoodsSpec(id?: number) { - const res = await request.delete>( - '/shop/shop-goods-spec/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品多规格 - */ -export async function removeBatchShopGoodsSpec(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-goods-spec/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品多规格 - */ -export async function getShopGoodsSpec(id: number) { - const res = await request.get>( - '/shop/shop-goods-spec/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopGoodsSpec/model/index.ts b/app/api/shop/shopGoodsSpec/model/index.ts deleted file mode 100644 index 44a6644..0000000 --- a/app/api/shop/shopGoodsSpec/model/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商品多规格 - */ -export interface ShopGoodsSpec { - // 主键 - id?: number; - // 商品ID - goodsId?: number; - // 规格ID - specId?: number; - // 规格名称 - specName?: string; - // 规格值 - specValue?: string; - // 活动类型 0=商品,1=秒杀,2=砍价,3=拼团 - type?: string; - // 租户id - tenantId?: number; -} - -/** - * 商品多规格搜索条件 - */ -export interface ShopGoodsSpecParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopMerchant/index.ts b/app/api/shop/shopMerchant/index.ts deleted file mode 100644 index 895bc80..0000000 --- a/app/api/shop/shopMerchant/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api/index'; -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/app/api/shop/shopMerchant/model/index.ts b/app/api/shop/shopMerchant/model/index.ts deleted file mode 100644 index c525379..0000000 --- a/app/api/shop/shopMerchant/model/index.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { PageParam } from '@/api/index'; - -/** - * 商户 - */ -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; - // 是否可以快递 - canExpress?: string; - // 是否推荐 - recommend?: number; - // 是否营业 - isOn?: number; - // - startTime?: string; - // - endTime?: string; - // 是否需要审核 - goodsReview?: number; - // 管理入口 - adminUrl?: string; - // 备注 - description?: 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/app/api/shop/shopMerchantAccount/index.ts b/app/api/shop/shopMerchantAccount/index.ts deleted file mode 100644 index eff50c4..0000000 --- a/app/api/shop/shopMerchantAccount/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -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/app/api/shop/shopMerchantAccount/model/index.ts b/app/api/shop/shopMerchantAccount/model/index.ts deleted file mode 100644 index f375406..0000000 --- a/app/api/shop/shopMerchantAccount/model/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -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; - // 备注 - description?: string; - // 状态 - status?: number; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; -} - -/** - * 商户账号搜索条件 - */ -export interface ShopMerchantAccountParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopMerchantApply/index.ts b/app/api/shop/shopMerchantApply/index.ts deleted file mode 100644 index 29e9c69..0000000 --- a/app/api/shop/shopMerchantApply/index.ts +++ /dev/null @@ -1,131 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopMerchantApply, ShopMerchantApplyParam } from './model'; -import { SERVER_API_URL } from '@/config/setting'; - -/** - * 分页查询商户入驻申请 - */ -export async function pageShopMerchantApply(params: ShopMerchantApplyParam) { - const res = await request.get>>( - SERVER_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>( - SERVER_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>( - '/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>( - SERVER_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 checkShopMerchantApply(data: ShopMerchantApply) { - const res = await request.put>( - SERVER_API_URL + '/shop/shop-merchant-apply/check', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -// 根据入驻申请创建商户 -export async function createMerchantFromApply(applyId: number) { - const res = await request.post>( - SERVER_API_URL + '/shop/shop-merchant-apply/create-merchant/' + applyId - ); - 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>( - SERVER_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>( - SERVER_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>( - SERVER_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/app/api/shop/shopMerchantApply/model/index.ts b/app/api/shop/shopMerchantApply/model/index.ts deleted file mode 100644 index 54a7832..0000000 --- a/app/api/shop/shopMerchantApply/model/index.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商户入驻申请 - */ -export interface ShopMerchantApply { - // ID - applyId?: number; - // 类型 - type?: number; - // 证件类型 - idType?: string; - // 主体名称 - merchantName?: string; - // 证件号码 - merchantCode?: string; - // 商户图标 - image?: string; - // 商户手机号 - phone?: string; - // 商户姓名 - realName?: string; - // 身份证号码 - idCard?: string; - // 店铺类型 - shopType?: string; - // 商户分类 - category?: string; - // 手续费 - commission?: string; - // 关键字 - keywords?: string; - // 营业执照 - yyzz?: string; - // 身份证正面 - sfz1?: string; - // 身份证反面 - sfz2?: string; - // 资质图片 - files?: string; - // 所有人 - userId?: number; - // 是否自营 - ownStore?: number; - // 是否推荐 - recommend?: number; - // 是否需要审核 - goodsReview?: number; - // 工作负责人 - name2?: string; - // 驳回原因 - reason?: string; - // 备注 - description?: string; - // 状态 - status?: number; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; -} - -/** - * 商户入驻申请搜索条件 - */ -export interface ShopMerchantApplyParam extends PageParam { - applyId?: number; - userId?: number; - shopType?: string; - phone?: string; - keywords?: string; -} \ No newline at end of file diff --git a/app/api/shop/shopMerchantCount/index.ts b/app/api/shop/shopMerchantCount/index.ts deleted file mode 100644 index c859b1b..0000000 --- a/app/api/shop/shopMerchantCount/index.ts +++ /dev/null @@ -1,108 +0,0 @@ -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/app/api/shop/shopMerchantCount/model/index.ts b/app/api/shop/shopMerchantCount/model/index.ts deleted file mode 100644 index 09a9f00..0000000 --- a/app/api/shop/shopMerchantCount/model/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 门店销售统计表 - */ -export interface ShopMerchantCount { - // ID - id?: number; - // 店铺名称 - name?: string; - // 店铺说明 - description?: string; - // 状态 - status?: number; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; -} - -/** - * 门店销售统计表搜索条件 - */ -export interface ShopMerchantCountParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopMerchantType/index.ts b/app/api/shop/shopMerchantType/index.ts deleted file mode 100644 index 8d7a054..0000000 --- a/app/api/shop/shopMerchantType/index.ts +++ /dev/null @@ -1,108 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopMerchantType, ShopMerchantTypeParam } from './model'; -import { SERVER_API_URL } from '@/config/setting'; - -/** - * 分页查询商户类型 - */ -export async function pageShopMerchantType(params: ShopMerchantTypeParam) { - const res = await request.get>>( - SERVER_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>( - SERVER_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>( - SERVER_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>( - SERVER_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>( - SERVER_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>( - SERVER_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>( - SERVER_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/app/api/shop/shopMerchantType/model/index.ts b/app/api/shop/shopMerchantType/model/index.ts deleted file mode 100644 index 242193f..0000000 --- a/app/api/shop/shopMerchantType/model/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商户类型 - */ -export interface ShopMerchantType { - // ID - id?: number; - // 店铺类型 - name?: string; - // 店铺入驻条件 - description?: string; - // 状态 - status?: number; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - value?: string; -} - -/** - * 商户类型搜索条件 - */ -export interface ShopMerchantTypeParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopOrder/index.ts b/app/api/shop/shopOrder/index.ts deleted file mode 100644 index d0107ac..0000000 --- a/app/api/shop/shopOrder/index.ts +++ /dev/null @@ -1,137 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopOrder, ShopOrderParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询订单 - */ -export async function pageShopOrder(params: ShopOrderParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-order/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询订单列表 - */ -export async function listShopOrder(params?: ShopOrderParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-order', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加订单 - */ -export async function addShopOrder(data: ShopOrder) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-order', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改订单 - */ -export async function updateShopOrder(data: ShopOrder) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-order', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除订单 - */ -export async function removeShopOrder(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-order/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除订单 - */ -export async function removeBatchShopOrder(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-order/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询订单 - */ -export async function getShopOrder(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-order/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改订单 - */ -export async function repairOrder(data: ShopOrder) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-order/repair', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 统计订单总金额(只统计有效订单) - */ -export async function shopOrderTotal(params?: ShopOrderParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-order/total', - { - params - } - ); - if (res.data.code === 0) { - // 即使没有数据也返回空数组,而不是抛出错误 - return res.data.data || []; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopOrder/model/index.ts b/app/api/shop/shopOrder/model/index.ts deleted file mode 100644 index 3ce0f0f..0000000 --- a/app/api/shop/shopOrder/model/index.ts +++ /dev/null @@ -1,183 +0,0 @@ -import type { PageParam } from '@/api'; -import {OrderGoods} from "@/api/system/orderGoods/model"; - -/** - * 订单 - */ -export interface ShopOrder { - // 订单号 - orderId?: number; - // 订单编号 - orderNo?: string; - // 订单类型,0商城订单 1预定订单/外卖 2会员卡 - type?: number; - // 快递/自提 - deliveryType?: number; - // 下单渠道,0小程序预定 1俱乐部训练场 3活动订场 - channel?: number; - // 微信支付订单号 - transactionId?: string; - // 微信退款订单号 - refundOrder?: string; - // 商户ID - merchantId?: number; - // 商户名称 - merchantName?: string; - // 商户编号 - merchantCode?: string; - // 使用的优惠券id - couponId?: number; - // 使用的会员卡id - cardId?: string; - // 关联管理员id - adminId?: number; - // 核销管理员id - confirmId?: number; - // IC卡号 - icCard?: string; - // 头像 - avatar?: string; - // 真实姓名 - realName?: string; - // 手机号码 - phone?: string; - // 手机号码(脱敏) - mobile?: string; - // 收货地址 - address?: string; - // - addressLat?: string; - // - addressLng?: string; - // 自提店铺id - selfTakeMerchantId?: number; - // 自提店铺 - selfTakeMerchantName?: string; - // 配送开始时间 - sendStartTime?: string; - // 配送结束时间 - sendEndTime?: string; - // 发货店铺id - expressMerchantId?: number; - // 发货店铺 - expressMerchantName?: string; - // 订单总额 - totalPrice?: string; - // 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格 - reducePrice?: string; - // 实际付款 - payPrice?: string; - // 用于统计 - price?: string; - // 价钱,用于积分赠送 - money?: string; - // 退款金额 - refundMoney?: string; - // 教练价格 - coachPrice?: string; - // 购买数量 - totalNum?: number; - // 教练id - coachId?: number; - // 支付的用户id - payUserId?: number; - // 0余额支付, 1微信支付,102微信Native,2会员卡支付,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡,18代付 - payType?: number; - // 代付支付方式,0余额支付, 1微信支付,102微信Native,2会员卡支付,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡,18代付 - friendPayType?: number; - // 0未付款,1已付款 - payStatus?: number; - // 0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款 - orderStatus?: number; - // 发货状态(10未发货 20已发货 30部分发货) - deliveryStatus?: number; - // 发货时间 - deliveryTime?: string; - // 发货备注/无需发货备注 - deliveryNote?: string; - // 快递公司id - expressId?: number; - // 快递公司名称 - expressName?: string; - // 发货人 - sendName?: string; - // 发货人联系方式 - sendPhone?: string; - // 发货地址 - sendAddress?: string; - // 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡 - couponType?: number; - // 优惠说明 - couponDesc?: string; - // 二维码地址,保存订单号,支付成功后才生成 - qrcode?: string; - // vip月卡年卡、ic月卡年卡回退次数 - returnNum?: number; - // vip充值回退金额 - returnMoney?: string; - // 预约详情开始时间数组 - startTime?: string; - // 是否已开具发票:0未开发票,1已开发票,2不能开具发票 - isInvoice?: number; - // 发票流水号 - invoiceNo?: string; - // 支付时间 - payTime?: string; - // 退款时间 - refundTime?: string; - // 申请退款时间 - refundApplyTime?: string; - // 过期时间 - expirationTime?: string; - // 对账情况:0=未对账;1=已对账;3=已对账,金额对不上;4=未查询到该订单 - checkBill?: number; - // 订单是否已结算(0未结算 1已结算) - isSettled?: number; - // 系统版本号 0当前版本 value=其他版本 - version?: number; - // 买家备注 - buyerRemarks: undefined, - // 商家备注 - merchantRemarks: undefined, - // 用户id - userId?: number; - // 备注 - description?: string; - // 排序号 - sortNumber?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 修改时间 - updateTime?: string; - // 创建时间 - createTime?: string; - // 自提码 - selfTakeCode?: string; - // 是否已收到赠品 - hasTakeGift?: string; - // 发货信息 - shopOrderDelivery?: any; - // 订单商品 - orderGoods?: OrderGoods[]; -} - -/** - * 订单搜索条件 - */ -export interface ShopOrderParam extends PageParam { - orderId?: number; - orderNo?: string; - type?: number; - phone?: string; - userId?: number; - payUserId?: number; - nickname?: string; - payStatus?: number; - orderStatus?: number; - payType?: number; - isInvoice?: boolean; - statusFilter?: number; - keywords?: string; -} diff --git a/app/api/shop/shopOrderGoods/index.ts b/app/api/shop/shopOrderGoods/index.ts deleted file mode 100644 index 2973147..0000000 --- a/app/api/shop/shopOrderGoods/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopOrderGoods, ShopOrderGoodsParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询商品信息 - */ -export async function pageShopOrderGoods(params: ShopOrderGoodsParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-order-goods/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询商品信息列表 - */ -export async function listShopOrderGoods(params?: ShopOrderGoodsParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-order-goods', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加商品信息 - */ -export async function addShopOrderGoods(data: ShopOrderGoods) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-order-goods', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改商品信息 - */ -export async function updateShopOrderGoods(data: ShopOrderGoods) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-order-goods', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除商品信息 - */ -export async function removeShopOrderGoods(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-order-goods/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除商品信息 - */ -export async function removeBatchShopOrderGoods(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-order-goods/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询商品信息 - */ -export async function getShopOrderGoods(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-order-goods/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopOrderGoods/model/index.ts b/app/api/shop/shopOrderGoods/model/index.ts deleted file mode 100644 index 9471c59..0000000 --- a/app/api/shop/shopOrderGoods/model/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 商品信息 - */ -export interface ShopOrderGoods { - // 自增ID - id?: number; - // 关联订单表id - orderId?: number; - // 订单标识 - orderCode?: string; - // 关联商户ID - merchantId?: number; - // 商户名称 - merchantName?: string; - // 商品封面图 - image?: string; - // 关联商品id - goodsId?: number; - // 商品名称 - goodsName?: string; - // 商品规格 - spec?: string; - // - skuId?: number; - // 单价 - price?: string; - // 购买数量 - totalNum?: number; - // 0 未付款 1已付款,2无需付款或占用状态 - payStatus?: number; - // 0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款 - orderStatus?: number; - // 是否免费:0收费、1免费 - isFree?: string; - // 系统版本 0当前版本 其他版本 - version?: number; - // 预约时间段 - timePeriod?: string; - // 预定日期 - dateTime?: string; - // 开场时间 - startTime?: string; - // 结束时间 - endTime?: string; - // 毫秒时间戳 - timeFlag?: string; - // 过期时间 - expirationTime?: string; - // 备注 - description?: string; - // 用户id - userId?: number; - // 租户id - tenantId?: number; - // 更新时间 - updateTime?: string; - // 创建时间 - createTime?: string; -} - -/** - * 商品信息搜索条件 - */ -export interface ShopOrderGoodsParam extends PageParam { - id?: number; - orderId?: number; - orderNo?: string; - keywords?: string; -} diff --git a/app/api/shop/shopSpec/index.ts b/app/api/shop/shopSpec/index.ts deleted file mode 100644 index 5056ba8..0000000 --- a/app/api/shop/shopSpec/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import { MODULES_API_URL } from '@/config/setting'; -import { ShopSpec, ShopSpecParam } from '@/api/shop/shopSpec/model'; - -/** - * 分页查询规格 - */ -export async function pageShopSpec(params: ShopSpecParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-spec/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询规格列表 - */ -export async function listShopSpec(params?: ShopSpecParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-spec', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加规格 - */ -export async function addShopSpec(data: ShopSpec) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-spec', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改规格 - */ -export async function updateShopSpec(data: ShopSpec) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-spec', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除规格 - */ -export async function removeShopSpec(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-spec/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除规格 - */ -export async function removeBatchShopSpec(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-spec/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询规格 - */ -export async function getShopSpec(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-spec/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopSpec/model/index.ts b/app/api/shop/shopSpec/model/index.ts deleted file mode 100644 index b06a783..0000000 --- a/app/api/shop/shopSpec/model/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 规格 - */ -export interface ShopSpec { - // 规格ID - specId?: number; - // 规格名称 - specName?: string; - // 规格值 - specValue?: string; - // 商户ID - merchantId?: number; - // 创建用户 - userId?: number; - // 更新者 - updater?: number; - // 备注 - description?: string; - // 状态, 0正常, 1待修,2异常已修,3异常未修 - status?: number; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - value?: string; -} - -/** - * 规格搜索条件 - */ -export interface ShopSpecParam extends PageParam { - specId?: number; - keywords?: string; -} diff --git a/app/api/shop/shopSpecValue/index.ts b/app/api/shop/shopSpecValue/index.ts deleted file mode 100644 index 2eab7d1..0000000 --- a/app/api/shop/shopSpecValue/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopSpecValue, ShopSpecValueParam } from './model'; - -/** - * 分页查询规格值 - */ -export async function pageShopSpecValue(params: ShopSpecValueParam) { - const res = await request.get>>( - '/shop/shop-spec-value/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询规格值列表 - */ -export async function listShopSpecValue(params?: ShopSpecValueParam) { - const res = await request.get>( - '/shop/shop-spec-value', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加规格值 - */ -export async function addShopSpecValue(data: ShopSpecValue) { - const res = await request.post>( - '/shop/shop-spec-value', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改规格值 - */ -export async function updateShopSpecValue(data: ShopSpecValue) { - const res = await request.put>( - '/shop/shop-spec-value', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除规格值 - */ -export async function removeShopSpecValue(id?: number) { - const res = await request.delete>( - '/shop/shop-spec-value/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除规格值 - */ -export async function removeBatchShopSpecValue(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-spec-value/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询规格值 - */ -export async function getShopSpecValue(id: number) { - const res = await request.get>( - '/shop/shop-spec-value/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopSpecValue/model/index.ts b/app/api/shop/shopSpecValue/model/index.ts deleted file mode 100644 index aba8178..0000000 --- a/app/api/shop/shopSpecValue/model/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 规格值 - */ -export interface ShopSpecValue { - // 规格值ID - specValueId?: number; - // 规格组ID - specId?: number; - // 规格值 - specValue?: string; - // 备注 - description?: string; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; -} - -/** - * 规格值搜索条件 - */ -export interface ShopSpecValueParam extends PageParam { - specValueId?: number; - keywords?: string; -} diff --git a/app/api/shop/shopUser/index.ts b/app/api/shop/shopUser/index.ts deleted file mode 100644 index c88282f..0000000 --- a/app/api/shop/shopUser/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopUser, ShopUserParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询用户记录表 - */ -export async function pageShopUser(params: ShopUserParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-user/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询用户记录表列表 - */ -export async function listShopUser(params?: ShopUserParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-user', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加用户记录表 - */ -export async function addShopUser(data: ShopUser) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-user', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改用户记录表 - */ -export async function updateShopUser(data: ShopUser) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-user', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除用户记录表 - */ -export async function removeShopUser(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-user/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除用户记录表 - */ -export async function removeBatchShopUser(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-user/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询用户记录表 - */ -export async function getShopUser(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-user/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopUser/model/index.ts b/app/api/shop/shopUser/model/index.ts deleted file mode 100644 index 3552547..0000000 --- a/app/api/shop/shopUser/model/index.ts +++ /dev/null @@ -1,163 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 用户记录表 - */ -export interface ShopUser { - // 用户id - userId?: number; - // 用户类型 0个人用户 1企业用户 2其他 - type?: number; - // 账号 - username?: string; - // 密码 - password?: string; - // 昵称 - nickname?: string; - // 手机号 - phone?: string; - // 性别 1男 2女 - sex?: number; - // 职务 - position?: string; - // 注册来源客户端 (APP、H5、MP-WEIXIN等) - platform?: string; - // 邮箱 - email?: string; - // 邮箱是否验证, 0否, 1是 - emailVerified?: number; - // 别名 - alias?: string; - // 真实姓名 - realName?: string; - // 证件号码 - idCard?: string; - // 出生日期 - birthday?: string; - // 所在国家 - country?: string; - // 所在省份 - province?: string; - // 所在城市 - city?: string; - // 所在辖区 - region?: string; - // 街道地址 - address?: string; - // 经度 - longitude?: string; - // 纬度 - latitude?: string; - // 用户可用余额 - balance?: string; - // 已提现金额 - cashedMoney?: string; - // 用户可用积分 - points?: number; - // 用户总支付的金额 - payMoney?: string; - // 实际消费的金额(不含退款) - expendMoney?: string; - // 密码 - payPassword?: string; - // 会员等级ID - gradeId?: number; - // 行业分类 - category?: string; - // 个人简介 - introduction?: string; - // 机构id - organizationId?: number; - // 会员分组ID - groupId?: number; - // 头像 - avatar?: string; - // 背景图 - bgImage?: string; - // 用户编码 - userCode?: string; - // 是否已实名认证 - certification?: number; - // 年龄 - age?: number; - // 是否线下会员 - offline?: string; - // 关注数 - followers?: number; - // 粉丝数 - fans?: number; - // 点赞数 - likes?: number; - // 评论数 - commentNumbers?: number; - // 是否推荐 - recommend?: number; - // 微信openid - openid?: string; - // 微信公众号openid - officeOpenid?: string; - // 微信unionID - unionid?: string; - // 客户端ID - clientId?: string; - // 不允许办卡 - notAllowVip?: string; - // 是否管理员 - isAdmin?: string; - // 是否企业管理员 - isOrganizationAdmin?: string; - // 累计登录次数 - loginNum?: number; - // 企业ID - companyId?: number; - // 可管理的场馆 - merchants?: string; - // 商户ID - merchantId?: number; - // 商户名称 - merchantName?: string; - // 商户头像 - merchantAvatar?: string; - // 第三方系统的用户ID - uid?: number; - // 专家角色 - expertType?: string; - // 过期时间 - expireTime?: number; - // 最后结算时间 - settlementTime?: string; - // 资质 - aptitude?: string; - // 行业类型(父级) - industryParent?: string; - // 行业类型(子级) - industryChild?: string; - // 头衔 - title?: string; - // 安装的产品ID - templateId?: number; - // 插件安装状态(仅对超超管判断) 0未安装 1已安装 - installed?: number; - // 特长 - speciality?: string; - // 备注 - description?: string; - // 状态, 0在线, 1离线 - status?: number; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 注册时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 用户记录表搜索条件 - */ -export interface ShopUserParam extends PageParam { - userId?: number; - keywords?: string; -} diff --git a/app/api/shop/shopUserAddress/index.ts b/app/api/shop/shopUserAddress/index.ts deleted file mode 100644 index 2a0d186..0000000 --- a/app/api/shop/shopUserAddress/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopUserAddress, ShopUserAddressParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询收货地址 - */ -export async function pageShopUserAddress(params: ShopUserAddressParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/shop-user-address/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询收货地址列表 - */ -export async function listShopUserAddress(params?: ShopUserAddressParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-user-address', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加收货地址 - */ -export async function addShopUserAddress(data: ShopUserAddress) { - const res = await request.post>( - MODULES_API_URL + '/shop/shop-user-address', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改收货地址 - */ -export async function updateShopUserAddress(data: ShopUserAddress) { - const res = await request.put>( - MODULES_API_URL + '/shop/shop-user-address', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除收货地址 - */ -export async function removeShopUserAddress(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-user-address/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除收货地址 - */ -export async function removeBatchShopUserAddress(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-user-address/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询收货地址 - */ -export async function getShopUserAddress(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/shop-user-address/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopUserAddress/model/index.ts b/app/api/shop/shopUserAddress/model/index.ts deleted file mode 100644 index 4f45d0f..0000000 --- a/app/api/shop/shopUserAddress/model/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 收货地址 - */ -export interface ShopUserAddress { - // 主键ID - id?: number; - // 姓名 - name?: string; - // 手机号码 - phone?: string; - // 所在国家 - country?: string; - // 所在省份 - province?: string; - // 所在城市 - city?: string; - // 所在辖区 - region?: string; - // 收货地址 - address?: string; - // 收货地址 - fullAddress?: string; - // - lat?: string; - // - lng?: string; - // 1先生 2女士 - gender?: number; - // 家、公司、学校 - type?: string; - // 默认收货地址 - isDefault?: string; - // 用户ID - userId?: number; - // 租户id - tenantId?: number; - // 注册时间 - createTime?: string; -} - -/** - * 收货地址搜索条件 - */ -export interface ShopUserAddressParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopUserCoupon/index.ts b/app/api/shop/shopUserCoupon/index.ts deleted file mode 100644 index 936d260..0000000 --- a/app/api/shop/shopUserCoupon/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopUserCoupon, ShopUserCouponParam } from './model'; - -/** - * 分页查询用户优惠券 - */ -export async function pageShopUserCoupon(params: ShopUserCouponParam) { - const res = await request.get>>( - '/shop/shop-user-coupon/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询用户优惠券列表 - */ -export async function listShopUserCoupon(params?: ShopUserCouponParam) { - const res = await request.get>( - '/shop/shop-user-coupon', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加用户优惠券 - */ -export async function addShopUserCoupon(data: ShopUserCoupon) { - const res = await request.post>( - '/shop/shop-user-coupon', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改用户优惠券 - */ -export async function updateShopUserCoupon(data: ShopUserCoupon) { - const res = await request.put>( - '/shop/shop-user-coupon', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除用户优惠券 - */ -export async function removeShopUserCoupon(id?: number) { - const res = await request.delete>( - '/shop/shop-user-coupon/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除用户优惠券 - */ -export async function removeBatchShopUserCoupon(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-user-coupon/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询用户优惠券 - */ -export async function getShopUserCoupon(id: number) { - const res = await request.get>( - '/shop/shop-user-coupon/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopUserCoupon/model/index.ts b/app/api/shop/shopUserCoupon/model/index.ts deleted file mode 100644 index e9fec3a..0000000 --- a/app/api/shop/shopUserCoupon/model/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 用户优惠券 - */ -export interface ShopUserCoupon { - // id - id?: string; - // 优惠券模板ID - couponId?: number; - // 用户ID - userId?: number; - // 优惠券名称 - name?: string; - // 优惠券描述 - description?: string; - // 优惠券类型(10满减券 20折扣券 30免费劵) - type?: number; - // 满减券-减免金额 - reducePrice?: string; - // 折扣券-折扣率(0-100) - discount?: number; - // 最低消费金额 - minPrice?: string; - // 适用范围(10全部商品 20指定商品 30指定分类) - applyRange?: number; - // 适用范围配置(json格式) - applyRangeConfig?: string; - // 有效期开始时间 - startTime?: string; - // 有效期结束时间 - endTime?: string; - // 使用状态(0未使用 1已使用 2已过期) - status?: number; - // 使用时间 - useTime?: string; - // 使用订单ID - orderId?: string; - // 使用订单号 - orderNo?: string; - // 获取方式(10主动领取 20系统发放 30活动赠送) - obtainType?: number; - // 获取来源描述 - obtainSource?: string; - // 是否删除, 0否, 1是 - deleted?: string; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 用户优惠券搜索条件 - */ -export interface ShopUserCouponParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/shopUserReferee/index.ts b/app/api/shop/shopUserReferee/index.ts deleted file mode 100644 index 4f4c663..0000000 --- a/app/api/shop/shopUserReferee/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { ShopUserReferee, ShopUserRefereeParam } from './model'; - -/** - * 分页查询用户推荐关系表 - */ -export async function pageShopUserReferee(params: ShopUserRefereeParam) { - const res = await request.get>>( - '/shop/shop-user-referee/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询用户推荐关系表列表 - */ -export async function listShopUserReferee(params?: ShopUserRefereeParam) { - const res = await request.get>( - '/shop/shop-user-referee', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加用户推荐关系表 - */ -export async function addShopUserReferee(data: ShopUserReferee) { - const res = await request.post>( - '/shop/shop-user-referee', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改用户推荐关系表 - */ -export async function updateShopUserReferee(data: ShopUserReferee) { - const res = await request.put>( - '/shop/shop-user-referee', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除用户推荐关系表 - */ -export async function removeShopUserReferee(id?: number) { - const res = await request.delete>( - '/shop/shop-user-referee/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除用户推荐关系表 - */ -export async function removeBatchShopUserReferee(data: (number | undefined)[]) { - const res = await request.delete>( - '/shop/shop-user-referee/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询用户推荐关系表 - */ -export async function getShopUserReferee(id: number) { - const res = await request.get>( - '/shop/shop-user-referee/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/shopUserReferee/model/index.ts b/app/api/shop/shopUserReferee/model/index.ts deleted file mode 100644 index f04cf95..0000000 --- a/app/api/shop/shopUserReferee/model/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 用户推荐关系表 - */ -export interface ShopUserReferee { - // 主键ID - id?: number; - // 推荐人ID - dealerId?: number; - // 用户id(被推荐人) - userId?: number; - // 推荐关系层级(1,2,3) - level?: number; - // 备注 - description?: string; - // 是否删除, 0否, 1是 - deleted?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; - // 修改时间 - updateTime?: string; -} - -/** - * 用户推荐关系表搜索条件 - */ -export interface ShopUserRefereeParam extends PageParam { - id?: number; - keywords?: string; -} diff --git a/app/api/shop/spec/index.ts b/app/api/shop/spec/index.ts deleted file mode 100644 index 402722a..0000000 --- a/app/api/shop/spec/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { Spec, SpecParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询规格 - */ -export async function pageSpec(params: SpecParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/spec/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询规格列表 - */ -export async function listSpec(params?: SpecParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/spec', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加规格 - */ -export async function addSpec(data: Spec) { - const res = await request.post>( - MODULES_API_URL + '/shop/spec', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改规格 - */ -export async function updateSpec(data: Spec) { - const res = await request.put>( - MODULES_API_URL + '/shop/spec', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除规格 - */ -export async function removeSpec(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/spec/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除规格 - */ -export async function removeBatchSpec(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/spec/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询规格 - */ -export async function getSpec(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/spec/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/spec/model/index.ts b/app/api/shop/spec/model/index.ts deleted file mode 100644 index a331618..0000000 --- a/app/api/shop/spec/model/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 规格 - */ -export interface Spec { - // 规格ID - specId?: number; - // 规格名称 - specName?: string; - // 规格值 - specValue?: string; - // 创建用户 - userId?: number; - // 更新者 - updater?: number; - // 商户ID - merchantId?: number; - // 备注 - description?: string; - // 状态, 0正常, 1待修,2异常已修,3异常未修 - status?: number; - // 排序号 - sortNumber?: number; - // 租户id - tenantId?: number; - // 创建时间 - createTime?: string; -} - -/** - * 规格搜索条件 - */ -export interface SpecParam extends PageParam { - specId?: number; - keywords?: string; -} diff --git a/app/api/shop/specValue/index.ts b/app/api/shop/specValue/index.ts deleted file mode 100644 index 2e2e398..0000000 --- a/app/api/shop/specValue/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import request from '@/utils/request'; -import type { ApiResult, PageResult } from '@/api'; -import type { SpecValue, SpecValueParam } from './model'; -import { MODULES_API_URL } from '@/config/setting'; - -/** - * 分页查询规格值 - */ -export async function pageSpecValue(params: SpecValueParam) { - const res = await request.get>>( - MODULES_API_URL + '/shop/spec-value/page', - { - params - } - ); - if (res.data.code === 0) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 查询规格值列表 - */ -export async function listSpecValue(params?: SpecValueParam) { - const res = await request.get>( - MODULES_API_URL + '/shop/spec-value', - { - params - } - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 添加规格值 - */ -export async function addSpecValue(data: SpecValue) { - const res = await request.post>( - MODULES_API_URL + '/shop/spec-value', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 修改规格值 - */ -export async function updateSpecValue(data: SpecValue) { - const res = await request.put>( - MODULES_API_URL + '/shop/spec-value', - data - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 删除规格值 - */ -export async function removeSpecValue(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/spec-value/' + id - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 批量删除规格值 - */ -export async function removeBatchSpecValue(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/spec-value/batch', - { - data - } - ); - if (res.data.code === 0) { - return res.data.message; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 根据id查询规格值 - */ -export async function getSpecValue(id: number) { - const res = await request.get>( - MODULES_API_URL + '/shop/spec-value/' + id - ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; - } - return Promise.reject(new Error(res.data.message)); -} diff --git a/app/api/shop/specValue/model/index.ts b/app/api/shop/specValue/model/index.ts deleted file mode 100644 index 8e23e40..0000000 --- a/app/api/shop/specValue/model/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { PageParam } from '@/api'; - -/** - * 规格值 - */ -export interface SpecValue { - // 规格值ID - specValueId?: number; - // 规格值 - specValue?: string; - // 规格组ID - specId?: number; - // 描述 - description?: string; - // 排序 - sortNumber?: number; - // 租户id - tenantId?: number; - key?: string; - label?: string; - value?: string; - detail?: [string]; - specName?: string; -} - -/** - * 规格值搜索条件 - */ -export interface SpecValueParam extends PageParam { - specValueId?: number; - specId?: number; - keywords?: string; -} diff --git a/app/api/ticket/index.ts b/app/api/ticket/index.ts deleted file mode 100644 index 9adbf2d..0000000 --- a/app/api/ticket/index.ts +++ /dev/null @@ -1,68 +0,0 @@ -import request from '@/utils/request' -import type { - Ticket, - TicketReply, - TicketSubmitForm, - TicketReplyForm, - TicketAssignForm, - TicketStatusForm, - TicketQueryParams, - TicketStats, -} from './model' - -const BASE = '/api/app/ticket' - -/** 分页查询工单列表(客户端:查自己的) */ -export async function getMyTickets(params: TicketQueryParams) { - return request.get<{ list: Ticket[]; count: number }>(`${BASE}/my`, { params }) -} - -/** 分页查询工单列表(技术人员:查所有/分配给自己的) */ -export async function getAllTickets(params: TicketQueryParams) { - return request.get<{ list: Ticket[]; count: number }>(`${BASE}/list`, { params }) -} - -/** 获取工单详情 */ -export async function getTicketDetail(ticketId: number) { - return request.get(`${BASE}/${ticketId}`) -} - -/** 提交工单 */ -export async function submitTicket(data: TicketSubmitForm) { - return request.post(`${BASE}/submit`, data) -} - -/** 更新工单状态(技术人员) */ -export async function updateTicketStatus(data: TicketStatusForm) { - return request.put(`${BASE}/status`, data) -} - -/** 分配工单给技术人员(管理员) */ -export async function assignTicket(data: TicketAssignForm) { - return request.put(`${BASE}/assign`, data) -} - -/** 关闭工单(提交人) */ -export async function closeTicket(ticketId: number) { - return request.put(`${BASE}/${ticketId}/close`) -} - -/** 获取工单回复列表 */ -export async function getTicketReplies(ticketId: number) { - return request.get(`${BASE}/${ticketId}/replies`) -} - -/** 提交工单回复 */ -export async function replyTicket(data: TicketReplyForm) { - return request.post(`${BASE}/reply`, data) -} - -/** 获取工单统计 */ -export async function getTicketStats(params?: { productId?: number }) { - return request.get(`${BASE}/stats`, { params }) -} - -/** 获取技术人员列表(用于分配) */ -export async function getTechStaffList() { - return request.get<{ userId: number; nickname: string; avatar: string }[]>(`${BASE}/staff-list`) -} diff --git a/app/api/ticket/model/index.ts b/app/api/ticket/model/index.ts deleted file mode 100644 index ccad663..0000000 --- a/app/api/ticket/model/index.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** 工单优先级 */ -export type TicketPriority = 'low' | 'normal' | 'high' | 'urgent' - -/** 工单状态 */ -export type TicketStatus = 'pending' | 'assigned' | 'processing' | 'resolved' | 'closed' | 'rejected' - -/** 工单分类 */ -export type TicketCategory = 'bug' | 'feature' | 'consultation' | 'complaint' | 'other' - -/** 工单列表项 */ -export interface Ticket { - ticketId: number - ticketNo: string // 工单编号 TK-202403xxxxxx - title: string - content: string - productId: number // 关联应用ID - productName?: string // 应用名称(前端展示用) - category: TicketCategory - priority: TicketPriority - status: TicketStatus - attachments?: string[] // 附件URL列表 - // 提交方 - submitUserId: number - submitUserName?: string - submitUserAvatar?: string - // 分配方 - assigneeId?: number - assigneeName?: string - assigneeAvatar?: string - // 时间 - createTime: string - updateTime: string - resolvedTime?: string - closedTime?: string - // 回复数 - replyCount: number - // 是否已读(对当前用户) - hasUnread?: boolean -} - -/** 工单回复 */ -export interface TicketReply { - replyId: number - ticketId: number - content: string - attachments?: string[] - userId: number - userName?: string - userAvatar?: string - isStaff: boolean // 是否是客服/技术人员 - createTime: string -} - -/** 提交工单表单 */ -export interface TicketSubmitForm { - title: string - content: string - productId: number - category: TicketCategory - priority: TicketPriority - attachments?: string[] -} - -/** 工单回复表单 */ -export interface TicketReplyForm { - ticketId: number - content: string - attachments?: string -} - -/** 分配工单表单 */ -export interface TicketAssignForm { - ticketId: number - assigneeId: number -} - -/** 更新状态表单 */ -export interface TicketStatusForm { - ticketId: number - status: TicketStatus - remark?: string -} - -/** 工单查询参数 */ -export interface TicketQueryParams { - productId?: number - status?: TicketStatus - category?: TicketCategory - priority?: TicketPriority - assigneeId?: number - keywords?: string - page?: number - limit?: number -} - -/** 工单统计 */ -export interface TicketStats { - total: number - pending: number - processing: number - resolved: number - closed: number -} diff --git a/app/components/SiteHeader.vue b/app/components/SiteHeader.vue index d62006f..5cd5361 100644 --- a/app/components/SiteHeader.vue +++ b/app/components/SiteHeader.vue @@ -6,8 +6,7 @@