From 9112f70f645d3521fa490e648cdce70b9a7254f0 Mon Sep 17 00:00:00 2001 From: songhuangfeng123 <shf18767906695@163.com> Date: 星期三, 27 七月 2022 17:12:36 +0800 Subject: [PATCH] fix --- goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/RewardPunishmentDetailRepository.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/RewardPunishmentDetailRepository.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/RewardPunishmentDetailRepository.java index 7ff7858..587e7e7 100644 --- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/RewardPunishmentDetailRepository.java +++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/RewardPunishmentDetailRepository.java @@ -1,7 +1,12 @@ package com.gkhy.safePlatform.targetDuty.repository; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail; +import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; /** @@ -13,4 +18,8 @@ @Repository public interface RewardPunishmentDetailRepository extends BaseMapper<RewardPunishmentDetail> { + @Select("<script> select a.id,a.person_id,a.create_time ,b.standard_type ,b.content ,b.q_name ,b.reason " + + "from reward_punishment_detail a left join reward_punishment_standard b on a.reward_punishment_standard_id=b.id where 1=1 " + + "<if test =\"personId !='' and personId !=null\">and a.person_id =#{personId}</if> </script> ") + IPage<RewardPunishmentDetailDto> queryAll(IPage<RewardPunishmentDetailDto> page, @Param("personId") String personId); } \ No newline at end of file -- Gitblit v1.9.2