型号排序
This commit is contained in:
parent
0109e30920
commit
eb8f281092
|
@ -74,4 +74,7 @@ public class SmModel extends BaseEntity
|
||||||
|
|
||||||
@ApiModelProperty("SN前缀")
|
@ApiModelProperty("SN前缀")
|
||||||
private String snPrefix;
|
private String snPrefix;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序字段")
|
||||||
|
private Integer sort;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class SmModelBO extends SmModel {
|
||||||
bo.setServiceRate(getServiceRate());
|
bo.setServiceRate(getServiceRate());
|
||||||
bo.setProductId(getProductId());
|
bo.setProductId(getProductId());
|
||||||
bo.setSnPrefix(getSnPrefix());
|
bo.setSnPrefix(getSnPrefix());
|
||||||
|
bo.setSort(getSort());
|
||||||
return bo;
|
return bo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ public class SmModelBO extends SmModel {
|
||||||
bo.setServiceRate(getServiceRate());
|
bo.setServiceRate(getServiceRate());
|
||||||
bo.setProductId(getProductId());
|
bo.setProductId(getProductId());
|
||||||
bo.setSnPrefix(getSnPrefix());
|
bo.setSnPrefix(getSnPrefix());
|
||||||
|
bo.setSort(getSort());
|
||||||
return bo;
|
return bo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sm.service_rate,
|
sm.service_rate,
|
||||||
sm.product_id,
|
sm.product_id,
|
||||||
sm.sn_prefix,
|
sm.sn_prefix,
|
||||||
count(case when sd.activation_time is not null and sd.deleted = false then sd.device_id end) as activation_count,
|
sm.sort
|
||||||
count(case when sd.online_status = '1' and sd.activation_time is not null and sd.deleted = false then sd.device_id end) as online_count
|
|
||||||
from sm_model sm
|
from sm_model sm
|
||||||
left join sm_device sd on sm.model_id = sd.model_id
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="searchCondition">
|
<sql id="searchCondition">
|
||||||
|
@ -52,13 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
<include refid="searchCondition"/>
|
<include refid="searchCondition"/>
|
||||||
</where>
|
</where>
|
||||||
group by sm.model_id
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSmModelByModelId" parameterType="Long" resultMap="SmModelResult">
|
<select id="selectSmModelByModelId" parameterType="Long" resultMap="SmModelResult">
|
||||||
<include refid="selectSmModelVo"/>
|
<include refid="selectSmModelVo"/>
|
||||||
where sm.model_id = #{modelId}
|
where sm.model_id = #{modelId}
|
||||||
group by sm.model_id
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCount" resultType="java.lang.Integer">
|
<select id="selectCount" resultType="java.lang.Integer">
|
||||||
|
@ -95,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="serviceRate != null">service_rate,</if>
|
<if test="serviceRate != null">service_rate,</if>
|
||||||
<if test="productId != null">product_id,</if>
|
<if test="productId != null">product_id,</if>
|
||||||
<if test="snPrefix != null">sn_prefix,</if>
|
<if test="snPrefix != null">sn_prefix,</if>
|
||||||
|
<if test="sort != null">sort,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="modelName != null">#{modelName},</if>
|
<if test="modelName != null">#{modelName},</if>
|
||||||
|
@ -112,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="serviceRate != null">#{serviceRate},</if>
|
<if test="serviceRate != null">#{serviceRate},</if>
|
||||||
<if test="productId != null">#{productId},</if>
|
<if test="productId != null">#{productId},</if>
|
||||||
<if test="snPrefix != null">#{snPrefix},</if>
|
<if test="snPrefix != null">#{snPrefix},</if>
|
||||||
|
<if test="sort != null">#{sort},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -133,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="serviceRate != null">service_rate = #{serviceRate},</if>
|
<if test="serviceRate != null">service_rate = #{serviceRate},</if>
|
||||||
<if test="productId != null">product_id = #{productId},</if>
|
<if test="productId != null">product_id = #{productId},</if>
|
||||||
<if test="snPrefix != null">sn_prefix = #{snPrefix},</if>
|
<if test="snPrefix != null">sn_prefix = #{snPrefix},</if>
|
||||||
|
<if test="sort != null">sort = #{sort},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where model_id = #{modelId}
|
where model_id = #{modelId}
|
||||||
</update>
|
</update>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user