调整登录时候操作日志导致的报错/xml表中添加删除判断

This commit is contained in:
aikai 2024-04-16 10:17:37 +08:00
parent 8be53dfa2c
commit 9968cd58d5
5 changed files with 12 additions and 29 deletions

View File

@ -148,6 +148,7 @@ public class AuthController {
@Parameter(name = "type", description = "社交类型", required = true),
@Parameter(name = "redirectUri", description = "回调路径")
})
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult<String> socialLogin(@RequestParam("type") Integer type,
@RequestParam("redirectUri") String redirectUri) {
return success(socialClientService.getAuthorizeUrl(
@ -165,6 +166,7 @@ public class AuthController {
@PostMapping("/miniapp_quick_login")
@PermitAll
@Operation(summary = "微信小程序授权手机号快捷登陆", description = "微信小程序的手机号授权,快捷登陆" )
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult<AuthLoginRespVO> miniAppQuickLogin(@RequestBody AuthSocialLoginReqVO reqVO) {
return success(authService.miniAppQuickLogin(reqVO)) ;
}
@ -172,6 +174,7 @@ public class AuthController {
@PostMapping("/miniapp_code2Session")
@PermitAll
@Operation(summary = "微信小程序openid", description = "获取微信小程序的openid" )
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult<WxMaJscode2SessionResult> miniAppCode2Session(@RequestBody AuthSocialLoginReqVO reqVO) {
return success(authService.miniAppCode2Session(reqVO)) ;
}

View File

@ -47,10 +47,4 @@ public interface LogInstanceMapper extends BaseMapperX<LogInstanceDO> {
List<LogReadUserRespDTO> selectRaedUser(Long deptId);
/**
* 获取我管理的日志列表
*
* @return
*/
List<LogInstanceDO> myManageLogInstanceByTimeRange(@Param("fromId") Long fromId, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);
}

View File

@ -82,26 +82,6 @@
or ( result.dept_id = #{deptId} and result.data_scope = 3 )
or result.data_scope = 1
</select>
<select id="myManageLogInstanceByTimeRange"
resultType="cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogInstanceDO">
SELECT
a.*
FROM
work_log_instance_ext AS a
LEFT JOIN work_log_form AS b ON a.form_id = b.id
LEFT JOIN work_log_use AS d ON b.rule_id = d.id AND d.id > 0
<where>
<if test="fromId != null">
and a.form_id = #{fromId}
</if>
<if test="beginTime != null">
and a.create_time &gt;= #{beginTime}
</if>
<if test="endTime != null">
and a.create_time &lt;= #{endTime}
</if>
</where>
</select>
<select id="selectPageResult" resultType="cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceRespVO">
SELECT

View File

@ -15,7 +15,9 @@
a.dept_id
FROM system_users AS a
LEFT JOIN work_log_use AS b ON a.id = b.use_user_id
WHERE b.form_id = #{formId}
WHERE
b.deleted = 0
and b.form_id = #{formId}
AND not EXISTS (SELECT id
FROM work_log_instance_ext
WHERE form_id = b.form_id
@ -98,6 +100,7 @@
AND b.form_id = #{formId}
</if>
<where>
a.deleted = 0
<if test="userId != null">
and a.use_user_id = #{userId}
</if>

View File

@ -15,8 +15,9 @@
DISTINCT form_id
from work_log_use
<where>
deleted = 0
<if test="userId != null">
use_user_id = #{userId}
and use_user_id = #{userId}
</if>
</where>
</select>
@ -25,6 +26,8 @@
select
DISTINCT use_user_dept
from work_log_use
where form_id = #{formId}
where
deleted = 0
and form_id = #{formId}
</select>
</mapper>