diff --git a/acdr-admin/pom.xml b/acdr-admin/pom.xml
index 917fdbb5..6e1c1f8a 100644
--- a/acdr-admin/pom.xml
+++ b/acdr-admin/pom.xml
@@ -24,6 +24,7 @@
yskj-module-crm
+ yskj-module-acdr
${project.artifactId}
diff --git a/acdr-admin/yskj-module-acdr/pom.xml b/acdr-admin/yskj-module-acdr/pom.xml
new file mode 100644
index 00000000..e7266541
--- /dev/null
+++ b/acdr-admin/yskj-module-acdr/pom.xml
@@ -0,0 +1,26 @@
+
+
+
+ cn.yskj.dev
+ yskj
+ ${revision}
+
+ 4.0.0
+
+ yskj-module-acdr-api
+ yskj-module-acdr-biz
+
+ pom
+ yskj-module-acdr
+
+ ${project.artifactId}
+
+ ai 模块下,接入 LLM 大模型,支持聊天、绘图、音乐、写作、思维脑图等功能。
+ 目前已接入各种模型,不限于:
+ 国内:通义千问、文心一言、讯飞星火、智谱 GLM、DeepSeek
+ 国外:OpenAI、Ollama、Midjourney、StableDiffusion、Suno
+
+
+
diff --git a/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/pom.xml b/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/pom.xml
new file mode 100644
index 00000000..aa61a9e1
--- /dev/null
+++ b/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/pom.xml
@@ -0,0 +1,33 @@
+
+
+
+ cn.yskj.dev
+ yskj-module-acdr
+ ${revision}
+
+ 4.0.0
+ yskj-module-acdr-api
+ jar
+
+ ${project.artifactId}
+
+ ai 模块 API,暴露给其它模块调用
+
+
+
+
+ cn.yskj.dev
+ yskj-common
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
diff --git a/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/src/main/java/cn/yskj/linghe/module/acdr/enums/ErrorCodeConstants.java b/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/src/main/java/cn/yskj/linghe/module/acdr/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..d2d958d8
--- /dev/null
+++ b/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/src/main/java/cn/yskj/linghe/module/acdr/enums/ErrorCodeConstants.java
@@ -0,0 +1,60 @@
+package cn.yskj.linghe.module.acdr.enums;
+
+import cn.yskj.linghe.framework.common.exception.ErrorCode;
+
+/**
+ * Product 错误码枚举类
+ *
+ * product 系统,使用 1-008-000-000 段
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 商品分类相关 1-008-001-000 ============
+ ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(1_008_001_000, "商品分类不存在");
+ ErrorCode CATEGORY_PARENT_NOT_EXISTS = new ErrorCode(1_008_001_001, "父分类不存在");
+ ErrorCode CATEGORY_PARENT_NOT_FIRST_LEVEL = new ErrorCode(1_008_001_002, "父分类不能是二级分类");
+ ErrorCode CATEGORY_EXISTS_CHILDREN = new ErrorCode(1_008_001_003, "存在子分类,无法删除");
+ ErrorCode CATEGORY_DISABLED = new ErrorCode(1_008_001_004, "商品分类({})已禁用,无法使用");
+ ErrorCode CATEGORY_HAVE_BIND_SPU = new ErrorCode(1_008_001_005, "类别下存在商品,无法删除");
+
+ // ========== 商品品牌相关编号 1-008-002-000 ==========
+ ErrorCode BRAND_NOT_EXISTS = new ErrorCode(1_008_002_000, "品牌不存在");
+ ErrorCode BRAND_DISABLED = new ErrorCode(1_008_002_001, "品牌已禁用");
+ ErrorCode BRAND_NAME_EXISTS = new ErrorCode(1_008_002_002, "品牌名称已存在");
+
+ // ========== 商品属性项 1-008-003-000 ==========
+ ErrorCode PROPERTY_NOT_EXISTS = new ErrorCode(1_008_003_000, "属性项不存在");
+ ErrorCode PROPERTY_EXISTS = new ErrorCode(1_008_003_001, "属性项的名称已存在");
+ ErrorCode PROPERTY_DELETE_FAIL_VALUE_EXISTS = new ErrorCode(1_008_003_002, "属性项下存在属性值,无法删除");
+
+ // ========== 商品属性值 1-008-004-000 ==========
+ ErrorCode PROPERTY_VALUE_NOT_EXISTS = new ErrorCode(1_008_004_000, "属性值不存在");
+ ErrorCode PROPERTY_VALUE_EXISTS = new ErrorCode(1_008_004_001, "属性值的名称已存在");
+
+ // ========== 商品 SPU 1-008-005-000 ==========
+ ErrorCode SPU_NOT_EXISTS = new ErrorCode(1_008_005_000, "商品 SPU 不存在");
+ ErrorCode SPU_SAVE_FAIL_CATEGORY_LEVEL_ERROR = new ErrorCode(1_008_005_001, "商品分类不正确,原因:必须使用第二级的商品分类及以下");
+ ErrorCode SPU_SAVE_FAIL_COUPON_TEMPLATE_NOT_EXISTS = new ErrorCode(1_008_005_002, "商品 SPU 保存失败,原因:优惠卷不存在");
+ ErrorCode SPU_NOT_ENABLE = new ErrorCode(1_008_005_003, "商品 SPU【{}】不处于上架状态");
+ ErrorCode SPU_NOT_RECYCLE = new ErrorCode(1_008_005_004, "商品 SPU 不处于回收站状态");
+
+ // ========== 商品 SKU 1-008-006-000 ==========
+ ErrorCode SKU_NOT_EXISTS = new ErrorCode(1_008_006_000, "商品 SKU 不存在");
+ ErrorCode SKU_PROPERTIES_DUPLICATED = new ErrorCode(1_008_006_001, "商品 SKU 的属性组合存在重复");
+ ErrorCode SPU_ATTR_NUMBERS_MUST_BE_EQUALS = new ErrorCode(1_008_006_002, "一个 SPU 下的每个 SKU,其属性项必须一致");
+ ErrorCode SPU_SKU_NOT_DUPLICATE = new ErrorCode(1_008_006_003, "一个 SPU 下的每个 SKU,必须不重复");
+ ErrorCode SKU_STOCK_NOT_ENOUGH = new ErrorCode(1_008_006_004, "商品 SKU 库存不足");
+
+ // ========== 商品 评价 1-008-007-000 ==========
+ ErrorCode COMMENT_NOT_EXISTS = new ErrorCode(1_008_007_000, "商品评价不存在");
+ ErrorCode COMMENT_ORDER_EXISTS = new ErrorCode(1_008_007_001, "订单的商品评价已存在");
+
+ // ========== 商品 收藏 1-008-008-000 ==========
+ ErrorCode FAVORITE_EXISTS = new ErrorCode(1_008_008_000, "该商品已经被收藏");
+ ErrorCode FAVORITE_NOT_EXISTS = new ErrorCode(1_008_008_001, "商品收藏不存在");
+
+ ErrorCode CONFIG_NOT_EXISTS = new ErrorCode(1_008_009_000, "宠物配置文件不存在");
+
+ ErrorCode PET_EXPERT_CERTIFICATION_NOT_EXISTS = new ErrorCode(1_008_009_001, "宠托师审核不存在");
+
+}
diff --git a/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/src/main/java/cn/yskj/linghe/module/acdr/package-info.java b/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/src/main/java/cn/yskj/linghe/module/acdr/package-info.java
new file mode 100644
index 00000000..b9b0198c
--- /dev/null
+++ b/acdr-admin/yskj-module-acdr/yskj-module-acdr-api/src/main/java/cn/yskj/linghe/module/acdr/package-info.java
@@ -0,0 +1 @@
+package cn.yskj.linghe.module.acdr;
diff --git a/acdr-admin/yskj-module-acdr/yskj-module-acdr-biz/pom.xml b/acdr-admin/yskj-module-acdr/yskj-module-acdr-biz/pom.xml
new file mode 100644
index 00000000..290d3c35
--- /dev/null
+++ b/acdr-admin/yskj-module-acdr/yskj-module-acdr-biz/pom.xml
@@ -0,0 +1,74 @@
+
+
+
+ cn.yskj.dev
+ yskj-module-acdr
+ ${revision}
+
+ 4.0.0
+ yskj-module-acdr-biz
+
+ ${project.artifactId}
+
+ ai 模块下,接入 LLM 大模型,支持聊天、绘图、音乐、写作、思维脑图等功能。
+ 目前已接入各种模型,不限于:
+ 国内:通义千问、文心一言、讯飞星火、智谱 GLM、DeepSeek
+ 国外:OpenAI、Ollama、Midjourney、StableDiffusion、Suno
+
+
+
+
+ cn.yskj.dev
+ yskj-module-acdr-api
+ ${revision}
+
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-web
+
+
+
+ org.projectlombok
+ lombok
+ provided
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-security
+
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-mybatis
+
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-job
+
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-test
+
+
+
+ cn.yskj.dev
+ yskj-spring-boot-starter-excel
+
+
+
diff --git a/acdr-admin/yskj-module-bpm/yskj-module-bpm-api/src/main/java/cn/yskj/linghe/module/bpm/enums/ErrorCodeConstants.java b/acdr-admin/yskj-module-bpm/yskj-module-bpm-api/src/main/java/cn/yskj/linghe/module/bpm/enums/ErrorCodeConstants.java
index acd5dcd2..8d843488 100644
--- a/acdr-admin/yskj-module-bpm/yskj-module-bpm-api/src/main/java/cn/yskj/linghe/module/bpm/enums/ErrorCodeConstants.java
+++ b/acdr-admin/yskj-module-bpm/yskj-module-bpm-api/src/main/java/cn/yskj/linghe/module/bpm/enums/ErrorCodeConstants.java
@@ -75,4 +75,6 @@ public interface ErrorCodeConstants {
// ========== BPM 流程表达式 1-009-014-000 ==========
ErrorCode PROCESS_EXPRESSION_NOT_EXISTS = new ErrorCode(1_009_014_000, "流程表达式不存在");
+ ErrorCode CONFIG_NOT_EXISTS = new ErrorCode(1_009_015_000, "宠物配置文件不存在");
+
}
diff --git a/acdr-admin/yskj-module-mall/yskj-module-product-api/src/main/java/cn/yskj/linghe/module/product/enums/ErrorCodeConstants.java b/acdr-admin/yskj-module-mall/yskj-module-product-api/src/main/java/cn/yskj/linghe/module/product/enums/ErrorCodeConstants.java
index 4e7c3441..642861d2 100644
--- a/acdr-admin/yskj-module-mall/yskj-module-product-api/src/main/java/cn/yskj/linghe/module/product/enums/ErrorCodeConstants.java
+++ b/acdr-admin/yskj-module-mall/yskj-module-product-api/src/main/java/cn/yskj/linghe/module/product/enums/ErrorCodeConstants.java
@@ -1,5 +1,7 @@
package cn.yskj.linghe.module.product.enums;
+
+
import cn.yskj.linghe.framework.common.exception.ErrorCode;
/**
diff --git a/acdr-admin/yskj-server/pom.xml b/acdr-admin/yskj-server/pom.xml
index 0d3871c3..42d6be9b 100644
--- a/acdr-admin/yskj-server/pom.xml
+++ b/acdr-admin/yskj-server/pom.xml
@@ -121,6 +121,13 @@
yskj-spring-boot-starter-protection
+
+
+ cn.yskj.dev
+ yskj-module-acdr-biz
+ ${revision}
+
+
diff --git a/acdr-admin/yskj-server/src/main/resources/application.yaml b/acdr-admin/yskj-server/src/main/resources/application.yaml
index 01e156d2..6240e756 100644
--- a/acdr-admin/yskj-server/src/main/resources/application.yaml
+++ b/acdr-admin/yskj-server/src/main/resources/application.yaml
@@ -239,7 +239,7 @@ yskj:
db-schemas: ${spring.datasource.dynamic.datasource.master.name}
front-type: 10 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类
tenant: # 多租户相关配置项
- enable: true
+ enable: false
ignore-urls:
- /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号
- /admin-api/system/tenant/get-by-website # 基于域名获取租户,不许带租户编号
diff --git a/acdr-admin/yskj-ui/yskj-ui-admin-vue3/.env b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/.env
index 3ae9bc77..7c22ae50 100644
--- a/acdr-admin/yskj-ui/yskj-ui-admin-vue3/.env
+++ b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/.env
@@ -8,7 +8,7 @@ VITE_PORT=80
VITE_OPEN=true
# 租户开关
-VITE_APP_TENANT_ENABLE=true
+VITE_APP_TENANT_ENABLE=false
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=true
diff --git a/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/api/acdr/petexpertcertification/index.ts b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/api/acdr/petexpertcertification/index.ts
new file mode 100644
index 00000000..e9b3f83d
--- /dev/null
+++ b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/api/acdr/petexpertcertification/index.ts
@@ -0,0 +1,45 @@
+import request from '@/config/axios'
+
+// 宠托师审核 VO
+export interface PetExpertCertificationVO {
+ id: number // ID
+ content: string // 审核内容
+ type: string // 申请职务
+ imageUrls: string // 审核材料
+ state: number // 审核状态
+ verifyAdminId: number // 审核管理员
+ userId: number // 创建人
+}
+
+// 宠托师审核 API
+export const PetExpertCertificationApi = {
+ // 查询宠托师审核分页
+ getPetExpertCertificationPage: async (params: any) => {
+ return await request.get({ url: `/acdr/pet-expert-certification/page`, params })
+ },
+
+ // 查询宠托师审核详情
+ getPetExpertCertification: async (id: number) => {
+ return await request.get({ url: `/acdr/pet-expert-certification/get?id=` + id })
+ },
+
+ // 新增宠托师审核
+ createPetExpertCertification: async (data: PetExpertCertificationVO) => {
+ return await request.post({ url: `/acdr/pet-expert-certification/create`, data })
+ },
+
+ // 修改宠托师审核
+ updatePetExpertCertification: async (data: PetExpertCertificationVO) => {
+ return await request.put({ url: `/acdr/pet-expert-certification/update`, data })
+ },
+
+ // 删除宠托师审核
+ deletePetExpertCertification: async (id: number) => {
+ return await request.delete({ url: `/acdr/pet-expert-certification/delete?id=` + id })
+ },
+
+ // 导出宠托师审核 Excel
+ exportPetExpertCertification: async (params) => {
+ return await request.download({ url: `/acdr/pet-expert-certification/export-excel`, params })
+ },
+}
\ No newline at end of file
diff --git a/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/views/acdr/petexpertcertification/PetExpertCertificationForm.vue b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/views/acdr/petexpertcertification/PetExpertCertificationForm.vue
new file mode 100644
index 00000000..6897fade
--- /dev/null
+++ b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/views/acdr/petexpertcertification/PetExpertCertificationForm.vue
@@ -0,0 +1,116 @@
+
+
+
+
\ No newline at end of file
diff --git a/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/views/acdr/petexpertcertification/index.vue b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/views/acdr/petexpertcertification/index.vue
new file mode 100644
index 00000000..ce412627
--- /dev/null
+++ b/acdr-admin/yskj-ui/yskj-ui-admin-vue3/src/views/acdr/petexpertcertification/index.vue
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/acdr-ui/src/pages.json b/acdr-ui/src/pages.json
index 5010783b..e390e69e 100644
--- a/acdr-ui/src/pages.json
+++ b/acdr-ui/src/pages.json
@@ -117,6 +117,14 @@
"navigationBarTitleText": "消息列表"
}
},
+ {
+ "path": "pages/message/privatechat",
+ "type": "page",
+ "layout": "default",
+ "style": {
+ "navigationBarTitleText": "聊天"
+ }
+ },
{
"path": "pages/my/index",
"type": "page",
diff --git a/acdr-ui/src/types/uni-pages.d.ts b/acdr-ui/src/types/uni-pages.d.ts
index e4e403cd..cf4be47d 100644
--- a/acdr-ui/src/types/uni-pages.d.ts
+++ b/acdr-ui/src/types/uni-pages.d.ts
@@ -17,6 +17,7 @@ interface NavigateToOptions {
"/pages/message/chat" |
"/pages/message/index" |
"/pages/message/message-list" |
+ "/pages/message/privatechat" |
"/pages/my/index" |
"/pages/order/index" |
"/pages/order/order-detail" |
diff --git a/acdr-ui/tootls/example.png b/acdr-ui/tootls/example.png
deleted file mode 100644
index 069683d2..00000000
Binary files a/acdr-ui/tootls/example.png and /dev/null differ
diff --git a/acdr-ui/tootls/imgtools.py b/acdr-ui/tootls/imgtools.py
deleted file mode 100644
index 5c004d54..00000000
--- a/acdr-ui/tootls/imgtools.py
+++ /dev/null
@@ -1,150 +0,0 @@
-import os
-import cv2
-import numpy as np
-import re
-from tkinter import *
-from tkinter import filedialog, messagebox, colorchooser
-from PIL import Image
-import tkinter as tk
-
-# 主应用类
-class ImageSplitterApp:
- def __init__(self, root):
- self.root = root
- self.root.title("图像分割工具")
- self.root.geometry("500x450")
-
- # 文件或文件夹路径
- self.file_path = None
- self.folder_path = None
- self.selected_color = (0, 0, 0) # 默认黑色
-
- # 创建选择文件按钮
- Button(self.root, text="选择单个文件", command=self.select_file).pack(pady=10)
- Button(self.root, text="选择文件夹", command=self.select_folder).pack(pady=10)
-
- # 选择颜色按钮
- Label(self.root, text="选择分割线颜色:").pack(pady=10)
- Button(self.root, text="打开取色器", command=self.pick_color).pack(pady=5)
-
- # 当前选择的颜色显示
- self.color_label = Label(self.root, text=f"当前颜色: {self.selected_color}")
- self.color_label.pack(pady=5)
-
- # 命名规则
- Label(self.root, text="请输入保存图片的命名规则(支持正则):").pack(pady=10)
- self.naming_entry = Entry(self.root)
- self.naming_entry.insert(0, r"sub_image_{idx}") # 默认命名规则
- self.naming_entry.pack(pady=5)
-
- # 分割按钮
- Button(self.root, text="开始分割", command=self.split_image).pack(pady=20)
-
- # 选择保存文件夹
- self.save_folder_path = None
- Button(self.root, text="选择保存文件夹", command=self.select_save_folder).pack(pady=10)
-
- def select_file(self):
- self.file_path = filedialog.askopenfilename(filetypes=[("Image Files", "*.png *.jpg *.jpeg")])
- if self.file_path:
- messagebox.showinfo("文件选择", f"已选择文件: {self.file_path}")
-
- def select_folder(self):
- self.folder_path = filedialog.askdirectory()
- if self.folder_path:
- messagebox.showinfo("文件夹选择", f"已选择文件夹: {self.folder_path}")
-
- def select_save_folder(self):
- self.save_folder_path = filedialog.askdirectory()
- if self.save_folder_path:
- messagebox.showinfo("保存文件夹选择", f"已选择保存文件夹: {self.save_folder_path}")
-
- # 颜色取色器
- def pick_color(self):
- color = colorchooser.askcolor(title="选择分割线颜色")
- if color:
- self.selected_color = tuple(map(int, color[0])) # 颜色转换为整数的 (r, g, b)
- self.color_label.config(text=f"当前颜色: {self.selected_color}")
-
- # 查找分割线的位置 (通过指定颜色)
- def find_dividing_lines(self, image, line_color):
- gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # 将图像转换为灰度图
- _, binary = cv2.threshold(gray, 128, 255, cv2.THRESH_BINARY_INV) # 进行二值化
-
- # 查找水平和垂直线条
- horizontal_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (25, 1))
- vertical_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (1, 25))
-
- # 水平线
- horizontal_lines = cv2.morphologyEx(binary, cv2.MORPH_OPEN, horizontal_kernel, iterations=2)
-
- # 垂直线
- vertical_lines = cv2.morphologyEx(binary, cv2.MORPH_OPEN, vertical_kernel, iterations=2)
-
- return horizontal_lines, vertical_lines
-
- # 分割图像
- def split_image(self):
- # 提取颜色
- line_color = self.selected_color
-
- # 读取命名规则
- naming_rule = self.naming_entry.get()
-
- # 处理单个文件
- if self.file_path:
- self.process_file(self.file_path, line_color, naming_rule)
-
- # 处理文件夹中的所有文件
- if self.folder_path:
- for file_name in os.listdir(self.folder_path):
- if file_name.endswith(('.png', '.jpg', '.jpeg')):
- file_path = os.path.join(self.folder_path, file_name)
- self.process_file(file_path, line_color, naming_rule)
-
- # 处理单个文件的分割
- def process_file(self, file_path, line_color, naming_rule):
- image = cv2.imread(file_path)
- if image is None:
- messagebox.showerror("错误", f"无法加载图像: {file_path}")
- return
-
- horizontal_lines, vertical_lines = self.find_dividing_lines(image, line_color)
- sub_images = self.split_image_by_lines(image, horizontal_lines, vertical_lines)
-
- # 保存分割后的图像
- self.save_sub_images(sub_images, naming_rule)
-
- # 根据分割线分割图像
- def split_image_by_lines(self, image, horizontal_lines, vertical_lines):
- horizontal_coords = np.where(np.any(horizontal_lines > 0, axis=1))[0]
- vertical_coords = np.where(np.any(vertical_lines > 0, axis=0))[0]
-
- sub_images = []
- for i in range(len(horizontal_coords) - 1):
- for j in range(len(vertical_coords) - 1):
- x1, x2 = vertical_coords[j], vertical_coords[j + 1]
- y1, y2 = horizontal_coords[i], horizontal_coords[i + 1]
- sub_image = image[y1:y2, x1:x2]
- sub_images.append(sub_image)
-
- return sub_images
-
- # 保存分割后的图像,支持正则命名规则
- def save_sub_images(self, sub_images, naming_rule):
- if not self.save_folder_path:
- messagebox.showerror("错误", "请先选择保存文件夹")
- return
-
- for idx, img in enumerate(sub_images):
- filename = re.sub(r'{idx}', str(idx), naming_rule) # 使用正则表达式进行命名
- save_path = os.path.join(self.save_folder_path, f"{filename}.png")
- cv2.imwrite(save_path, img)
-
- messagebox.showinfo("完成", f"图像已分割并保存到 {self.save_folder_path}")
-
-# 运行图形界面应用
-if __name__ == "__main__":
- root = tk.Tk()
- app = ImageSplitterApp(root)
- root.mainloop()
diff --git a/acdr-ui/tootls/tools.py b/acdr-ui/tootls/tools.py
deleted file mode 100644
index 511ea7ef..00000000
--- a/acdr-ui/tootls/tools.py
+++ /dev/null
@@ -1,202 +0,0 @@
-import os
-import tkinter as tk
-from tkinter import filedialog, scrolledtext, ttk
-from tkinter import Menu
-from PIL import Image
-
-# 搜索指定关键字的函数
-def search_keyword_in_files(directory, keyword, output_text):
- if not keyword:
- output_text.insert(tk.END, "请输入要搜索的关键字。\n")
- return
-
- for root, dirs, files in os.walk(directory):
- for file in files:
- if file.endswith(('.js', '.json', '.vue', '.ts', '.py', '.java', '.cpp')):
- file_path = os.path.join(root, file)
- try:
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
- count = content.count(keyword)
- if count > 0:
- output_text.insert(tk.END, f"在 {file_path} 中找到 '{keyword}',共 {count} 次\n")
- except Exception as e:
- output_text.insert(tk.END, f"读取文件 {file_path} 出错: {e}\n")
- output_text.insert(tk.END, "搜索完成。\n")
-
-# 找出不包含指定关键字的文件
-def find_files_without_keyword(directory, keyword, output_text):
- if not keyword:
- output_text.insert(tk.END, "请输入要搜索的关键字。\n")
- return
-
- for root, dirs, files in os.walk(directory):
- for file in files:
- if file.endswith(('.js', '.json', '.vue', '.ts', '.py', '.java', '.cpp')):
- file_path = os.path.join(root, file)
- try:
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
- if keyword not in content:
- output_text.insert(tk.END, f"'{keyword}' 未在文件 {file_path} 中找到。\n")
- except Exception as e:
- output_text.insert(tk.END, f"读取文件 {file_path} 出错: {e}\n")
- output_text.insert(tk.END, "查找未包含关键字的文件完成。\n")
-
-# 替换文件内容中的指定字符串
-def replace_in_files(directory, search_text, replace_text, output_text):
- if not search_text or not replace_text:
- output_text.insert(tk.END, "请输入要替换的文本和新文本。\n")
- return
-
- for root, dirs, files in os.walk(directory):
- for file in files:
- if file.endswith(('.js', '.json', '.vue', '.ts', '.py', '.java', '.cpp')):
- file_path = os.path.join(root, file)
- try:
- with open(file_path, 'r', encoding='utf-8') as f:
- content = f.read()
- if search_text in content:
- new_content = content.replace(search_text, replace_text)
- with open(file_path, 'w', encoding='utf-8') as f:
- f.write(new_content)
- output_text.insert(tk.END, f"在 {file_path} 中替换 '{search_text}' 为 '{replace_text}'\n")
- except Exception as e:
- output_text.insert(tk.END, f"处理文件 {file_path} 时出错: {e}\n")
- output_text.insert(tk.END, "替换完成。\n")
-
-# 转换指定颜色为透明色的功能
-def convert_color_to_transparent(image_path, color, output_text):
- img = Image.open(image_path)
- img = img.convert("RGBA")
- datas = img.getdata()
-
- newData = []
- for item in datas:
- if item[0:3] == color:
- newData.append((255, 255, 255, 0)) # 将指定颜色变为透明
- else:
- newData.append(item)
-
- img.putdata(newData)
- new_path = os.path.splitext(image_path)[0] + "_transparent.png"
- img.save(new_path)
- output_text.insert(tk.END, f"处理后的图片保存为 '{new_path}'\n")
-
-# 清空输出框的函数
-def clear_output(output_text):
- output_text.delete(1.0, tk.END)
-
-# 添加右键菜单
-def add_right_click_menu(output_text):
- menu = Menu(output_text, tearoff=0)
- menu.add_command(label="清空输出", command=lambda: clear_output(output_text))
-
- def show_menu(event):
- menu.post(event.x_root, event.y_root)
-
- output_text.bind("", show_menu)
-
-# 创建GUI界面
-def create_gui():
- root = tk.Tk()
- root.title("文件和图片处理工具")
- root.geometry("800x500")
-
- notebook = ttk.Notebook(root)
- notebook.pack(fill='both', expand=True)
-
- search_frame = ttk.Frame(notebook)
- notebook.add(search_frame, text="搜索和替换")
- image_frame = ttk.Frame(notebook)
- notebook.add(image_frame, text="图片透明化")
- note_frame = ttk.Frame(notebook)
- notebook.add(note_frame, text="记事本")
-
- # 搜索和替换界面
- left_frame_search = ttk.Frame(search_frame)
- left_frame_search.pack(side=tk.LEFT, fill=tk.Y, padx=10, pady=10)
-
- keyword_entry = ttk.Entry(left_frame_search)
- keyword_entry.pack(pady=5)
- ttk.Label(left_frame_search, text="请输入要搜索的关键字:").pack(pady=5)
-
- search_button = ttk.Button(left_frame_search, text="搜索文件夹",
- command=lambda: browse_directory_for_search(keyword_entry.get(), output_text_search))
- search_button.pack(pady=5)
-
- search_text_entry = ttk.Entry(left_frame_search)
- search_text_entry.pack(pady=5)
- ttk.Label(left_frame_search, text="请输入要替换的文本:").pack(pady=5)
-
- replace_text_entry = ttk.Entry(left_frame_search)
- replace_text_entry.pack(pady=5)
- ttk.Label(left_frame_search, text="请输入新文本:").pack(pady=5)
-
- replace_button = ttk.Button(left_frame_search, text="替换文件夹中的内容",
- command=lambda: browse_directory_for_replace(search_text_entry.get(), replace_text_entry.get(), output_text_search))
- replace_button.pack(pady=5)
-
- search_missing_button = ttk.Button(left_frame_search, text="查找不包含关键字的文件",
- command=lambda: browse_directory_for_missing(keyword_entry.get(), output_text_search))
- search_missing_button.pack(pady=5)
-
- output_text_search = scrolledtext.ScrolledText(search_frame, width=70)
- output_text_search.pack(side=tk.RIGHT, fill=tk.BOTH, expand=True)
- add_right_click_menu(output_text_search) # 为搜索输出框添加右键菜单
-
- # 图像透明化界面
- color_entry = ttk.Entry(image_frame)
- color_entry.pack(pady=5)
- ttk.Label(image_frame, text="请输入要透明化的颜色 (r,g,b):").pack(pady=5)
-
- trans_button = ttk.Button(image_frame, text="使图片透明",
- command=lambda: browse_image_for_transparency(tuple(map(int, color_entry.get().split(','))), output_text_image))
- trans_button.pack(pady=5)
-
- output_text_image = scrolledtext.ScrolledText(image_frame, width=70)
- output_text_image.pack(side=tk.RIGHT, fill=tk.BOTH, expand=True)
- add_right_click_menu(output_text_image) # 为图片处理输出框添加右键菜单
-
- # 记事本界面
- note_text = scrolledtext.ScrolledText(note_frame, width=70)
- note_text.pack(padx=10, pady=10, fill=tk.BOTH, expand=True)
-
- save_button = ttk.Button(note_frame, text="保存记事本", command=lambda: save_notes(note_text))
- save_button.pack(pady=10)
-
- root.mainloop()
-
-# 辅助函数
-def browse_directory_for_search(keyword, output_text):
- directory = filedialog.askdirectory()
- if directory:
- output_text.insert(tk.END, f"正在 {directory} 中搜索关键字: '{keyword}'\n")
- search_keyword_in_files(directory, keyword, output_text)
-
-def browse_directory_for_replace(search_text, replace_text, output_text):
- directory = filedialog.askdirectory()
- if directory:
- output_text.insert(tk.END, f"在 {directory} 中将 '{search_text}' 替换为 '{replace_text}'\n")
- replace_in_files(directory, search_text, replace_text, output_text)
-
-def browse_directory_for_missing(keyword, output_text):
- directory = filedialog.askdirectory()
- if directory:
- output_text.insert(tk.END, f"正在 {directory} 中查找未包含关键字 '{keyword}' 的文件。\n")
- find_files_without_keyword(directory, keyword, output_text)
-
-def browse_image_for_transparency(color, output_text):
- image_path = filedialog.askopenfilename()
- if image_path:
- convert_color_to_transparent(image_path, color, output_text)
-
-def save_notes(note_text):
- file_path = filedialog.asksaveasfilename(defaultextension=".txt")
- if file_path:
- with open(file_path, 'w') as file:
- file.write(note_text.get(1.0, tk.END))
- note_text.insert(tk.END, f"记事本已保存到 {file_path}\n")
-
-if __name__ == "__main__":
- create_gui()
diff --git a/acdr/src/main/java/com/yskj/acdr/master/address/entity/ChinaAddress.java b/acdr/src/main/java/com/yskj/acdr/master/address/entity/ChinaAddress.java
index f68b64b5..25b9195a 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/address/entity/ChinaAddress.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/address/entity/ChinaAddress.java
@@ -11,6 +11,7 @@ import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yskj.acdr.common.verify.ValidPhone;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.Pattern;
@@ -37,7 +38,7 @@ import jakarta.validation.constraints.Null;
@TableName("acdr_china_address")
@ApiModel(value = "ChinaAddress对象", description = "中国地址表")
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ChinaAddress implements Serializable {
+public class ChinaAddress extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -104,14 +105,6 @@ public class ChinaAddress implements Serializable {
@TableField(value = "longitude")
private Long longitude;
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
-
@ApiModelProperty("是否为默认地址")
@TableField("is_default")
private Boolean isDefault;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/chat/entity/ChatMessage.java b/acdr/src/main/java/com/yskj/acdr/master/chat/entity/ChatMessage.java
index bf5aab93..ce2d9944 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/chat/entity/ChatMessage.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/chat/entity/ChatMessage.java
@@ -2,6 +2,7 @@ package com.yskj.acdr.master.chat.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.yskj.acdr.master.chat.chatenum.ChatState;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -26,7 +27,7 @@ import java.time.LocalDateTime;
@Accessors(chain = true)
@TableName("acdr_chat_message")
@ApiModel(value = "ChatMessage对象", description = "")
-public class ChatMessage implements Serializable {
+public class ChatMessage extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -46,10 +47,6 @@ public class ChatMessage implements Serializable {
@TableField("be_user_id")
private Long beUserId;
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
@ApiModelProperty("消息状态,0未读,1已读")
@TableField(value = "state")
private ChatState state;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/common/ExtendEntity.java b/acdr/src/main/java/com/yskj/acdr/master/common/ExtendEntity.java
new file mode 100644
index 00000000..f9ef0419
--- /dev/null
+++ b/acdr/src/main/java/com/yskj/acdr/master/common/ExtendEntity.java
@@ -0,0 +1,39 @@
+package com.yskj.acdr.master.common;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.apache.ibatis.type.JdbcType;
+
+import java.time.LocalDateTime;
+
+/**
+ * 这个类是一些公共字段的抽象类,比如创建时间、更新时间、逻辑删除等
+ */
+@Data
+@Accessors(chain = true)
+@JsonIgnoreProperties(value = "transMap")
+public class ExtendEntity {
+
+ // 更新作者
+ @TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.VARCHAR)
+ private Long updater;
+
+ // 创建作者
+ @TableField(fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.VARCHAR)
+ private Long creator;
+
+ // 逻辑删除
+ @TableLogic
+ private Boolean deleted;
+
+ @TableField(value = "create_time", fill = FieldFill.INSERT)
+ private LocalDateTime createTime;
+
+ @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
+ private LocalDateTime updateTime;
+
+}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/controller/CommunityController.java b/acdr/src/main/java/com/yskj/acdr/master/community/controller/CommunityController.java
index 346da9ae..4870b067 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/controller/CommunityController.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/controller/CommunityController.java
@@ -74,7 +74,7 @@ public class CommunityController {
@Transactional
public GlobalResponse createPost(@Valid @RequestBody Posts post) {
post.setUserId(StpUtil.getLoginIdAsLong());
- post.setCreatedTime(LocalDateTime.now());
+ post.setCreateTime(LocalDateTime.now());
postsMapper.insert(post);
for (String url : post.getImages()) {
photosMapper.insert(
@@ -207,7 +207,7 @@ public class CommunityController {
}
comment.setPostId(postId);
comment.setUserId(StpUtil.getLoginIdAsLong());
- comment.setCreatedTime(LocalDateTime.now());
+ comment.setCreateTime(LocalDateTime.now());
commentsMapper.insert(comment);
return GlobalResponse.success(comment);
}
@@ -285,7 +285,7 @@ public class CommunityController {
Follows follow = new Follows();
follow.setFollowerId(followerId);
follow.setFollowingId(followingId);
- follow.setCreatedTime(LocalDateTime.now());
+ follow.setCreateTime(LocalDateTime.now());
followsMapper.insert(follow);
return GlobalResponse.success("关注成功");
@@ -334,7 +334,7 @@ public class CommunityController {
like.setUserId(userId);
like.setPostId(postId);
like.setCommentId(commentId);
- like.setCreatedTime(LocalDateTime.now());
+ like.setCreateTime(LocalDateTime.now());
likesMapper.insert(like);
return GlobalResponse.success("点赞成功");
@@ -389,7 +389,7 @@ public class CommunityController {
Favorites favorite = new Favorites();
favorite.setUserId(userId);
favorite.setPostId(postId);
- favorite.setCreatedTime(LocalDateTime.now());
+ favorite.setCreateTime(LocalDateTime.now());
favoritesMapper.insert(favorite);
return GlobalResponse.success("收藏成功");
@@ -470,7 +470,7 @@ public class CommunityController {
// 设置图片所属的帖子ID和创建时间
photo.setPostId(postId);
- photo.setCreatedTime(LocalDateTime.now());
+ photo.setCreateTime(LocalDateTime.now());
// 将图片信息插入数据库
photosMapper.insert(photo);
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Comments.java b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Comments.java
index 13caf95c..445160ad 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Comments.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Comments.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
@@ -33,7 +34,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_comments")
@ApiModel(value = "Comments对象", description = "")
-public class Comments implements Serializable {
+public class Comments extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -52,12 +53,6 @@ public class Comments implements Serializable {
@Size(min = 5, message = "评论内容不能少于五个字")
private String content;
- @TableField("created_time")
- private LocalDateTime createdTime;
-
- @TableField("updated_time")
- private LocalDateTime updatedTime;
-
@TableField("deleted_time")
private LocalDateTime deletedTime;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Favorites.java b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Favorites.java
index 9ca3de34..f3c65885 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Favorites.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Favorites.java
@@ -1,6 +1,7 @@
package com.yskj.acdr.master.community.entity;
import com.baomidou.mybatisplus.annotation.*;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
@@ -24,7 +25,7 @@ import java.time.LocalDateTime;
@Accessors(chain = true)
@TableName("acdr_favorites")
@ApiModel(value = "Favorites对象", description = "")
-public class Favorites implements Serializable {
+public class Favorites extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -36,7 +37,4 @@ public class Favorites implements Serializable {
@TableField("post_id")
private Long postId;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Follows.java b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Follows.java
index b75b91d8..cb2a2c76 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Follows.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Follows.java
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotNull;
@@ -30,7 +31,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_follows")
@ApiModel(value = "Follows对象", description = "")
-public class Follows implements Serializable {
+public class Follows extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -44,7 +45,4 @@ public class Follows implements Serializable {
@TableField("following_id")
@NotNull(message = "被关注者ID不能为空")
private Long followingId;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Likes.java b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Likes.java
index c3d5afbd..092837e5 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Likes.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Likes.java
@@ -1,49 +1,42 @@
package com.yskj.acdr.master.community.entity;
- import com.baomidou.mybatisplus.annotation.FieldFill;
- import com.baomidou.mybatisplus.annotation.IdType;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableId;
- import com.baomidou.mybatisplus.annotation.TableName;
- import java.io.Serializable;
- import java.time.LocalDateTime;
- import io.swagger.annotations.ApiModel;
- import io.swagger.annotations.ApiModelProperty;
- import lombok.Getter;
- import lombok.Setter;
- import lombok.ToString;
- import lombok.experimental.Accessors;
+import com.baomidou.mybatisplus.annotation.*;
+import com.yskj.acdr.master.common.ExtendEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
/**
-*
- *
- *
-*
-* @author 林河
-* @since 2024-08-12
-*/
- @Getter
- @Setter
- @ToString
- @Accessors(chain = true)
- @TableName("acdr_likes")
- @ApiModel(value = "Likes对象", description = "")
- public class Likes implements Serializable {
+ *
+ *
+ *
+ *
+ * @author 林河
+ * @since 2024-08-12
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+@TableName("acdr_likes")
+@ApiModel(value = "Likes对象", description = "")
+public class Likes extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
- @TableId(value = "id", type = IdType.AUTO)
+ @TableId(value = "id", type = IdType.AUTO)
private Long id;
- @TableField(value = "user_id", fill = FieldFill.INSERT)
+ @TableField(value = "user_id", fill = FieldFill.INSERT)
private Long userId;
- @TableField("post_id")
+ @TableField("post_id")
private Long postId;
- @TableField("comment_id")
+ @TableField("comment_id")
private Long commentId;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Photos.java b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Photos.java
index 6dee5eca..0c74addd 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Photos.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Photos.java
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
@@ -32,7 +33,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_photos")
@ApiModel(value = "Photos对象", description = "照片实体")
-public class Photos implements Serializable {
+public class Photos extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -47,8 +48,5 @@ public class Photos implements Serializable {
@Size(max = 255, message = "图片URL不能超过255个字符")
@TableField("photo_url")
private String photoUrl;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Posts.java b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Posts.java
index f880f524..7d8ff817 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/community/entity/Posts.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/community/entity/Posts.java
@@ -10,6 +10,7 @@ import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
@@ -34,7 +35,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_posts")
@ApiModel(value = "Posts对象", description = "帖子实体")
-public class Posts implements Serializable {
+public class Posts extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -66,12 +67,6 @@ public class Posts implements Serializable {
@TableField("is_public")
private Boolean isPublic;
- @TableField("created_time")
- private LocalDateTime createdTime;
-
- @TableField("updated_time")
- private LocalDateTime updatedTime;
-
@TableField("deleted_at")
private LocalDateTime deletedAt;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/config/entity/Config.java b/acdr/src/main/java/com/yskj/acdr/master/config/entity/Config.java
index 30af0651..f9976605 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/config/entity/Config.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/config/entity/Config.java
@@ -1,16 +1,16 @@
package com.yskj.acdr.master.config.entity;
-import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
+import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@@ -30,10 +30,13 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_config")
@ApiModel(value = "Config对象")
-public class Config implements Serializable {
+public class Config extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
+ @TableId
+ private Long id;
+
@ApiModelProperty("配置表key")
@NotBlank(message = "key 不能为空")
private String key;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/file/entity/FileMap.java b/acdr/src/main/java/com/yskj/acdr/master/file/entity/FileMap.java
index 8564eba2..8f4a63e1 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/file/entity/FileMap.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/file/entity/FileMap.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
@@ -27,7 +28,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_file_map")
@ApiModel(value = "FileMap对象", description = "")
-public class FileMap implements Serializable {
+public class FileMap extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -57,14 +58,6 @@ public class FileMap implements Serializable {
@TableField("is_web")
private Boolean isWeb;
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
-
@ApiModelProperty("上传用户")
@TableField(value = "user_id")
private long userId;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/controller/MallController.java b/acdr/src/main/java/com/yskj/acdr/master/mall/controller/MallController.java
index ba39c990..7a9e72f8 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/controller/MallController.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/controller/MallController.java
@@ -41,8 +41,8 @@ public class MallController {
@PostMapping("/stores")
public GlobalResponse createStores(@RequestBody Stores store) {
try {
- store.setCreatedTime(LocalDateTime.now());
- store.setUpdatedTime(LocalDateTime.now());
+ store.setCreateTime(LocalDateTime.now());
+ store.setUpdateTime(LocalDateTime.now());
storeMapper.insert(store);
return GlobalResponse.success(store);
} catch (Exception e) {
@@ -74,8 +74,8 @@ public class MallController {
@PostMapping("/products")
public GlobalResponse addProducts(@RequestBody Products product) {
try {
- product.setCreatedTime(LocalDateTime.now());
- product.setUpdatedTime(LocalDateTime.now());
+ product.setCreateTime(LocalDateTime.now());
+ product.setUpdateTime(LocalDateTime.now());
productMapper.insert(product);
return GlobalResponse.success(product);
} catch (Exception e) {
@@ -109,8 +109,8 @@ public class MallController {
@Transactional(rollbackFor = Exception.class)
public GlobalResponse createOrders(@RequestBody Orders order) {
try {
- order.setCreatedTime(LocalDateTime.now());
- order.setUpdatedTime(LocalDateTime.now());
+ order.setCreateTime(LocalDateTime.now());
+ order.setUpdateTime(LocalDateTime.now());
orderMapper.insert(order);
return GlobalResponse.success(order);
} catch (Exception e) {
@@ -147,8 +147,8 @@ public class MallController {
@PostMapping("/cart")
public GlobalResponse addToCart(@RequestBody CartItems cartItem) {
try {
- cartItem.setCreatedTime(LocalDateTime.now());
- cartItem.setUpdatedTime(LocalDateTime.now());
+ cartItem.setCreateTime(LocalDateTime.now());
+ cartItem.setUpdateTime(LocalDateTime.now());
cartItemMapper.insert(cartItem);
return GlobalResponse.success(cartItem);
} catch (Exception e) {
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/CartItems.java b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/CartItems.java
index e7893842..d0870547 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/CartItems.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/CartItems.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -30,7 +31,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_cart_items")
@ApiModel(value = "CartItems对象", description = "")
-public class CartItems implements Serializable {
+public class CartItems extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -45,10 +46,4 @@ public class CartItems implements Serializable {
@TableField("quantity")
private Integer quantity;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
-
- @TableField("updated_time")
- private LocalDateTime updatedTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/OrderItems.java b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/OrderItems.java
index 674a7275..e4e8913d 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/OrderItems.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/OrderItems.java
@@ -9,6 +9,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -30,7 +31,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_order_items")
@ApiModel(value = "OrderItems对象", description = "")
-public class OrderItems implements Serializable {
+public class OrderItems extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -48,7 +49,4 @@ public class OrderItems implements Serializable {
@TableField("price")
private BigDecimal price;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Orders.java b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Orders.java
index 88aa4f19..d6ef5870 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Orders.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Orders.java
@@ -10,6 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -31,7 +32,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_orders")
@ApiModel(value = "Orders对象", description = "")
-public class Orders implements Serializable {
+public class Orders extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -46,10 +47,4 @@ public class Orders implements Serializable {
@TableField("status")
private String status;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
-
- @TableField("updated_time")
- private LocalDateTime updatedTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Products.java b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Products.java
index 28efddaf..573fd4b0 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Products.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Products.java
@@ -9,6 +9,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -30,7 +31,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_products")
@ApiModel(value = "Products对象", description = "")
-public class Products implements Serializable {
+public class Products extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -51,10 +52,4 @@ public class Products implements Serializable {
@TableField("stock")
private Integer stock;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
-
- @TableField("updated_time")
- private LocalDateTime updatedTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/StoreTypes.java b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/StoreTypes.java
index 8256098c..408438cb 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/StoreTypes.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/StoreTypes.java
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -28,7 +29,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_store_types")
@ApiModel(value = "StoreTypes对象", description = "")
-public class StoreTypes implements Serializable {
+public class StoreTypes extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Stores.java b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Stores.java
index 0483f74e..70583825 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Stores.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/mall/entity/Stores.java
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -29,7 +30,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_stores")
@ApiModel(value = "Stores对象", description = "")
-public class Stores implements Serializable {
+public class Stores extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -50,10 +51,4 @@ public class Stores implements Serializable {
@TableField("owner_id")
private Long ownerId;
-
- @TableField("created_time")
- private LocalDateTime createdTime;
-
- @TableField("updated_time")
- private LocalDateTime updatedTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/Notifications.java b/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/Notifications.java
index 6e247016..ed648f2b 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/Notifications.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/Notifications.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
@@ -31,7 +32,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_notifications")
@ApiModel(value = "Notifications对象", description = "")
-public class Notifications implements Serializable {
+public class Notifications extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -53,10 +54,6 @@ public class Notifications implements Serializable {
@TableField("url")
private String url;
- @ApiModelProperty("消息创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
@ApiModelProperty("消息创建状态")
@TableField("status")
private Integer status;
@@ -72,8 +69,4 @@ public class Notifications implements Serializable {
@ApiModelProperty("消息接受范围")
@TableField("receiver_scope")
private String receiverScope;
-
- @ApiModelProperty("消息更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/NotificationsUser.java b/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/NotificationsUser.java
index 9772b189..4ced6ce0 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/NotificationsUser.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/notifications/entity/NotificationsUser.java
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -28,7 +29,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_notifications_user")
@ApiModel(value = "NotificationsUser对象", description = "")
-public class NotificationsUser implements Serializable {
+public class NotificationsUser extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/order/entity/Order.java b/acdr/src/main/java/com/yskj/acdr/master/order/entity/Order.java
index 38932a35..0286de40 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/order/entity/Order.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/order/entity/Order.java
@@ -11,6 +11,7 @@ import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yskj.acdr.master.common.ExtendEntity;
import com.yskj.acdr.master.order.orderenum.OrderState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -35,7 +36,7 @@ import org.springframework.format.annotation.DateTimeFormat;
@Accessors(chain = true)
@TableName("acdr_order")
@ApiModel(value = "Order对象", description = "订单实体类")
-public class Order implements Serializable {
+public class Order extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -104,16 +105,6 @@ public class Order implements Serializable {
@TableField("qrcode")
private String qrcode;
- // 这个是默认为不为空的,由数据库插入的时候补全
- @ApiModelProperty("预约创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- // 这个是默认为不为空的,由数据库插入的时候补全
- @ApiModelProperty("预约更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
-
@ApiModelProperty("客户下单地址")
@TableField("address")
@NotNull(message = "用户下单地址不能为空")
diff --git a/acdr/src/main/java/com/yskj/acdr/master/order/entity/PayInfo.java b/acdr/src/main/java/com/yskj/acdr/master/order/entity/PayInfo.java
index 79c054bc..174844a5 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/order/entity/PayInfo.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/order/entity/PayInfo.java
@@ -10,6 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import com.yskj.acdr.master.order.orderenum.PayType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -32,7 +33,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_pay_info")
@ApiModel(value = "PayInfo对象", description = "")
-public class PayInfo implements Serializable {
+public class PayInfo extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -75,8 +76,4 @@ public class PayInfo implements Serializable {
@ApiModelProperty("被支付方")
@TableField("payee")
private Long payee;
-
- @ApiModelProperty("支付时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/order/entity/QrCode.java b/acdr/src/main/java/com/yskj/acdr/master/order/entity/QrCode.java
index 42ff663d..173ab528 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/order/entity/QrCode.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/order/entity/QrCode.java
@@ -4,16 +4,18 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
+import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@Accessors(chain = true)
@TableName("acdr_qr_code")
-public class QrCode {
+public class QrCode extends ExtendEntity implements Serializable {
@TableId(value = "id", type = IdType.ASSIGN_ID)
@ApiModelProperty("二维码id")
diff --git a/acdr/src/main/java/com/yskj/acdr/master/personal/entity/PersonalService.java b/acdr/src/main/java/com/yskj/acdr/master/personal/entity/PersonalService.java
index 2a6728a0..f8dfd532 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/personal/entity/PersonalService.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/personal/entity/PersonalService.java
@@ -10,6 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.*;
@@ -30,7 +31,7 @@ import org.springframework.web.bind.annotation.PutMapping;
@Accessors(chain = true)
@TableName("acdr_personal_service")
@ApiModel(value = "PersonalService对象", description = "")
-public class PersonalService implements Serializable {
+public class PersonalService extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -82,14 +83,6 @@ public class PersonalService implements Serializable {
@TableField(value = "user_id", fill = FieldFill.INSERT)
private Long userId;
- @ApiModelProperty("创建服务的时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新服务的时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
-
@ApiModelProperty("发布地址")
@NotBlank(message = "发布地址不能为空")
@TableField(value = "address")
diff --git a/acdr/src/main/java/com/yskj/acdr/master/personal/entity/ServiceName.java b/acdr/src/main/java/com/yskj/acdr/master/personal/entity/ServiceName.java
index 0fd95ae2..99ad3dd1 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/personal/entity/ServiceName.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/personal/entity/ServiceName.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -30,7 +31,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_service_name")
@ApiModel(value = "ServiceName对象", description = "")
-public class ServiceName implements Serializable {
+public class ServiceName extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -49,12 +50,4 @@ public class ServiceName implements Serializable {
@ApiModelProperty("优先级")
@TableField("number")
private Integer number;
-
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/ExpandLocOrderInfo.java b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/ExpandLocOrderInfo.java
index 19e5c72d..5d2188c2 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/ExpandLocOrderInfo.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/ExpandLocOrderInfo.java
@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.yskj.acdr.master.common.ExtendEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
+import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@@ -21,7 +23,7 @@ import java.util.Date;
@Getter
@Setter
@Accessors(chain = true)
-public class ExpandLocOrderInfo {
+public class ExpandLocOrderInfo extends ExtendEntity implements Serializable {
/**
* 宠物拓展位主键(只记录支付成功的)
*/
diff --git a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetExpertCertification.java b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetExpertCertification.java
index fad8ecb3..0e95cfbb 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetExpertCertification.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetExpertCertification.java
@@ -11,6 +11,7 @@ import java.time.LocalDateTime;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.yskj.acdr.master.common.ExtendEntity;
import com.yskj.acdr.master.pet.status.PetExpertCertificationStatus;
import com.yskj.acdr.serialization.handler.JsonTypeHandler;
import com.yskj.acdr.serialization.handler.ListStringTypeHandler;
@@ -37,7 +38,7 @@ import lombok.experimental.Accessors;
@TableName("acdr_pet_expert_certification")
@ApiModel(value = "PetExpertCertification对象", description = "")
@JsonIgnoreProperties(ignoreUnknown = true)
-public class PetExpertCertification implements Serializable {
+public class PetExpertCertification extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -69,10 +70,4 @@ public class PetExpertCertification implements Serializable {
@ApiModelProperty("创建人")
@TableField("user_id")
private Long userId;
-
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetInfo.java b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetInfo.java
index 15dd7348..54e7250b 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetInfo.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetInfo.java
@@ -3,6 +3,7 @@ package com.yskj.acdr.master.pet.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yskj.acdr.common.verify.ValidAgeRange;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@@ -13,6 +14,7 @@ import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PutMapping;
+import java.io.Serializable;
import java.time.LocalDateTime;
/**
@@ -23,7 +25,7 @@ import java.time.LocalDateTime;
@Getter
@Setter
@Accessors(chain = true)
-public class PetInfo {
+public class PetInfo extends ExtendEntity implements Serializable {
/**
* 宠物主键
@@ -106,12 +108,4 @@ public class PetInfo {
@TableField(value = "`hair_color`")
@NotNull(message = "毛发不能为空")
private String hairColor;
-
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetSpecialistCertificate.java b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetSpecialistCertificate.java
index de7a5c1e..b75f91a4 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetSpecialistCertificate.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/pet/entity/PetSpecialistCertificate.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -30,21 +31,13 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_pet_specialist_certificate")
@ApiModel(value = "PetSpecialistCertificate对象", description = "")
-public class PetSpecialistCertificate implements Serializable {
+public class PetSpecialistCertificate extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
-
@ApiModelProperty("过期日期")
@TableField("expired_time")
private LocalDateTime expiredTime;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/user/controller/UserController.java b/acdr/src/main/java/com/yskj/acdr/master/user/controller/UserController.java
index 8e073079..34a5d743 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/user/controller/UserController.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/user/controller/UserController.java
@@ -109,9 +109,9 @@ public class UserController {
public GlobalResponse userInfo() {
Users userInfo = usersService.getById(StpUtil.getLoginIdAsLong());
userInfo.setTypeId("")
+ .setEmail("")
.setCreateTime(null)
- .setUpdateTime(null)
- .setEmail("");
+ .setUpdateTime(null);
return GlobalResponse.success("获取用户信息成功!", userInfo);
}
diff --git a/acdr/src/main/java/com/yskj/acdr/master/user/entity/UserIdentityVerification.java b/acdr/src/main/java/com/yskj/acdr/master/user/entity/UserIdentityVerification.java
index f16b0afa..ecac2a1f 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/user/entity/UserIdentityVerification.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/user/entity/UserIdentityVerification.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.time.LocalDateTime;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -26,7 +27,7 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@TableName("acdr_user_identity_verification")
@ApiModel(value = "UserIdentityVerification对象", description = "")
-public class UserIdentityVerification implements Serializable {
+public class UserIdentityVerification extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -50,14 +51,6 @@ public class UserIdentityVerification implements Serializable {
@TableField("real_sex")
private String realSex;
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-
- @ApiModelProperty("实名认证信息更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- private LocalDateTime updateTime;
-
@ApiModelProperty("身份证信息")
@TableField("identity")
private String identity;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/user/entity/Users.java b/acdr/src/main/java/com/yskj/acdr/master/user/entity/Users.java
index 35e777e9..a959361e 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/user/entity/Users.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/user/entity/Users.java
@@ -1,36 +1,34 @@
package com.yskj.acdr.master.user.entity;
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import com.yskj.acdr.master.common.ExtendEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Null;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
-import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Null;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
/**
-*
-*
-*
-*
-* @author 林河
-* @since 2024-08-08
-*/
+ *
+ *
+ *
+ *
+ * @author 林河
+ * @since 2024-08-08
+ */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("acdr_users")
@ApiModel(value = "UserBase对象", description = "")
- public class Users implements Serializable {
+public class Users extends ExtendEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -55,16 +53,6 @@ import jakarta.validation.constraints.Null;
@TableField("type_id")
private String typeId;
- @ApiModelProperty("创建时间")
- @TableField(value = "create_time", fill = FieldFill.INSERT)
- @NotNull(message = "创建时间不能为空")
- private LocalDateTime createTime;
-
- @ApiModelProperty("更新时间")
- @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
- @NotNull(message = "更新时间不能为空")
- private LocalDateTime updateTime;
-
@ApiModelProperty("用户头像")
@TableField("avatar")
private String avatar;
diff --git a/acdr/src/main/java/com/yskj/acdr/master/user/service/impl/UsersServiceImpl.java b/acdr/src/main/java/com/yskj/acdr/master/user/service/impl/UsersServiceImpl.java
index 6e21b870..c60e9c8d 100644
--- a/acdr/src/main/java/com/yskj/acdr/master/user/service/impl/UsersServiceImpl.java
+++ b/acdr/src/main/java/com/yskj/acdr/master/user/service/impl/UsersServiceImpl.java
@@ -128,14 +128,14 @@ public class UsersServiceImpl extends ServiceImpl implements
// 检查手机号是否已注册
Users user = this.baseMapper.selectOne(new QueryWrapper().eq("phone", phone));
if (user == null) {
- // 未注册,创建新用户
- user = new Users()
+ user = (Users) new Users()
.setAvatar("/profile/avatar.jpg")
.setName(phone) // 设置默认用户名
.setPhone(phone)
+ .setNickname(DEFAULT_NICK_NAME_PREFIX + phone.substring(phone.length() - 4))
.setCreateTime(LocalDateTime.now())
- .setUpdateTime(LocalDateTime.now())
- .setNickname(DEFAULT_NICK_NAME_PREFIX + phone.substring(phone.length() - 4));
+ .setUpdateTime(LocalDateTime.now());
+ // 未注册,创建新用户
this.baseMapper.insert(user);
}
@@ -154,13 +154,13 @@ public class UsersServiceImpl extends ServiceImpl implements
@Override
public Users getSafeUsers(Long userId) {
Users users = baseMapper.selectById(userId);
- return users.setOpenid("")
- .setCreateTime(null)
- .setUpdateTime(null)
+ return (Users) users.setOpenid("")
.setEmail("")
.setTypeId("")
// 这个是创建用户的手机号信息隐藏中间几位
- .setPhone(PhoneValidator.hidePhoneNumber(users.getPhone()));
+ .setPhone(PhoneValidator.hidePhoneNumber(users.getPhone()))
+ .setCreateTime(null)
+ .setUpdateTime(null);
}
/**
@@ -170,13 +170,13 @@ public class UsersServiceImpl extends ServiceImpl implements
@Override
public Users getSafeUsers() {
Users users = baseMapper.selectById(StpUtil.getLoginIdAsLong());
- return users.setOpenid("")
- .setCreateTime(null)
- .setUpdateTime(null)
+ return (Users) users.setOpenid("")
.setEmail("")
.setTypeId("")
// 这个是创建用户的手机号信息隐藏中间几位
- .setPhone(PhoneValidator.hidePhoneNumber(users.getPhone()));
+ .setPhone(PhoneValidator.hidePhoneNumber(users.getPhone()))
+ .setCreateTime(null)
+ .setUpdateTime(null);
}
@Override
diff --git a/acdr/src/main/resources/application-devp.yml b/acdr/src/main/resources/application-devp.yml
index 3226276f..e21b18f2 100644
--- a/acdr/src/main/resources/application-devp.yml
+++ b/acdr/src/main/resources/application-devp.yml
@@ -94,6 +94,10 @@ mybatis-plus:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 当使用非实体类接收返回数据时,字段值若为空则返回null(不设置此项会忽略为null的字段)
call-setters-on-nulls: true
+ global-config:
+ db-config:
+ logic-delete-value: 1 # 逻辑删除时的值
+ logic-not-delete-value: 0 # 逻辑未删除时的值
# 系统管理
management:
diff --git a/acdr/src/main/resources/application-production.yml b/acdr/src/main/resources/application-production.yml
index fcb66c69..697fed4c 100644
--- a/acdr/src/main/resources/application-production.yml
+++ b/acdr/src/main/resources/application-production.yml
@@ -91,6 +91,10 @@ mybatis-plus:
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 当使用非实体类接收返回数据时,字段值若为空则返回null(不设置此项会忽略为null的字段)
call-setters-on-nulls: true
+ global-config:
+ db-config:
+ logic-delete-value: 1 # 逻辑删除时的值
+ logic-not-delete-value: 0 # 逻辑未删除时的值
# 系统管理
management: