@ApiModel(value="com-entity-GuaranteeRescueTeam")
public class GuaranteeRescueTeam implements Serializable {
@ApiModelProperty(value="类型")
private Integer type;
private String typeName;//getter/setter
<select id="select" resultType="com.piesat.iems.entity.GuaranteeRescueTeam">
select grt.TEAM_ID as teamId, grt.NAME,
grt.SCALE_NUMBER,
b.DICT_NAME as typeName,
grt.STATUS, grt.LOCATION, grt.PRINCIPAL, grt.PHONE
from guarantee_rescue_team grt
left outer join base_dict b on grt.TYPE = b.DICT_VALUE and b.DICT_TYPE = 'rescueTeamType'
<where>
<if test="name != null and name != ''">
grt.NAME like concat('%', #{name}, '%')
</if>
<if test="type != null">
and grt.TYPE = #{type}
</if>
<if test="status != null">
and grt.STATUS = #{status}
</if>
<if test="scaleNumber != null">
<if test="scaleNumber == 1">
and grt.SCALE_NUMBER < 50
</if>
<if test="scaleNumber == 2">
and grt.SCALE_NUMBER >= 50 and grt.SCALE_NUMBER < 100
</if>
<if test="scaleNumber == 3">
and grt.SCALE_NUMBER >= 100 and grt.SCALE_NUMBER <= 500
</if>
<if test="scaleNumber == 4">
and grt.SCALE_NUMBER > 500
</if>
</if>
</where>
</select>