|
@@ -1,9 +1,10 @@
|
|
|
<?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.caimei365.user.mapper.ClubMapper">
|
|
|
- <insert id="insertRemarks" parameterType="com.caimei365.user.model.po.ClubRemarksPo" keyProperty="remarksId" useGeneratedKeys="true">
|
|
|
- insert into cm_club_remarks(clubId, serviceProviderId, remarks, addTime)
|
|
|
- values (#{clubId}, #{serviceProviderId}, #{remarks}, now())
|
|
|
+ <insert id="insertRemarks" parameterType="com.caimei365.user.model.po.ClubRemarksPo" keyProperty="remarksId"
|
|
|
+ useGeneratedKeys="true">
|
|
|
+ insert into cm_club_remarks(clubId, serviceProviderId, remarks, addTime, questionMan)
|
|
|
+ values (#{clubId}, #{serviceProviderId}, #{remarks}, now(), #{questionMan})
|
|
|
</insert>
|
|
|
<insert id="insertRemarksImage">
|
|
|
insert into cm_club_remarks_file(remarksId, fileType, imageUrl)
|
|
@@ -13,7 +14,27 @@
|
|
|
insert into cm_club_remarks_file(remarksId, fileType, fileName, ossName)
|
|
|
values (#{remarksId}, 2, #{fileName}, #{ossName})
|
|
|
</insert>
|
|
|
-
|
|
|
+ <insert id="insertQuestionMan">
|
|
|
+ insert into cm_visitor_remarks(questionManId, serviceProviderId, remarks, addTime, questionMan, concactTime)
|
|
|
+ values (#{questionManId}, #{serviceProviderId}, #{remarks}, now(), #{questionMan}, #{concactTime})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertVisitorRemark" keyProperty="remarksId" useGeneratedKeys="true">
|
|
|
+ insert into cm_visitor_remarks(questionMan,questionManId, serviceProviderId, remarks, addTime)
|
|
|
+ values (#{questionMan},#{questionManId}, #{serviceProviderId}, #{remarks}, now())
|
|
|
+ </insert>
|
|
|
+ <insert id="insertVisitorRemarksImage">
|
|
|
+ insert into cm_visitor_remarks_file(remarksId, fileType, imageUrl)
|
|
|
+ values (#{remarksId}, 1, #{image})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertVisitorRemarksFile">
|
|
|
+ insert into cm_visitor_remarks_file(remarksId, fileType, fileName, ossName)
|
|
|
+ values (#{remarksId}, 2, #{fileName}, #{ossName})
|
|
|
+ </insert>
|
|
|
+ <insert id="concactVisit" parameterType="com.caimei365.user.model.vo.RemarksVo" keyProperty="remarksId"
|
|
|
+ useGeneratedKeys="true">
|
|
|
+ insert into cm_club_remarks(clubId, serviceProviderId, remarks, addTime, questionMan, concactTime)
|
|
|
+ values (#{clubId}, #{serviceProviderId}, #{remarks}, #{addTime}, #{questionMan}, now())
|
|
|
+ </insert>
|
|
|
<update id="updateClubUserByUpdateInfo">
|
|
|
update user set
|
|
|
<if test="name != null and name != ''">
|
|
@@ -22,7 +43,7 @@
|
|
|
<if test="email != null and email != ''">
|
|
|
email = #{email},
|
|
|
</if>
|
|
|
- userName = #{userName}
|
|
|
+ userName = #{userName}
|
|
|
where userID = #{userId}
|
|
|
</update>
|
|
|
<update id="updateClubByUpdateInfo">
|
|
@@ -56,7 +77,8 @@
|
|
|
firstClubType = #{firstClubType},
|
|
|
</if>
|
|
|
<if test="firstClubType == 1 or firstClubType == 2">
|
|
|
- secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg = #{medicalPracticeLicense},
|
|
|
+ secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg =
|
|
|
+ #{medicalPracticeLicense},
|
|
|
</if>
|
|
|
<if test="mainProduct != null and mainProduct != ''">
|
|
|
mainpro = #{mainProduct},
|
|
@@ -67,129 +89,180 @@
|
|
|
where clubID = #{clubId}
|
|
|
</update>
|
|
|
<delete id="clearRemarksFiles">
|
|
|
- delete from cm_club_remarks_file where remarksId = #{remarksId}
|
|
|
+ delete
|
|
|
+ from cm_club_remarks_file
|
|
|
+ where remarksId = #{remarksId}
|
|
|
</delete>
|
|
|
<delete id="deleteRemarks">
|
|
|
- delete from cm_club_remarks where id = #{remarksId}
|
|
|
+ delete
|
|
|
+ from cm_club_remarks
|
|
|
+ where id = #{remarksId}
|
|
|
</delete>
|
|
|
<delete id="deleteRemarksFiles">
|
|
|
- delete from cm_club_remarks_file where remarksId = #{remarksId}
|
|
|
+ delete
|
|
|
+ from cm_club_remarks_file
|
|
|
+ where remarksId = #{remarksId}
|
|
|
+ </delete>
|
|
|
+ <delete id="clearVisitorRemarks">
|
|
|
+ delete
|
|
|
+ from cm_visitor_remarks_file
|
|
|
+ where remarksId = #{remarksId}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteVisitRemark">
|
|
|
+ delete
|
|
|
+ from cm_visitor_remarks
|
|
|
+ where id = #{remarksId}
|
|
|
</delete>
|
|
|
<select id="getClubById" resultType="com.caimei365.user.model.vo.ClubVo">
|
|
|
- select clubID as clubId, userID as userId, name, sname as shortName, contractMobile, contractEmail,
|
|
|
- contractPhone, linkMan, provinceID as proviceId, cityID as cityId, townID as townId,
|
|
|
- address, headpic as shopPhoto, businessLicenseImage as businessLicense, socialCreditCode,
|
|
|
- firstClubType, secondClubType, department, medicalPracticeLicenseImg as medicalPracticeLicense,
|
|
|
- mainpro as mainProduct, fax, info as profile, spID as serviceProviderId, addTime, status, lastCheckOrderDate
|
|
|
+ select clubID as clubId,
|
|
|
+ userID as userId,
|
|
|
+ name,
|
|
|
+ sname as shortName,
|
|
|
+ contractMobile,
|
|
|
+ contractEmail,
|
|
|
+ contractPhone,
|
|
|
+ linkMan,
|
|
|
+ provinceID as proviceId,
|
|
|
+ cityID as cityId,
|
|
|
+ townID as townId,
|
|
|
+ address,
|
|
|
+ headpic as shopPhoto,
|
|
|
+ businessLicenseImage as businessLicense,
|
|
|
+ socialCreditCode,
|
|
|
+ firstClubType,
|
|
|
+ secondClubType,
|
|
|
+ department,
|
|
|
+ medicalPracticeLicenseImg as medicalPracticeLicense,
|
|
|
+ mainpro as mainProduct,
|
|
|
+ fax,
|
|
|
+ info as profile,
|
|
|
+ spID as serviceProviderId,
|
|
|
+ addTime,
|
|
|
+ status,
|
|
|
+ lastCheckOrderDate
|
|
|
from club
|
|
|
where clubID = #{clubId}
|
|
|
</select>
|
|
|
-<!-- <select id="getOrderCount" resultType="com.caimei365.user.model.vo.OrderCountVo">-->
|
|
|
-<!-- select userID as userId,-->
|
|
|
-<!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0') as orderCount,-->
|
|
|
-<!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status = '0') as confirmedCount,-->
|
|
|
-<!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(11,12,13,21,22,23)) as paymentCount,-->
|
|
|
-<!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(11,12,21,22,31,32)) as waitShipmentsCount,-->
|
|
|
-<!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(12,13,22,23,32,33)) as shipmentsCount,-->
|
|
|
-<!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(1,2)) as salesReturnCount-->
|
|
|
-<!-- from cm_order-->
|
|
|
-<!-- where userID = #{userId} and delFlag = '0'-->
|
|
|
-<!-- limit 1-->
|
|
|
-<!-- </select>-->
|
|
|
+ <!-- <select id="getOrderCount" resultType="com.caimei365.user.model.vo.OrderCountVo">-->
|
|
|
+ <!-- select userID as userId,-->
|
|
|
+ <!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0') as orderCount,-->
|
|
|
+ <!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status = '0') as confirmedCount,-->
|
|
|
+ <!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(11,12,13,21,22,23)) as paymentCount,-->
|
|
|
+ <!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(11,12,21,22,31,32)) as waitShipmentsCount,-->
|
|
|
+ <!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(12,13,22,23,32,33)) as shipmentsCount,-->
|
|
|
+ <!-- (select COUNT(*) from cm_order where userID = #{userId} and delFlag = '0' and status in(1,2)) as salesReturnCount-->
|
|
|
+ <!-- from cm_order-->
|
|
|
+ <!-- where userID = #{userId} and delFlag = '0'-->
|
|
|
+ <!-- limit 1-->
|
|
|
+ <!-- </select>-->
|
|
|
|
|
|
<select id="findBeansHistoryByType" resultType="integer">
|
|
|
- SELECT id FROM user_beans_history WHERE userId = #{userId} AND beansType = #{beansType} AND delFlag = 0
|
|
|
+ SELECT id
|
|
|
+ FROM user_beans_history
|
|
|
+ WHERE userId = #{userId}
|
|
|
+ AND beansType = #{beansType}
|
|
|
+ AND delFlag = 0
|
|
|
</select>
|
|
|
|
|
|
<update id="updateUserBeans">
|
|
|
- UPDATE USER SET userBeans = #{userBeans} WHERE userID = #{userId}
|
|
|
+ UPDATE USER
|
|
|
+ SET userBeans = #{userBeans}
|
|
|
+ WHERE userID = #{userId}
|
|
|
</update>
|
|
|
|
|
|
<select id="findBeansHistory" resultType="com.caimei365.user.model.vo.BeansHistoryVo">
|
|
|
- SELECT
|
|
|
- beansType,
|
|
|
- num
|
|
|
- FROM
|
|
|
- user_beans_history
|
|
|
- WHERE
|
|
|
- pushStatus = 0
|
|
|
+ SELECT beansType,
|
|
|
+ num
|
|
|
+ FROM user_beans_history
|
|
|
+ WHERE pushStatus = 0
|
|
|
AND beansType IN (1, 2, 3, 4, 8, 12)
|
|
|
AND delFlag = 0
|
|
|
AND userId = #{userId}
|
|
|
- ORDER BY
|
|
|
- ADDTIME DESC
|
|
|
- LIMIT
|
|
|
- 1
|
|
|
+ ORDER BY ADDTIME DESC
|
|
|
+ LIMIT 1
|
|
|
</select>
|
|
|
|
|
|
<select id="findByBeansType" resultType="integer">
|
|
|
- SELECT
|
|
|
- SUM(num)
|
|
|
- FROM
|
|
|
- user_beans_history
|
|
|
- WHERE
|
|
|
- userId = #{userId}
|
|
|
+ SELECT SUM(num)
|
|
|
+ FROM user_beans_history
|
|
|
+ WHERE userId = #{userId}
|
|
|
AND beansType = #{beansType}
|
|
|
AND pushStatus = 0
|
|
|
AND delFlag = 0
|
|
|
</select>
|
|
|
|
|
|
<update id="updatePushStatus">
|
|
|
- UPDATE user_beans_history SET pushStatus = 1 WHERE userId = #{userId}
|
|
|
+ UPDATE user_beans_history
|
|
|
+ SET pushStatus = 1
|
|
|
+ WHERE userId = #{userId}
|
|
|
</update>
|
|
|
<update id="updateRemarks">
|
|
|
update cm_club_remarks
|
|
|
+ set remarks = #{remarks},
|
|
|
+ questionMan = #{questionMan}
|
|
|
+ where id = #{remarksId}
|
|
|
+ </update>
|
|
|
+ <update id="updateQuestionMan">
|
|
|
+ update cm_visitor_remarks
|
|
|
+ set questionMan = #{questionMan}
|
|
|
+ where questionManId = #{questionManId}
|
|
|
+ and serviceProviderId = #{serviceProviderId}
|
|
|
+ </update>
|
|
|
+ <update id="updateVisitorRemark">
|
|
|
+ update cm_visitor_remarks
|
|
|
set remarks = #{remarks}
|
|
|
where id = #{remarksId}
|
|
|
</update>
|
|
|
-
|
|
|
+ <update id="updateVisit">
|
|
|
+ update cm_visitor_remarks
|
|
|
+ set clubId = #{clubId},
|
|
|
+ concactTime = now()
|
|
|
+ where questionManId = #{questionManId}
|
|
|
+ </update>
|
|
|
<select id="findAllBeansHistory" resultType="com.caimei365.user.model.vo.BeansHistoryVo">
|
|
|
SELECT
|
|
|
- type,
|
|
|
- beansType,
|
|
|
- num,
|
|
|
- addTime
|
|
|
+ type,
|
|
|
+ beansType,
|
|
|
+ num,
|
|
|
+ addTime
|
|
|
FROM
|
|
|
- user_beans_history
|
|
|
+ user_beans_history
|
|
|
WHERE
|
|
|
- userId = #{userId}
|
|
|
- AND addTime <![CDATA[ >= ]]> #{startTime}
|
|
|
- AND addTime <![CDATA[ <= ]]> #{endTime}
|
|
|
- AND delFlag = 0
|
|
|
- <if test="type != null and type != 0">
|
|
|
- AND type = #{type}
|
|
|
- </if>
|
|
|
+ userId = #{userId}
|
|
|
+ AND addTime <![CDATA[ >= ]]> #{startTime}
|
|
|
+ AND addTime <![CDATA[ <= ]]> #{endTime}
|
|
|
+ AND delFlag = 0
|
|
|
+ <if test="type != null and type != 0">
|
|
|
+ AND type = #{type}
|
|
|
+ </if>
|
|
|
ORDER BY addTime DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="findLoginBeans" resultType="integer">
|
|
|
- SELECT
|
|
|
- id
|
|
|
- FROM
|
|
|
- user_beans_history
|
|
|
- WHERE
|
|
|
- beansType IN (1,12)
|
|
|
+ SELECT id
|
|
|
+ FROM user_beans_history
|
|
|
+ WHERE beansType IN (1, 12)
|
|
|
AND DATE_FORMAT(addTime, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
|
|
|
AND userId = #{userId}
|
|
|
</select>
|
|
|
|
|
|
<select id="findCountCoupon" resultType="integer">
|
|
|
- SELECT
|
|
|
- COUNT(a.id)
|
|
|
- FROM
|
|
|
- cm_coupon_club a
|
|
|
- LEFT JOIN cm_coupon cc ON a.couponId = cc.id
|
|
|
- WHERE
|
|
|
- cc.delFlag = 0
|
|
|
+ SELECT COUNT(a.id)
|
|
|
+ FROM cm_coupon_club a
|
|
|
+ LEFT JOIN cm_coupon cc ON a.couponId = cc.id
|
|
|
+ WHERE cc.delFlag = 0
|
|
|
AND a.delFlag = 0
|
|
|
AND a.userId = #{userId}
|
|
|
AND a.status = 1
|
|
|
AND NOW() BETWEEN cc.startDate
|
|
|
- AND cc.endDate
|
|
|
+ AND cc.endDate
|
|
|
AND cc.status != 2
|
|
|
</select>
|
|
|
<select id="findBeansHistoryByArchiveId" resultType="java.lang.Integer">
|
|
|
- select id from user_beans_history where userId = #{userId} and archiveId = #{archiveId}
|
|
|
+ select id
|
|
|
+ from user_beans_history
|
|
|
+ where userId = #{userId}
|
|
|
+ and archiveId = #{archiveId}
|
|
|
</select>
|
|
|
<select id="getBeansNumByUserId" resultType="java.lang.Integer">
|
|
|
select userBeans
|
|
@@ -197,14 +270,15 @@
|
|
|
where userID = #{userId}
|
|
|
</select>
|
|
|
<select id="getRemarksList" resultType="com.caimei365.user.model.vo.RemarksVo">
|
|
|
- select id as remarksId, remarks, addTime
|
|
|
+ select id as remarksId, remarks, addTime, questionMan, clubId
|
|
|
from cm_club_remarks
|
|
|
- where clubId = #{clubId}
|
|
|
+ where serviceProviderId = #{serviceProviderId}
|
|
|
order by addTime desc
|
|
|
</select>
|
|
|
<select id="getRemarks" resultType="com.caimei365.user.model.vo.RemarksVo">
|
|
|
- select id as remarksId, remarks, addTime
|
|
|
- from cm_club_remarks
|
|
|
+ select ccr.id as remarksId, ccr.remarks, ccr.questionMan, ccr.addTime, ccr.clubId, c.userID
|
|
|
+ from cm_club_remarks ccr
|
|
|
+ left join club c on ccr.clubId = c.clubId
|
|
|
where id = #{remarksId}
|
|
|
</select>
|
|
|
<select id="getRemarksImageList" resultType="java.lang.String">
|
|
@@ -220,20 +294,39 @@
|
|
|
and fileType = 2
|
|
|
</select>
|
|
|
<select id="getAfterSale" resultType="com.caimei365.user.model.vo.AfterSaleVo">
|
|
|
- SELECT id, organizeName, organizeLinkName, mobile, contactNumber, systemName, systemImage,
|
|
|
- introduction, afterSale, shoppingNotes, updateTime, addTime, delFlag
|
|
|
+ SELECT id,
|
|
|
+ organizeName,
|
|
|
+ organizeLinkName,
|
|
|
+ mobile,
|
|
|
+ contactNumber,
|
|
|
+ systemName,
|
|
|
+ systemImage,
|
|
|
+ introduction,
|
|
|
+ afterSale,
|
|
|
+ shoppingNotes,
|
|
|
+ updateTime,
|
|
|
+ addTime,
|
|
|
+ delFlag
|
|
|
FROM cm_mall_organize
|
|
|
- WHERE id = 0 AND delFlag = '0'
|
|
|
+ WHERE id = 0
|
|
|
+ AND delFlag = '0'
|
|
|
</select>
|
|
|
<select id="getUnReadMessageCount" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(*) FROM message WHERE toUserID = #{userId} AND readFlag='0'
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM message
|
|
|
+ WHERE toUserID = #{userId}
|
|
|
+ AND readFlag = '0'
|
|
|
</select>
|
|
|
<select id="getUserCouponCount" resultType="java.lang.Integer">
|
|
|
SELECT COUNT(a.id)
|
|
|
FROM cm_coupon_club a
|
|
|
- LEFT JOIN cm_coupon cc ON a.couponId = cc.id
|
|
|
- WHERE cc.delFlag = 0 AND a.delFlag = 0 AND a.status = 1 AND cc.status != 2
|
|
|
- AND a.userId = #{userId} AND NOW() BETWEEN cc.startDate AND cc.endDate
|
|
|
+ LEFT JOIN cm_coupon cc ON a.couponId = cc.id
|
|
|
+ WHERE cc.delFlag = 0
|
|
|
+ AND a.delFlag = 0
|
|
|
+ AND a.status = 1
|
|
|
+ AND cc.status != 2
|
|
|
+ AND a.userId = #{userId}
|
|
|
+ AND NOW() BETWEEN cc.startDate AND cc.endDate
|
|
|
</select>
|
|
|
<select id="getUserAdvertiseList" resultType="com.caimei365.user.model.vo.AdvertiseVo">
|
|
|
SELECT image, link, title
|
|
@@ -264,4 +357,92 @@
|
|
|
</where>
|
|
|
ORDER BY informationID DESC
|
|
|
</select>
|
|
|
+ <select id="getVisitorList" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
|
|
|
+ SELECT questionManId, serviceProviderId, addTime as addDate, questionMan
|
|
|
+ FROM cm_visitor_remarks
|
|
|
+ WHERE serviceProviderId = #{serviceProviderId}
|
|
|
+ and clubId is null
|
|
|
+ GROUP BY questionManId
|
|
|
+ ORDER BY addTime DESC
|
|
|
+ </select>
|
|
|
+ <select id="getVisitRemark" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
|
|
|
+ select id as remarksId, questionManId, remarks, questionMan, addTime as addDate
|
|
|
+ from cm_visitor_remarks
|
|
|
+ where id = #{remarksId}
|
|
|
+ AND remarks IS NOT NULL
|
|
|
+ and clubId is null
|
|
|
+ </select>
|
|
|
+ <select id="getVisitRemarksImageList" resultType="java.lang.String">
|
|
|
+ select imageUrl
|
|
|
+ from cm_visitor_remarks_file
|
|
|
+ where remarksId = #{remarksId}
|
|
|
+ and fileType = 1
|
|
|
+ </select>
|
|
|
+ <select id="getVisitRemarksFileList" resultType="com.caimei365.user.model.vo.RemarksFileVo">
|
|
|
+ select fileName, ossName
|
|
|
+ from cm_visitor_remarks_file
|
|
|
+ where remarksId = #{remarksId}
|
|
|
+ and fileType = 2
|
|
|
+ </select>
|
|
|
+ <select id="findClubName" resultType="java.lang.String">
|
|
|
+ select name
|
|
|
+ from club
|
|
|
+ where clubID = #{clubId}
|
|
|
+ </select>
|
|
|
+ <select id="getVisitRecordList" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
|
|
|
+ select id as remarksId, questionManId, remarks, addTime as addDate, questionMan
|
|
|
+ from cm_visitor_remarks
|
|
|
+ where questionManId = #{questionManId}
|
|
|
+ AND remarks IS NOT NULL
|
|
|
+ and clubId is null
|
|
|
+ ORDER BY ADDTIME DESC
|
|
|
+ </select>
|
|
|
+ <select id="findConcactVisit" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
|
|
|
+ select id as remarksId,
|
|
|
+ questionManId,
|
|
|
+ serviceProviderId,
|
|
|
+ remarks,
|
|
|
+ addTime as addDate,
|
|
|
+ questionMan,
|
|
|
+ clubId,
|
|
|
+ concactTime
|
|
|
+ from cm_visitor_remarks
|
|
|
+ where questionManId = #{questionManId}
|
|
|
+ and remarks is not null
|
|
|
+ </select>
|
|
|
+ <select id="findQuestionMan" resultType="java.lang.String">
|
|
|
+ select DISTINCT questionMan
|
|
|
+ from cm_visitor_remarks
|
|
|
+ where questionManId = #{questionManId}
|
|
|
+ AND questionMan IS NOT NULL
|
|
|
+ </select>
|
|
|
+ <select id="getRemarksListByKey" resultType="com.caimei365.user.model.vo.RemarksVo">
|
|
|
+ select ccr.id as remarksId, ccr.remarks, ccr.addTime, ccr.questionMan, ccr.clubId
|
|
|
+ from cm_club_remarks ccr
|
|
|
+ LEFT JOIN club c ON c.clubID = ccr.clubId
|
|
|
+ where ccr.serviceProviderId = #{serviceProviderId}
|
|
|
+ AND ccr.remarks LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
+ OR c.name LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
+ OR ccr.questionMan LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
+ order by addTime desc
|
|
|
+ </select>
|
|
|
+ <select id="getVisitorListByKey" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
|
|
|
+ SELECT questionManId, serviceProviderId, addTime as addDate, questionMan
|
|
|
+ FROM cm_visitor_remarks
|
|
|
+ WHERE serviceProviderId = #{serviceProviderId}
|
|
|
+ and questionMan LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
+ and clubId is null
|
|
|
+ GROUP BY questionManId
|
|
|
+ ORDER BY addTime DESC
|
|
|
+ </select>
|
|
|
+ <select id="getVisitRecordListByKey" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
|
|
|
+ select id as remarksId, questionManId, remarks, addTime as addDate, questionMan
|
|
|
+ from cm_visitor_remarks
|
|
|
+ where questionManId = #{questionManId}
|
|
|
+ and questionMan LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
+ OR remarks LIKE CONCAT('%', #{keyWord}, '%')
|
|
|
+ AND remarks IS NOT NULL
|
|
|
+ and clubId is null
|
|
|
+ ORDER BY ADDTIME DESC
|
|
|
+ </select>
|
|
|
</mapper>
|