btxtgxq-system-bigdata/src/main/resources/mybatis/mapper/kpi/IKpiKhxzWgzDao.xml
2023-05-13 01:20:34 +08:00

70 lines
1.9 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.bigdata.dao.kpi.IKpiKhxzWgzDao">
<resultMap id="kpiKhxzWgzDTO" type="com.cm.bigdata.pojo.dtos.kpi.KpiKhxzWgzDTO">
<result column="id" property="id"/>
<result column="area_id" property="areaId"/>
<result column="community_id" property="communityId"/>
<result column="user_id" property="userId"/>
<result column="user_username" property="userUsername"/>
<result column="kh_year" property="khYear"/>
<result column="kh_month" property="khMonth"/>
<result column="B" property="b"/>
</resultMap>
<insert id="save" parameterType="map">
INSERT INTO kpi_khxz_wgz (
area_id,
community_id,
user_id,
user_username,
kh_year,
kh_month,
B
) VALUES (
#{areaId},
#{communityId},
#{userId},
#{userUsername},
#{khYear},
#{khMonth},
#{B}
)
</insert>
<delete id="delete" parameterType="map">
DELETE FROM
kpi_khxz_wgz
WHERE
kh_year = #{khYear}
AND
kh_month = #{khMonth}
</delete>
<update id="updateCDEFGH" parameterType="map">
UPDATE
kpi_khxz_wgz
SET
C = #{C},
D = #{D},
E = #{E},
F = #{F},
G = #{G},
H = #{H}
WHERE
kh_year = #{khYear}
AND
kh_month = #{khMonth}
AND
user_id = #{userId}
</update>
<select id="list" parameterType="map" resultMap="kpiKhxzWgzDTO">
SELECT
*
FROM
kpi_khxz_wgz
</select>
</mapper>