Commit 93549a45 by hayden

房间新增排序值,倒序

parent 5405ee1d
......@@ -32,6 +32,10 @@ public class SRoom extends BaseEntity
@Excel(name = "门店ID")
private Long storeId;
/** 排序值 */
@Excel(name = "排序值")
private String sort;
/** 房间名称 */
@Excel(name = "房间名称")
private String name;
......
......@@ -34,6 +34,10 @@ public class SRoomVo extends BaseEntity
@ApiModelProperty(value = "门店ID")
private Long storeId;
/** 排序值 */
@Excel(name = "排序值")
private String sort;
/** 门店名称 */
@ApiModelProperty(value = "门店名称")
private String storeName;
......
......@@ -7,6 +7,7 @@
<resultMap type="SRoom" id="SRoomResult">
<result property="id" column="id" />
<result property="storeId" column="store_id" />
<result property="sort" column="sort" />
<result property="name" column="name" />
<result property="roomType" column="room_type" />
<result property="images" column="images" />
......@@ -27,7 +28,7 @@
</resultMap>
<sql id="selectSRoomVo">
select id, store_id, name, room_type, images, facilities, info, status, price, door_lock_code, electric_control_code, password, params1, params2, create_by, create_time, update_by, update_time, remark from s_room
select id, store_id, sort, name, room_type, images, facilities, info, status, price, door_lock_code, electric_control_code, password, params1, params2, create_by, create_time, update_by, update_time, remark from s_room
</sql>
<select id="selectSRoomList" parameterType="SRoom" resultMap="SRoomResult">
......@@ -47,6 +48,7 @@
<if test="params1 != null and params1 != ''"> and params1 = #{params1}</if>
<if test="params2 != null and params2 != ''"> and params2 = #{params2}</if>
</where>
order by sort desc
</select>
<select id="selectSRoomById" parameterType="Long" resultMap="SRoomResult">
......@@ -57,6 +59,7 @@
<insert id="insertSRoom" parameterType="SRoom" useGeneratedKeys="true" keyProperty="id">
insert into s_room
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sort != null">sort,</if>
<if test="storeId != null">store_id,</if>
<if test="name != null">name,</if>
<if test="roomType != null">room_type,</if>
......@@ -77,6 +80,7 @@
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sort != null">#{sort},</if>
<if test="storeId != null">#{storeId},</if>
<if test="name != null">#{name},</if>
<if test="roomType != null">#{roomType},</if>
......@@ -101,6 +105,7 @@
<update id="updateSRoom" parameterType="SRoom">
update s_room
<trim prefix="SET" suffixOverrides=",">
<if test="sort != null">sort = #{sort},</if>
<if test="storeId != null">store_id = #{storeId},</if>
<if test="name != null">name = #{name},</if>
<if test="roomType != null">room_type = #{roomType},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment