|
@@ -7,6 +7,7 @@
|
|
<resultMap type="com.bosshand.virgo.core.model.MgrClient" id="clientResult">
|
|
<resultMap type="com.bosshand.virgo.core.model.MgrClient" id="clientResult">
|
|
<id column="id" property="id"/>
|
|
<id column="id" property="id"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
<result column="organizationId" property="organizationId"/>
|
|
|
|
+ <result column="projectId" property="projectId"/>
|
|
<result column="userId" property="userId"/>
|
|
<result column="userId" property="userId"/>
|
|
<result column="name" property="name"/>
|
|
<result column="name" property="name"/>
|
|
<result column="type" property="type"/>
|
|
<result column="type" property="type"/>
|
|
@@ -28,17 +29,17 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<insert id="insert" parameterType="com.bosshand.virgo.core.model.MgrClient" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insert" parameterType="com.bosshand.virgo.core.model.MgrClient" useGeneratedKeys="true" keyProperty="id">
|
|
- INSERT INTO mgr_client(`organizationId`, `userId`, `name`, `type`, `person`, `phone`, `weChatAccount`, `followUpState`, `job`, `demand`, `decorationRequirements`,
|
|
|
|
|
|
+ INSERT INTO mgr_client(`organizationId`, `projectId`, `userId`, `name`, `type`, `person`, `phone`, `weChatAccount`, `followUpState`, `job`, `demand`, `decorationRequirements`,
|
|
`customerIndustry`, `followUpPerson`, `firsTimeRoom`, `visitingChannels`, `visitingTime`, `remark`, `status`, `highSeas`)
|
|
`customerIndustry`, `followUpPerson`, `firsTimeRoom`, `visitingChannels`, `visitingTime`, `remark`, `status`, `highSeas`)
|
|
- VALUES (#{organizationId}, #{userId}, #{name}, #{type}, #{person}, #{phone}, #{weChatAccount}, #{followUpState}, #{job}, #{demand}, #{decorationRequirements},
|
|
|
|
|
|
+ VALUES (#{organizationId}, #{projectId}, #{userId}, #{name}, #{type}, #{person}, #{phone}, #{weChatAccount}, #{followUpState}, #{job}, #{demand}, #{decorationRequirements},
|
|
#{customerIndustry}, #{followUpPerson}, #{firsTimeRoom}, #{visitingChannels}, #{visitingTime}, #{remark}, #{status}, #{highSeas})
|
|
#{customerIndustry}, #{followUpPerson}, #{firsTimeRoom}, #{visitingChannels}, #{visitingTime}, #{remark}, #{status}, #{highSeas})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert" parameterType="com.bosshand.virgo.core.model.MgrClient" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="batchInsert" parameterType="com.bosshand.virgo.core.model.MgrClient" useGeneratedKeys="true" keyProperty="id">
|
|
- INSERT INTO mgr_client(`organizationId`, `userId`, `name`, `type`, `person`, `phone`, `weChatAccount`, `followUpState`, `job`, `demand`, `decorationRequirements`,
|
|
|
|
|
|
+ INSERT INTO mgr_client(`organizationId`, `projectId`, `userId`, `name`, `type`, `person`, `phone`, `weChatAccount`, `followUpState`, `job`, `demand`, `decorationRequirements`,
|
|
`customerIndustry`, `followUpPerson`, `firsTimeRoom`, `visitingChannels`, `visitingTime`, `remark`, `status`, `highSeas`) VALUES
|
|
`customerIndustry`, `followUpPerson`, `firsTimeRoom`, `visitingChannels`, `visitingTime`, `remark`, `status`, `highSeas`) VALUES
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
- (#{item.organizationId}, #{item.userId}, #{item.name}, #{item.type}, #{item.person}, #{item.phone}, #{item.weChatAccount}, #{item.followUpState}, #{item.job}, #{item.demand}, #{item.decorationRequirements},
|
|
|
|
|
|
+ (#{item.organizationId}, #{projectId}, #{item.userId}, #{item.name}, #{item.type}, #{item.person}, #{item.phone}, #{item.weChatAccount}, #{item.followUpState}, #{item.job}, #{item.demand}, #{item.decorationRequirements},
|
|
#{item.customerIndustry}, #{item.followUpPerson}, #{item.firsTimeRoom}, #{item.visitingChannels}, #{item.visitingTime}, #{item.remark}, #{item.status}, #{item.highSeas})
|
|
#{item.customerIndustry}, #{item.followUpPerson}, #{item.firsTimeRoom}, #{item.visitingChannels}, #{item.visitingTime}, #{item.remark}, #{item.status}, #{item.highSeas})
|
|
</foreach>
|
|
</foreach>
|
|
</insert>
|
|
</insert>
|
|
@@ -79,6 +80,7 @@
|
|
SELECT type, COUNT(*) as number FROM mgr_client
|
|
SELECT type, COUNT(*) as number FROM mgr_client
|
|
<where>
|
|
<where>
|
|
<if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
<if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
|
|
+ <if test="projectId!=0">and projectId=#{projectId}</if>
|
|
<if test="userId!=0">and userId=#{userId}</if>
|
|
<if test="userId!=0">and userId=#{userId}</if>
|
|
<if test="name!=null">and name=#{name}</if>
|
|
<if test="name!=null">and name=#{name}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
@@ -104,6 +106,7 @@
|
|
SELECT count(*) FROM mgr_client
|
|
SELECT count(*) FROM mgr_client
|
|
<where>
|
|
<where>
|
|
<if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
<if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
|
|
+ <if test="projectId!=0">and projectId=#{projectId}</if>
|
|
<if test="userId!=0">and userId=#{userId}</if>
|
|
<if test="userId!=0">and userId=#{userId}</if>
|
|
<if test="name!=null">and name=#{name}</if>
|
|
<if test="name!=null">and name=#{name}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
<if test="type!=null">and type=#{type}</if>
|
|
@@ -128,6 +131,7 @@
|
|
SELECT * FROM mgr_client
|
|
SELECT * FROM mgr_client
|
|
<where>
|
|
<where>
|
|
<if test="p.organizationId!=0">and organizationId=#{p.organizationId}</if>
|
|
<if test="p.organizationId!=0">and organizationId=#{p.organizationId}</if>
|
|
|
|
+ <if test="p.projectId!=0">and projectId=#{p.projectId}</if>
|
|
<if test="p.userId!=0">and userId=#{p.userId}</if>
|
|
<if test="p.userId!=0">and userId=#{p.userId}</if>
|
|
<if test="p.name!=null">and name=#{p.name}</if>
|
|
<if test="p.name!=null">and name=#{p.name}</if>
|
|
<if test="p.type!=null">and type=#{p.type}</if>
|
|
<if test="p.type!=null">and type=#{p.type}</if>
|