btxtgxq-system-population/src/main/resources/mybatis/mapper/populationlog/population-log-mapper.xml
java_cuibaocheng@163.com 12e10ecd2c 人口基本信息-房屋中同住人的新增与修改
人口基本信息-人口选择页面的去脱敏Bug修改
人口基本信息-人口选择页面增加新增人员功能
2023-11-16 14:51:04 +08:00

78 lines
3.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cm.population.dao.populationlog.IPopulationLogDao">
<resultMap id="populationLogDTO" type="com.cm.population.pojo.dtos.populationlog.PopulationLogDTO">
<result column="population_info_id" property="populationInfoId"/>
<result column="population_log_id" property="populationLogId"/>
<result column="population_info_new_creator_name" property="populationInfoNewCreatorName"/>
<result column="population_info_new_creator" property="populationInfoNewCreator"/>
<result column="population_info_old_creator_name" property="populationInfoOldCreatorName"/>
<result column="population_info_old_creator" property="populationInfoOldCreator"/>
<result column="population_info_content" property="populationInfoContent"/>
<result column="population_info_data" property="populationInfoData"/>
<result column="population_info_ip" property="populationInfoIp"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
</resultMap>
<insert id="save" parameterType="map">
INSERT INTO population_population_log(
population_log_id,
population_info_id,
population_info_new_creator_name,
population_info_new_creator,
population_info_old_creator_name,
population_info_old_creator,
population_info_content,
population_info_data,
population_info_ip,
creator,
gmt_create
) VALUES(
#{populationLogId},
#{populationInfoId},
#{populationInfoNewCreatorName},
#{populationInfoNewCreator},
#{populationInfoOldCreatorName},
#{populationInfoOldCreator},
#{populationInfoContent},
#{populationInfoData},
#{populationInfoIp},
#{creator},
#{gmtCreate}
)
</insert>
<select id="list" parameterType="map" resultMap="populationLogDTO">
SELECT
t1.population_info_id,
t1.population_log_id,
t1.population_info_new_creator_name,
t1.population_info_new_creator,
t1.population_info_old_creator_name,
t1.population_info_old_creator,
t1.population_info_content,
t1.population_info_data,
t1.population_info_ip,
t1.creator,
t1.gmt_create
FROM
population_population_log t1
WHERE
t1.population_info_id = #{populationInfoId}
ORDER BY
t1.gmt_create DESC
LIMIT 50
</select>
<select id="count" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
FROM
population_population_log t1
WHERE
t1.population_info_id = #{populationInfoId}
</select>
</mapper>