Administrator %!s(int64=2) %!d(string=hai) anos
pai
achega
18c4fd0de4

+ 13 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRotograph.java

@@ -21,12 +21,24 @@ public class SysRotograph extends BaseEntity
     /** 图片地址 */
     @Excel(name = "图片地址")
     private String path;
+    /**
+     * 轮播图类型 1:招商 2发改委
+     */
+    private String type;
 
     /** 排序 */
     @Excel(name = "排序")
     private Long sort;
 
-    public void setId(Long id) 
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }

+ 6 - 1
ruoyi-system/src/main/resources/mapper/system/SysRotographMapper.xml

@@ -7,18 +7,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="SysRotograph" id="SysRotographResult">
         <result property="id"    column="id"    />
         <result property="path"    column="path"    />
+        <result property="type"    column="type"    />
         <result property="sort"    column="sort"    />
         <result property="remark"    column="remark"    />
     </resultMap>
 
     <sql id="selectSysRotographVo">
-        select id, path, sort, remark from sys_rotograph
+        select id, path,type, sort, remark from sys_rotograph
     </sql>
 
     <select id="selectSysRotographList" parameterType="SysRotograph" resultMap="SysRotographResult">
         <include refid="selectSysRotographVo"/>
         <where>  
             <if test="path != null  and path != ''"> and path = #{path}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="sort != null "> and sort = #{sort}</if>
         </where>
         order by sort
@@ -34,11 +36,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="path != null">path,</if>
             <if test="sort != null">sort,</if>
+            <if test="type != null">type,</if>
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="path != null">#{path},</if>
             <if test="sort != null">#{sort},</if>
+            <if test="type != null">#{type},</if>
             <if test="remark != null">#{remark},</if>
          </trim>
     </insert>
@@ -48,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="path != null">path = #{path},</if>
             <if test="sort != null">sort = #{sort},</if>
+            <if test="type != null">type = #{type},</if>
             <if test="remark != null">remark = #{remark},</if>
         </trim>
         where id = #{id}