123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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.CmOperationsDao">
- <select id="findList" resultType="com.caimei.modules.user.entity.CmOperationalLogs">
- SELECT institutionName, Contact, operationtype, Actioncontent, Operator, Operationtime
- FROM `cm_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.CmOperationalLogs" keyProperty="id"
- useGeneratedKeys="true">
- INSERT INTO cm_operational_logs
- (institutionName,
- Contact,
- operationtype,
- Actioncontent,
- Operator,
- Operationtime)
- VALUES (#{institutionName},
- #{Contact},
- #{operationtype},
- #{Actioncontent},
- #{Operator},
- #{Operationtime})
- </insert>
- <select id="shoplist" resultType="NewCmShop">
- SELECT * FROM `shop` s
- LEFT JOIN `user` u ON u.userID = s.userID
- WHERE s.shopID = #{shopID}
- </select>
- <select id="userlist" resultType="NewCmShop">
- SELECT * FROM `shop` s
- LEFT JOIN `user` u ON u.userID = s.userID
- WHERE s.userID = #{userID}
- </select>
- </mapper>
|