Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jgjy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
jgjy
Commits
781f9f9b
提交
781f9f9b
authored
9月 02, 2019
作者:
malei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(school-sysUser): BookRecommend
1.重新推荐 References:N/A
上级
39b60c67
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
54 行增加
和
6 行删除
+54
-6
ApprovalStatus.java
.../java/com/zrqx/core/model/school/book/ApprovalStatus.java
+15
-1
BookUserRelationManage.java
...qx/school/sysuser/manage/book/BookUserRelationManage.java
+10
-0
BookUserRelationManageImpl.java
...chool/sysuser/manage/book/BookUserRelationManageImpl.java
+5
-0
BookRecommendServiceImpl.java
...school/sysuser/service/book/BookRecommendServiceImpl.java
+24
-5
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/model/school/book/ApprovalStatus.java
浏览文件 @
781f9f9b
...
...
@@ -24,7 +24,7 @@ public class ApprovalStatus extends BaseModel {
private
Integer
id
;
/**
* 状态
*
教材
状态
* {@link BookRecommendStatusEnum}
*/
@ApiModelProperty
(
"状态;0:已提交 ,1:未提交 , 2:已退回"
)
...
...
@@ -45,5 +45,19 @@ public class ApprovalStatus extends BaseModel {
@ApiModelProperty
(
"用户与教材推荐的关系ID"
)
private
Integer
bookUserRelationId
;
/**
* 两个步骤时,终审能看到多本教材,确认一本提交分单
* {@link com.zrqx.core.enums.school.sysuser.ApprovalStatusEnum}
*/
@ApiModelProperty
(
"状态;0:待确认 ,1:已确认"
)
private
String
confirmStatus
;
/**
* 课程状态,列表以课程为单位展示
* {@link BookRecommendStatusEnum}
*/
// @ApiModelProperty("状态;0:已提交, 1:未提交, 2:已退回")
// private String lessonStatus;
}
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/manage/book/BookUserRelationManage.java
浏览文件 @
781f9f9b
...
...
@@ -53,4 +53,14 @@ public interface BookUserRelationManage {
*/
BookRecommendUserRelation
findById
(
Integer
id
);
/**
* 查询当前用户的推荐记录,重新推荐使用
*@param queryCondition
*@return
*@author: ml
*@date: 2019/9/2 10:59
*/
BookRecommendUserRelation
findOneByCreaterAndLessonId
(
BookRecommendUserRelation
queryCondition
);
}
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/manage/book/BookUserRelationManageImpl.java
浏览文件 @
781f9f9b
...
...
@@ -52,4 +52,9 @@ public class BookUserRelationManageImpl extends BaseManageImpl<BookRecommendUser
public
BookRecommendUserRelation
findById
(
Integer
id
)
{
return
super
.
selectByPrimaryKey
(
id
);
}
@Override
public
BookRecommendUserRelation
findOneByCreaterAndLessonId
(
BookRecommendUserRelation
queryCondition
)
{
return
super
.
selectOne
(
queryCondition
);
}
}
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/service/book/BookRecommendServiceImpl.java
浏览文件 @
781f9f9b
...
...
@@ -296,17 +296,36 @@ public class BookRecommendServiceImpl extends BaseModelServiceImpl<BookRecommend
@Transactional
public
Boolean
renewRecommend
(
RenewRecommendForm
form
)
{
//更新教参习题册绑定状态
BookRecommendUserRelation
userRelation
=
relationManage
.
findById
(
form
.
getId
());
userRelation
.
setIsGuide
(
form
.
getIsGuides
());
userRelation
.
setIsExercise
(
form
.
getIsExercise
());
//查询需要更新的推荐记录
BookRecommendUserRelation
userRelation
=
new
BookRecommendUserRelation
();
userRelation
.
setCreater
(
redis
.
getMember
().
getId
().
toString
());
userRelation
.
setLessonId
(
form
.
getLessonId
());
userRelation
.
setRecommendId
(
form
.
getId
());
userRelation
=
relationManage
.
findOneByCreaterAndLessonId
(
userRelation
);
//教材是否绑定了教参或习题册
CallBack
<
CheckBindingVo
>
data
=
fgResouceClient
.
getCheckBindingByMainId
(
form
.
getBookId
());
if
(
data
==
null
||
data
.
getData
()
==
null
)
{
throw
new
BaseException
(
"推荐失败,获取资源失败"
);
}
CheckBindingVo
binding
=
data
.
getData
();
if
(
binding
.
getExercise
()
!=
null
&&
binding
.
getExercise
())
{
userRelation
.
setIsExercise
(
BooleanStatusEnum
.
YES
.
getCode
());
userRelation
.
setExerciseId
(
data
.
getData
().
getExerciseId
());
}
if
(
binding
.
getExercise
()
!=
null
&&
binding
.
getGuides
())
{
userRelation
.
setIsGuide
(
BooleanStatusEnum
.
YES
.
getCode
());
userRelation
.
setGuideId
(
data
.
getData
().
getGuideId
());
}
//更新推荐记录
relationManage
.
update
(
userRelation
);
String
code
=
this
.
getFlowCodeByMemberId
(
redis
.
getMember
().
getId
());
String
nextCode
=
code
.
substring
(
0
,
code
.
length
()-
2
);
//修改当前环节已退回状态为已提交
ApprovalStatus
current
=
statusManage
.
queryOne
(
form
.
getId
(),
userRelation
.
getId
(),
code
,
BookRecommendStatusEnum
.
RETURNED
.
getCode
());
current
.
setStatus
(
BookRecommendStatusEnum
.
SUBMITTED
.
getCode
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论