Commit 70c8e627 by leejoker

添加初始化数据,修复部分bug

1 parent 6e4320f6
......@@ -72,7 +72,7 @@ public class WeSensitiveActController extends BaseController {
@PreAuthorize("@ss.hasPermi('wecom:sensitiveact:edit')")
@Log(title = "修改敏感行为", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Valid @RequestBody WeSensitiveAct weSensitiveAct) {
public AjaxResult edit(@RequestBody WeSensitiveAct weSensitiveAct) {
Long id = weSensitiveAct.getId();
WeSensitiveAct originData = weSensitiveActService.selectWeSensitiveActById(id);
if (originData == null) {
......
......@@ -33,7 +33,7 @@ public class WeSensitiveActServiceImpl extends ServiceImpl<WeSensitiveActMapper,
if (weSensitiveAct != null && StringUtils.isNotBlank(weSensitiveAct.getActName())) {
lambda.eq(WeSensitiveAct::getActName, weSensitiveAct);
}
lambda.orderByDesc(WeSensitiveAct::getOrderNum)
lambda.orderByAsc(WeSensitiveAct::getOrderNum)
.orderByDesc(WeSensitiveAct::getUpdateTime)
.orderByDesc(WeSensitiveAct::getCreateTime);
return list(lambda);
......
......@@ -6351,7 +6351,7 @@ DROP TABLE IF EXISTS `we_sensitive_act`;
CREATE TABLE `we_sensitive_act` (
id BIGINT auto_increment NOT NULL COMMENT '主键',
act_name varchar(100) NOT NULL COMMENT '敏感行为名称',
order_num INT DEFAULT 0 NOT NULL COMMENT '排序字段,倒序排序',
order_num INT DEFAULT 0 NOT NULL COMMENT '排序字段',
enable_flag TINYINT DEFAULT 1 NOT NULL COMMENT '记录敏感行为,1 开启 0 关闭',
del_flag TINYINT DEFAULT 0 NOT NULL COMMENT '删除标识,1 已删除 0 未删除',
create_by varchar(64) NULL COMMENT '创建人',
......@@ -6362,6 +6362,15 @@ CREATE TABLE `we_sensitive_act` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='敏感行为表';
-- ----------------------------
-- Records of we_sensitive_act
-- ----------------------------
INSERT INTO we_sensitive_act (act_name,order_num,enable_flag,del_flag,create_by,create_time,update_by,update_time) VALUES
('发名片',1,1,0,'admin','2021-01-13 11:11:18.0','admin','2021-01-13 11:11:18.0'),
('发红包',2,1,0,'admin','2021-01-13 11:11:29.0','admin','2021-01-13 11:11:29.0'),
('删除好友',3,1,0,'admin','2021-01-13 11:10:54.0','admin','2021-01-13 11:10:54.0'),
('拉黑好友',4,1,0,'admin','2021-01-13 11:11:51.0','admin','2021-01-13 11:11:51.0');
-- ----------------------------
-- Table structure for we_sensitive_act_hit
-- ----------------------------
DROP TABLE IF EXISTS `we_sensitive_act_hit`;
......@@ -6376,5 +6385,7 @@ CREATE TABLE `we_sensitive_act_hit` (
del_flag TINYINT DEFAULT 0 NOT NULL COMMENT '删除标识,1 已删除 0 未删除',
create_by varchar(64) NULL COMMENT '创建人',
create_time DATETIME NULL COMMENT '创建时间',
update_by varchar(64) NULL COMMENT '更新人',
update_time DATETIME NULL COMMENT '更新时间',
CONSTRAINT we_sensitive_act_hit_pk PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='敏感行为记录表';
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!