123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?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.caimei.modules.user.dao.OperationsDao">
- <select id="findList" resultType="com.caimei.modules.user.entity.OperationalLogs">
- SELECT institutionName, Contact, operationtype, Actioncontent, Operator, Operationtime
- FROM `operational_logs`
- <where>
- <if test="institutionName != null and institutionName != ''">
- AND institutionName LIKE "%"#{institutionName}"%"
- </if>
- <if test="Contact != null and Contact != ''">
- AND Contact LIKE "%"#{Contact}"%"
- </if>
- <if test="operationtype != null and operationtype != ''">
- AND operationtype LIKE "%"#{operationtype}"%"
- </if>
- <if test="Operationtime != null and Operationtime != ''">
- AND Operationtime LIKE "%"#{Operationtime}"%"
- </if>
- <if test="startTime != null and startTime != ''">
- AND Operationtime <![CDATA[ > ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND Operationtime <![CDATA[ < ]]> #{endTime}
- </if>
- </where>
- order by Operationtime desc
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- </choose>
- </select>
- <insert id="insert" parameterType="com.caimei.modules.user.entity.OperationalLogs" keyProperty="id"
- useGeneratedKeys="true">
- INSERT INTO operational_logs
- (institutionName,
- Contact,
- operationtype,
- Actioncontent,
- Operator,
- Operationtime)
- VALUES (#{institutionName},
- #{Contact},
- #{operationtype},
- #{Actioncontent},
- #{Operator},
- #{Operationtime})
- </insert>
- <select id="ClubName" resultType="java.lang.String">
- SELECT a.linkMan FROM `club` a
- LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
- WHERE b.clubChangeSpRecordID = #{clubChangeSpRecordID}
- </select>
- <select id="ClubsName" resultType="java.lang.String">
- SELECT a.inviterName FROM `club` a
- LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
- WHERE b.clubChangeSpRecordID =#{clubChangeSpRecordID}
- </select>
- <select id="JgName" resultType="java.lang.String">
- SELECT `name` FROM `club` a
- LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
- WHERE b.clubChangeSpRecordID = #{clubChangeSpRecordID}
- </select>
- <select id="linkMan" resultType="java.lang.String">
- SELECT `linkMan` FROM `club` a
- LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
- WHERE b.clubChangeSpRecordID = #{clubChangeSpRecordID}
- </select>
- <select id="passName" resultType="java.lang.String">
- SELECT `name` FROM club a
- WHERE a.userID =#{userID}
- </select>
- <select id="PasslinkMan" resultType="java.lang.String">
- SELECT `linkMan` FROM club a
- WHERE a.userID =#{userID}
- </select>
- <select id="auditName" resultType="java.lang.String">
- SELECT name FROM club a
- WHERE a.clubID =#{clubID}
- </select>
- <select id="auditlinkMan" resultType="java.lang.String">
- SELECT linkMan FROM club a
- WHERE a.clubID =#{clubID}
- </select>
- <select id="newCmClub" resultType="NewCmClub">
- SELECT * FROM club WHERE clubID= #{clubID}
- </select>
- <select id="cmclubinfo" resultType="CmClubinfo">
- SELECT * FROM clubinfo
- WHERE clubInfoID = #{id}
- </select>
- <select id="temPorary" resultType="ClubTemporary">
- SELECT * FROM club_temporary
- WHERE id = #{id}
- </select>
- <select id="selOperationals" resultType="com.caimei.modules.user.entity.OperationalLogs">
- SELECT
- cpr.id as providerId,
- cpr.clubId,
- cpr.operator,
- cpr.createTime,
- CASE sp.status WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE sp.linkMan END AS "spName"
- FROM cm_provider_record cpr
- LEFT JOIN serviceprovider sp ON sp.serviceProviderID = cpr.spID
- WHERE cpr.clubId = #{clubID}
- order by createTime desc
- </select>
- <insert id="inProvider">
- insert into cm_provider_record (spId, clubId, operator, createTime)
- values (#{spId}, #{clubId}, #{operator}, now())
- </insert>
- </mapper>
|