refactor(online): 重命名 OnlineMb 中的 sql 属性为 sqlText
- 在 OnlineMb 类中,将 sql 属性重命名为 sqlText - 更新了相关的 getter 和 setter 方法 - 修改了 mapper 文件中的对应字段 - 调整了 SQL 查询语句中的字段名称
This commit is contained in:
parent
bde0e974a0
commit
79bf3dfdf5
@ -134,7 +134,7 @@ public class OnLineController extends BaseController {
|
|||||||
if (onlineMb.getUserId() != null && onlineMb.getUserId().equals("1")) {
|
if (onlineMb.getUserId() != null && onlineMb.getUserId().equals("1")) {
|
||||||
object.put("userId", SecurityUtils.getUserId());
|
object.put("userId", SecurityUtils.getUserId());
|
||||||
}
|
}
|
||||||
return processingMapper(onlineMb.getSql(), onlineMb.getActuator(), object);
|
return processingMapper(onlineMb.getSqlText(), onlineMb.getActuator(), object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class OnlineMb extends BaseEntity {
|
|||||||
/** sql语句 */
|
/** sql语句 */
|
||||||
@Schema(title = "sql语句")
|
@Schema(title = "sql语句")
|
||||||
@Excel(name = "sql语句")
|
@Excel(name = "sql语句")
|
||||||
private String sql;
|
private String sqlText;
|
||||||
|
|
||||||
/** 请求路径 */
|
/** 请求路径 */
|
||||||
@Schema(title = "请求路径")
|
@Schema(title = "请求路径")
|
||||||
@ -159,12 +159,12 @@ public class OnlineMb extends BaseEntity {
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSql(String sql) {
|
public void setSqlText(String sqlText) {
|
||||||
this.sql = sql;
|
this.sqlText = sqlText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSql() {
|
public String getSqlText() {
|
||||||
return sql;
|
return sqlText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPath(String path) {
|
public void setPath(String path) {
|
||||||
@ -207,7 +207,7 @@ public class OnlineMb extends BaseEntity {
|
|||||||
.append("tagId", getTagId())
|
.append("tagId", getTagId())
|
||||||
.append("parameterType", getParameterType())
|
.append("parameterType", getParameterType())
|
||||||
.append("resultMap", getResultMap())
|
.append("resultMap", getResultMap())
|
||||||
.append("sql", getSql())
|
.append("sqlText", getSqlText())
|
||||||
.append("path", getPath())
|
.append("path", getPath())
|
||||||
.append("method", getMethod())
|
.append("method", getMethod())
|
||||||
.append("resultType", getResultType())
|
.append("resultType", getResultType())
|
||||||
|
@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="tagId" column="tag_id" />
|
<result property="tagId" column="tag_id" />
|
||||||
<result property="parameterType" column="parameter_type" />
|
<result property="parameterType" column="parameter_type" />
|
||||||
<result property="resultMap" column="result_map" />
|
<result property="resultMap" column="result_map" />
|
||||||
<result property="sql" column="sql" />
|
<result property="sqlText" column="sql_text" />
|
||||||
<result property="path" column="path" />
|
<result property="path" column="path" />
|
||||||
<result property="method" column="method" />
|
<result property="method" column="method" />
|
||||||
<result property="resultType" column="result_type" />
|
<result property="resultType" column="result_type" />
|
||||||
@ -22,19 +22,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOnlineMbVo">
|
<sql id="selectOnlineMbVo">
|
||||||
select mb_id, tag, tag_id, parameter_type, result_map, `sql`, `path`, method, result_type, actuator,user_id,dept_id,permission_type,permission_value from online_mb
|
select mb_id, tag, tag_id, parameter_type, result_map, sql_text, online_mb.path, method, result_type, actuator,user_id,dept_id,permission_type,permission_value from online_mb
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectOnlineMbList" parameterType="OnlineMb" resultMap="OnlineMbResult">
|
<select id="selectOnlineMbList" parameterType="OnlineMb" resultMap="OnlineMbResult">
|
||||||
<include refid="selectOnlineMbVo"/>
|
<include refid="selectOnlineMbVo"/>
|
||||||
<where>
|
<where>
|
||||||
online_mb.del_flag != 1
|
online_mb.del_flag != '1'
|
||||||
<if test="tag != null and tag != ''"> and tag = #{tag}</if>
|
<if test="tag != null and tag != ''"> and tag = #{tag}</if>
|
||||||
<if test="tagId != null and tagId != ''"> and tag_id = #{tagId}</if>
|
<if test="tagId != null and tagId != ''"> and tag_id = #{tagId}</if>
|
||||||
<if test="parameterType != null and parameterType != ''"> and parameter_type = #{parameterType}</if>
|
<if test="parameterType != null and parameterType != ''"> and parameter_type = #{parameterType}</if>
|
||||||
<if test="resultMap != null and resultMap != ''"> and result_map = #{resultMap}</if>
|
<if test="resultMap != null and resultMap != ''"> and result_map = #{resultMap}</if>
|
||||||
<if test="sql != null and sql != ''"> and `sql` = #{sql}</if>
|
<if test="sqlText != null and sqlText != ''"> and sql_text = #{sqlText}</if>
|
||||||
<if test="path != null and path != ''"> and `path` = #{path}</if>
|
<if test="path != null and path != ''"> and path = #{path}</if>
|
||||||
<if test="method != null and method != ''"> and method = #{method}</if>
|
<if test="method != null and method != ''"> and method = #{method}</if>
|
||||||
<if test="resultType != null and resultType != ''"> and result_type = #{resultType}</if>
|
<if test="resultType != null and resultType != ''"> and result_type = #{resultType}</if>
|
||||||
<if test="actuator != null and actuator != ''"> and actuator = #{actuator}</if>
|
<if test="actuator != null and actuator != ''"> and actuator = #{actuator}</if>
|
||||||
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectOnlineMbByMbId" parameterType="Long" resultMap="OnlineMbResult">
|
<select id="selectOnlineMbByMbId" parameterType="Long" resultMap="OnlineMbResult">
|
||||||
<include refid="selectOnlineMbVo"/>
|
<include refid="selectOnlineMbVo"/>
|
||||||
where online_mb.mb_id = #{mbId} and online_mb.del_flag != 1
|
where online_mb.mb_id = #{mbId} and online_mb.del_flag != '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertOnlineMb" parameterType="OnlineMb">
|
<insert id="insertOnlineMb" parameterType="OnlineMb">
|
||||||
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="tagId != null">tag_id,</if>
|
<if test="tagId != null">tag_id,</if>
|
||||||
<if test="parameterType != null">parameter_type,</if>
|
<if test="parameterType != null">parameter_type,</if>
|
||||||
<if test="resultMap != null">result_map,</if>
|
<if test="resultMap != null">result_map,</if>
|
||||||
<if test="sql != null">`sql`,</if>
|
<if test="sqlText != null">sql_text,</if>
|
||||||
<if test="path != null and path != ''">path,</if>
|
<if test="path != null and path != ''">path,</if>
|
||||||
<if test="method != null and method != ''">method,</if>
|
<if test="method != null and method != ''">method,</if>
|
||||||
<if test="resultType != null">result_type,</if>
|
<if test="resultType != null">result_type,</if>
|
||||||
@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="tagId != null">#{tagId},</if>
|
<if test="tagId != null">#{tagId},</if>
|
||||||
<if test="parameterType != null">#{parameterType},</if>
|
<if test="parameterType != null">#{parameterType},</if>
|
||||||
<if test="resultMap != null">#{resultMap},</if>
|
<if test="resultMap != null">#{resultMap},</if>
|
||||||
<if test="sql != null">#{sql},</if>
|
<if test="sqlText != null">#{sqlText},</if>
|
||||||
<if test="path != null and path != ''">#{path},</if>
|
<if test="path != null and path != ''">#{path},</if>
|
||||||
<if test="method != null and method != ''">#{method},</if>
|
<if test="method != null and method != ''">#{method},</if>
|
||||||
<if test="resultType != null">#{resultType},</if>
|
<if test="resultType != null">#{resultType},</if>
|
||||||
@ -93,8 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="tagId != null">tag_id = #{tagId},</if>
|
<if test="tagId != null">tag_id = #{tagId},</if>
|
||||||
<if test="parameterType != null">parameter_type = #{parameterType},</if>
|
<if test="parameterType != null">parameter_type = #{parameterType},</if>
|
||||||
<if test="resultMap != null">result_map = #{result_map},</if>
|
<if test="resultMap != null">result_map = #{result_map},</if>
|
||||||
<if test="sql != null">`sql` = #{sql},</if>
|
<if test="sqlText != null">sql_text = #{sqlText},</if>
|
||||||
<if test="path != null and path != ''">`path` = #{path},</if>
|
<if test="path != null and path != ''">path = #{path},</if>
|
||||||
<if test="method != null and method != ''">method = #{method},</if>
|
<if test="method != null and method != ''">method = #{method},</if>
|
||||||
<if test="resultType != null">result_type = #{resultType},</if>
|
<if test="resultType != null">result_type = #{resultType},</if>
|
||||||
<if test="actuator != null and actuator != ''">actuator = #{actuator},</if>
|
<if test="actuator != null and actuator != ''">actuator = #{actuator},</if>
|
||||||
@ -103,15 +103,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="permissionType != null and permissionType != ''">permission_type = #{permissionType},</if>
|
<if test="permissionType != null and permissionType != ''">permission_type = #{permissionType},</if>
|
||||||
<if test="permissionValue != null and permissionValue != ''">permission_value = #{permissionValue},</if>
|
<if test="permissionValue != null and permissionValue != ''">permission_value = #{permissionValue},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where online_mb.mb_id = #{mbId} and online_mb.del_flag != 1
|
where online_mb.mb_id = #{mbId} and online_mb.del_flag != '1'
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteOnlineMbByMbId" parameterType="Long">
|
<delete id="deleteOnlineMbByMbId" parameterType="Long">
|
||||||
update online_mb set del_flag = 1 where mb_id = #{mbId}
|
update online_mb set del_flag = '1' where mb_id = #{mbId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteOnlineMbByMbIds" parameterType="String">
|
<delete id="deleteOnlineMbByMbIds" parameterType="String">
|
||||||
update online_mb set del_flag = 1 where mb_id in
|
update online_mb set del_flag = '1' where mb_id in
|
||||||
<foreach item="mbId" collection="array" open="(" separator="," close=")">
|
<foreach item="mbId" collection="array" open="(" separator="," close=")">
|
||||||
#{mbId}
|
#{mbId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -1,3 +1 @@
|
|||||||
CREATE DATABASE IF NOT EXISTS ry
|
CREATE DATABASE IF NOT EXISTS ry CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||||
CHARACTER SET utf8mb4
|
|
||||||
COLLATE utf8mb4_general_ci;
|
|
@ -6,7 +6,7 @@ CREATE TABLE online_mb (
|
|||||||
tag_id varchar(255) NULL COMMENT '标签id',
|
tag_id varchar(255) NULL COMMENT '标签id',
|
||||||
parameter_type varchar(255) NULL COMMENT '参数类型',
|
parameter_type varchar(255) NULL COMMENT '参数类型',
|
||||||
result_map varchar(255) NULL COMMENT '结果类型',
|
result_map varchar(255) NULL COMMENT '结果类型',
|
||||||
`sql` varchar(255) NULL COMMENT 'sql语句',
|
sql_text varchar(255) NULL COMMENT 'sql语句',
|
||||||
path varchar(255) NULL COMMENT '请求路径',
|
path varchar(255) NULL COMMENT '请求路径',
|
||||||
method varchar(255) NULL COMMENT '请求方式',
|
method varchar(255) NULL COMMENT '请求方式',
|
||||||
result_type varchar(255) NULL COMMENT '响应类型',
|
result_type varchar(255) NULL COMMENT '响应类型',
|
||||||
|
Loading…
Reference in New Issue
Block a user