Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
606c472e
Commit
606c472e
authored
Jan 11, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改作业目录结构
parent
1bbd11fa
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
69 deletions
+105
-69
BCodeController.java
...rg/rcisoft/business/bcode/controller/BCodeController.java
+20
-6
BCodeFile.java
...main/java/org/rcisoft/business/bcode/model/BCodeFile.java
+5
-2
BCodeService.java
...java/org/rcisoft/business/bcode/service/BCodeService.java
+4
-2
BCodeServiceImpl.java
...rcisoft/business/bcode/service/impl/BCodeServiceImpl.java
+75
-59
JwtUtil.java
src/main/java/org/rcisoft/core/util/JwtUtil.java
+1
-0
No files found.
src/main/java/org/rcisoft/business/bcode/controller/BCodeController.java
View file @
606c472e
...
...
@@ -3,6 +3,7 @@ package org.rcisoft.business.bcode.controller;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.business.bcode.model.BCodeFile
;
import
org.rcisoft.business.bcode.service.BCodeService
;
import
org.rcisoft.common.controller.PaginationController
;
import
org.rcisoft.core.constant.MessageConstant
;
...
...
@@ -12,6 +13,8 @@ import org.rcisoft.core.util.UserUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* Created by lcy on 18/1/3.
*
...
...
@@ -40,11 +43,19 @@ public class BCodeController extends PaginationController {
public
Result
queryOwnExamFiles
(
@RequestParam
(
"slId"
)
String
slId
,
@RequestParam
(
"chapId"
)
String
chapId
,
@RequestParam
(
"examType"
)
String
examType
){
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bCodeServiceImpl
.
readExamFiles
(
slId
,
chapId
,
examType
,
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_ID
)));
List
<
BCodeFile
>
list
=
bCodeServiceImpl
.
readExamFiles
(
slId
,
chapId
,
examType
,
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_ID
),
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_USERNAME
));
if
(
examType
.
equals
(
"0001"
)||
examType
.
equals
(
"1001"
))
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
list
.
get
(
0
));
else
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
list
);
}
...
...
@@ -63,7 +74,10 @@ public class BCodeController extends PaginationController {
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bCodeServiceImpl
.
saveOwnExamFiles
(
slId
,
chapId
,
examType
,
content
,
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_ID
)));
bCodeServiceImpl
.
saveOwnExamFiles
(
slId
,
chapId
,
examType
,
content
,
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_ID
),
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_USERNAME
)
));
}
...
...
src/main/java/org/rcisoft/business/bcode/model/BCodeFile.java
View file @
606c472e
...
...
@@ -22,7 +22,10 @@ public class BCodeFile {
private
Date
lastModify
;
private
List
<
String
>
fileNameList
;
private
String
name
;
private
String
id
;
private
String
pId
;
private
List
<
BCodeFile
>
codeFileList
;
}
src/main/java/org/rcisoft/business/bcode/service/BCodeService.java
View file @
606c472e
...
...
@@ -2,6 +2,8 @@ package org.rcisoft.business.bcode.service;
import
org.rcisoft.business.bcode.model.BCodeFile
;
import
java.util.List
;
/**
* Created by lcy on 18/1/3.
*/
...
...
@@ -14,7 +16,7 @@ public interface BCodeService {
* @param userInfoProp
* @return
*/
BCodeFile
readExamFiles
(
String
slId
,
String
chapId
,
String
examType
,
String
userInfoProp
);
List
<
BCodeFile
>
readExamFiles
(
String
slId
,
String
chapId
,
String
examType
,
String
userInfoProp
,
String
StudentCode
);
/**
...
...
@@ -26,7 +28,7 @@ public interface BCodeService {
* @param userInfoProp
* @return
*/
BCodeFile
saveOwnExamFiles
(
String
slId
,
String
chapId
,
String
examType
,
String
content
,
String
userInfoProp
);
BCodeFile
saveOwnExamFiles
(
String
slId
,
String
chapId
,
String
examType
,
String
content
,
String
userInfoProp
,
String
studentCode
);
String
exportFiles
(
String
slId
,
String
studentId
,
String
type
,
String
slCode
);
}
src/main/java/org/rcisoft/business/bcode/service/impl/BCodeServiceImpl.java
View file @
606c472e
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/core/util/JwtUtil.java
View file @
606c472e
...
...
@@ -52,6 +52,7 @@ public class JwtUtil {
Map
<
String
,
Object
>
map
=
new
HashedMap
();
map
.
put
(
userDetails
.
getUsername
(),
userDetails
);
map
.
put
(
UserUtil
.
USER_ID
,
jwtUser
.
getBusinessId
());
map
.
put
(
UserUtil
.
USER_USERNAME
,
jwtUser
.
getUsername
());
String
token
=
jwtBean
.
generateToken
(
userDetails
.
getUsername
(),
map
);
return
token
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment