|
@@ -1,7 +1,7 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.caimei.modules.user.dao.ClubTemporaryDao">
|
|
<mapper namespace="com.caimei.modules.user.dao.ClubTemporaryDao">
|
|
-
|
|
|
|
|
|
+
|
|
<sql id="clubTemporaryColumns">
|
|
<sql id="clubTemporaryColumns">
|
|
a.id AS "id",
|
|
a.id AS "id",
|
|
a.userId AS "userId",
|
|
a.userId AS "userId",
|
|
@@ -11,6 +11,7 @@
|
|
a.bindMobile AS "bindMobile",
|
|
a.bindMobile AS "bindMobile",
|
|
a.contractEmail AS "contractEmail",
|
|
a.contractEmail AS "contractEmail",
|
|
a.linkMan AS "linkMan",
|
|
a.linkMan AS "linkMan",
|
|
|
|
+ a.linkManIdentity AS "linkManIdentity",
|
|
a.provinceId AS "provinceId",
|
|
a.provinceId AS "provinceId",
|
|
a.cityId AS "cityId",
|
|
a.cityId AS "cityId",
|
|
a.townId AS "townId",
|
|
a.townId AS "townId",
|
|
@@ -28,14 +29,14 @@
|
|
IFNULL(s.name,s.linkMan) AS "spName",
|
|
IFNULL(s.name,s.linkMan) AS "spName",
|
|
if(csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime,1,0) as svipUserFlag
|
|
if(csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime,1,0) as svipUserFlag
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<sql id="clubTemporaryJoins">
|
|
<sql id="clubTemporaryJoins">
|
|
LEFT JOIN serviceprovider s ON s.userID = a.userId
|
|
LEFT JOIN serviceprovider s ON s.userID = a.userId
|
|
LEFT JOIN cm_svip_user csu ON csu.userId = a.userId
|
|
LEFT JOIN cm_svip_user csu ON csu.userId = a.userId
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="get" resultType="ClubTemporary">
|
|
<select id="get" resultType="ClubTemporary">
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
<include refid="clubTemporaryColumns"/>,
|
|
<include refid="clubTemporaryColumns"/>,
|
|
d.name AS "province",
|
|
d.name AS "province",
|
|
c.name AS "city",
|
|
c.name AS "city",
|
|
@@ -47,33 +48,33 @@
|
|
LEFT JOIN province d ON d.provinceID=c.provinceID
|
|
LEFT JOIN province d ON d.provinceID=c.provinceID
|
|
WHERE a.id = #{id}
|
|
WHERE a.id = #{id}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="findList" resultType="ClubTemporary">
|
|
<select id="findList" resultType="ClubTemporary">
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
<include refid="clubTemporaryColumns"/>
|
|
<include refid="clubTemporaryColumns"/>
|
|
FROM club_temporary a
|
|
FROM club_temporary a
|
|
<include refid="clubTemporaryJoins"/>
|
|
<include refid="clubTemporaryJoins"/>
|
|
<where>
|
|
<where>
|
|
<if test="name != null and name != ''">
|
|
<if test="name != null and name != ''">
|
|
- AND a.name LIKE
|
|
|
|
|
|
+ AND a.name LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
|
|
</if>
|
|
</if>
|
|
<if test="bindMobile != null and bindMobile != ''">
|
|
<if test="bindMobile != null and bindMobile != ''">
|
|
- AND a.bindMobile LIKE
|
|
|
|
|
|
+ AND a.bindMobile LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{bindMobile}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{bindMobile}||'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{bindMobile}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{bindMobile}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{bindMobile},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{bindMobile},'%')</if>
|
|
</if>
|
|
</if>
|
|
<if test="contractEmail != null and contractEmail != ''">
|
|
<if test="contractEmail != null and contractEmail != ''">
|
|
- AND a.contractEmail LIKE
|
|
|
|
|
|
+ AND a.contractEmail LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{contractEmail}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{contractEmail}||'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{contractEmail}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{contractEmail}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{contractEmail},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{contractEmail},'%')</if>
|
|
</if>
|
|
</if>
|
|
<if test="linkMan != null and linkMan != ''">
|
|
<if test="linkMan != null and linkMan != ''">
|
|
- AND a.linkMan LIKE
|
|
|
|
|
|
+ AND a.linkMan LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{linkMan}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{linkMan}||'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{linkMan}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{linkMan}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{linkMan},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{linkMan},'%')</if>
|
|
@@ -94,15 +95,15 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="findAllList" resultType="ClubTemporary">
|
|
<select id="findAllList" resultType="ClubTemporary">
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
<include refid="clubTemporaryColumns"/>
|
|
<include refid="clubTemporaryColumns"/>
|
|
FROM club_temporary a
|
|
FROM club_temporary a
|
|
<include refid="clubTemporaryJoins"/>
|
|
<include refid="clubTemporaryJoins"/>
|
|
<where>
|
|
<where>
|
|
-
|
|
|
|
- </where>
|
|
|
|
|
|
+
|
|
|
|
+ </where>
|
|
<choose>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
ORDER BY ${page.orderBy}
|
|
@@ -111,7 +112,7 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insert" parameterType="ClubTemporary" keyProperty="id" useGeneratedKeys="true">
|
|
<insert id="insert" parameterType="ClubTemporary" keyProperty="id" useGeneratedKeys="true">
|
|
INSERT INTO club_temporary(
|
|
INSERT INTO club_temporary(
|
|
id,
|
|
id,
|
|
@@ -121,6 +122,7 @@
|
|
bindMobile,
|
|
bindMobile,
|
|
contractEmail,
|
|
contractEmail,
|
|
linkMan,
|
|
linkMan,
|
|
|
|
+ linkManIdentity,
|
|
provinceId,
|
|
provinceId,
|
|
cityId,
|
|
cityId,
|
|
townId,
|
|
townId,
|
|
@@ -143,6 +145,7 @@
|
|
#{bindMobile},
|
|
#{bindMobile},
|
|
#{contractEmail},
|
|
#{contractEmail},
|
|
#{linkMan},
|
|
#{linkMan},
|
|
|
|
+ #{linkManIdentity},
|
|
#{provinceId},
|
|
#{provinceId},
|
|
#{cityId},
|
|
#{cityId},
|
|
#{townId},
|
|
#{townId},
|
|
@@ -159,9 +162,9 @@
|
|
#{addTime}
|
|
#{addTime}
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
-
|
|
|
|
|
|
+
|
|
<update id="update">
|
|
<update id="update">
|
|
- UPDATE club_temporary SET
|
|
|
|
|
|
+ UPDATE club_temporary SET
|
|
userId = #{userId},
|
|
userId = #{userId},
|
|
confirmUserId = #{confirmUserId},
|
|
confirmUserId = #{confirmUserId},
|
|
name = #{name},
|
|
name = #{name},
|
|
@@ -169,6 +172,7 @@
|
|
bindMobile = #{bindMobile},
|
|
bindMobile = #{bindMobile},
|
|
contractEmail = #{contractEmail},
|
|
contractEmail = #{contractEmail},
|
|
linkMan = #{linkMan},
|
|
linkMan = #{linkMan},
|
|
|
|
+ linkManIdentity = #{linkManIdentity},
|
|
provinceId = #{provinceId},
|
|
provinceId = #{provinceId},
|
|
cityId = #{cityId},
|
|
cityId = #{cityId},
|
|
townId = #{townId},
|
|
townId = #{townId},
|
|
@@ -185,7 +189,7 @@
|
|
addTime = #{addTime}
|
|
addTime = #{addTime}
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
|
|
+
|
|
<delete id="delete">
|
|
<delete id="delete">
|
|
DELETE FROM club_temporary
|
|
DELETE FROM club_temporary
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
@@ -232,5 +236,5 @@
|
|
<include refid="clubTemporaryJoins"/>
|
|
<include refid="clubTemporaryJoins"/>
|
|
WHERE a.confirmUserId = #{userId}
|
|
WHERE a.confirmUserId = #{userId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
-</mapper>
|
|
|
|
|
|
+
|
|
|
|
+</mapper>
|