新增小程序页面管理模块

This commit is contained in:
2024-07-21 20:06:06 +08:00
parent 4e1a76968f
commit 4fc1e5e9b8
3 changed files with 70 additions and 61 deletions
@@ -1,5 +1,6 @@
package com.gxwebsoft.cms.entity; package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
@@ -116,4 +117,7 @@ public class MpMenu implements Serializable {
@ApiModelProperty(value = "注册时间") @ApiModelProperty(value = "注册时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "分组名称")
private String groupName;
} }
@@ -43,6 +43,9 @@ public class MpPages implements Serializable {
@ApiModelProperty(value = "分包") @ApiModelProperty(value = "分包")
private String subpackage; private String subpackage;
@ApiModelProperty(value = "图标")
private String icon;
@ApiModelProperty(value = "排序(数字越小越靠前)") @ApiModelProperty(value = "排序(数字越小越靠前)")
private Integer sortNumber; private Integer sortNumber;
@@ -2,68 +2,70 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.cms.mapper.MpPagesMapper"> <mapper namespace="com.gxwebsoft.cms.mapper.MpPagesMapper">
<!-- 关联查询sql --> <!-- 关联查询sql -->
<sql id="selectSql"> <sql id="selectSql">
SELECT a.* SELECT a.*
FROM cms_mp_pages a FROM cms_mp_pages a
<where> <where>
<if test="param.id != null"> <if test="param.id != null">
AND a.id = #{param.id} AND a.id = #{param.id}
</if> </if>
<if test="param.parentId != null"> <if test="param.parentId != null">
AND a.parent_id = #{param.parentId} AND a.parent_id = #{param.parentId}
</if> </if>
<if test="param.title != null"> <if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%') AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if> </if>
<if test="param.path != null"> <if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%') AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if> </if>
<if test="param.home != null"> <if test="param.home != null">
AND a.home = #{param.home} AND a.home = #{param.home}
</if> </if>
<if test="param.subpackage != null"> <if test="param.subpackage != null">
AND a.subpackage LIKE CONCAT('%', #{param.subpackage}, '%') AND a.subpackage LIKE CONCAT('%', #{param.subpackage}, '%')
</if> </if>
<if test="param.sortNumber != null"> <if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber} AND a.sort_number = #{param.sortNumber}
</if> </if>
<if test="param.comments != null"> <if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%') AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if> </if>
<if test="param.userId != null"> <if test="param.userId != null">
AND a.user_id = #{param.userId} AND a.user_id = #{param.userId}
</if> </if>
<if test="param.status != null"> <if test="param.status != null">
AND a.status = #{param.status} AND a.status = #{param.status}
</if> </if>
<if test="param.deleted != null"> <if test="param.deleted != null">
AND a.deleted = #{param.deleted} AND a.deleted = #{param.deleted}
</if> </if>
<if test="param.deleted == null"> <if test="param.deleted == null">
AND a.deleted = 0 AND a.deleted = 0
</if> </if>
<if test="param.createTimeStart != null"> <if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart} AND a.create_time &gt;= #{param.createTimeStart}
</if> </if>
<if test="param.createTimeEnd != null"> <if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd} AND a.create_time &lt;= #{param.createTimeEnd}
</if> </if>
<if test="param.keywords != null"> <if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
) OR a.title LIKE CONCAT('%', #{param.keywords}, '%')
</if> OR a.path LIKE CONCAT('%', #{param.keywords}, '%')
</where> )
</sql> </if>
</where>
</sql>
<!-- 分页查询 --> <!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.MpPages"> <select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.MpPages">
<include refid="selectSql"></include> <include refid="selectSql"></include>
</select> </select>
<!-- 查询全部 --> <!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.MpPages"> <select id="selectListRel" resultType="com.gxwebsoft.cms.entity.MpPages">
<include refid="selectSql"></include> <include refid="selectSql"></include>
</select> </select>
</mapper> </mapper>