|
|
@@ -0,0 +1,599 @@
|
|
|
+<?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.goafanti.common.dao.CustomerMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
+ <result column="company_nmae" jdbcType="VARCHAR" property="companyNmae" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
|
|
|
+ <result column="company_intention" jdbcType="VARCHAR" property="companyIntention" />
|
|
|
+ <result column="adress" jdbcType="VARCHAR" property="adress" />
|
|
|
+ <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
|
|
|
+ <result column="customer_position" jdbcType="VARCHAR" property="customerPosition" />
|
|
|
+ <result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
|
+ <result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
+ <result column="department" jdbcType="VARCHAR" property="department" />
|
|
|
+ <result column="qq" jdbcType="VARCHAR" property="qq" />
|
|
|
+ <result column="wechat" jdbcType="VARCHAR" property="wechat" />
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
+ <result column="province" jdbcType="VARCHAR" property="province" />
|
|
|
+ <result column="fllow_situation" jdbcType="VARCHAR" property="fllowSituation" />
|
|
|
+ <result column="sex" jdbcType="INTEGER" property="sex" />
|
|
|
+ <result column="customer_statue" jdbcType="VARCHAR" property="customerStatue" />
|
|
|
+ <result column="customer_typ" jdbcType="INTEGER" property="customerTyp" />
|
|
|
+ <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ id, aid, company_nmae, create_time, company_industry, company_intention, adress,
|
|
|
+ customer_name, customer_position, mobile, email, department, qq, wechat, remark,
|
|
|
+ province, fllow_situation, sex, customer_statue
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from customer
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from customer
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <update id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ update customer set delete_flg= 0
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <delete id="deleteByExample" parameterType="java.lang.String">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from customer
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into customer (id, aid, company_nmae,
|
|
|
+ create_time, company_industry, company_intention,
|
|
|
+ adress, customer_name, customer_position,
|
|
|
+ mobile, email, department,
|
|
|
+ qq, wechat, remark,
|
|
|
+ province, fllow_situation, sex,
|
|
|
+ customer_statue,cutomer_typ,tel_num,typ)
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{companyIndustry,jdbcType=VARCHAR}, #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ #{adress,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, #{customerPosition,jdbcType=VARCHAR},
|
|
|
+ #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
|
|
|
+ #{qq,jdbcType=VARCHAR}, #{wechat,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
|
|
+ #{province,jdbcType=VARCHAR}, #{fllowSituation,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER},
|
|
|
+ #{customerStatue,jdbcType=VARCHAR}, #{cutomerTyp,jdbcType=INTEGER}, #{telNum,jdbcType=VARCHAR},0)
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into customer
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
+ <if test="companyNmae != null">
|
|
|
+ company_nmae,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="companyIndustry != null">
|
|
|
+ company_industry,
|
|
|
+ </if>
|
|
|
+ <if test="companyIntention != null">
|
|
|
+ company_intention,
|
|
|
+ </if>
|
|
|
+ <if test="adress != null">
|
|
|
+ adress,
|
|
|
+ </if>
|
|
|
+ <if test="customerName != null">
|
|
|
+ customer_name,
|
|
|
+ </if>
|
|
|
+ <if test="customerPosition != null">
|
|
|
+ customer_position,
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null">
|
|
|
+ mobile,
|
|
|
+ </if>
|
|
|
+ <if test="email != null">
|
|
|
+ email,
|
|
|
+ </if>
|
|
|
+ <if test="department != null">
|
|
|
+ department,
|
|
|
+ </if>
|
|
|
+ <if test="qq != null">
|
|
|
+ qq,
|
|
|
+ </if>
|
|
|
+ <if test="wechat != null">
|
|
|
+ wechat,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark,
|
|
|
+ </if>
|
|
|
+ <if test="province != null">
|
|
|
+ province,
|
|
|
+ </if>
|
|
|
+ <if test="fllowSituation != null">
|
|
|
+ fllow_situation,
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex,
|
|
|
+ </if>
|
|
|
+ <if test="customerStatue != null">
|
|
|
+ customer_statue,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyNmae != null">
|
|
|
+ #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyIndustry != null">
|
|
|
+ #{companyIndustry,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyIntention != null">
|
|
|
+ #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="adress != null">
|
|
|
+ #{adress,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerName != null">
|
|
|
+ #{customerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerPosition != null">
|
|
|
+ #{customerPosition,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null">
|
|
|
+ #{mobile,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email != null">
|
|
|
+ #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="department != null">
|
|
|
+ #{department,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="qq != null">
|
|
|
+ #{qq,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="wechat != null">
|
|
|
+ #{wechat,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="province != null">
|
|
|
+ #{province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="fllowSituation != null">
|
|
|
+ #{fllowSituation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="customerStatue != null">
|
|
|
+ #{customerStatue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.goafanti.common.model.CustomerExample" resultType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ select count(*) from customer
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.aid != null">
|
|
|
+ aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.companyNmae != null">
|
|
|
+ company_nmae = #{record.companyNmae,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createTime != null">
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.companyIndustry != null">
|
|
|
+ company_industry = #{record.companyIndustry,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.companyIntention != null">
|
|
|
+ company_intention = #{record.companyIntention,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.adress != null">
|
|
|
+ adress = #{record.adress,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.customerName != null">
|
|
|
+ customer_name = #{record.customerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.customerPosition != null">
|
|
|
+ customer_position = #{record.customerPosition,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.mobile != null">
|
|
|
+ mobile = #{record.mobile,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.email != null">
|
|
|
+ email = #{record.email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.department != null">
|
|
|
+ department = #{record.department,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.qq != null">
|
|
|
+ qq = #{record.qq,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wechat != null">
|
|
|
+ wechat = #{record.wechat,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.remark != null">
|
|
|
+ remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.province != null">
|
|
|
+ province = #{record.province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.fllowSituation != null">
|
|
|
+ fllow_situation = #{record.fllowSituation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.sex != null">
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.customerStatue != null">
|
|
|
+ customer_statue = #{record.customerStatue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
+ company_nmae = #{record.companyNmae,jdbcType=VARCHAR},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ company_industry = #{record.companyIndustry,jdbcType=VARCHAR},
|
|
|
+ company_intention = #{record.companyIntention,jdbcType=VARCHAR},
|
|
|
+ adress = #{record.adress,jdbcType=VARCHAR},
|
|
|
+ customer_name = #{record.customerName,jdbcType=VARCHAR},
|
|
|
+ customer_position = #{record.customerPosition,jdbcType=VARCHAR},
|
|
|
+ mobile = #{record.mobile,jdbcType=VARCHAR},
|
|
|
+ email = #{record.email,jdbcType=VARCHAR},
|
|
|
+ department = #{record.department,jdbcType=VARCHAR},
|
|
|
+ qq = #{record.qq,jdbcType=VARCHAR},
|
|
|
+ wechat = #{record.wechat,jdbcType=VARCHAR},
|
|
|
+ remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
+ province = #{record.province,jdbcType=VARCHAR},
|
|
|
+ fllow_situation = #{record.fllowSituation,jdbcType=VARCHAR},
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ customer_statue = #{record.customerStatue,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ <set>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyNmae != null">
|
|
|
+ company_nmae = #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyIndustry != null">
|
|
|
+ company_industry = #{companyIndustry,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyIntention != null">
|
|
|
+ company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="adress != null">
|
|
|
+ adress = #{adress,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerName != null">
|
|
|
+ customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerPosition != null">
|
|
|
+ customer_position = #{customerPosition,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null">
|
|
|
+ mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email != null">
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="department != null">
|
|
|
+ department = #{department,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="qq != null">
|
|
|
+ qq = #{qq,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="wechat != null">
|
|
|
+ wechat = #{wechat,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="province != null">
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="fllowSituation != null">
|
|
|
+ fllow_situation = #{fllowSituation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="customerStatue != null">
|
|
|
+ customer_statue = #{customerStatue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Oct 10 10:30:05 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ set aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ company_nmae = #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ company_industry = #{companyIndustry,jdbcType=VARCHAR},
|
|
|
+ company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ adress = #{adress,jdbcType=VARCHAR},
|
|
|
+ customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
+ customer_position = #{customerPosition,jdbcType=VARCHAR},
|
|
|
+ mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ department = #{department,jdbcType=VARCHAR},
|
|
|
+ qq = #{qq,jdbcType=VARCHAR},
|
|
|
+ wechat = #{wechat,jdbcType=VARCHAR},
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
+ fllow_situation = #{fllowSituation,jdbcType=VARCHAR},
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ customer_statue = #{customerStatue,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
|
|
|
+ select
|
|
|
+ a.id, a.name, a.keyword,a.introduction,a.category,
|
|
|
+ a.serial_number as serialNumber,
|
|
|
+ a.data_category as dataCategory,
|
|
|
+ a.owner_type as ownerType,
|
|
|
+ a.owner_name as ownerName,
|
|
|
+ a.field_a as fieldA,
|
|
|
+ a.field_b as fieldB,
|
|
|
+ a.transfer_price as transferPrice,
|
|
|
+ a.maturity,
|
|
|
+ a.introduction,
|
|
|
+ a.transfer_mode as transferMode,
|
|
|
+ a.technical_picture_url as technicalPictureUrl,
|
|
|
+ b.name as fieldAs
|
|
|
+ from achievement a
|
|
|
+ left join field_glossory b on a.field_a = b.id
|
|
|
+ where a.deleted_sign = 0
|
|
|
+ <if test="dataCategory != null and dataCategory != ''">
|
|
|
+ and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="category != null and category != ''">
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="fieldA != null and fieldA != ''">
|
|
|
+ and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null and keyword != ''">
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="transferMode != null">
|
|
|
+ and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="upperPrice != null and upperPrice != ''">
|
|
|
+ and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="lowerPrice != null and lowerPrice != ''">
|
|
|
+ and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ and a.release_status = 1
|
|
|
+ and a.audit_status = 3
|
|
|
+ <if test="dateSort == 0">
|
|
|
+ order by a.release_date asc
|
|
|
+ </if>
|
|
|
+ <if test="dateSort == 1">
|
|
|
+ order by a.release_date desc
|
|
|
+ </if>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from achievement a
|
|
|
+ where a.deleted_sign = 0
|
|
|
+ <if test="dataCategory != null and dataCategory != ''">
|
|
|
+ and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="category != null and category != ''">
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="fieldA != null and fieldA != ''">
|
|
|
+ and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null and keyword != ''">
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="transferMode != null">
|
|
|
+ and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="upperPrice != null and upperPrice != ''">
|
|
|
+ and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="lowerPrice != null and lowerPrice != ''">
|
|
|
+ and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ and a.release_status = 1
|
|
|
+ and a.audit_status = 3
|
|
|
+ <if test="dateSort == 0">
|
|
|
+ order by a.release_date asc
|
|
|
+ </if>
|
|
|
+ <if test="dateSort == 1">
|
|
|
+ order by a.release_date desc
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|