Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
1a867041
Commit
1a867041
authored
Dec 09, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/smart_gov_platform
parents
466e5a69
49ffc2c7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
14 deletions
+133
-14
base-manager/src/main/java/com/mortals/xhx/base/system/upload/web/UploadController.java
.../mortals/xhx/base/system/upload/web/UploadController.java
+15
-4
base-manager/src/main/java/com/mortals/xhx/module/workman/model/WorkmanEntity.java
...a/com/mortals/xhx/module/workman/model/WorkmanEntity.java
+17
-7
base-manager/src/main/java/com/mortals/xhx/module/workman/web/WorkmanController.java
...com/mortals/xhx/module/workman/web/WorkmanController.java
+13
-0
portal-manager/db/add.sql
portal-manager/db/add.sql
+88
-3
No files found.
base-manager/src/main/java/com/mortals/xhx/base/system/upload/web/UploadController.java
View file @
1a867041
...
@@ -3,7 +3,10 @@ package com.mortals.xhx.base.system.upload.web;
...
@@ -3,7 +3,10 @@ package com.mortals.xhx.base.system.upload.web;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseController
;
import
com.mortals.framework.web.BaseController
;
import
com.mortals.xhx.base.system.resource.model.ResourceEntity
;
import
com.mortals.xhx.base.system.resource.service.ResourceService
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -23,10 +26,18 @@ import java.util.Map;
...
@@ -23,10 +26,18 @@ import java.util.Map;
@RestController
@RestController
@RequestMapping
(
"file"
)
@RequestMapping
(
"file"
)
public
class
UploadController
extends
BaseController
{
public
class
UploadController
extends
BaseController
{
protected
String
moduleDesc
=
""
;
@Resource
@Resource
private
UploadService
uploadService
;
private
UploadService
uploadService
;
public
UploadController
()
{
this
.
setModuleDesc
(
"资源信息"
);
}
public
void
setModuleDesc
(
String
moduleDesc
)
{
this
.
moduleDesc
=
moduleDesc
;
}
@RequestMapping
(
value
=
"upload"
)
@RequestMapping
(
value
=
"upload"
)
public
String
doFileUpload
(
HttpServletRequest
request
,
UploadForm
form
)
{
public
String
doFileUpload
(
HttpServletRequest
request
,
UploadForm
form
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
...
@@ -52,7 +63,7 @@ public class UploadController extends BaseController {
...
@@ -52,7 +63,7 @@ public class UploadController extends BaseController {
@RequestMapping
(
value
=
"commonupload"
)
@RequestMapping
(
value
=
"commonupload"
)
public
String
doFileUpload
(
MultipartFile
file
,
@RequestParam
(
value
=
"prePath"
,
defaultValue
=
"/file/fileupload"
)
String
prePath
)
{
public
String
doFileUpload
(
MultipartFile
file
,
@RequestParam
(
value
=
"prePath"
,
defaultValue
=
"/file/fileupload"
)
String
prePath
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
jsonStr
=
""
;
String
jsonStr
=
""
;
try
{
try
{
...
@@ -97,7 +108,7 @@ public class UploadController extends BaseController {
...
@@ -97,7 +108,7 @@ public class UploadController extends BaseController {
* @param fileName 文件名称
* @param fileName 文件名称
*/
*/
@GetMapping
(
"preview/{fileName}"
)
@GetMapping
(
"preview/{fileName}"
)
public
void
preView
(
@PathVariable
(
value
=
"fileName"
)
String
fileName
,
HttpServletResponse
response
)
{
public
void
preView
(
@PathVariable
(
value
=
"fileName"
)
String
fileName
,
HttpServletResponse
response
)
{
try
{
try
{
uploadService
.
preview
(
fileName
,
response
);
uploadService
.
preview
(
fileName
,
response
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -111,7 +122,7 @@ public class UploadController extends BaseController {
...
@@ -111,7 +122,7 @@ public class UploadController extends BaseController {
* @param fileName 文件名称
* @param fileName 文件名称
*/
*/
@GetMapping
(
"fileupload/{fileName}"
)
@GetMapping
(
"fileupload/{fileName}"
)
public
void
fileupload
(
@PathVariable
(
value
=
"fileName"
)
String
fileName
,
HttpServletResponse
response
)
{
public
void
fileupload
(
@PathVariable
(
value
=
"fileName"
)
String
fileName
,
HttpServletResponse
response
)
{
try
{
try
{
uploadService
.
uploadDownload
(
fileName
,
response
);
uploadService
.
uploadDownload
(
fileName
,
response
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
base-manager/src/main/java/com/mortals/xhx/module/workman/model/WorkmanEntity.java
View file @
1a867041
package
com.mortals.xhx.module.workman.model
;
package
com.mortals.xhx.module.workman.model
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.math.BigDecimal
;
import
cn.hutool.core.date.DateUtil
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.workman.model.vo.WorkmanVo
;
import
com.mortals.xhx.module.workman.model.vo.WorkmanVo
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -23,10 +17,12 @@ public class WorkmanEntity extends WorkmanVo {
...
@@ -23,10 +17,12 @@ public class WorkmanEntity extends WorkmanVo {
/**
/**
* 登录用户名
* 登录用户名
*/
*/
@Excel
(
name
=
"用户名"
)
private
String
loginName
;
private
String
loginName
;
/**
/**
* 密码
* 密码
*/
*/
@Excel
(
name
=
"密码"
)
private
String
loginPwd
;
private
String
loginPwd
;
/**
/**
* 部门id号
* 部门id号
...
@@ -35,6 +31,7 @@ public class WorkmanEntity extends WorkmanVo {
...
@@ -35,6 +31,7 @@ public class WorkmanEntity extends WorkmanVo {
/**
/**
* 部门名称
* 部门名称
*/
*/
@Excel
(
name
=
"部门名称"
)
private
String
deptName
;
private
String
deptName
;
/**
/**
* 窗口id号
* 窗口id号
...
@@ -55,14 +52,17 @@ public class WorkmanEntity extends WorkmanVo {
...
@@ -55,14 +52,17 @@ public class WorkmanEntity extends WorkmanVo {
/**
/**
* 姓名
* 姓名
*/
*/
@Excel
(
name
=
"姓名"
)
private
String
name
;
private
String
name
;
/**
/**
* 工号
* 工号
*/
*/
@Excel
(
name
=
"工号"
)
private
String
number
;
private
String
number
;
/**
/**
* 职务
* 职务
*/
*/
@Excel
(
name
=
"职务"
)
private
String
userpost
;
private
String
userpost
;
/**
/**
* 职称
* 职称
...
@@ -71,10 +71,12 @@ public class WorkmanEntity extends WorkmanVo {
...
@@ -71,10 +71,12 @@ public class WorkmanEntity extends WorkmanVo {
/**
/**
* 政治面貌 (0.中共党员,1.中共预备党员,2.共青团员,3.普通居民,4.其它)
* 政治面貌 (0.中共党员,1.中共预备党员,2.共青团员,3.普通居民,4.其它)
*/
*/
@Excel
(
name
=
"政治面貌 "
,
combo
={
"中共党员"
,
"中共预备党员"
,
"共青团员"
,
"普通居民"
,
"其它"
},
readConverterExp
=
"0=中共党员,1=中共预备党员,2=共青团员,3=普通居民,4=其它"
)
private
Integer
politicalstatus
;
private
Integer
politicalstatus
;
/**
/**
* 党员 (0.非党员,1.党员,2.党员示范岗,3.党员先锋岗)
* 党员 (0.非党员,1.党员,2.党员示范岗,3.党员先锋岗)
*/
*/
@Excel
(
name
=
"党员 "
,
combo
={
"非党员"
,
"党员"
,
"党员示范岗"
,
"党员先锋岗"
},
readConverterExp
=
"0=非党员,1=党员,2=党员示范岗,3=党员先锋岗"
)
private
Integer
dangyuan
;
private
Integer
dangyuan
;
/**
/**
* 党员扩展
* 党员扩展
...
@@ -83,6 +85,7 @@ public class WorkmanEntity extends WorkmanVo {
...
@@ -83,6 +85,7 @@ public class WorkmanEntity extends WorkmanVo {
/**
/**
* 身份证
* 身份证
*/
*/
@Excel
(
name
=
"身份证"
)
private
String
idCard
;
private
String
idCard
;
/**
/**
* 电话
* 电话
...
@@ -91,30 +94,37 @@ public class WorkmanEntity extends WorkmanVo {
...
@@ -91,30 +94,37 @@ public class WorkmanEntity extends WorkmanVo {
/**
/**
* 手机
* 手机
*/
*/
@Excel
(
name
=
"手机"
)
private
String
mobile
;
private
String
mobile
;
/**
/**
* 星级
* 星级
*/
*/
@Excel
(
name
=
"星级"
)
private
Integer
starlevel
;
private
Integer
starlevel
;
/**
/**
* 个人简介
* 个人简介
*/
*/
@Excel
(
name
=
"个人简介"
)
private
String
summary
;
private
String
summary
;
/**
/**
* 照片
* 照片
*/
*/
@Excel
(
name
=
"照片"
,
height
=
90
,
type
=
Excel
.
Type
.
EXPORT
,
cellType
=
Excel
.
ColumnType
.
IMAGE
)
private
String
photoPath
;
private
String
photoPath
;
/**
/**
* 岗位职责
* 岗位职责
*/
*/
@Excel
(
name
=
"岗位职责"
)
private
String
duty
;
private
String
duty
;
/**
/**
* 服务承诺
* 服务承诺
*/
*/
@Excel
(
name
=
"服务承诺"
)
private
String
promise
;
private
String
promise
;
/**
/**
* 办理事项
* 办理事项
*/
*/
@Excel
(
name
=
"办理事项"
)
private
String
business
;
private
String
business
;
/**
/**
* 是否在线(0.离线,1.在线,2.暂离,3.点击暂离,4.回归,5.登陆)
* 是否在线(0.离线,1.在线,2.暂离,3.点击暂离,4.回归,5.登陆)
...
...
base-manager/src/main/java/com/mortals/xhx/module/workman/web/WorkmanController.java
View file @
1a867041
...
@@ -18,6 +18,7 @@ import com.mortals.xhx.base.system.upload.service.UploadService;
...
@@ -18,6 +18,7 @@ import com.mortals.xhx.base.system.upload.service.UploadService;
import
com.mortals.xhx.common.code.OnlineEnum
;
import
com.mortals.xhx.common.code.OnlineEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.site.service.SiteService
;
import
com.mortals.xhx.module.site.service.SiteService
;
...
@@ -218,6 +219,8 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
...
@@ -218,6 +219,8 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
if
(!
ObjectUtils
.
isEmpty
(
siteId
))
{
if
(!
ObjectUtils
.
isEmpty
(
siteId
))
{
siteEntity
=
siteService
.
get
(
Long
.
parseLong
(
siteId
));
siteEntity
=
siteService
.
get
(
Long
.
parseLong
(
siteId
));
}
}
if
(!
ObjectUtils
.
isEmpty
(
deptId
))
{
if
(!
ObjectUtils
.
isEmpty
(
deptId
))
{
deptEntity
=
deptService
.
get
(
Long
.
parseLong
(
deptId
));
deptEntity
=
deptService
.
get
(
Long
.
parseLong
(
deptId
));
}
}
...
@@ -240,11 +243,21 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
...
@@ -240,11 +243,21 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
if
(
ObjectUtils
.
isEmpty
(
workmanEntity
.
getLoginPwd
())
||
""
.
equals
(
workmanEntity
.
getLoginPwd
().
trim
()))
{
if
(
ObjectUtils
.
isEmpty
(
workmanEntity
.
getLoginPwd
())
||
""
.
equals
(
workmanEntity
.
getLoginPwd
().
trim
()))
{
workmanEntity
.
setLoginPwd
(
"123"
);
workmanEntity
.
setLoginPwd
(
"123"
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
workmanEntity
.
getDeptName
()))
{
DeptEntity
dept
=
deptService
.
selectOne
(
new
DeptQuery
().
name
(
workmanEntity
.
getDeptName
()).
siteId
(
siteEntity
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
dept
)){
workmanEntity
.
setDeptId
(
dept
.
getId
());
workmanEntity
.
setDeptName
(
dept
.
getName
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
deptEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
deptEntity
))
{
workmanEntity
.
setDeptId
(
deptEntity
.
getId
());
workmanEntity
.
setDeptId
(
deptEntity
.
getId
());
workmanEntity
.
setDeptName
(
deptEntity
.
getName
());
workmanEntity
.
setDeptName
(
deptEntity
.
getName
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
windowEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
windowEntity
))
{
workmanEntity
.
setWindowId
(
windowEntity
.
getId
());
workmanEntity
.
setWindowId
(
windowEntity
.
getId
());
workmanEntity
.
setWindowName
(
windowEntity
.
getName
());
workmanEntity
.
setWindowName
(
windowEntity
.
getName
());
...
...
portal-manager/db/add.sql
View file @
1a867041
...
@@ -43,7 +43,7 @@ CREATE TABLE `mortals_xhx_user_pwd_record` (
...
@@ -43,7 +43,7 @@ CREATE TABLE `mortals_xhx_user_pwd_record` (
UPDATE
mortals_xhx_user
SET
lastUpdatePwdTime
=
NOW
();
UPDATE
mortals_xhx_user
SET
lastUpdatePwdTime
=
NOW
();
-- ----------------------------
-- ----------------------------
2023
-
08
-
29
--
2023-08-29
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_user_model_collect`
;
DROP
TABLE
IF
EXISTS
`mortals_xhx_user_model_collect`
;
CREATE
TABLE
`mortals_xhx_user_model_collect`
(
CREATE
TABLE
`mortals_xhx_user_model_collect`
(
...
@@ -56,7 +56,7 @@ CREATE TABLE `mortals_xhx_user_model_collect` (
...
@@ -56,7 +56,7 @@ CREATE TABLE `mortals_xhx_user_model_collect` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户模块收藏'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户模块收藏'
;
-- ----------------------------
-- ----------------------------
2023
-
10
-
10
--
2023-10-10
-- ----------------------------
-- ----------------------------
ALTER
TABLE
`mortals_xhx_user_model_collect`
ALTER
TABLE
`mortals_xhx_user_model_collect`
ADD
COLUMN
`siteId`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'站点ID'
;
ADD
COLUMN
`siteId`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'站点ID'
;
...
@@ -64,9 +64,94 @@ ADD COLUMN `siteId` bigint(20) DEFAULT NULL COMMENT '站点ID';
...
@@ -64,9 +64,94 @@ ADD COLUMN `siteId` bigint(20) DEFAULT NULL COMMENT '站点ID';
UPDATE
mortals_xhx_user_model_collect
SET
siteId
=
1
;
UPDATE
mortals_xhx_user_model_collect
SET
siteId
=
1
;
-- ----------------------------
-- ----------------------------
2023
-
11
-
13
--
2023-11-13
-- ----------------------------
-- ----------------------------
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`resourceId`
bigint
(
20
)
COMMENT
'资源ID'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`resourceId`
bigint
(
20
)
COMMENT
'资源ID'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`createTime`
datetime
COMMENT
'创建时间'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`createTime`
datetime
COMMENT
'创建时间'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`createUserName`
varchar
(
50
)
COMMENT
'创建用户名称'
;
ALTER
TABLE
mortals_xhx_role_auth
ADD
COLUMN
`createUserName`
varchar
(
50
)
COMMENT
'创建用户名称'
;
-- ----------------------------
-- 2024-12-9 添加消息模板表与发送任务表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_message_template`
;
CREATE
TABLE
`mortals_xhx_message_template`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`code`
varchar
(
255
)
DEFAULT
''
COMMENT
'模板编码,唯一'
,
`site_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'站点ID'
,
`site_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'站点名称'
,
`site_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'站点编码'
,
`app_name`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'应用平台标识'
,
`category`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'分组,便于将模板归类,如“系统通知”、“营销推广”'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'模板名称,用于标识模板的用途或类型。例如 "注册成功通知"、"验证码短信"。'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'模板类型,指定消息模板适用的发送渠道或用途'
,
`content`
varchar
(
1024
)
COMMENT
'模板内容,支持包含动态占位符。占位符用特殊语法(如 {{变量名}})表示,发送时动态替换。例如:"您好,{{name}},您的验证码是 {{code}}"。'
,
`placeholders`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'模板占位符的定义,描述模板中各占位符的名称和含义。以 JSON 格式存储,例如:{"name": "用户姓名", "code": "验证码"},用于接口生成提示或校验必需参数。'
,
`description`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'模板描述,简要说明模板的用途和使用场景,方便管理员理解。例如:"此模板用于向用户发送验证码短信。"'
,
`priority`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'优先级,用于在消息任务调度时区分重要性 (0.普通,1.优先,2.紧急)'
,
`enabled`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'启用状态 (0.停用,1.启用)'
,
`create_user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建用户'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
KEY
`uni_code`
(
`code`
)
USING
BTREE
,
INDEX
`idx_site_id`
(
`site_id`
)
USING
BTREE
,
INDEX
`idx_app_name`
(
`app_name`
)
USING
BTREE
,
INDEX
`idx_category`
(
`category`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消息模板表'
;
DROP
TABLE
IF
EXISTS
`mortals_xhx_message_task`
;
CREATE
TABLE
`mortals_xhx_message_task`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`code`
varchar
(
255
)
DEFAULT
''
COMMENT
'模板编码,唯一'
,
`template_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'消息模板ID'
,
`app_name`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'应用平台标识'
,
`site_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'站点ID'
,
`site_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'站点名称'
,
`site_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'站点编码'
,
`recipient`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'接收者信息,例如手机号、邮箱或用户 ID,具体格式依据模板类型(SMS 为手机号,EMAIL 为邮箱,PUSH 为用户 ID)'
,
`parameters`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'动态参数,用于替换消息模板中的占位符。例如:{"name": "张三", "code": "123456"}'
,
`channel`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'消息发送渠道,例如 SMS(短信)、EMAIL(邮件)、PUSH(推送通知)'
,
`priority`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'优先级,用于在消息任务调度时区分重要性 (0.普通,1.优先,2.紧急)'
,
`send_status`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'状态 (0.待发送,1.发送中,2.成功,3.失败)'
,
`retry_count`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'任务重试次数,记录任务失败后已尝试重新发送的次数。默认值为 0,用于防止无限重试。'
,
`create_user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建用户'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_code`
(
`code`
)
USING
BTREE
,
INDEX
`idx_template_id`
(
`template_id`
)
USING
BTREE
,
INDEX
`idx_site_id`
(
`site_id`
)
USING
BTREE
,
INDEX
`idx_app_name`
(
`app_name`
)
USING
BTREE
,
INDEX
`idx_send_status`
(
`send_status`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消息任务表'
;
DROP
TABLE
IF
EXISTS
`mortals_xhx_message_log`
;
CREATE
TABLE
`mortals_xhx_message_log`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`code`
varchar
(
255
)
DEFAULT
''
COMMENT
'模板编码,唯一'
,
`task_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'任务ID'
,
`app_name`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'应用平台标识'
,
`site_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'站点ID'
,
`site_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'站点名称'
,
`site_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'站点编码'
,
`response`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'返回的响应结果,记录发送的详细反馈信息'
,
`error_code`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'错误代码,标识具体的失败原因。例如 "400"(参数错误)、"503"(服务不可用)'
,
`error_msg`
varchar
(
512
)
DEFAULT
NULL
COMMENT
'错误描述信息,对 error_code 进行补充说明。例如:"Invalid recipient address"'
,
`priority`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'优先级,用于在消息任务调度时区分重要性 (0.普通,1.优先,2.紧急)'
,
`send_status`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'状态 (0.待发送,1.发送中,2.成功,3.失败)'
,
`retry_count`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'任务重试次数,记录任务失败后已尝试重新发送的次数。默认值为 0,用于防止无限重试。'
,
`send_time`
datetime
DEFAULT
NULL
COMMENT
'发送时间'
,
`create_user_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建用户'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_task_id`
(
`task_id`
)
USING
BTREE
,
INDEX
`idx_code`
(
`code`
)
USING
BTREE
,
INDEX
`idx_site_id`
(
`site_id`
)
USING
BTREE
,
INDEX
`idx_app_name`
(
`app_name`
)
USING
BTREE
,
INDEX
`idx_send_status`
(
`send_status`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消息日志表'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment