123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <?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="DECIMAL" />
- <result column="wv_withdraw_total" property="wv_withdraw_total" jdbcType="DECIMAL" />
- <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" />
- <result column="wv_account_number" property="wv_account_number" jdbcType="VARCHAR" />
- <result column="wv_account_bank" property="wv_account_bank" jdbcType="VARCHAR" />
- <result column="wv_account_number_path" property="wv_account_number_path" 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,
- wv_account_number,
- wv_account_bank,
- wv_account_number_path
- 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=DECIMAL}
- </if>
- <if test="wv_withdraw_total != null and wv_withdraw_total != ''">
- and wv_withdraw_total = #{wv_withdraw_total,jdbcType=DECIMAL}
- </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=VARCHAR}
- </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>
- <if test="wv_account_number != null and wv_account_number != ''">
- and wv_account_number = #{wv_account_number,jdbcType=VARCHAR}
- </if>
- <if test="wv_account_bank != null and wv_account_bank != ''">
- and wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR}
- </if>
- <if test="wv_account_number_path != null and wv_account_number_path != ''">
- and wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR}
- </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=DECIMAL},
- </if>
- <if test="wv_withdraw_total != null" >
- wv_withdraw_total = #{wv_withdraw_total,jdbcType=DECIMAL},
- </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=INTEGER},
- </if>
- <if test="wv_contract_count != null" >
- wv_contract_count = #{wv_contract_count,jdbcType=INTEGER},
- </if>
- <if test="wv_finish_count != null" >
- wv_finish_count = #{wv_finish_count,jdbcType=INTEGER},
- </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>
- <if test="wv_account_number_path != null" >
- wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR},
- </if>
- <if test="wv_account_bank != null" >
- wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR},
- </if>
- <if test="wv_account_number != null" >
- wv_account_number = #{wv_account_number,jdbcType=VARCHAR}
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateAccountNumber" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
- update dc_introducer
- <set >
- <if test="wv_account_number != null" >
- wv_account_number = #{wv_account_number,jdbcType=VARCHAR},
- </if>
- <if test="wv_account_bank != null" >
- wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR},
- </if>
- <if test="wv_account_number_path != null" >
- wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR}
- </if>
- </set>
- where wv_phone = #{wv_phone,jdbcType=VARCHAR}
- </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_account_number != null" >
- wv_account_number,
- </if>
- <if test="wv_account_bank != null" >
- wv_account_bank,
- </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=DECIMAL},
- </if>
- <if test="wv_withdraw_total != null" >
- #{wv_withdraw_total,jdbcType=DECIMAL},
- </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=INTEGER},
- </if>
- <if test="wv_contract_count != null" >
- #{wv_contract_count,jdbcType=INTEGER},
- </if>
- <if test="wv_finish_count != null" >
- #{wv_finish_count,jdbcType=INTEGER},
- </if>
- <if test="wv_people_count != null" >
- #{wv_people_count,jdbcType=INTEGER},
- </if>
- <if test="wv_account_number != null" >
- #{wv_account_number,jdbcType=VARCHAR},
- </if>
- <if test="wv_account_bank != null" >
- #{wv_account_bank,jdbcType=VARCHAR},
- </if>
- <if test="wv_consultant != null" >
- #{wv_consultant,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- </mapper>
|