ad d
This commit is contained in:
@@ -156,8 +156,8 @@ VALUES
|
||||
|
||||
INSERT INTO family_elder(family_id, elder_id, relationship)
|
||||
VALUES
|
||||
(3, 1, '儿子'),
|
||||
(3, 2, '女儿');
|
||||
(4, 1, '儿子'),
|
||||
(4, 2, '女儿');
|
||||
|
||||
INSERT INTO schedule(nurse_id, date, shift, task)
|
||||
VALUES
|
||||
|
||||
@@ -11,6 +11,6 @@ public interface NoticeMapper {
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id")
|
||||
int insert(Notice notice);
|
||||
|
||||
@Select("<script>SELECT * FROM notice WHERE 1=1 <if test='targetUserId != null'> AND target_user_id = #{targetUserId}</if> <if test='targetRole != null'> AND (target_role = #{targetRole} OR target_role = 'ALL')</if> ORDER BY created_at DESC</script>")
|
||||
@Select("<script>SELECT * FROM notice WHERE 1=1 <if test='targetUserId != null'> AND (target_user_id = #{targetUserId} OR target_user_id IS NULL)</if> <if test='targetRole != null'> AND (target_role = #{targetRole} OR target_role = 'ALL')</if> ORDER BY created_at DESC</script>")
|
||||
List<Notice> listByTarget(@Param("targetRole") String targetRole, @Param("targetUserId") Long targetUserId);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ server:
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3307/nursing_home?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://localhost:3306/nursing_home?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: qq5211314
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
Reference in New Issue
Block a user