型号SN前缀
This commit is contained in:
parent
791a919280
commit
5184b06bd4
|
@ -71,4 +71,7 @@ public class SmModel extends BaseEntity
|
|||
@ApiModelProperty("OneNet产品ID")
|
||||
@NotBlank(message = "OneNet产品ID不允许为空", groups = {ValidGroup.Create.class})
|
||||
private String productId;
|
||||
|
||||
@ApiModelProperty("SN前缀")
|
||||
private String snPrefix;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ public class SmModelBO extends SmModel {
|
|||
bo.setServiceType(getServiceType());
|
||||
bo.setServiceRate(getServiceRate());
|
||||
bo.setProductId(getProductId());
|
||||
bo.setSnPrefix(getSnPrefix());
|
||||
return bo;
|
||||
}
|
||||
|
||||
|
@ -36,6 +37,7 @@ public class SmModelBO extends SmModel {
|
|||
bo.setServiceType(getServiceType());
|
||||
bo.setServiceRate(getServiceRate());
|
||||
bo.setProductId(getProductId());
|
||||
bo.setSnPrefix(getSnPrefix());
|
||||
return bo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sm.service_type,
|
||||
sm.service_rate,
|
||||
sm.product_id,
|
||||
sm.sn_prefix,
|
||||
count(case when sd.activation_time is not null and sd.deleted = false then sd.device_id end) as activation_count,
|
||||
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
|
||||
|
@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="searchCondition">
|
||||
<if test="modelName != null and modelName != ''"> and sm.model_name like concat('%', #{modelName}, '%')</if>
|
||||
<if test="snPrefix != null and snPrefix != ''"> and sm.sn_prefix like concat('%', #{snPrefix}, '%')</if>
|
||||
<if test="model != null and model != ''"> and sm.model = #{model}</if>
|
||||
<if test="serviceType != null and serviceType != ''"> and sm.service_type = #{serviceType}</if>
|
||||
<if test="productId != null and productId != ''"> and sm.product_id = #{productId}</if>
|
||||
|
@ -92,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="serviceType != null">service_type,</if>
|
||||
<if test="serviceRate != null">service_rate,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="snPrefix != null">sn_prefix,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modelName != null">#{modelName},</if>
|
||||
|
@ -108,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="serviceType != null">#{serviceType},</if>
|
||||
<if test="serviceRate != null">#{serviceRate},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="snPrefix != null">#{snPrefix},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -128,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="serviceType != null">service_type = #{serviceType},</if>
|
||||
<if test="serviceRate != null">service_rate = #{serviceRate},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="snPrefix != null">sn_prefix = #{snPrefix},</if>
|
||||
</trim>
|
||||
where model_id = #{modelId}
|
||||
</update>
|
||||
|
|
Loading…
Reference in New Issue
Block a user