system-operator/src/main/resources/mybatis/mapper/user/expand/user-expand.xml

117 lines
4.5 KiB
XML
Raw Normal View History

2024-06-11 16:05:23 +08:00
<?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="cn.com.tenlion.operator.dao.user.expand.IUserExpandDao">
<resultMap id="userExpandDTO" type="cn.com.tenlion.operator.pojo.dtos.user.expand.UserExpandDTO">
<result column="price_additional_pkg" property="priceAdditionalPkg"/>
<result column="price_additional_video_demo" property="priceAdditionalVideoDemo"/>
<result column="price_all" property="priceAll"/>
<result column="price_material" property="priceMaterial"/>
<result column="price_material_agent" property="priceMaterialAgent"/>
<result column="price_material_agent_urgent" property="priceMaterialAgentUrgent"/>
2024-06-14 14:27:09 +08:00
<result column="available_proj_type" property="availableProjType"/>
<result column="postpaid" property="postpaid"/>
<result column="free_proj_count" property="freeProjCount"/>
<result column="correction_count" property="correctionCount"/>
2024-06-11 16:05:23 +08:00
</resultMap>
2024-06-11 16:50:38 +08:00
<resultMap id="userExpandPO" type="cn.com.tenlion.operator.pojo.pos.user.expand.UserExpandPO">
<result column="price_additional_pkg" property="priceAdditionalPkg"/>
<result column="price_additional_video_demo" property="priceAdditionalVideoDemo"/>
<result column="price_all" property="priceAll"/>
<result column="price_material" property="priceMaterial"/>
<result column="price_material_agent" property="priceMaterialAgent"/>
<result column="price_material_agent_urgent" property="priceMaterialAgentUrgent"/>
2024-06-14 14:27:09 +08:00
<result column="available_proj_type" property="availableProjType"/>
<result column="postpaid" property="postpaid"/>
<result column="free_proj_count" property="freeProjCount"/>
<result column="correction_count" property="correctionCount"/>
2024-06-11 16:50:38 +08:00
</resultMap>
2024-06-11 16:05:23 +08:00
<insert id="save" parameterType="map">
INSERT INTO sys_user_expand (
user_id,
price_additional_pkg,
price_additional_video_demo,
price_all,
price_material,
price_material_agent,
2024-06-14 14:27:09 +08:00
price_material_agent_urgent,
available_proj_type,
postpaid,
free_proj_count,
correction_count
2024-06-11 16:05:23 +08:00
) VALUES (
#{userId},
#{priceAdditionalPkg},
#{priceAdditionalVideoDemo},
#{priceAll},
#{priceMaterial},
#{priceMaterialAgent},
2024-06-14 14:27:09 +08:00
#{priceMaterialAgentUrgent},
#{availableProjType},
#{postpaid},
#{freeProjCount},
#{correctionCount}
2024-06-11 16:05:23 +08:00
)
</insert>
<update id="update" parameterType="map">
UPDATE
sys_user_expand
SET
price_additional_pkg = #{priceAdditionalPkg},
price_additional_video_demo = #{priceAdditionalVideoDemo},
price_all = #{priceAll},
price_material = #{priceMaterial},
price_material_agent = #{priceMaterialAgent},
2024-06-14 14:27:09 +08:00
price_material_agent_urgent = #{priceMaterialAgentUrgent},
available_proj_type = #{availableProjType},
postpaid = #{postpaid},
free_proj_count = #{freeProjCount},
correction_count = #{correctionCount}
2024-06-11 16:05:23 +08:00
WHERE
user_id = #{userId}
</update>
<select id="get" parameterType="map" resultMap="userExpandDTO">
SELECT
price_additional_pkg,
price_additional_video_demo,
price_all,
price_material,
price_material_agent,
2024-06-14 14:27:09 +08:00
price_material_agent_urgent,
available_proj_type,
postpaid,
free_proj_count,
correction_count
2024-06-11 16:05:23 +08:00
FROM
sys_user_expand
WHERE
<if test="userId != null and userId != ''">
user_id = #{userId}
</if>
</select>
2024-06-11 16:50:38 +08:00
<select id="getPO" parameterType="map" resultMap="userExpandPO">
SELECT
price_additional_pkg,
price_additional_video_demo,
price_all,
price_material,
price_material_agent,
2024-06-14 14:27:09 +08:00
price_material_agent_urgent,
available_proj_type,
postpaid,
free_proj_count,
correction_count
2024-06-11 16:50:38 +08:00
FROM
sys_user_expand
WHERE
<if test="userId != null and userId != ''">
user_id = #{userId}
</if>
</select>
2024-06-11 16:05:23 +08:00
</mapper>