Procházet zdrojové kódy

轮播图新增字段,图片名称或描述

LiRong před 3 měsíci
rodič
revize
599dc9b0f3

+ 6 - 1
leromro-core/src/main/java/com/leromro/core/domain/Slideshow.java

@@ -32,8 +32,13 @@ public class Slideshow extends BaseEntity
 
     /** 图片字符串拼接起来 */
     @TableField("picture")
-    @ApiModelProperty("图片字符串拼接起来")
+    @ApiModelProperty("图片字符串拼接起来")
     private String picture;
 
+    /** 图片字符串拼接起来 */
+    @TableField("slideshow_name")
+    @ApiModelProperty("图片的名字和或描述")
+    private String slideshowName;
+
 
 }

+ 5 - 1
leromro-core/src/main/resources/mapper/core/LSlideshowMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="Slideshow" id="LSlideshowResult">
         <result property="slideshowId"    column="slideshow_id"    />
+        <result property="slideshowName"    column="slideshow_name"    />
         <result property="picture"    column="picture"    />
         <result property="createTime"    column="create_time"    />
         <result property="createBy"    column="create_by"    />
@@ -15,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectLSlideshowVo">
-        select slideshow_id, picture, create_time, create_by, update_time, update_by, remark from l_slideshow
+        select slideshow_id,slideshow_name, picture, create_time, create_by, update_time, update_by, remark from l_slideshow
     </sql>
 
     <select id="selectLSlideshowList" parameterType="Slideshow" resultMap="LSlideshowResult">
@@ -33,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertLSlideshow" parameterType="Slideshow" useGeneratedKeys="true" keyProperty="slideshowId">
         insert into l_slideshow
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="slideshowName != null">slideshow_name,</if>
             <if test="picture != null">picture,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createBy != null">create_by,</if>
@@ -41,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="slideshowName != null">#{slideshowName},</if>
             <if test="picture != null">#{picture},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -53,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateLSlideshow" parameterType="Slideshow">
         update l_slideshow
         <trim prefix="SET" suffixOverrides=",">
+            <if test="slideshowName != null">slideshow_name = #{slideshowName},</if>
             <if test="picture != null">picture = #{picture},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>