zss
2024-08-01 30a143f368dd2ff6e9c27b9d5dd17923ffed03ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.yuanchu.mom.mapper;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.pojo.PageSystemLogDto;
import com.yuanchu.mom.pojo.SystemLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
 
/**
 * 系统日志(SystemLog)表数据库访问层
 *
 * @author makejava
 * @since 2024-02-27 15:33:14
 */
@Mapper
public interface SystemLogMapper extends BaseMapper<SystemLog> {
 
    IPage<PageSystemLogDto> selectSystemLogList(Page page, QueryWrapper<PageSystemLogDto> ew);
 
    @Select("select coalesce(count(id), 0) from ${tableName} where create_time like concat('%', #{date}, '%')")
    int countRowsByNow(String tableName, String date);
 
    @Select("select coalesce(count(id), 0) from ${tableName} where examine_time like concat('%', #{date}, '%')")
    int countRowsByNow2(String tableName, String date);
 
    @Select("select coalesce(count(id), 0) from ${tableName} where examine_time like concat('%', #{date}, '%') and laboratory=#{laboratory} and company_id=#{companyId}")
    int countRowsByNow3(String tableName, Long companyId, String laboratory, String date);
 
    @Select("select coalesce(count(id), 0) from ${tableName} where create_time like concat('%', #{date}, '%') and laboratory=#{laboratory} and company_id=#{companyId}")
    int countRowsByNow4(String tableName, Long companyId, String laboratory, String date);
}