md
This commit is contained in:
parent
7c47290779
commit
d2ef9ef0fa
@ -34,12 +34,18 @@ public class EmisNotCalcAging extends BaseEntity
|
||||
|
||||
/* 序号 */
|
||||
private Long id;
|
||||
/* 所属国家,可能多个国家,逗号隔开 */
|
||||
/* 所属国家,可能多个国家id,逗号隔开 */
|
||||
private String country;
|
||||
/* 国家名称列表 逗号隔开 */
|
||||
private String countryName;
|
||||
/* 不计时效日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date noCalcDay;
|
||||
/* 启用状态 0-启用 1-停用 */
|
||||
private Integer status;
|
||||
/* 创建网点 */
|
||||
private String createSite;
|
||||
/* 更新网点 */
|
||||
private String updateSite;
|
||||
|
||||
}
|
||||
|
||||
@ -16,17 +16,28 @@
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createSite" column="create_site" />
|
||||
<result property="updateSite" column="update_site" />
|
||||
|
||||
<association property="countryName" column="country" select="selectGroupCountryNameByCode"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisNotCalcAgingVo">
|
||||
select id, country, no_calc_day, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time from emis_not_calc_aging
|
||||
select id, country, country_name, no_calc_day, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_not_calc_aging
|
||||
</sql>
|
||||
|
||||
<select id="selectGroupCountryNameByCode" parameterType="String" resultType="string">
|
||||
select GROUP_CONCAT(name) from emis_country where FIND_IN_SET(`code`,#{code})
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisNotCalcAgingList" parameterType="EmisNotCalcAging" resultMap="EmisNotCalcAgingResult">
|
||||
<include refid="selectEmisNotCalcAgingVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||||
<if test="countryName != null and countryName != ''"> and country_name like concat('%', #{countryName}, '%')</if>
|
||||
<if test="noCalcDay != null "> and no_calc_day = #{noCalcDay}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
@ -36,12 +47,14 @@
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisNotCalcAgingById" parameterType="Long" resultMap="EmisNotCalcAgingResult">
|
||||
select id, country, no_calc_day, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time
|
||||
select id, country, country_name, no_calc_day, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_not_calc_aging a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
@ -51,6 +64,7 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="country != null and country != ''">country,</if>
|
||||
<if test="countryName != null and countryName != ''">country_name,</if>
|
||||
<if test="noCalcDay != null">no_calc_day,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
@ -60,10 +74,13 @@
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="country != null and country != ''">#{country},</if>
|
||||
<if test="countryName != null and countryName != ''">#{countryName},</if>
|
||||
<if test="noCalcDay != null">#{noCalcDay},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
@ -73,6 +90,8 @@
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -80,6 +99,7 @@
|
||||
update emis_not_calc_aging
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="country != null and country != ''">country = #{country},</if>
|
||||
<if test="countryName != null and countryName != ''">country_name = #{countryName},</if>
|
||||
<if test="noCalcDay != null">no_calc_day = #{noCalcDay},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
@ -89,6 +109,8 @@
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user