64 lines
2.3 KiB
XML
64 lines
2.3 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="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"/>
|
|
</resultMap>
|
|
|
|
<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,
|
|
price_material_agent_urgent
|
|
) VALUES (
|
|
#{userId},
|
|
#{priceAdditionalPkg},
|
|
#{priceAdditionalVideoDemo},
|
|
#{priceAll},
|
|
#{priceMaterial},
|
|
#{priceMaterialAgent},
|
|
#{priceMaterialAgentUrgent}
|
|
)
|
|
</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},
|
|
price_material_agent_urgent = #{priceMaterialAgentUrgent}
|
|
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,
|
|
price_material_agent_urgent
|
|
FROM
|
|
sys_user_expand
|
|
WHERE
|
|
<if test="userId != null and userId != ''">
|
|
user_id = #{userId}
|
|
</if>
|
|
</select>
|
|
|
|
</mapper> |