From dce6874cfd280e5b6160bc103dff11e7f6073865 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 19 六月 2024 10:19:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/resources/mapper/EducationResourceMapper.xml | 22 +++++++++++-----------
src/main/java/com/ycl/jxkg/config/spring/security/RestAuthenticationSuccessHandler.java | 2 +-
src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java | 2 +-
src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java | 4 ++--
src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java | 6 +++---
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/main/java/com/ycl/jxkg/config/spring/security/RestAuthenticationSuccessHandler.java b/src/main/java/com/ycl/jxkg/config/spring/security/RestAuthenticationSuccessHandler.java
index 6a9c670..7c2a229 100644
--- a/src/main/java/com/ycl/jxkg/config/spring/security/RestAuthenticationSuccessHandler.java
+++ b/src/main/java/com/ycl/jxkg/config/spring/security/RestAuthenticationSuccessHandler.java
@@ -50,7 +50,7 @@
com.ycl.jxkg.domain.entity.User user = userService.getUserByUserName(springUser.getUsername());
if (null != user) {
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
- userEventLog.setContent(user.getUserName() + " 鐧诲綍浜嗗涔嬫�濆紑婧愯�冭瘯绯荤粺");
+ userEventLog.setContent(user.getUserName() + " 鐧诲綍浜嗘睙瑗胯闊宠棰戝煿璁郴缁�");
eventPublisher.publishEvent(new UserEvent(userEventLog));
com.ycl.jxkg.domain.entity.User newUser = new com.ycl.jxkg.domain.entity.User();
newUser.setUserName(user.getUserName());
diff --git a/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java b/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java
index 1eb012c..39405f8 100644
--- a/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java
+++ b/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java
@@ -85,7 +85,7 @@
.authorizeRequests()
.antMatchers(securityIgnoreUrls.toArray(ignores)).permitAll()
.antMatchers("/api/admin/**").hasRole(RoleEnum.ADMIN.getName())
- .antMatchers("/api/student/**").hasRole(RoleEnum.STUDENT.getName())
+ .antMatchers("/api/student/**").hasAnyRole(RoleEnum.STUDENT.getName(),RoleEnum.ADMIN.getName())
.antMatchers("/api/register/**").anonymous()
.anyRequest().permitAll()
.and().exceptionHandling().accessDeniedHandler(restAccessDeniedHandler)
diff --git a/src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java b/src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java
index ea6b7dc..153170b 100644
--- a/src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java
+++ b/src/main/java/com/ycl/jxkg/domain/entity/EducationResource.java
@@ -20,8 +20,8 @@
/** 鏂囦欢鍦板潃 */
private String contentUrl;
- /** 鎵�灞炲垎绫� */
- private Integer belongType;
+ /** 鎵�灞炲绉� */
+ private Integer subjectId;
/** 涓婚绠�浠� */
private String introduction;
diff --git a/src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java b/src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java
index 6f6333e..18f4f6e 100644
--- a/src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java
+++ b/src/main/java/com/ycl/jxkg/domain/vo/admin/education/EducationResourceVO.java
@@ -30,9 +30,9 @@
private UploadFile contentUrl;
private String contentUrlString;
- /** 鎵�灞炲垎绫� */
- @NotNull(message = "璇烽�夋嫨鍒嗙被")
- private Integer belongType;
+ /** 鎵�灞炲绉� */
+ @NotNull(message = "璇烽�夋嫨瀛︾")
+ private Integer subjectId;
private String typeName;
diff --git a/src/main/resources/mapper/EducationResourceMapper.xml b/src/main/resources/mapper/EducationResourceMapper.xml
index 86c3488..bd383cc 100644
--- a/src/main/resources/mapper/EducationResourceMapper.xml
+++ b/src/main/resources/mapper/EducationResourceMapper.xml
@@ -9,7 +9,7 @@
ter.id,
ter.content_type,
ter.content_url as contentUrlString,
- ter.belong_type,
+ ter.subject_id,
ter.introduction,
ter.create_time,
ter.update_time,
@@ -17,14 +17,14 @@
ts.name as typeName
FROM
t_education_resource ter
- INNER JOIN t_subject ts ON ts.id = ter.belong_type
+ INNER JOIN t_subject ts ON ts.id = ter.subject_id
<where>
AND ter.deleted = 0
<if test="query.introduction != null and query.introduction != ''">
AND ter.introduction like concat('%', #{query.subject}, '%')
</if>
- <if test="query.belongType != null">
- AND ts.id = #{query.belongType}
+ <if test="query.subjectId != null">
+ AND ts.id = #{query.subjectId}
</if>
</where>
ORDER BY
@@ -36,21 +36,21 @@
ter.id,
ter.content_type,
ter.content_url as contentUrlString,
- ter.belong_type,
+ ter.subject_id,
ter.introduction,
ter.create_time,
ter.update_time,
ter.attachment as attachmentString
FROM
t_education_resource ter
- INNER JOIN t_subject ts ON ts.id = tos.belong_type
+ INNER JOIN t_subject ts ON ts.id = ter.subject_id
<where>
AND ter.deleted = 0
<if test="query.introduction != null and query.introduction != ''">
AND ter.introduction like concat('%', #{query.subject}, '%')
</if>
- <if test="query.belongType != null">
- AND ts.id = #{query.belongType}
+ <if test="query.subjectId != null">
+ AND ts.id = #{query.subjectId}
</if>
</where>
ORDER BY
@@ -58,9 +58,9 @@
</select>
<insert id="add" keyColumn="id" useGeneratedKeys="true">
- INSERT INTO t_education_resource(content_type, content_url, belong_type, introduction, create_time, update_time,
+ INSERT INTO t_education_resource(content_type, content_url, subject_id, introduction, create_time, update_time,
attachment)
- value (#{form.contentType}, #{form.contentUrl}, #{form.belongType}, #{form.introduction}, #{form.createTime}, #{form.updateTime}, #{form.attachment})
+ value (#{form.contentType}, #{form.contentUrl}, #{form.subjectId}, #{form.introduction}, #{form.createTime}, #{form.updateTime}, #{form.attachment})
</insert>
<update id="update">
@@ -69,7 +69,7 @@
<set>
<if test="form.contentType != null and form.contentType != ''">content_type = #{form.contentType},</if>
<if test="form.contentUrl != null and form.contentUrl != ''">content_url = #{form.contentUrl},</if>
- <if test="form.belongType != null">belong_type = #{form.belongType},</if>
+ <if test="form.subjectId != null">subject_id = #{form.subjectId},</if>
<if test="form.introduction != null and form.introduction != ''">introduction = #{form.introduction},</if>
<if test="form.updateTime != null">update_time = #{form.updateTime},</if>
attachment = #{form.attachment}
--
Gitblit v1.8.0