|
@@ -8,6 +8,7 @@
|
|
|
<result property="id" column="ID" jdbcType="BIGINT"/>
|
|
|
<result property="userName" column="USER_NAME" jdbcType="VARCHAR"/>
|
|
|
<result property="phone" column="PHONE" jdbcType="VARCHAR"/>
|
|
|
+ <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/>
|
|
|
<result property="companyId" column="COMPANY_ID" jdbcType="INTEGER"/>
|
|
|
<result property="departmentId" column="DEPARTMENT_ID" jdbcType="INTEGER"/>
|
|
|
<result property="operateContent" column="OPERATE_CONTENT" jdbcType="VARCHAR"/>
|
|
@@ -21,6 +22,7 @@
|
|
|
a.id,
|
|
|
a.USER_NAME,
|
|
|
a.phone,
|
|
|
+ a.tenant_id,
|
|
|
a.company_id,
|
|
|
a.DEPARTMENT_ID,
|
|
|
a.operate_content,
|
|
@@ -73,8 +75,7 @@
|
|
|
and a.create_time >= #{beginTime}
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
- and a.create_time <= #{endTime}
|
|
|
- </if>
|
|
|
+ and a.create_time <= #{endTime} </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<!--通过实体作为筛选条件查询-->
|
|
@@ -92,15 +93,15 @@
|
|
|
</select>
|
|
|
<!-- 新增所有列 -->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into uims_opr_log( USER_NAME, phone, company_id, DEPARTMENT_ID, operate_content, create_time, operate_parameter)
|
|
|
- values ( #{userName}, #{phone}, #{companyId}, #{departmentId}, #{operateContent}, #{createTime}, #{operateParameter})
|
|
|
+ insert into uims_opr_log( USER_NAME, tenant_id, phone, company_id, DEPARTMENT_ID, operate_content, create_time, operate_parameter)
|
|
|
+ values ( #{userName}, #{tenantId}, #{phone}, #{companyId}, #{departmentId}, #{operateContent}, #{createTime}, #{operateParameter})
|
|
|
</insert>
|
|
|
<!-- 批量新增 -->
|
|
|
<insert id="batchInsert">
|
|
|
- insert into uims_opr_log( USER_NAME, phone, company_id, DEPARTMENT_ID, operate_content, create_time, operate_parameter )
|
|
|
+ insert into uims_opr_log( USER_NAME, tenant_id,phone, company_id, DEPARTMENT_ID, operate_content, create_time, operate_parameter )
|
|
|
values
|
|
|
<foreach collection="loginLogs" item="item" index="index" separator=",">
|
|
|
- ( #{item.userName}, #{item.phone}, #{item.companyId}, #{item.departmentId}, #{item.operateContent},
|
|
|
+ ( #{item.userName}, #{item.tenantId},#{item.phone}, #{item.companyId}, #{item.departmentId}, #{item.operateContent},
|
|
|
#{item.createTime}, #{item.operateParameter})
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -149,6 +150,9 @@
|
|
|
<if test="operateLogDto.id != null">
|
|
|
and a.id = #{operateLogDto.id}
|
|
|
</if>
|
|
|
+ <if test="operateLogDto.tenantId != null and operateLogDto.tenantId != ''">
|
|
|
+ and a.tenant_id = #{operateLogDto.tenantId}
|
|
|
+ </if>
|
|
|
<if test="operateLogDto.condition != null and operateLogDto.condition != ''">
|
|
|
and (a.USER_NAME like concat('%', #{operateLogDto.condition},'%')
|
|
|
or a.phone like concat('%', #{operateLogDto.condition},'%'))
|
|
@@ -163,7 +167,7 @@
|
|
|
and a.create_time >= #{operateLogDto.beginTime}
|
|
|
</if>
|
|
|
<if test="operateLogDto.endTime != null">
|
|
|
- and a.create_time <= #{operateLogDto.endTime}
|
|
|
+ and a.create_time <= DATE_ADD(#{operateLogDto.endTime},INTERVAL 1 DAY)
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|