| | |
| | | |
| | | alter table lf.sys_operate add column modular1 varchar(50); |
| | | alter table lf.sys_operate add column modular2 varchar(50); |
| | | alter table lf.sys_operate drop column modular; |
| | | select split_part(modular,'\',1),split_part(modular,'\',2) from lf.sys_operate; |
| | | update lf.sys_operate set modular1=split_part(modular,'\',1),modular2=split_part(modular,'\',2); |
| | | |
| | | delete from lf.sys_operate where modular is null and modular2 is null; |
| | | /*insert into lf.sys_operate (modular,url,ip,type) values ('数据管理\目录管理','data/manage/update','192.168.20.106',5); |
| | | insert into lf.sys_operate (modular,url,ip,type,optime) values ('数据管理\目录管理','data/manage/delete','192.168.20.107',4,'2024-01-02');*/ |
| | | |
| | | select * from lf.sys_operate where modular is null or ; |
| | | select a.*,b.uname from lf.sys_operate a inner join lf.sys_user b on a.userid = b.id; |
| | | select * from lf.sys_operate; |
| | | select * from lf.sys_operate_2022; |
| | | select * from lf.sys_operate_2024; |
| | | ----------------------------------------------------------------------------------------------------- 7.令牌表 |
| | |
| | | comment on column lf.sys_res_op.optime is '创建时间'; |
| | | |
| | | /*insert into lf.sys_res_op (resid,ip,type) values (1,'192.168.20.106',5); |
| | | insert into lf.sys_res_op (resid,ip,type) values (1,'192.168.20.106',1); |
| | | insert into lf.sys_res_op (resid,ip,type,optime) values (1,'192.168.20.107',4,'2024-01-02');*/ |
| | | |
| | | select a.*,b.uname,c.name from lf.sys_res_op a inner join lf.sys_user b on a.userid = b.id inner join lf.sys_res c on a.resid=c.id; |
| | | |
| | | select * from lf.sys_res_op; |
| | | select * from lf.sys_res_op_2022; |
| | | select * from lf.sys_res_op_2024; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", required = false, example = "sys_operate") |
| | | @ApiImplicitParam(name = "uname", value = "用户名", dataType = "String", paramType = "query", example = "管理员"), |
| | | @ApiImplicitParam(name = "type", value = "类型", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", dataType = "Timestamp", paramType = "query", example = "2022-10-10 17:00:00") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String userid) { |
| | | public ResponseMsg<Integer> selectCount(String uname, Integer type, Timestamp start, Timestamp end) { |
| | | try { |
| | | int count = operateService.selectCount(userid); |
| | | int count = operateService.selectCount(uname, type, start, end); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", example = "sys_operate"), |
| | | @ApiImplicitParam(name = "uname", value = "用户名", dataType = "String", paramType = "query", example = "管理员"), |
| | | @ApiImplicitParam(name = "type", value = "类型", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", dataType = "Timestamp", paramType = "query", example = "2022-10-10 17:00:00"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPage") |
| | | public ResponseMsg<List<OperateEntity>> selectByPage(String userid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<List<OperateEntity>> selectByPage(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | List<OperateEntity> rs = operateService.selectByPage(userid, pageSize, pageSize * (pageIndex - 1)); |
| | | List<OperateEntity> rs = operateService.selectByPage(uname, type, start, end, pageSize, pageSize * (pageIndex - 1)); |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询并返回记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "uname", value = "用户名", dataType = "String", paramType = "query", example = "管理员"), |
| | | @ApiImplicitParam(name = "type", value = "类型", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", dataType = "Timestamp", paramType = "query", example = "2022-10-10 17:00:00"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPageAndCount") |
| | | public ResponseMsg<List<OperateEntity>> selectByPageAndCount(String userid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<List<OperateEntity>> selectByPageAndCount(String uname, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | |
| | | int count = operateService.selectCount(userid); |
| | | int count = operateService.selectCount(uname, type, start, end); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<OperateEntity> rs = operateService.selectByPage(userid, pageSize, pageSize * (pageIndex - 1)); |
| | | List<OperateEntity> rs = operateService.selectByPage(uname, type, start, end, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", required = false, example = "sys_res_op") |
| | | @ApiImplicitParam(name = "name", value = "资源名称", dataType = "String", paramType = "query", example = "天地图"), |
| | | @ApiImplicitParam(name = "type", value = "操作类型", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", dataType = "Timestamp", paramType = "query", example = "2022-10-10 18:00:00"), |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String userid) { |
| | | public ResponseMsg<Integer> selectCount(String name, Integer type, Timestamp start, Timestamp end) { |
| | | try { |
| | | int count = resOpService.selectCount(userid); |
| | | int count = resOpService.selectCount(name, type, start, end); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", example = "sys_res_op"), |
| | | @ApiImplicitParam(name = "name", value = "资源名称", dataType = "String", paramType = "query", example = "天地图"), |
| | | @ApiImplicitParam(name = "type", value = "操作类型", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", dataType = "Timestamp", paramType = "query", example = "2022-10-10 18:00:00"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPage") |
| | | public ResponseMsg<List<ResOpEntity>> selectByPage(String userid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<List<ResOpEntity>> selectByPage(String name, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | List<ResOpEntity> rs = resOpService.selectByPage(userid, pageSize, pageSize * (pageIndex - 1)); |
| | | List<ResOpEntity> rs = resOpService.selectByPage(name, type, start, end, pageSize, pageSize * (pageIndex - 1)); |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询并返回记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "name", value = "资源名称", dataType = "String", paramType = "query", example = "天地图"), |
| | | @ApiImplicitParam(name = "type", value = "操作类型", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "start", value = "开始时间", dataType = "Timestamp", paramType = "query", example = "2022-10-09 09:00:00"), |
| | | @ApiImplicitParam(name = "end", value = "结束时间", dataType = "Timestamp", paramType = "query", example = "2022-10-10 18:00:00"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPageAndCount") |
| | | public ResponseMsg<List<ResOpEntity>> selectByPageAndCount(String userid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<List<ResOpEntity>> selectByPageAndCount(String name, Integer type, Timestamp start, Timestamp end, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | |
| | | int count = resOpService.selectCount(userid); |
| | | int count = resOpService.selectCount(name, type, start, end); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<ResOpEntity> rs = resOpService.selectByPage(userid, pageSize, pageSize * (pageIndex - 1)); |
| | | List<ResOpEntity> rs = resOpService.selectByPage(name, type, start, end, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | |
| | | |
| | | private int id; |
| | | |
| | | private String modular; |
| | | private String uname; |
| | | |
| | | private String modular1; |
| | | |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getModular() { |
| | | return modular; |
| | | public String getUname() { |
| | | return uname; |
| | | } |
| | | |
| | | public void setModular(String modular) { |
| | | this.modular = modular; |
| | | public void setUname(String uname) { |
| | | this.uname = uname; |
| | | } |
| | | |
| | | public String getModular1() { |
| | |
| | | */ |
| | | |
| | | public class ResOpEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -7322438248126715583L; |
| | | |
| | | private int id; |
| | | |
| | | private String uname; |
| | | |
| | | private String name; |
| | | |
| | | private int resid; |
| | | |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getUname() { |
| | | return uname; |
| | | } |
| | | |
| | | public void setUname(String uname) { |
| | | this.uname = uname; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getResid() { |
| | | return resid; |
| | | } |
| | |
| | | @ResponseBody |
| | | public interface LoginMapper { |
| | | /** |
| | | * 根据表名查询记录数 |
| | | * 查询记录数 |
| | | * |
| | | * @param uname |
| | | * @param type |
| | |
| | | public Integer selectCount(String uname, Integer type, Timestamp start, Timestamp end); |
| | | |
| | | /** |
| | | * 根据表名分页查询 |
| | | * 分页查询 |
| | | * |
| | | * @param uname |
| | | * @param type |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | public interface OperateMapper { |
| | | /** |
| | | * 根据表名查询记录数 |
| | | * |
| | | * @param userid 登录人ID |
| | | * @return 记录数 |
| | | * 查询记录数 |
| | | * @param uname |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @return |
| | | */ |
| | | public Integer selectCount(String userid); |
| | | public Integer selectCount(String uname, Integer type, Timestamp start, Timestamp end); |
| | | |
| | | /** |
| | | * 根据表名分页查询 |
| | | * |
| | | * @param userid 表名 |
| | | * @param limit 记录表 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | | * 分页查询 |
| | | * @param uname |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @param limit |
| | | * @param offset |
| | | * @return |
| | | */ |
| | | public List<OperateEntity> selectByPage(String userid, Integer limit, Integer offset); |
| | | public List<OperateEntity> selectByPage(String uname, Integer type, Timestamp start, Timestamp end, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 添加数据 |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | public interface ResOpMapper { |
| | | /** |
| | | * 根据表名查询记录数 |
| | | * 查询记录数 |
| | | * |
| | | * @param userid 登录人ID |
| | | * @return 记录数 |
| | | * @param name |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @return |
| | | */ |
| | | public Integer selectCount(String userid); |
| | | public Integer selectCount(String name, Integer type, Timestamp start, Timestamp end); |
| | | |
| | | /** |
| | | * 根据表名分页查询 |
| | | * 分页查询 |
| | | * |
| | | * @param userid 表名 |
| | | * @param limit 记录表 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | | * @param name |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @param type |
| | | * @param start |
| | | * @param end |
| | | * @return |
| | | */ |
| | | public List<ResOpEntity> selectByPage(String userid, Integer limit, Integer offset); |
| | | public List<ResOpEntity> selectByPage(String name, Integer type, Timestamp start, Timestamp end, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 添加数据 |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.OperateEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.OperateMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | OperateMapper operateMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String userid) { |
| | | return operateMapper.selectCount(userid); |
| | | public Integer selectCount(String uname, Integer type, Timestamp start, Timestamp end) { |
| | | uname = StringHelper.isNull(uname) ? null : "%" + uname.trim() + "%"; |
| | | |
| | | return operateMapper.selectCount(uname, type, start, end); |
| | | } |
| | | |
| | | @Override |
| | | public List<OperateEntity> selectByPage(String userid, Integer limit, Integer offset) { |
| | | return operateMapper.selectByPage(userid,limit,offset); |
| | | public List<OperateEntity> selectByPage(String uname, Integer type, Timestamp start, Timestamp end, Integer limit, Integer offset) { |
| | | uname = StringHelper.isNull(uname) ? null : "%" + uname.trim() + "%"; |
| | | |
| | | return operateMapper.selectByPage(uname, type, start, end, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.ResOpEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.ResOpMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | ResOpMapper resOpMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String userid) { |
| | | return resOpMapper.selectCount(userid); |
| | | public Integer selectCount(String name, Integer type, Timestamp start, Timestamp end) { |
| | | name = StringHelper.isNull(name) ? null : "%" + name.trim() + "%"; |
| | | |
| | | return resOpMapper.selectCount(name, type, start, end); |
| | | } |
| | | |
| | | @Override |
| | | public List<ResOpEntity> selectByPage(String userid, Integer limit, Integer offset) { |
| | | return resOpMapper.selectByPage(userid, limit, offset); |
| | | public List<ResOpEntity> selectByPage(String name, Integer type, Timestamp start, Timestamp end, Integer limit, Integer offset) { |
| | | name = StringHelper.isNull(name) ? null : "%" + name.trim() + "%"; |
| | | |
| | | return resOpMapper.selectByPage(name, type, start, end, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <?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.lf.server.mapper.sys.OperateMapper"> |
| | | |
| | | <!-- 统计行数 --> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_operate |
| | | select count(*) from lf.sys_operate a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | | <if test="userid != null"> |
| | | userid = #{userid} |
| | | 1 = 1 |
| | | <if test="uname != null"> |
| | | and b.uname like #{uname} |
| | | </if> |
| | | <if test="type != null"> |
| | | and a.type = #{type} |
| | | </if> |
| | | <if test="start != null"> |
| | | and a.optime >= #{start} |
| | | </if> |
| | | <if test="end != null"> |
| | | and a.optime <= #{end} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.OperateEntity"> |
| | | select * from lf.sys_operate |
| | | select a.*,b.uname from lf.sys_operate a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | | <if test="userid != null"> |
| | | userid = #{userid} |
| | | 1 = 1 |
| | | <if test="uname != null"> |
| | | and b.uname like #{uname} |
| | | </if> |
| | | <if test="type != null"> |
| | | and a.type = #{type} |
| | | </if> |
| | | <if test="start != null"> |
| | | and a.optime >= #{start} |
| | | </if> |
| | | <if test="end != null"> |
| | | and a.optime <= #{end} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | order by a.id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | |
| | | <?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.lf.server.mapper.sys.ResOpMapper"> |
| | | |
| | | <!-- 统计行数 --> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_res_op |
| | | select count(*) from lf.sys_res_op a inner join lf.sys_user b on a.userid = b.id inner join lf.sys_res c on a.resid=c.id |
| | | <where> |
| | | <if test="userid != null"> |
| | | userid = #{userid} |
| | | 1 = 1 |
| | | <if test="name != null"> |
| | | and c.name like #{name} |
| | | </if> |
| | | <if test="type != null"> |
| | | and a.type = #{type} |
| | | </if> |
| | | <if test="start != null"> |
| | | and a.optime >= #{start} |
| | | </if> |
| | | <if test="end != null"> |
| | | and a.optime <= #{end} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.ResOpEntity"> |
| | | select * from lf.sys_res_op |
| | | select a.*,b.uname,c.name from lf.sys_res_op a inner join lf.sys_user b on a.userid = b.id inner join lf.sys_res c on a.resid=c.id |
| | | <where> |
| | | <if test="userid != null"> |
| | | userid = #{userid} |
| | | 1 = 1 |
| | | <if test="name != null"> |
| | | and c.name like #{name} |
| | | </if> |
| | | <if test="type != null"> |
| | | and a.type = #{type} |
| | | </if> |
| | | <if test="start != null"> |
| | | and a.optime >= #{start} |
| | | </if> |
| | | <if test="end != null"> |
| | | and a.optime <= #{end} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | order by a.id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |