|
@@ -0,0 +1,230 @@
|
|
|
|
+<?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.ygj.yuemum.dao.distributionchannel.DcIntroducerDao" >
|
|
|
|
+
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
|
|
|
|
+ <result column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_phone" property="wv_phone" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="wv_gradeid" property="wv_gradeid" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_Introduction_total" property="wv_Introduction_total" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_withdraw_total" property="wv_withdraw_total" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_Introduction_count" property="wv_Introduction_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_order_count" property="wv_order_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_extract_count" property="wv_extract_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_qrcode" property="wv_qrcode" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="wv_people_count" property="wv_people_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_register_count" property="wv_register_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_contract_count" property="wv_contract_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_finish_count" property="wv_finish_count" jdbcType="INTEGER" />
|
|
|
|
+ <result column="wv_consultant" property="wv_consultant" jdbcType="VARCHAR" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <!--获取所有数据-->
|
|
|
|
+ <select id="getDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
|
|
|
|
+ select
|
|
|
|
+ *
|
|
|
|
+ from dc_introducer
|
|
|
|
+ order by id desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="checkDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" parameterType="java.lang.String">
|
|
|
|
+ select
|
|
|
|
+ *
|
|
|
|
+ from dc_introducer
|
|
|
|
+ where wv_phone = #{wv_phone,jdbcType=VARCHAR}
|
|
|
|
+ order by id desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="queryDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
|
|
|
|
+ select
|
|
|
|
+ id,
|
|
|
|
+ wv_phone,
|
|
|
|
+ wv_gradeid,
|
|
|
|
+ wv_Introduction_total,
|
|
|
|
+ wv_withdraw_total,
|
|
|
|
+ wv_Introduction_count,
|
|
|
|
+ wv_extract_count,
|
|
|
|
+ wv_qrcode,
|
|
|
|
+ wv_order_count,
|
|
|
|
+ wv_people_count,
|
|
|
|
+ wv_register_count,
|
|
|
|
+ wv_contract_count,
|
|
|
|
+ wv_finish_count,
|
|
|
|
+ wv_consultant
|
|
|
|
+ from dc_introducer
|
|
|
|
+ where 1=1
|
|
|
|
+ <if test="wv_phone != null and wv_phone != ''">
|
|
|
|
+ and wv_phone = #{wv_phone,jdbcType=VARCHAR}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_gradeid != null and wv_gradeid != ''">
|
|
|
|
+ and wv_gradeid = #{wv_gradeid,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_total != null and wv_Introduction_total != ''">
|
|
|
|
+ and wv_Introduction_total = #{wv_Introduction_total,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_withdraw_total != null and wv_withdraw_total != ''">
|
|
|
|
+ and wv_withdraw_total = #{wv_withdraw_total,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_count != null and wv_Introduction_count != ''">
|
|
|
|
+ and wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_qrcode != null and wv_qrcode != ''">
|
|
|
|
+ and wv_qrcode = #{wv_qrcode,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_order_count != null and wv_order_count != ''">
|
|
|
|
+ and wv_order_count = #{wv_order_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_people_count != null and wv_people_count != ''">
|
|
|
|
+ and wv_people_count = #{wv_people_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_extract_count != null and wv_extract_count != ''">
|
|
|
|
+ and wv_extract_count = #{wv_extract_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_register_count != null and wv_register_count != ''">
|
|
|
|
+ and wv_register_count = #{wv_register_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_contract_count != null and wv_contract_count != ''">
|
|
|
|
+ and wv_contract_count = #{wv_contract_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_finish_count != null and wv_finish_count != ''">
|
|
|
|
+ and wv_finish_count = #{wv_finish_count,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_consultant != null and wv_consultant != ''">
|
|
|
|
+ and wv_consultant = #{wv_consultant,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ order by id desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="updateDcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
|
|
|
|
+ update dc_introducer
|
|
|
|
+ <set >
|
|
|
|
+ <if test="wv_phone != null" >
|
|
|
|
+ wv_phone = #{wv_phone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_gradeid != null" >
|
|
|
|
+ wv_gradeid = #{wv_gradeid,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_total != null" >
|
|
|
|
+ wv_Introduction_total = #{wv_Introduction_total,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_withdraw_total != null" >
|
|
|
|
+ wv_withdraw_total = #{wv_withdraw_total,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_count != null" >
|
|
|
|
+ wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_order_count != null" >
|
|
|
|
+ wv_order_count = #{wv_order_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_extract_count != null" >
|
|
|
|
+ wv_extract_count = #{wv_extract_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_qrcode != null" >
|
|
|
|
+ wv_qrcode = #{wv_qrcode,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_register_count != null" >
|
|
|
|
+ wv_register_count = #{wv_register_count,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_contract_count != null" >
|
|
|
|
+ wv_contract_count = #{wv_contract_count,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_finish_count != null" >
|
|
|
|
+ wv_finish_count = #{wv_finish_count,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_people_count != null" >
|
|
|
|
+ wv_people_count = #{wv_people_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_consultant != null" >
|
|
|
|
+ wv_consultant = #{wv_consultant,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <insert id="insertDcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
|
|
|
|
+ insert into dc_introducer
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
+ <if test="wv_phone != null" >
|
|
|
|
+ wv_phone,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_gradeid != null" >
|
|
|
|
+ wv_gradeid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_total != null" >
|
|
|
|
+ wv_Introduction_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_withdraw_total != null" >
|
|
|
|
+ wv_withdraw_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_count != null" >
|
|
|
|
+ wv_Introduction_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_order_count != null" >
|
|
|
|
+ wv_order_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_extract_count != null" >
|
|
|
|
+ wv_extract_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_qrcode != null" >
|
|
|
|
+ wv_qrcode,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_register_count != null" >
|
|
|
|
+ wv_register_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_contract_count != null" >
|
|
|
|
+ wv_contract_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_finish_count != null" >
|
|
|
|
+ wv_finish_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_people_count != null" >
|
|
|
|
+ wv_people_count,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_consultant != null" >
|
|
|
|
+ wv_consultant
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
+ <if test="wv_phone != null" >
|
|
|
|
+ #{wv_phone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_gradeid != null" >
|
|
|
|
+ #{wv_gradeid,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_total != null" >
|
|
|
|
+ #{wv_Introduction_total,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_withdraw_total != null" >
|
|
|
|
+ #{wv_withdraw_total,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_extract_count != null" >
|
|
|
|
+ #{wv_extract_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_order_count != null" >
|
|
|
|
+ #{wv_order_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_Introduction_count != null" >
|
|
|
|
+ #{wv_Introduction_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_qrcode != null" >
|
|
|
|
+ #{wv_qrcode,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_register_count != null" >
|
|
|
|
+ #{wv_register_count,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_contract_count != null" >
|
|
|
|
+ #{wv_contract_count,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_finish_count != null" >
|
|
|
|
+ #{wv_finish_count,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_people_count != null" >
|
|
|
|
+ #{wv_people_count,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wv_consultant != null" >
|
|
|
|
+ #{wv_consultant,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+</mapper>
|