| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?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.fs.company.mapper.CompanyDetectionPhoneDailyStatisticsMapper">
-
- <resultMap type="CompanyDetectionPhoneDailyStatistics" id="CompanyDetectionPhoneDailyStatisticsResult">
- <result property="id" column="id" />
- <result property="companyId" column="company_id" />
- <result property="companyName" column="company_name" />
- <result property="companyUserId" column="company_user_id" />
- <result property="companyUserName" column="company_user_name" />
- <result property="detectionTime" column="detection_time" />
- <result property="azCount" column="az_count" />
- <result property="iosCount" column="ios_count" />
- <result property="unknownCount" column="unknown_count" />
- <result property="totalCount" column="total_count" />
- <result property="createTime" column="create_time" />
- </resultMap>
- <sql id="selectCompanyDetectionPhoneDailyStatisticsVo">
- select id, company_id, company_name, company_user_id, company_user_name, detection_time, az_count, ios_count, unknown_count, total_count, create_time from company_detection_phone_daily_statistics
- </sql>
- <select id="selectCompanyDetectionPhoneDailyStatisticsList" parameterType="CompanyDetectionPhoneDailyStatistics" resultMap="CompanyDetectionPhoneDailyStatisticsResult">
- <include refid="selectCompanyDetectionPhoneDailyStatisticsVo"/>
- <where>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
- <if test="companyUserName != null and companyUserName != ''"> and company_user_name like concat('%', #{companyUserName}, '%')</if>
- <if test="detectionTime != null "> and DATE(detection_time) = DATE(#{detectionTime})</if>
- <if test="azCount != null "> and az_count = #{azCount}</if>
- <if test="iosCount != null "> and ios_count = #{iosCount}</if>
- <if test="unknownCount != null "> and unknown_count = #{unknownCount}</if>
- <if test="totalCount != null "> and total_count = #{totalCount}</if>
- </where>
- order by id desc
- </select>
-
- <select id="selectCompanyDetectionPhoneDailyStatisticsById" parameterType="Long" resultMap="CompanyDetectionPhoneDailyStatisticsResult">
- <include refid="selectCompanyDetectionPhoneDailyStatisticsVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertCompanyDetectionPhoneDailyStatistics" parameterType="CompanyDetectionPhoneDailyStatistics" useGeneratedKeys="true" keyProperty="id">
- insert into company_detection_phone_daily_statistics
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="companyId != null">company_id,</if>
- <if test="companyName != null">company_name,</if>
- <if test="companyUserId != null">company_user_id,</if>
- <if test="companyUserName != null">company_user_name,</if>
- <if test="detectionTime != null">detection_time,</if>
- <if test="azCount != null">az_count,</if>
- <if test="iosCount != null">ios_count,</if>
- <if test="unknownCount != null">unknown_count,</if>
- <if test="totalCount != null">total_count,</if>
- <if test="createTime != null">create_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="companyId != null">#{companyId},</if>
- <if test="companyName != null">#{companyName},</if>
- <if test="companyUserId != null">#{companyUserId},</if>
- <if test="companyUserName != null">#{companyUserName},</if>
- <if test="detectionTime != null">#{detectionTime},</if>
- <if test="azCount != null">#{azCount},</if>
- <if test="iosCount != null">#{iosCount},</if>
- <if test="unknownCount != null">#{unknownCount},</if>
- <if test="totalCount != null">#{totalCount},</if>
- <if test="createTime != null">#{createTime},</if>
- </trim>
- </insert>
- <update id="updateCompanyDetectionPhoneDailyStatistics" parameterType="CompanyDetectionPhoneDailyStatistics">
- update company_detection_phone_daily_statistics
- <trim prefix="SET" suffixOverrides=",">
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="companyName != null">company_name = #{companyName},</if>
- <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
- <if test="companyUserName != null">company_user_name = #{companyUserName},</if>
- <if test="detectionTime != null">detection_time = #{detectionTime},</if>
- <if test="azCount != null">az_count = #{azCount},</if>
- <if test="iosCount != null">ios_count = #{iosCount},</if>
- <if test="unknownCount != null">unknown_count = #{unknownCount},</if>
- <if test="totalCount != null">total_count = #{totalCount},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteCompanyDetectionPhoneDailyStatisticsById" parameterType="Long">
- delete from company_detection_phone_daily_statistics where id = #{id}
- </delete>
- <delete id="deleteCompanyDetectionPhoneDailyStatisticsByIds" parameterType="String">
- delete from company_detection_phone_daily_statistics where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|