From 4351e71d782741143a98f86f6648acd16689165f Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 27 May 2022 19:48:02 +0800 Subject: [PATCH] Merge branch 'developer' into hive2.0 --- zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml new file mode 100644 index 0000000..3fe7b82 --- /dev/null +++ b/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml @@ -0,0 +1,68 @@ +<?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.matrix.system.common.dao.OperationLogDao"> + + + <select id="selectPageList" resultType="com.matrix.system.common.bean.respVO.OperationLogRespVo"> + + SELECT + a.id, + a.ope_function, + a.ope_but, + d.shop_short_name as shop_name, + b.su_name AS opeUser, + c.vip_name, + a.bill_no, + a.ip, + a.note, + a.create_time + FROM + sys_operation_log a + LEFT JOIN sys_users b ON a.ope_user_id = b.su_id + LEFT JOIN sys_vip_info c ON a.vip_id = c.id + LEFT JOIN sys_shop_info d ON a.shop_id = d.id + <where> + a.company_id=#{param.companyId} + <if test="param.shopId != null and param.shopId != 0 "> + and a.shop_id=#{param.shopId} + </if> + <if test="param.opeUserId != null"> + and a.ope_user_id=#{param.opeUserId} + </if> + + <if test="param.vipQueryKey != null and param.vipQueryKey != '' "> + and c.VIP_NAME like concat('%',#{param.vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{param.vipQueryKey},'%') + or c.PHONE like concat('%',#{param.vipQueryKey},'%') + ) + </if> + <if test="param.opeFunction != null"> + and a.ope_function=#{param.opeFunction} + </if> + + <if test="param.opeBut != null"> + and a.ope_but=#{param.opeBut} + </if> + <if test="param.billNo != null and param.billNo != ''"> + and a.bill_no like concat('%',#{param.billNo},'%') + </if> + <if test="param.ip != null and param.ip != ''"> + and a.ip like concat('%',#{param.ip},'%') + </if> + <if test="param.note != null and param.note != ''"> + and a.note like concat('%',#{param.note},'%') + </if> + <if test="param.startTime != null "> + and a.create_time <![CDATA[>=]]> #{param.startTime} + </if> + <if test="param.endTime != null"> + and a.create_time <![CDATA[<=]]> #{param.endTime} + </if> + order by ${param.sort} ${param.order} + </where> + + + </select> +</mapper> \ No newline at end of file -- Gitblit v1.9.1