Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b1448565
authored
Mar 22, 2022
by
邓敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单设备登录
1 parent
f973e2ad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
344 additions
and
266 deletions
pom.xml
src/main/java/com/subsidy/common/Code.java
src/main/java/com/subsidy/common/configure/RedisConfig.java
src/main/java/com/subsidy/common/constant/Code.java
src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java
src/main/java/com/subsidy/common/interceptor/LoginRequired.java
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/AnsweringQuestionController.java
src/main/java/com/subsidy/controller/CategoryController.java
src/main/java/com/subsidy/controller/ClassDictController.java
src/main/java/com/subsidy/controller/ClassHourDictController.java
src/main/java/com/subsidy/controller/ClassNoticeController.java
src/main/java/com/subsidy/controller/ClassTypeDictController.java
src/main/java/com/subsidy/controller/CompanyDictController.java
src/main/java/com/subsidy/controller/CourseContentController.java
src/main/java/com/subsidy/controller/CourseDictController.java
src/main/java/com/subsidy/controller/DepartmentDictController.java
src/main/java/com/subsidy/controller/ExerciseDictController.java
src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java
src/main/java/com/subsidy/controller/ExerciseDoneResultController.java
src/main/java/com/subsidy/controller/FieldDictController.java
src/main/java/com/subsidy/controller/FileDictController.java
src/main/java/com/subsidy/controller/JobDictController.java
src/main/java/com/subsidy/controller/MemberController.java
src/main/java/com/subsidy/controller/OprAdmDictController.java
src/main/java/com/subsidy/controller/OprMemDictController.java
src/main/java/com/subsidy/controller/PaperDictController.java
src/main/java/com/subsidy/controller/RankDictController.java
src/main/java/com/subsidy/controller/RotationImgDictController.java
src/main/java/com/subsidy/controller/SignInRecordController.java
src/main/java/com/subsidy/controller/VodDictController.java
src/main/java/com/subsidy/controller/VodPlayHistoryController.java
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/util/RedisUtil.java
src/main/java/com/subsidy/vo/administer/UserRoleVO.java
src/main/java/com/subsidy/vo/member/MemberVO.java
src/main/resources/application-prod.properties
src/main/resources/code.properties
pom.xml
View file @
b144856
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<itext-asian.version>
5.2.0
</itext-asian.version>
<itext-asian.version>
5.2.0
</itext-asian.version>
<itextpdf.version>
5.4.1
</itextpdf.version>
<itextpdf.version>
5.4.1
</itextpdf.version>
<java-jwt.version>
3.10.3
</java-jwt.version>
<java-jwt.version>
3.10.3
</java-jwt.version>
<!-- <jedis.version>3.3.0</jedis.version>--
>
<jedis.version>
3.3.0
</jedis.version
>
</properties>
</properties>
<dependencies>
<dependencies>
...
@@ -192,21 +192,21 @@
...
@@ -192,21 +192,21 @@
<version>
1.0.7
</version>
<version>
1.0.7
</version>
</dependency>
</dependency>
<!-- <dependency>--
>
<dependency
>
<!-- <groupId>org.springframework.boot</groupId>--
>
<groupId>
org.springframework.boot
</groupId
>
<!-- <artifactId>spring-boot-starter-data-redis</artifactId>--
>
<artifactId>
spring-boot-starter-data-redis
</artifactId
>
<!-- </dependency>--
>
</dependency
>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-quartz
</artifactId>
<artifactId>
spring-boot-starter-quartz
</artifactId>
</dependency>
</dependency>
<!-- <dependency>--
>
<dependency
>
<!-- <groupId>redis.clients</groupId>--
>
<groupId>
redis.clients
</groupId
>
<!-- <artifactId>jedis</artifactId>--
>
<artifactId>
jedis
</artifactId
>
<!-- <version>${jedis.version}</version>--
>
<version>
${jedis.version}
</version
>
<!-- </dependency>--
>
</dependency
>
<!-- <dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <groupId>org.springframework.boot</groupId>-->
...
...
src/main/java/com/subsidy/common/Code.java
deleted
100644 → 0
View file @
f973e2a
package
com
.
subsidy
.
common
;
public
enum
Code
{
USERNAMENOTFOUND
(
10001
,
"用户不存在"
),
BADCREDENTIALS
(
10002
,
"账户或者密码错误"
),
ACCOUNTEXPIRED
(
10003
,
"账户过期"
),
LOCKEDEXCEPTION
(
10004
,
"账户已锁定"
),
DISABLEDEXCEPTION
(
10005
,
"账户已禁用"
),
ACCESSDENIED
(
10006
,
"无权限访问"
),
AUTHENTICATION
(
10007
,
"身份验证异常"
),
NOHANDLERFOUND
(
10008
,
"找不到相应的视图处理器"
),
PARAM_INVALID
(
10009
,
"参数不合法"
),
TOKEN_EXCEPTION
(
10010
,
"Token不合法"
),
TOKEN_EXPIRED
(
10011
,
"Token已过期"
),
OSS_ERROR
(
10012
,
"OSS文件上传异常"
),
Network_ERROR
(
90000
,
"网络请求失败"
),
SERVER_INTERNAL_ERROR
(
99999
,
"服务器内部错误"
),
;
private
Integer
code
;
private
String
message
;
Code
(
Integer
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
}
src/main/java/com/subsidy/common/configure/RedisConfig.java
View file @
b144856
//package com.subsidy.common.configure;
package
com
.
subsidy
.
common
.
configure
;
//
//import com.fasterxml.jackson.annotation.JsonAutoDetect;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
//import com.fasterxml.jackson.annotation.PropertyAccessor;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
//import com.fasterxml.jackson.databind.ObjectMapper;
import
com.fasterxml.jackson.databind.ObjectMapper
;
//import org.springframework.cache.annotation.CachingConfigurerSupport;
import
org.springframework.cache.annotation.CachingConfigurerSupport
;
//import org.springframework.cache.annotation.EnableCaching;
import
org.springframework.cache.annotation.EnableCaching
;
//import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Bean
;
//import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Configuration
;
//
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
//@EnableCaching
import
org.springframework.data.redis.core.HashOperations
;
//
import
org.springframework.data.redis.core.ListOperations
;
///**
import
org.springframework.data.redis.core.RedisTemplate
;
// * <p>
import
org.springframework.data.redis.core.SetOperations
;
// * Redis
import
org.springframework.data.redis.core.ValueOperations
;
// * </p>
import
org.springframework.data.redis.core.ZSetOperations
;
// *
import
org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer
;
// * @author DengMin
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
// * @since 2020/12/14
// */
@EnableCaching
//@Configuration
//public class RedisConfig extends CachingConfigurerSupport {
/**
//
* <p>
// /**
* Redis
// * retemplate相关配置
* </p>
// * @param factory
*
// * @return
* @author DengMin
// */
* @since 2020/12/14
// @Bean
*/
// public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
@Configuration
//
public
class
RedisConfig
extends
CachingConfigurerSupport
{
// RedisTemplate<String, Object> template = new RedisTemplate<>();
// // 配置连接工厂
/**
// template.setConnectionFactory(factory);
* retemplate相关配置
//
* @param factory
// //使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式)
* @return
// Jackson2JsonRedisSerializer jacksonSeial = new Jackson2JsonRedisSerializer(Object.class);
*/
//
@Bean
// ObjectMapper om = new ObjectMapper();
public
RedisTemplate
<
String
,
Object
>
redisTemplate
(
RedisConnectionFactory
factory
)
{
// // 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
// om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
RedisTemplate
<
String
,
Object
>
template
=
new
RedisTemplate
<>();
// // 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
// 配置连接工厂
// om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
template
.
setConnectionFactory
(
factory
);
// jacksonSeial.setObjectMapper(om);
//
//使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式)
// // 值采用json序列化
Jackson2JsonRedisSerializer
jacksonSeial
=
new
Jackson2JsonRedisSerializer
(
Object
.
class
);
// template.setValueSerializer(jacksonSeial);
// //使用StringRedisSerializer来序列化和反序列化redis的key值
ObjectMapper
om
=
new
ObjectMapper
();
// template.setKeySerializer(new StringRedisSerializer());
// 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
//
om
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
// // 设置hash key 和value序列化模式
// 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
// template.setHashKeySerializer(new StringRedisSerializer());
om
.
enableDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
);
// template.setHashValueSerializer(jacksonSeial);
jacksonSeial
.
setObjectMapper
(
om
);
// template.afterPropertiesSet();
//
// 值采用json序列化
// return template;
template
.
setValueSerializer
(
jacksonSeial
);
// }
//使用StringRedisSerializer来序列化和反序列化redis的key值
//
template
.
setKeySerializer
(
new
StringRedisSerializer
());
// /**
// * 对hash类型的数据操作
// 设置hash key 和value序列化模式
// *
template
.
setHashKeySerializer
(
new
StringRedisSerializer
());
// * @param redisTemplate
template
.
setHashValueSerializer
(
jacksonSeial
);
// * @return
template
.
afterPropertiesSet
();
// */
// @Bean
return
template
;
// public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
}
// return redisTemplate.opsForHash();
// }
/**
//
* 对hash类型的数据操作
// /**
*
// * 对redis字符串类型数据操作
* @param redisTemplate
// *
* @return
// * @param redisTemplate
*/
// * @return
@Bean
// */
public
HashOperations
<
String
,
String
,
Object
>
hashOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
// @Bean
return
redisTemplate
.
opsForHash
();
// public ValueOperations<String, Object> valueOperations(RedisTemplate<String, Object> redisTemplate) {
}
// return redisTemplate.opsForValue();
// }
/**
//
* 对redis字符串类型数据操作
// /**
*
// * 对链表类型的数据操作
* @param redisTemplate
// *
* @return
// * @param redisTemplate
*/
// * @return
@Bean
// */
public
ValueOperations
<
String
,
Object
>
valueOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
// @Bean
return
redisTemplate
.
opsForValue
();
// public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
}
// return redisTemplate.opsForList();
// }
/**
//
* 对链表类型的数据操作
// /**
*
// * 对无序集合类型的数据操作
* @param redisTemplate
// *
* @return
// * @param redisTemplate
*/
// * @return
@Bean
// */
public
ListOperations
<
String
,
Object
>
listOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
// @Bean
return
redisTemplate
.
opsForList
();
// public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
}
// return redisTemplate.opsForSet();
// }
/**
//
* 对无序集合类型的数据操作
// /**
*
// * 对有序集合类型的数据操作
* @param redisTemplate
// *
* @return
// * @param redisTemplate
*/
// * @return
@Bean
// */
public
SetOperations
<
String
,
Object
>
setOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
// @Bean
return
redisTemplate
.
opsForSet
();
// public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
}
// return redisTemplate.opsForZSet();
// }
/**
//
* 对有序集合类型的数据操作
//
*
//}
* @param redisTemplate
\ No newline at end of file
* @return
*/
@Bean
public
ZSetOperations
<
String
,
Object
>
zSetOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForZSet
();
}
}
\ No newline at end of file
src/main/java/com/subsidy/common/constant/Code.java
View file @
b144856
...
@@ -15,7 +15,7 @@ public enum Code {
...
@@ -15,7 +15,7 @@ public enum Code {
NOHANDLERFOUND
(
1008
,
"找不到相应的视图处理器"
),
NOHANDLERFOUND
(
1008
,
"找不到相应的视图处理器"
),
PARAM_INVALID
(
1009
,
"参数不合法"
),
PARAM_INVALID
(
1009
,
"参数不合法"
),
TOKEN_EXCEPTION
(
1010
,
"无效的令牌"
),
TOKEN_EXCEPTION
(
1010
,
"无效的令牌"
),
TOKEN_EXPIRED
(
1011
,
"
令牌已过期
"
),
TOKEN_EXPIRED
(
1011
,
"
当前账户已在其他设备登录
"
),
TOKEN_VERIFICATION_FAILED
(
1013
,
"令牌验证失败"
),
TOKEN_VERIFICATION_FAILED
(
1013
,
"令牌验证失败"
),
OSS_ERROR
(
1012
,
"OSS文件上传异常"
),
OSS_ERROR
(
1012
,
"OSS文件上传异常"
),
Network_ERROR
(
9000
,
"网络请求失败"
),
Network_ERROR
(
9000
,
"网络请求失败"
),
...
...
src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java
View file @
b144856
...
@@ -2,11 +2,16 @@ package com.subsidy.common.interceptor;
...
@@ -2,11 +2,16 @@ package com.subsidy.common.interceptor;
import
com.auth0.jwt.interfaces.Claim
;
import
com.auth0.jwt.interfaces.Claim
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.constant.Code
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.mapper.AdministerMapper
;
import
com.subsidy.mapper.AdministerMapper
;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.JwtUtil
;
import
com.subsidy.util.JwtUtil
;
import
com.subsidy.util.Localstorage
;
import
com.subsidy.util.Localstorage
;
import
com.subsidy.util.RedisUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.method.HandlerMethod
;
...
@@ -14,7 +19,10 @@ import org.springframework.web.servlet.HandlerInterceptor;
...
@@ -14,7 +19,10 @@ import org.springframework.web.servlet.HandlerInterceptor;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -31,6 +39,9 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
...
@@ -31,6 +39,9 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
@Autowired
@Autowired
private
AdministerMapper
administerMapper
;
private
AdministerMapper
administerMapper
;
@Autowired
private
RedisUtil
redisUtil
;
@Override
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
{
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
{
// 不需要进行拦截
// 不需要进行拦截
...
@@ -55,27 +66,31 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
...
@@ -55,27 +66,31 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
Map
<
String
,
Claim
>
claimMap
=
JwtUtil
.
getClaims
(
token
);
Map
<
String
,
Claim
>
claimMap
=
JwtUtil
.
getClaims
(
token
);
if
(
claimMap
!=
null
)
{
if
(
claimMap
!=
null
)
{
String
[]
role
=
methodAnnotation
.
value
();
//
String[] role = methodAnnotation.value();
String
type
=
claimMap
.
get
(
"type"
).
asString
();
String
type
=
claimMap
.
get
(
"type"
).
asString
();
if
(
role
.
length
>
0
)
{
if
(
ConstantUtils
.
ADMINISTER_TERMINATE
.
equals
(
type
))
{
if
(
"administer"
.
equals
(
type
))
{
AdministerDO
administerDO
=
administerMapper
.
selectById
(
claimMap
.
get
(
"id"
).
asLong
());
AdministerDO
administerDO
=
administerMapper
.
selectById
(
claimMap
.
get
(
"id"
).
asLong
());
if
(
administerDO
!=
null
)
{
if
(
administerDO
!=
null
)
{
Localstorage
.
setUser
(
administerDO
);
Localstorage
.
setUser
(
administerDO
);
return
true
;
}
}
else
if
(
ConstantUtils
.
MOBILE_TERMINATE
.
equals
(
type
))
{
/**
* 学生端设置单设备登录
*/
String
tk
=
(
String
)
redisUtil
.
get
(
ConstantUtils
.
MOBILE_TERMINATE
+
"_"
+
claimMap
.
get
(
"id"
).
asLong
());
if
(
StringUtils
.
isNotBlank
(
tk
))
{
if
(
tk
.
equals
(
token
))
{
return
true
;
return
true
;
}
}
throw
new
HttpException
(
1011
);
}
else
{
}
else
{
throw
new
HttpException
(
1010
);
throw
new
HttpException
(
1010
);
}
}
}
else
{
}
else
{
AdministerDO
administerDO
=
administerMapper
.
selectById
(
claimMap
.
get
(
"id"
).
asLong
());
throw
new
HttpException
(
1010
);
if
(
administerDO
!=
null
)
{
Localstorage
.
setUser
(
administerDO
);
return
true
;
}
}
}
}
}
//return true;
}
}
throw
new
HttpException
(
1010
);
throw
new
HttpException
(
1010
);
}
}
...
...
src/main/java/com/subsidy/common/interceptor/LoginRequired.java
View file @
b144856
...
@@ -16,5 +16,5 @@ import java.lang.annotation.*;
...
@@ -16,5 +16,5 @@ import java.lang.annotation.*;
@Inherited
@Inherited
public
@interface
LoginRequired
{
public
@interface
LoginRequired
{
String
[]
value
();
//
String[] value();
}
}
\ No newline at end of file
src/main/java/com/subsidy/controller/AdministerController.java
View file @
b144856
...
@@ -56,53 +56,56 @@ public class AdministerController {
...
@@ -56,53 +56,56 @@ public class AdministerController {
@PostMapping
(
"/getPermissions"
)
@PostMapping
(
"/getPermissions"
)
@ApiOperation
(
"权限查询"
)
@ApiOperation
(
"权限查询"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getPermissions
()
{
public
ResponseVO
getPermissions
()
{
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getPermissions
());
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getPermissions
());
}
}
@PostMapping
(
"/administers"
)
@PostMapping
(
"/administers"
)
@ApiOperation
(
"查询所有运营者 { userName pageNum pageSize }"
)
@ApiOperation
(
"查询所有运营者 { userName pageNum pageSize }"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
operators
(
operatorsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
operators
(
operatorsDTO
));
}
}
@PostMapping
(
"addAdminister"
)
@PostMapping
(
"addAdminister"
)
@ApiOperation
(
"添加运营者 id userName 名称 accountName 账号 "
)
@ApiOperation
(
"添加运营者 id userName 名称 accountName 账号 "
)
@LoginRequired
public
ResponseVO
addAdminister
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
addAdminister
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
addAdminister
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
addAdminister
(
administerDO
));
}
}
@PostMapping
(
"deleteAdminister"
)
@PostMapping
(
"deleteAdminister"
)
@ApiOperation
(
"添加运营者 id "
)
@ApiOperation
(
"添加运营者 id "
)
@LoginRequired
public
ResponseVO
deleteAdminister
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
deleteAdminister
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
deleteAdminister
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
deleteAdminister
(
administerDO
));
}
}
@PostMapping
(
"updateAdminister"
)
@PostMapping
(
"updateAdminister"
)
@ApiOperation
(
"编辑运营者 id userName 名称 accountName 账号 password"
)
@ApiOperation
(
"编辑运营者 id userName 名称 accountName 账号 password"
)
@LoginRequired
public
ResponseVO
updateAdminister
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
updateAdminister
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
updateAdminister
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
updateAdminister
(
administerDO
));
}
}
@PostMapping
(
"classSummary"
)
@PostMapping
(
"classSummary"
)
@ApiOperation
(
"班级详情--数据概览 id 班级id "
)
@ApiOperation
(
"班级详情--数据概览 id 班级id "
)
// @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
}
}
@PostMapping
(
"classDetail"
)
@PostMapping
(
"classDetail"
)
@ApiOperation
(
"班级管理--班级成员 id 班级id userName"
)
@ApiOperation
(
"班级管理--班级成员 id 班级id userName"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
classDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
classDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDetail
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDetail
(
classDetailDTO
));
}
}
@PostMapping
(
"exportClassDetail"
)
@PostMapping
(
"exportClassDetail"
)
@ApiOperation
(
"班级管理--班级成员--导出 id 班级id userName"
)
@ApiOperation
(
"班级管理--班级成员--导出 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
void
exportClassDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportClassDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportClassDetail
(
classDetailDTO
);
administerService
.
exportClassDetail
(
classDetailDTO
);
...
@@ -110,14 +113,14 @@ public class AdministerController {
...
@@ -110,14 +113,14 @@ public class AdministerController {
@PostMapping
(
"signDetail"
)
@PostMapping
(
"signDetail"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
signDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
signDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
signDetail
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
signDetail
(
classDetailDTO
));
}
}
@PostMapping
(
"exportSignDetail"
)
@PostMapping
(
"exportSignDetail"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
void
exportSignDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportSignDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportSignDetail
(
classDetailDTO
);
administerService
.
exportSignDetail
(
classDetailDTO
);
...
@@ -125,14 +128,14 @@ public class AdministerController {
...
@@ -125,14 +128,14 @@ public class AdministerController {
@PostMapping
(
"exerciseTest"
)
@PostMapping
(
"exerciseTest"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName paperId"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName paperId"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
exerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
exerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
exerciseTest
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
exerciseTest
(
classDetailDTO
));
}
}
@PostMapping
(
"exportExerciseTest"
)
@PostMapping
(
"exportExerciseTest"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName paperId"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName paperId"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportExerciseTest
(
classDetailDTO
);
administerService
.
exportExerciseTest
(
classDetailDTO
);
...
@@ -140,26 +143,28 @@ public class AdministerController {
...
@@ -140,26 +143,28 @@ public class AdministerController {
@PostMapping
(
"getMemberPapers"
)
@PostMapping
(
"getMemberPapers"
)
@ApiOperation
(
"获取某个成员某个卷子的做题历史 memberId paperId"
)
@ApiOperation
(
"获取某个成员某个卷子的做题历史 memberId paperId"
)
@LoginRequired
public
ResponseVO
getMemberPapers
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
public
ResponseVO
getMemberPapers
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getMemberPapers
(
exerciseDoneResultDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getMemberPapers
(
exerciseDoneResultDO
));
}
}
@PostMapping
(
"getPaperDetail"
)
@PostMapping
(
"getPaperDetail"
)
@ApiOperation
(
"获取某个卷子做题详情 doneId getMemberPapers接口返回id memberId成员id"
)
@ApiOperation
(
"获取某个卷子做题详情 doneId getMemberPapers接口返回id memberId成员id"
)
@LoginRequired
public
ResponseVO
getPaperDetail
(
@RequestBody
ExerciseDoneHistoryDO
exerciseDoneHistoryDO
){
public
ResponseVO
getPaperDetail
(
@RequestBody
ExerciseDoneHistoryDO
exerciseDoneHistoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getPaperDetail
(
exerciseDoneHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getPaperDetail
(
exerciseDoneHistoryDO
));
}
}
@PostMapping
(
"answerRecord"
)
@PostMapping
(
"answerRecord"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
answerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
answerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
answerRecord
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
answerRecord
(
classDetailDTO
));
}
}
@PostMapping
(
"exportAnswerRecord"
)
@PostMapping
(
"exportAnswerRecord"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
void
exportAnswerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportAnswerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportAnswerRecord
(
classDetailDTO
);
administerService
.
exportAnswerRecord
(
classDetailDTO
);
...
@@ -167,62 +172,71 @@ public class AdministerController {
...
@@ -167,62 +172,71 @@ public class AdministerController {
@PostMapping
(
"classVodInfo"
)
@PostMapping
(
"classVodInfo"
)
@ApiOperation
(
"学习记录---课件进度提醒 {courseId 课程id classId 班级id vodName视频名称}"
)
@ApiOperation
(
"学习记录---课件进度提醒 {courseId 课程id classId 班级id vodName视频名称}"
)
@LoginRequired
public
ResponseVO
classVodInfo
(
@RequestBody
ClassVodInfoDTO
classVodInfoDTO
){
public
ResponseVO
classVodInfo
(
@RequestBody
ClassVodInfoDTO
classVodInfoDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classVodInfo
(
classVodInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classVodInfo
(
classVodInfoDTO
));
}
}
@PostMapping
(
"classDailyInfo"
)
@PostMapping
(
"classDailyInfo"
)
@ApiOperation
(
"学习记录---每日学习时长 {courseId 课程id classId 班级id userName startDate endDate}"
)
@ApiOperation
(
"学习记录---每日学习时长 {courseId 课程id classId 班级id userName startDate endDate}"
)
@LoginRequired
public
ResponseVO
classDailyInfo
(
@RequestBody
ClassDailyInfoDTO
classDailyInfoDTO
){
public
ResponseVO
classDailyInfo
(
@RequestBody
ClassDailyInfoDTO
classDailyInfoDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDailyInfo
(
classDailyInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDailyInfo
(
classDailyInfoDTO
));
}
}
@PostMapping
(
"exportClassDailyInfo"
)
@PostMapping
(
"exportClassDailyInfo"
)
@ApiParam
(
"每日学习日志"
)
@ApiParam
(
"每日学习日志"
)
@LoginRequired
public
void
exportVodInfo
(
@RequestBody
ClassDailyInfoDTO
classDailyInfoDTO
){
public
void
exportVodInfo
(
@RequestBody
ClassDailyInfoDTO
classDailyInfoDTO
){
administerService
.
exportClassDailyInfo
(
classDailyInfoDTO
);
administerService
.
exportClassDailyInfo
(
classDailyInfoDTO
);
}
}
@PostMapping
(
"classVodDailyInfo"
)
@PostMapping
(
"classVodDailyInfo"
)
@ApiOperation
(
"学习记录---每日学习时长(视频维度)"
)
@ApiOperation
(
"学习记录---每日学习时长(视频维度)"
)
@LoginRequired
public
ResponseVO
classVodDailyInfo
(
@RequestBody
ClassVodDailyInfoDTO
classVodDailyInfoDTO
){
public
ResponseVO
classVodDailyInfo
(
@RequestBody
ClassVodDailyInfoDTO
classVodDailyInfoDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classVodDailyInfo
(
classVodDailyInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classVodDailyInfo
(
classVodDailyInfoDTO
));
}
}
@PostMapping
(
"exportClassVodDailyInfo"
)
@PostMapping
(
"exportClassVodDailyInfo"
)
@ApiOperation
(
"学习记录---每日学习时长(视频维度) pageSize pageNum userName classId"
)
@ApiOperation
(
"学习记录---每日学习时长(视频维度) pageSize pageNum userName classId"
)
@LoginRequired
public
void
exportClassVodDailyInfo
(
@RequestBody
ClassVodDailyInfoDTO
classVodDailyInfoDTO
){
public
void
exportClassVodDailyInfo
(
@RequestBody
ClassVodDailyInfoDTO
classVodDailyInfoDTO
){
administerService
.
exportClassVodDailyInfo
(
classVodDailyInfoDTO
);
administerService
.
exportClassVodDailyInfo
(
classVodDailyInfoDTO
);
}
}
@PostMapping
(
"memberStudy"
)
@ApiOperation
(
"学员学习日志 pageSize pageNum classId memberId"
)
@LoginRequired
public
ResponseVO
memberStudy
(
@RequestBody
MemberStudyLogDTO
memberStudyLogDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
memberStudy
(
memberStudyLogDTO
));
}
@PostMapping
(
"exportZip"
)
@PostMapping
(
"exportZip"
)
@ApiOperation
(
"下载压缩包 id 班级id"
)
@ApiOperation
(
"下载压缩包 id 班级id"
)
@CrossOrigin
@CrossOrigin
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
void
exportZip
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportZip
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
administerService
.
export
(
classDetailDTO
);
administerService
.
export
(
classDetailDTO
);
}
}
@PostMapping
(
"memberStudy"
)
@ApiOperation
(
"学员学习日志 pageSize pageNum classId memberId"
)
public
ResponseVO
memberStudy
(
@RequestBody
MemberStudyLogDTO
memberStudyLogDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
memberStudy
(
memberStudyLogDTO
));
}
@PostMapping
(
"memberStudyLog"
)
@PostMapping
(
"memberStudyLog"
)
@ApiOperation
(
"学员学习日志 classId memberId"
)
@ApiOperation
(
"学员学习日志 classId memberId"
)
@LoginRequired
public
void
memberStudyLog
(
@RequestBody
MemberStudyLogDTO
memberStudyLogDTO
)
throws
Exception
{
public
void
memberStudyLog
(
@RequestBody
MemberStudyLogDTO
memberStudyLogDTO
)
throws
Exception
{
administerService
.
memberStudyLog
(
memberStudyLogDTO
);
administerService
.
memberStudyLog
(
memberStudyLogDTO
);
}
}
@PostMapping
(
"importMember"
)
@PostMapping
(
"importMember"
)
@ApiOperation
(
"导入学生 {companyId 公司id file}"
)
@ApiOperation
(
"导入学生 {companyId 公司id file}"
)
@LoginRequired
public
ResponseVO
importMember
(
Long
companyId
,
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
public
ResponseVO
importMember
(
Long
companyId
,
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
importMember
(
companyId
,
file
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
importMember
(
companyId
,
file
));
}
}
@PostMapping
(
"manageMember"
)
@PostMapping
(
"manageMember"
)
@ApiOperation
(
"用户管理 {pageSize pageNum userName:名字}"
)
@ApiOperation
(
"用户管理 {pageSize pageNum userName:名字}"
)
@LoginRequired
public
ResponseVO
manageMember
(
@RequestBody
ManageMemberDTO
manageMemberDTO
){
public
ResponseVO
manageMember
(
@RequestBody
ManageMemberDTO
manageMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
manageMember
(
manageMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
manageMember
(
manageMemberDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/AnsweringQuestionController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.course.GetCourseQuestionDTO
;
import
com.subsidy.dto.course.GetCourseQuestionDTO
;
import
com.subsidy.model.AnsweringQuestionDO
;
import
com.subsidy.model.AnsweringQuestionDO
;
import
com.subsidy.service.AnsweringQuestionService
;
import
com.subsidy.service.AnsweringQuestionService
;
...
@@ -32,30 +33,35 @@ public class AnsweringQuestionController {
...
@@ -32,30 +33,35 @@ public class AnsweringQuestionController {
@PostMapping
(
"getCourseQuestion"
)
@PostMapping
(
"getCourseQuestion"
)
@ApiOperation
(
" 获取某个课程的答疑 {classId pageSize pageNum memberId}"
)
@ApiOperation
(
" 获取某个课程的答疑 {classId pageSize pageNum memberId}"
)
@LoginRequired
public
ResponseVO
getCourseQuestion
(
@RequestBody
GetCourseQuestionDTO
getCourseQuestionDTO
){
public
ResponseVO
getCourseQuestion
(
@RequestBody
GetCourseQuestionDTO
getCourseQuestionDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
getCourseQuestion
(
getCourseQuestionDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
getCourseQuestion
(
getCourseQuestionDTO
));
}
}
@PostMapping
(
"addQuestion"
)
@PostMapping
(
"addQuestion"
)
@ApiOperation
(
"新增答疑 {classId askId title}"
)
@ApiOperation
(
"新增答疑 {classId askId title}"
)
@LoginRequired
public
ResponseVO
addQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
addQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
addQuestion
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
addQuestion
(
answeringQuestionDO
));
}
}
@PostMapping
(
"deleteQuestion"
)
@PostMapping
(
"deleteQuestion"
)
@ApiOperation
(
" 删除答疑 {id}"
)
@ApiOperation
(
" 删除答疑 {id}"
)
@LoginRequired
public
ResponseVO
deleteQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
deleteQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
deleteQuestion
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
deleteQuestion
(
answeringQuestionDO
));
}
}
@PostMapping
(
"updateQuestion"
)
@PostMapping
(
"updateQuestion"
)
@ApiOperation
(
"编辑答疑 {id answerId answer}"
)
@ApiOperation
(
"编辑答疑 {id answerId answer}"
)
@LoginRequired
public
ResponseVO
updateQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
updateQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
updateQuestion
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
updateQuestion
(
answeringQuestionDO
));
}
}
@PostMapping
(
"getNoAnswers"
)
@PostMapping
(
"getNoAnswers"
)
@ApiOperation
(
"获取某个课程没有回答的答疑个数 classId 课程id"
)
@ApiOperation
(
"获取某个课程没有回答的答疑个数 classId 课程id"
)
@LoginRequired
public
ResponseVO
getNoAnswers
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
getNoAnswers
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
getNoAnswers
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
getNoAnswers
(
answeringQuestionDO
));
}
}
...
...
src/main/java/com/subsidy/controller/CategoryController.java
View file @
b144856
...
@@ -34,7 +34,7 @@ public class CategoryController {
...
@@ -34,7 +34,7 @@ public class CategoryController {
@PostMapping
(
"getCategories"
)
@PostMapping
(
"getCategories"
)
@ApiOperation
(
"查询类目 name 类目名称 companyId pageSize pageNum"
)
@ApiOperation
(
"查询类目 name 类目名称 companyId pageSize pageNum"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getCategories
(
@RequestBody
GetCategoriesDTO
getCategoriesDTO
){
public
ResponseVO
getCategories
(
@RequestBody
GetCategoriesDTO
getCategoriesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
getCategories
(
getCategoriesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
getCategories
(
getCategoriesDTO
));
}
}
...
@@ -47,21 +47,21 @@ public class CategoryController {
...
@@ -47,21 +47,21 @@ public class CategoryController {
@PostMapping
(
"addCategory"
)
@PostMapping
(
"addCategory"
)
@ApiOperation
(
"新增类目 name companyId"
)
@ApiOperation
(
"新增类目 name companyId"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addCategory
(
@RequestBody
CategoryDO
categoryDO
){
public
ResponseVO
addCategory
(
@RequestBody
CategoryDO
categoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
addCategory
(
categoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
addCategory
(
categoryDO
));
}
}
@PostMapping
(
"deleteCategory"
)
@PostMapping
(
"deleteCategory"
)
@ApiOperation
(
"删除类目 id"
)
@ApiOperation
(
"删除类目 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteCategory
(
@RequestBody
CategoryDO
categoryDO
){
public
ResponseVO
deleteCategory
(
@RequestBody
CategoryDO
categoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
deleteCategory
(
categoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
deleteCategory
(
categoryDO
));
}
}
@PostMapping
(
"updateCategory"
)
@PostMapping
(
"updateCategory"
)
@ApiOperation
(
"修改类目 id name companyId"
)
@ApiOperation
(
"修改类目 id name companyId"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateCategory
(
@RequestBody
CategoryDO
categoryDO
){
public
ResponseVO
updateCategory
(
@RequestBody
CategoryDO
categoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
updateCategory
(
categoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
updateCategory
(
categoryDO
));
}
}
...
...
src/main/java/com/subsidy/controller/ClassDictController.java
View file @
b144856
...
@@ -38,71 +38,71 @@ public class ClassDictController {
...
@@ -38,71 +38,71 @@ public class ClassDictController {
@PostMapping
(
"getAllClasses"
)
@PostMapping
(
"getAllClasses"
)
@ApiOperation
(
"获取某公司下的所有班级 companyId 所选企业id className 班级名称 openStatus 开放状态 startDate 开始时间 endDate 结束时间"
)
@ApiOperation
(
"获取某公司下的所有班级 companyId 所选企业id className 班级名称 openStatus 开放状态 startDate 开始时间 endDate 结束时间"
)
// @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
getAllClasses
(
@RequestBody
ClassDictDO
classDictDO
)
throws
Exception
{
public
ResponseVO
getAllClasses
(
@RequestBody
ClassDictDO
classDictDO
)
throws
Exception
{
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getAllClasses
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getAllClasses
(
classDictDO
));
}
}
@PostMapping
(
"deleteClasses"
)
@PostMapping
(
"deleteClasses"
)
@ApiOperation
(
" 删除班级 id"
)
@ApiOperation
(
" 删除班级 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteClasses
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
deleteClasses
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
deleteClasses
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
deleteClasses
(
classDictDO
));
}
}
@PostMapping
(
"addClass"
)
@PostMapping
(
"addClass"
)
@ApiOperation
(
"添加班级 userId:登录人id companyId courseId classTypeId className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]"
)
@ApiOperation
(
"添加班级 userId:登录人id companyId courseId classTypeId className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addClass
(
@RequestBody
AddClassDTO
addClassDTO
){
public
ResponseVO
addClass
(
@RequestBody
AddClassDTO
addClassDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addClass
(
addClassDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addClass
(
addClassDTO
));
}
}
@PostMapping
(
"updateClass"
)
@PostMapping
(
"updateClass"
)
@ApiOperation
(
"修改班级 id companyId className classTypeId startDate endDate"
)
@ApiOperation
(
"修改班级 id companyId className classTypeId startDate endDate"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateClass
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
updateClass
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
updateClass
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
updateClass
(
classDictDO
));
}
}
@PostMapping
(
"classDetail"
)
@PostMapping
(
"classDetail"
)
@ApiOperation
(
"获取一个班级详情 id"
)
@ApiOperation
(
"获取一个班级详情 id"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
classDetail
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
classDetail
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
classDetail
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
classDetail
(
classDictDO
));
}
}
@PostMapping
(
"removeMember"
)
@PostMapping
(
"removeMember"
)
@ApiOperation
(
"移除班级 classId 班级id memberId人员id"
)
@ApiOperation
(
"移除班级 classId 班级id memberId人员id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
removeMember
(
@RequestBody
ClassMemberMappingDO
classMemberMappingDO
){
public
ResponseVO
removeMember
(
@RequestBody
ClassMemberMappingDO
classMemberMappingDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
removeMember
(
classMemberMappingDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
removeMember
(
classMemberMappingDO
));
}
}
@PostMapping
(
"getSpareMembers"
)
@PostMapping
(
"getSpareMembers"
)
@ApiOperation
(
"获取不在某班级的某企业里所有成员 companyId 企业id classId 班级id"
)
@ApiOperation
(
"获取不在某班级的某企业里所有成员 companyId 企业id classId 班级id"
)
@LoginRequired
public
ResponseVO
getSpareMembers
(
@RequestBody
GetSpareMembersDTO
getSpareMembersDTO
){
public
ResponseVO
getSpareMembers
(
@RequestBody
GetSpareMembersDTO
getSpareMembersDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getSpareMembers
(
getSpareMembersDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getSpareMembers
(
getSpareMembersDTO
));
}
}
@PostMapping
(
"addMemberToClass"
)
@PostMapping
(
"addMemberToClass"
)
@ApiOperation
(
"将多个成员加入到某个班级里 classId memberIds []"
)
@ApiOperation
(
"将多个成员加入到某个班级里 classId memberIds []"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addMemberToClass
(
@RequestBody
AddMemberToClassDTO
addMemberToClassDTO
){
public
ResponseVO
addMemberToClass
(
@RequestBody
AddMemberToClassDTO
addMemberToClassDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addMemberToClass
(
addMemberToClassDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addMemberToClass
(
addMemberToClassDTO
));
}
}
@PostMapping
(
"batchSms"
)
@PostMapping
(
"batchSms"
)
@ApiOperation
(
" 批量发送班级短信通知 {id 班级id }"
)
@ApiOperation
(
" 批量发送班级短信通知 {id 班级id }"
)
@LoginRequired
public
ResponseVO
batchSms
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
batchSms
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
batchSms
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
batchSms
(
classDictDO
));
}
}
@PostMapping
(
"getClassBaseInfo"
)
@PostMapping
(
"getClassBaseInfo"
)
@ApiOperation
(
"班级详情--获取课程基本信息 id"
)
@ApiOperation
(
"班级详情--获取课程基本信息 id"
)
@LoginRequired
public
ResponseVO
getClassBaseInfo
(
@RequestBody
GetClassBaseInfoDTO
getClassBaseInfoDTO
){
public
ResponseVO
getClassBaseInfo
(
@RequestBody
GetClassBaseInfoDTO
getClassBaseInfoDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getClassBaseInfo
(
getClassBaseInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getClassBaseInfo
(
getClassBaseInfoDTO
));
}
}
}
}
src/main/java/com/subsidy/controller/ClassHourDictController.java
View file @
b144856
...
@@ -35,20 +35,21 @@ public class ClassHourDictController {
...
@@ -35,20 +35,21 @@ public class ClassHourDictController {
@PostMapping
(
"getSetting"
)
@PostMapping
(
"getSetting"
)
@ApiOperation
(
"查看当天设置的最大学习时长 companyId"
)
@ApiOperation
(
"查看当天设置的最大学习时长 companyId"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getSetting
(
@RequestBody
ClassHourDictDO
classHourDictDO
){
public
ResponseVO
getSetting
(
@RequestBody
ClassHourDictDO
classHourDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
getSetting
(
classHourDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
getSetting
(
classHourDictDO
));
}
}
@PostMapping
(
"updateSetting"
)
@PostMapping
(
"updateSetting"
)
@ApiOperation
(
"修改当天设置时长 companyId 主键 logo classHour status interrupt interruptStatus repeatTime repeatStatus rotationImgDictDOS[companyId rotationImg]"
)
@ApiOperation
(
"修改当天设置时长 companyId 主键 logo classHour status interrupt interruptStatus repeatTime repeatStatus rotationImgDictDOS[companyId rotationImg]"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateSetting
(
@RequestBody
GetSettingVO
getSettingVO
){
public
ResponseVO
updateSetting
(
@RequestBody
GetSettingVO
getSettingVO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
updateSetting
(
getSettingVO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
updateSetting
(
getSettingVO
));
}
}
@PostMapping
(
"pollingGet"
)
@PostMapping
(
"pollingGet"
)
@ApiOperation
(
"轮询查询当前这个人当天有没有超过最长时长 memberId playLength"
)
@ApiOperation
(
"轮询查询当前这个人当天有没有超过最长时长 memberId playLength"
)
@LoginRequired
public
ResponseVO
pollingGet
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
public
ResponseVO
pollingGet
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
pollingGet
(
vodPlayHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
pollingGet
(
vodPlayHistoryDO
));
}
}
...
...
src/main/java/com/subsidy/controller/ClassNoticeController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.classNotice.SendNotificationDTO
;
import
com.subsidy.dto.classNotice.SendNotificationDTO
;
import
com.subsidy.model.ClassNoticeDO
;
import
com.subsidy.model.ClassNoticeDO
;
import
com.subsidy.service.ClassNoticeService
;
import
com.subsidy.service.ClassNoticeService
;
...
@@ -32,31 +33,36 @@ public class ClassNoticeController {
...
@@ -32,31 +33,36 @@ public class ClassNoticeController {
private
ClassNoticeService
classNoticeService
;
private
ClassNoticeService
classNoticeService
;
@PostMapping
(
"addNotice"
)
@PostMapping
(
"addNotice"
)
@ApiOperation
(
"新增一个通知 classId noticeType isAuto noticeTime"
)
@ApiOperation
(
"新增一个通知 classId noticeType isAuto noticeTime"
)
@LoginRequired
public
ResponseVO
addNotice
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
public
ResponseVO
addNotice
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
addNotice
(
classNoticeDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
addNotice
(
classNoticeDO
));
}
}
@PostMapping
(
"updateNotice"
)
@PostMapping
(
"updateNotice"
)
@ApiOperation
(
"修改一个通知 id noticeType isAuto noticeTime"
)
@ApiOperation
(
"修改一个通知 id noticeType isAuto noticeTime"
)
@LoginRequired
public
ResponseVO
updateNotice
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
public
ResponseVO
updateNotice
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
updateNotice
(
classNoticeDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
updateNotice
(
classNoticeDO
));
}
}
@PostMapping
(
"deleteNotice"
)
@PostMapping
(
"deleteNotice"
)
@ApiOperation
(
"删除一个通知 id"
)
@ApiOperation
(
"删除一个通知 id"
)
@LoginRequired
public
ResponseVO
deleteNotice
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
public
ResponseVO
deleteNotice
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
deleteNotice
(
classNoticeDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
deleteNotice
(
classNoticeDO
));
}
}
@PostMapping
(
"queryClassNotices"
)
@PostMapping
(
"queryClassNotices"
)
@ApiOperation
(
"查看某个课程的通知提醒 classId 课程id status 状态(待发送/已发送)"
)
@ApiOperation
(
"查看某个课程的通知提醒 classId 课程id status 状态(待发送/已发送)"
)
@LoginRequired
public
ResponseVO
queryClassNotices
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
public
ResponseVO
queryClassNotices
(
@RequestBody
ClassNoticeDO
classNoticeDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
queryClassNotices
(
classNoticeDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classNoticeService
.
queryClassNotices
(
classNoticeDO
));
}
}
@PostMapping
(
"sendClassNotices"
)
@PostMapping
(
"sendClassNotices"
)
@ApiOperation
(
"发送通知:classId/课程Id sendType/发送类型(全部成员/未签到成员/未完课成员)"
)
@ApiOperation
(
"发送通知:classId/课程Id sendType/发送类型(全部成员/未签到成员/未完课成员)"
)
@LoginRequired
public
ResponseVO
sendClassNotices
(
@RequestBody
SendNotificationDTO
sendNotificationDTO
)
{
public
ResponseVO
sendClassNotices
(
@RequestBody
SendNotificationDTO
sendNotificationDTO
)
{
classNoticeService
.
sendNotification
(
sendNotificationDTO
);
classNoticeService
.
sendNotification
(
sendNotificationDTO
);
return
ResponseData
.
generateCreatedResponse
(
0
);
return
ResponseData
.
generateCreatedResponse
(
0
);
...
...
src/main/java/com/subsidy/controller/ClassTypeDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.classDict.ClassTypeDTO
;
import
com.subsidy.dto.classDict.ClassTypeDTO
;
import
com.subsidy.model.ClassTypeDictDO
;
import
com.subsidy.model.ClassTypeDictDO
;
import
com.subsidy.service.ClassTypeDictService
;
import
com.subsidy.service.ClassTypeDictService
;
...
@@ -33,24 +34,28 @@ public class ClassTypeDictController {
...
@@ -33,24 +34,28 @@ public class ClassTypeDictController {
@PostMapping
(
"addClassType"
)
@PostMapping
(
"addClassType"
)
@ApiOperation
(
"添加课程类型 companyId 运营者公司id不传 classType"
)
@ApiOperation
(
"添加课程类型 companyId 运营者公司id不传 classType"
)
@LoginRequired
public
ResponseVO
addClassType
(
@RequestBody
ClassTypeDictDO
classTypeDictDO
){
public
ResponseVO
addClassType
(
@RequestBody
ClassTypeDictDO
classTypeDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
addClassType
(
classTypeDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
addClassType
(
classTypeDictDO
));
}
}
@PostMapping
(
"updateClassType"
)
@PostMapping
(
"updateClassType"
)
@ApiOperation
(
"修改课程类型 id companyId classType"
)
@ApiOperation
(
"修改课程类型 id companyId classType"
)
@LoginRequired
public
ResponseVO
updateClassType
(
@RequestBody
ClassTypeDictDO
classTypeDictDO
){
public
ResponseVO
updateClassType
(
@RequestBody
ClassTypeDictDO
classTypeDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
updateClassType
(
classTypeDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
updateClassType
(
classTypeDictDO
));
}
}
@PostMapping
(
"deleteClassType"
)
@PostMapping
(
"deleteClassType"
)
@ApiOperation
(
"删除课程类型 id"
)
@ApiOperation
(
"删除课程类型 id"
)
@LoginRequired
public
ResponseVO
deleteClassType
(
@RequestBody
ClassTypeDictDO
classTypeDictDO
){
public
ResponseVO
deleteClassType
(
@RequestBody
ClassTypeDictDO
classTypeDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
deleteClassType
(
classTypeDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
deleteClassType
(
classTypeDictDO
));
}
}
@PostMapping
(
"queryClassTypes"
)
@PostMapping
(
"queryClassTypes"
)
@ApiOperation
(
"查询某个公司的班级类型 userId 登录人id companyId"
)
@ApiOperation
(
"查询某个公司的班级类型 userId 登录人id companyId"
)
@LoginRequired
public
ResponseVO
queryClassTypes
(
@RequestBody
ClassTypeDTO
classTypeDTO
){
public
ResponseVO
queryClassTypes
(
@RequestBody
ClassTypeDTO
classTypeDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
queryClassTypes
(
classTypeDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classTypeDictService
.
queryClassTypes
(
classTypeDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/CompanyDictController.java
View file @
b144856
...
@@ -35,28 +35,28 @@ public class CompanyDictController {
...
@@ -35,28 +35,28 @@ public class CompanyDictController {
@PostMapping
(
"/administers"
)
@PostMapping
(
"/administers"
)
@ApiOperation
(
"查询所有企业 {id companyName fieldId 行业id pageNum pageSize }"
)
@ApiOperation
(
"查询所有企业 {id companyName fieldId 行业id pageNum pageSize }"
)
// @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
operators
(
operatorsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
operators
(
operatorsDTO
));
}
}
@PostMapping
(
"addCompany"
)
@PostMapping
(
"addCompany"
)
@ApiOperation
(
"添加企业 {accountName:账号 companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员}"
)
@ApiOperation
(
"添加企业 {accountName:账号 companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addOperator
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
public
ResponseVO
addOperator
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
addOperator
(
addCompanyDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
addOperator
(
addCompanyDTO
));
}
}
@PostMapping
(
"deleteCompany"
)
@PostMapping
(
"deleteCompany"
)
@ApiOperation
(
"删除企业 id"
)
@ApiOperation
(
"删除企业 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteAdminister
(
@RequestBody
CompanyDictDO
companyDictDO
){
public
ResponseVO
deleteAdminister
(
@RequestBody
CompanyDictDO
companyDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
deleteAdminister
(
companyDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
deleteAdminister
(
companyDictDO
));
}
}
@PostMapping
(
"updateCompany"
)
@PostMapping
(
"updateCompany"
)
@ApiOperation
(
"修改企业 id accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员"
)
@ApiOperation
(
"修改企业 id accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateAdminister
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
public
ResponseVO
updateAdminister
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
updateAdminister
(
addCompanyDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
updateAdminister
(
addCompanyDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/CourseContentController.java
View file @
b144856
...
@@ -33,28 +33,28 @@ public class CourseContentController {
...
@@ -33,28 +33,28 @@ public class CourseContentController {
@PostMapping
(
"getContents"
)
@PostMapping
(
"getContents"
)
@ApiOperation
(
"获取课程目录 {courseId}"
)
@ApiOperation
(
"获取课程目录 {courseId}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getContents
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
getContents
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
getContents
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
getContents
(
courseContentDO
));
}
}
@PostMapping
(
"deleteContent"
)
@PostMapping
(
"deleteContent"
)
@ApiOperation
(
"删除一个目录 {id} "
)
@ApiOperation
(
"删除一个目录 {id} "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteContent
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
deleteContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
deleteContent
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
deleteContent
(
courseContentDO
));
}
}
@PostMapping
(
"addContent"
)
@PostMapping
(
"addContent"
)
@ApiOperation
(
"添加一个目录 {courseId content}"
)
@ApiOperation
(
"添加一个目录 {courseId content}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addContent
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
addContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
addContent
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
addContent
(
courseContentDO
));
}
}
@PostMapping
(
"updateContent"
)
@PostMapping
(
"updateContent"
)
@ApiOperation
(
"更新一个目录 {id courseId content}"
)
@ApiOperation
(
"更新一个目录 {id courseId content}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateContent
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
updateContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
updateContent
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
updateContent
(
courseContentDO
));
}
}
...
...
src/main/java/com/subsidy/controller/CourseDictController.java
View file @
b144856
...
@@ -36,40 +36,42 @@ public class CourseDictController {
...
@@ -36,40 +36,42 @@ public class CourseDictController {
@PostMapping
(
"addCourse"
)
@PostMapping
(
"addCourse"
)
@ApiOperation
(
"添加课程 companyId courseName courseType coverPage openStatus remark fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[]"
)
@ApiOperation
(
"添加课程 companyId courseName courseType coverPage openStatus remark fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[]"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addCourse
(
@RequestBody
AddCourseDTO
addCourseDTO
){
public
ResponseVO
addCourse
(
@RequestBody
AddCourseDTO
addCourseDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
addCourse
(
addCourseDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
addCourse
(
addCourseDTO
));
}
}
@PostMapping
(
"deleteCourse"
)
@PostMapping
(
"deleteCourse"
)
@ApiOperation
(
"删除课程 id"
)
@ApiOperation
(
"删除课程 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteCourse
(
@RequestBody
CourseDictDO
courseDictDO
){
public
ResponseVO
deleteCourse
(
@RequestBody
CourseDictDO
courseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
deleteCourse
(
courseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
deleteCourse
(
courseDictDO
));
}
}
@PostMapping
(
"queryCourses"
)
@PostMapping
(
"queryCourses"
)
@ApiOperation
(
"平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId rankId courseType openStatus"
)
@ApiOperation
(
"平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId rankId courseType openStatus"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
queryCourses
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
public
ResponseVO
queryCourses
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCourses
(
queryCoursesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCourses
(
queryCoursesDTO
));
}
}
@PostMapping
(
"updateCourses"
)
@PostMapping
(
"updateCourses"
)
@ApiOperation
(
"编辑课程 id courseName courseType coverPage openStatus fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[]"
)
@ApiOperation
(
"编辑课程 id courseName courseType coverPage openStatus fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[]"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateCourses
(
@RequestBody
UpdateCoursesDTO
updateCoursesDTO
){
public
ResponseVO
updateCourses
(
@RequestBody
UpdateCoursesDTO
updateCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateCourses
(
updateCoursesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateCourses
(
updateCoursesDTO
));
}
}
@PostMapping
(
"queryCompanyCourse"
)
@PostMapping
(
"queryCompanyCourse"
)
@ApiOperation
(
"企业内容管理-- { companyId 所选企业id pageSize pageNum courseName categoryId jobId rankId openStatus}"
)
@ApiOperation
(
"企业内容管理-- { companyId 所选企业id pageSize pageNum courseName categoryId jobId rankId openStatus}"
)
@LoginRequired
public
ResponseVO
queryCompanyCourse
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
public
ResponseVO
queryCompanyCourse
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCompanyCourse
(
queryCoursesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCompanyCourse
(
queryCoursesDTO
));
}
}
@PostMapping
(
"updateOpenStatus"
)
@PostMapping
(
"updateOpenStatus"
)
@ApiOperation
(
"修改课程开放状态 id openStatus"
)
@ApiOperation
(
"修改课程开放状态 id openStatus"
)
@LoginRequired
public
ResponseVO
updateOpenStatus
(
@RequestBody
CourseDictDO
courseDictDO
){
public
ResponseVO
updateOpenStatus
(
@RequestBody
CourseDictDO
courseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateOpenStatus
(
courseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateOpenStatus
(
courseDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/DepartmentDictController.java
View file @
b144856
...
@@ -35,40 +35,42 @@ public class DepartmentDictController {
...
@@ -35,40 +35,42 @@ public class DepartmentDictController {
@PostMapping
(
"getDepartments"
)
@PostMapping
(
"getDepartments"
)
@ApiOperation
(
"获取所有部门 companyId 企业id"
)
@ApiOperation
(
"获取所有部门 companyId 企业id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getDepartments
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
public
ResponseVO
getDepartments
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartments
(
departmentDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartments
(
departmentDictDO
));
}
}
@PostMapping
(
"addDepartment"
)
@PostMapping
(
"addDepartment"
)
@ApiOperation
(
"添加部门 companyId departmentName leaderName parentId 父节点"
)
@ApiOperation
(
"添加部门 companyId departmentName leaderName parentId 父节点"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
addDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
public
ResponseVO
addDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
addDepartment
(
departmentDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
addDepartment
(
departmentDictDO
));
}
}
@PostMapping
(
"deleteDepartment"
)
@PostMapping
(
"deleteDepartment"
)
@ApiOperation
(
"删除部门 id"
)
@ApiOperation
(
"删除部门 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
public
ResponseVO
deleteDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
deleteDepartment
(
departmentDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
deleteDepartment
(
departmentDictDO
));
}
}
@PostMapping
(
"updateDepartment"
)
@PostMapping
(
"updateDepartment"
)
@ApiOperation
(
"编辑部门 id companyId departmentName leaderName parentId"
)
@ApiOperation
(
"编辑部门 id companyId departmentName leaderName parentId"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
public
ResponseVO
updateDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
updateDepartment
(
departmentDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
updateDepartment
(
departmentDictDO
));
}
}
@PostMapping
(
"getDepartmentMembers"
)
@PostMapping
(
"getDepartmentMembers"
)
@ApiOperation
(
"获取部门成员 companyId 公司id departmentId 部门id userName startDate endDate"
)
@ApiOperation
(
"获取部门成员 companyId 公司id departmentId 部门id userName startDate endDate"
)
@LoginRequired
public
ResponseVO
getDepartmentMembers
(
@RequestBody
GetDepartmentMembersDTO
getDepartmentMembersDTO
){
public
ResponseVO
getDepartmentMembers
(
@RequestBody
GetDepartmentMembersDTO
getDepartmentMembersDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartmentMembers
(
getDepartmentMembersDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartmentMembers
(
getDepartmentMembersDTO
));
}
}
@PostMapping
(
"getMembers"
)
@PostMapping
(
"getMembers"
)
@ApiOperation
(
"获取成员(树) companyId 公司id startDate endDate "
)
@ApiOperation
(
"获取成员(树) companyId 公司id startDate endDate "
)
@LoginRequired
public
ResponseVO
getMembers
(
@RequestBody
GetDepartmentMembersDTO
getDepartmentMembersDTO
){
public
ResponseVO
getMembers
(
@RequestBody
GetDepartmentMembersDTO
getDepartmentMembersDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getMembers
(
getDepartmentMembersDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getMembers
(
getDepartmentMembersDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/ExerciseDictController.java
View file @
b144856
...
@@ -37,33 +37,35 @@ public class ExerciseDictController {
...
@@ -37,33 +37,35 @@ public class ExerciseDictController {
@PostMapping
(
"addExercise"
)
@PostMapping
(
"addExercise"
)
@ApiOperation
(
"添加题目 {paperId 试卷id courseId 课程id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案 }"
)
@ApiOperation
(
"添加题目 {paperId 试卷id courseId 课程id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案 }"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
public
ResponseVO
addExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
addExercise
(
exerciseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
addExercise
(
exerciseDictDO
));
}
}
@PostMapping
(
"deleteExercise"
)
@PostMapping
(
"deleteExercise"
)
@ApiOperation
(
"删除题目 id"
)
@ApiOperation
(
"删除题目 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
public
ResponseVO
deleteExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
deleteExercise
(
exerciseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
deleteExercise
(
exerciseDictDO
));
}
}
@PostMapping
(
"updateExercise"
)
@PostMapping
(
"updateExercise"
)
@ApiOperation
(
"修改题目 id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案"
)
@ApiOperation
(
"修改题目 id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
public
ResponseVO
updateExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
updateExercise
(
exerciseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
updateExercise
(
exerciseDictDO
));
}
}
@PostMapping
(
"submit"
)
@PostMapping
(
"submit"
)
@ApiOperation
(
"提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] length:做题时长} "
)
@ApiOperation
(
"提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] length:做题时长} "
)
@LoginRequired
public
ResponseVO
submit
(
@RequestBody
SubmitDTO
submitDTO
){
public
ResponseVO
submit
(
@RequestBody
SubmitDTO
submitDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
submit
(
submitDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
submit
(
submitDTO
));
}
}
@PostMapping
(
"getPaperExercise"
)
@PostMapping
(
"getPaperExercise"
)
@ApiOperation
(
"获取某个卷子的所有题目 pageSize pageNum paperId 卷子id exerciseType 类型 difficulty难度 title题目名称"
)
@ApiOperation
(
"获取某个卷子的所有题目 pageSize pageNum paperId 卷子id exerciseType 类型 difficulty难度 title题目名称"
)
@LoginRequired
public
ResponseVO
getPaperExercise
(
@RequestBody
GetPaperExerciseDTO
getPaperExerciseDTO
){
public
ResponseVO
getPaperExercise
(
@RequestBody
GetPaperExerciseDTO
getPaperExerciseDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getPaperExercise
(
getPaperExerciseDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getPaperExercise
(
getPaperExerciseDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.service.ExerciseDoneHistoryService
;
import
com.subsidy.service.ExerciseDoneHistoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -31,6 +32,7 @@ public class ExerciseDoneHistoryController {
...
@@ -31,6 +32,7 @@ public class ExerciseDoneHistoryController {
@PostMapping
(
"getDoneHistoryDetail"
)
@PostMapping
(
"getDoneHistoryDetail"
)
@ApiOperation
(
"获取某一个试卷每个题目的做题详情 id 提交后返回的id memberId 成员id "
)
@ApiOperation
(
"获取某一个试卷每个题目的做题详情 id 提交后返回的id memberId 成员id "
)
@LoginRequired
public
ResponseVO
getDoneHistoryDetail
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
public
ResponseVO
getDoneHistoryDetail
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDoneHistoryService
.
getDoneHistoryDetail
(
exerciseDoneResultDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDoneHistoryService
.
getDoneHistoryDetail
(
exerciseDoneResultDO
));
}
}
...
...
src/main/java/com/subsidy/controller/ExerciseDoneResultController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.service.ExerciseDoneResultService
;
import
com.subsidy.service.ExerciseDoneResultService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -29,6 +30,7 @@ public class ExerciseDoneResultController {
...
@@ -29,6 +30,7 @@ public class ExerciseDoneResultController {
@PostMapping
(
"getDoneDetail"
)
@PostMapping
(
"getDoneDetail"
)
@ApiOperation
(
"提交后获取做题结果 id 提交后返回的id"
)
@ApiOperation
(
"提交后获取做题结果 id 提交后返回的id"
)
@LoginRequired
public
ResponseVO
getDoneDetail
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
public
ResponseVO
getDoneDetail
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDoneResultService
.
getDoneDetail
(
exerciseDoneResultDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDoneResultService
.
getDoneDetail
(
exerciseDoneResultDO
));
}
}
...
...
src/main/java/com/subsidy/controller/FieldDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.field.QueryFieldsDTO
;
import
com.subsidy.dto.field.QueryFieldsDTO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.service.FieldDictService
;
import
com.subsidy.service.FieldDictService
;
...
@@ -33,24 +34,28 @@ public class FieldDictController {
...
@@ -33,24 +34,28 @@ public class FieldDictController {
@PostMapping
(
"addField"
)
@PostMapping
(
"addField"
)
@ApiOperation
(
"添加行业 fieldName 行业名称"
)
@ApiOperation
(
"添加行业 fieldName 行业名称"
)
@LoginRequired
public
ResponseVO
addField
(
@RequestBody
FieldDictDO
fieldDictDO
){
public
ResponseVO
addField
(
@RequestBody
FieldDictDO
fieldDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
addField
(
fieldDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
addField
(
fieldDictDO
));
}
}
@PostMapping
(
"updateField"
)
@PostMapping
(
"updateField"
)
@ApiOperation
(
"修改行业 id fieldName 行业名称"
)
@ApiOperation
(
"修改行业 id fieldName 行业名称"
)
@LoginRequired
public
ResponseVO
updateField
(
@RequestBody
FieldDictDO
fieldDictDO
){
public
ResponseVO
updateField
(
@RequestBody
FieldDictDO
fieldDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
updateField
(
fieldDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
updateField
(
fieldDictDO
));
}
}
@PostMapping
(
"deleteField"
)
@PostMapping
(
"deleteField"
)
@ApiOperation
(
"删除行业 id"
)
@ApiOperation
(
"删除行业 id"
)
@LoginRequired
public
ResponseVO
deleteField
(
@RequestBody
FieldDictDO
fieldDictDO
){
public
ResponseVO
deleteField
(
@RequestBody
FieldDictDO
fieldDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
deleteField
(
fieldDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
deleteField
(
fieldDictDO
));
}
}
@PostMapping
(
"queryFields"
)
@PostMapping
(
"queryFields"
)
@ApiOperation
(
"查询行业 pageSize pageNum fieldName"
)
@ApiOperation
(
"查询行业 pageSize pageNum fieldName"
)
@LoginRequired
public
ResponseVO
queryFields
(
@RequestBody
QueryFieldsDTO
queryFieldsDTO
){
public
ResponseVO
queryFields
(
@RequestBody
QueryFieldsDTO
queryFieldsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
queryFields
(
queryFieldsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fieldDictService
.
queryFields
(
queryFieldsDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/FileDictController.java
View file @
b144856
...
@@ -33,28 +33,28 @@ public class FileDictController {
...
@@ -33,28 +33,28 @@ public class FileDictController {
@PostMapping
(
"getContendFiles"
)
@PostMapping
(
"getContendFiles"
)
@ApiOperation
(
"获取目录下的视频 {contentId fileName}"
)
@ApiOperation
(
"获取目录下的视频 {contentId fileName}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getContendFiles
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
getContendFiles
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
getContendFiles
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
getContendFiles
(
fileDictDO
));
}
}
@PostMapping
(
"deleteFile"
)
@PostMapping
(
"deleteFile"
)
@ApiOperation
(
"** 删除视频 id "
)
@ApiOperation
(
"** 删除视频 id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteFile
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
deleteFile
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
deleteFile
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
deleteFile
(
fileDictDO
));
}
}
@PostMapping
(
"addFile"
)
@PostMapping
(
"addFile"
)
@ApiOperation
(
"** 新增视频 contentId fileName fileSize fileType fileUrl"
)
@ApiOperation
(
"** 新增视频 contentId fileName fileSize fileType fileUrl"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addFile
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
addFile
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
addFile
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
addFile
(
fileDictDO
));
}
}
@PostMapping
(
"updateFile"
)
@PostMapping
(
"updateFile"
)
@ApiOperation
(
"** 新增视频 id contentId fileName fileSize fileType fileUrl"
)
@ApiOperation
(
"** 新增视频 id contentId fileName fileSize fileType fileUrl"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateFile
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
updateFile
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
updateFile
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
updateFile
(
fileDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/JobDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.service.JobDictService
;
import
com.subsidy.service.JobDictService
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -33,24 +34,28 @@ public class JobDictController {
...
@@ -33,24 +34,28 @@ public class JobDictController {
@PostMapping
(
"queryJobs"
)
@PostMapping
(
"queryJobs"
)
@ApiOperation
(
"查询某公司的岗位 companyId"
)
@ApiOperation
(
"查询某公司的岗位 companyId"
)
@LoginRequired
public
ResponseVO
queryJobs
(
@RequestBody
JobDictDO
jobDictDO
){
public
ResponseVO
queryJobs
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
queryJobs
(
jobDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
queryJobs
(
jobDictDO
));
}
}
@PostMapping
(
"deleteJob"
)
@PostMapping
(
"deleteJob"
)
@ApiOperation
(
"删除某个岗位 id"
)
@ApiOperation
(
"删除某个岗位 id"
)
@LoginRequired
public
ResponseVO
deleteJob
(
@RequestBody
JobDictDO
jobDictDO
){
public
ResponseVO
deleteJob
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
deleteJob
(
jobDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
deleteJob
(
jobDictDO
));
}
}
@PostMapping
(
"addJob"
)
@PostMapping
(
"addJob"
)
@ApiOperation
(
"添加岗位 companyId jobName"
)
@ApiOperation
(
"添加岗位 companyId jobName"
)
@LoginRequired
public
ResponseVO
addJob
(
@RequestBody
JobDictDO
jobDictDO
){
public
ResponseVO
addJob
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
addJob
(
jobDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
addJob
(
jobDictDO
));
}
}
@PostMapping
(
"updateJob"
)
@PostMapping
(
"updateJob"
)
@ApiOperation
(
"更新岗位 id jobName"
)
@ApiOperation
(
"更新岗位 id jobName"
)
@LoginRequired
public
ResponseVO
updateJob
(
@RequestBody
JobDictDO
jobDictDO
){
public
ResponseVO
updateJob
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
updateJob
(
jobDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
updateJob
(
jobDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/MemberController.java
View file @
b144856
package
com
.
subsidy
.
controller
;
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.common.interceptor.LoginRequired
;
...
@@ -15,7 +14,6 @@ import com.subsidy.dto.member.StudyHistoryDTO;
...
@@ -15,7 +14,6 @@ import com.subsidy.dto.member.StudyHistoryDTO;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.service.MemberService
;
import
com.subsidy.service.MemberService
;
import
com.subsidy.util.ConstantUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -42,28 +40,28 @@ public class MemberController {
...
@@ -42,28 +40,28 @@ public class MemberController {
@PostMapping
(
"getAll"
)
@PostMapping
(
"getAll"
)
@ApiOperation
(
"查询某部门成员 pageNum pageSize departmentId userName status startDate endDate"
)
@ApiOperation
(
"查询某部门成员 pageNum pageSize departmentId userName status startDate endDate"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getAll
(
@RequestBody
GetAllDTO
getAllDTO
){
public
ResponseVO
getAll
(
@RequestBody
GetAllDTO
getAllDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getAll
(
getAllDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getAll
(
getAllDTO
));
}
}
@PostMapping
(
"deleteMember"
)
@PostMapping
(
"deleteMember"
)
@ApiOperation
(
"删除成员 id "
)
@ApiOperation
(
"删除成员 id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteMember
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
deleteMember
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
deleteMember
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
deleteMember
(
memberDO
));
}
}
@PostMapping
(
"addMember"
)
@PostMapping
(
"addMember"
)
@ApiOperation
(
"新增成员 companyId userName accountName accountNameEn telephone gender image idCard departmentIds jobIds workNo inductionDate email"
)
@ApiOperation
(
"新增成员 companyId userName accountName accountNameEn telephone gender image idCard departmentIds jobIds workNo inductionDate email"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
public
ResponseVO
addMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
addMember
(
addMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
addMember
(
addMemberDTO
));
}
}
@PostMapping
(
"updateMember"
)
@PostMapping
(
"updateMember"
)
@ApiOperation
(
"编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard status departmentIds jobIds}"
)
@ApiOperation
(
"编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard status departmentIds jobIds}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
public
ResponseVO
updateMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updateMember
(
addMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updateMember
(
addMemberDTO
));
}
}
...
@@ -82,6 +80,7 @@ public class MemberController {
...
@@ -82,6 +80,7 @@ public class MemberController {
@PostMapping
(
"updatePassword"
)
@PostMapping
(
"updatePassword"
)
@ApiOperation
(
"修改密码 {id password}"
)
@ApiOperation
(
"修改密码 {id password}"
)
@LoginRequired
public
ResponseVO
updatePassword
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
updatePassword
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updatePassword
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updatePassword
(
memberDO
));
}
}
...
@@ -94,62 +93,71 @@ public class MemberController {
...
@@ -94,62 +93,71 @@ public class MemberController {
@PostMapping
(
"myCourses"
)
@PostMapping
(
"myCourses"
)
@ApiOperation
(
"手机端:我的学习--课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 "
)
@ApiOperation
(
"手机端:我的学习--课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 "
)
@LoginRequired
public
ResponseVO
myCourses
(
@RequestBody
MyCoursesDTO
myCoursesDTO
){
public
ResponseVO
myCourses
(
@RequestBody
MyCoursesDTO
myCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
myCourses
(
myCoursesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
myCourses
(
myCoursesDTO
));
}
}
@PostMapping
(
"contentVod"
)
@PostMapping
(
"contentVod"
)
@ApiOperation
(
"手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id"
)
@ApiOperation
(
"手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id"
)
@LoginRequired
public
ResponseVO
contentVod
(
@RequestBody
ContentMemberDTO
contentVodDTO
){
public
ResponseVO
contentVod
(
@RequestBody
ContentMemberDTO
contentVodDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentVod
(
contentVodDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentVod
(
contentVodDTO
));
}
}
@PostMapping
(
"contentFiles"
)
@PostMapping
(
"contentFiles"
)
@ApiOperation
(
"手机端:目录+课件 courseId 课程 memberId 学员id"
)
@ApiOperation
(
"手机端:目录+课件 courseId 课程 memberId 学员id"
)
@LoginRequired
public
ResponseVO
contentFiles
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
public
ResponseVO
contentFiles
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentFiles
(
contentMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentFiles
(
contentMemberDTO
));
}
}
@PostMapping
(
"studyHistory"
)
@PostMapping
(
"studyHistory"
)
@ApiOperation
(
"学习记录 memberId 成员id pageSize pageNum"
)
@ApiOperation
(
"学习记录 memberId 成员id pageSize pageNum"
)
@LoginRequired
public
ResponseVO
studyHistory
(
@RequestBody
StudyHistoryDTO
studyHistoryDTO
){
public
ResponseVO
studyHistory
(
@RequestBody
StudyHistoryDTO
studyHistoryDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
studyHistory
(
studyHistoryDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
studyHistory
(
studyHistoryDTO
));
}
}
@PostMapping
(
"getCourseTest"
)
@PostMapping
(
"getCourseTest"
)
@ApiOperation
(
"获取课程下的测试情况 {memberId 成员id 班级id classId courseId 课程id }"
)
@ApiOperation
(
"获取课程下的测试情况 {memberId 成员id 班级id classId courseId 课程id }"
)
@LoginRequired
public
ResponseVO
getCourseTest
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
public
ResponseVO
getCourseTest
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getCourseTest
(
contentMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getCourseTest
(
contentMemberDTO
));
}
}
@PostMapping
(
"getTestDoneDetail"
)
@PostMapping
(
"getTestDoneDetail"
)
@ApiOperation
(
"获取某个测评学生的完成情况 paperId memberId"
)
@ApiOperation
(
"获取某个测评学生的完成情况 paperId memberId"
)
@LoginRequired
public
ResponseVO
getPaperDoneDetail
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
public
ResponseVO
getPaperDoneDetail
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getPaperDoneDetail
(
exerciseDoneResultDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getPaperDoneDetail
(
exerciseDoneResultDO
));
}
}
@PostMapping
(
"getStudyInfo"
)
@PostMapping
(
"getStudyInfo"
)
@ApiOperation
(
"获取学生完成课程情况 id 学员id"
)
@ApiOperation
(
"获取学生完成课程情况 id 学员id"
)
@LoginRequired
public
ResponseVO
getStudyInfo
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
getStudyInfo
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getStudyInfo
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getStudyInfo
(
memberDO
));
}
}
@PostMapping
(
"checkTimes"
)
@PostMapping
(
"checkTimes"
)
@ApiOperation
(
"检测是否超过次数 memberId paperId classId"
)
@ApiOperation
(
"检测是否超过次数 memberId paperId classId"
)
@LoginRequired
public
ResponseVO
checkTimes
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
public
ResponseVO
checkTimes
(
@RequestBody
ExerciseDoneResultDO
exerciseDoneResultDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
checkTimes
(
exerciseDoneResultDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
checkTimes
(
exerciseDoneResultDO
));
}
}
@PostMapping
(
"importRedis"
)
@PostMapping
(
"importRedis"
)
@ApiOperation
(
"导入学生账号到redis"
)
@ApiOperation
(
"导入学生账号到redis"
)
@LoginRequired
public
void
importRedis
(){
public
void
importRedis
(){
memberService
.
importRedis
();
memberService
.
importRedis
();
}
}
@PostMapping
(
"changeDepartments"
)
@PostMapping
(
"changeDepartments"
)
@ApiOperation
(
"修改部门 desDepId[] 目的部门 memberIds[] 成员id"
)
@ApiOperation
(
"修改部门 desDepId[] 目的部门 memberIds[] 成员id"
)
@LoginRequired
public
ResponseVO
changeDepartments
(
@RequestBody
ChangeDepartmentsDTO
changeDepartmentsDTO
){
public
ResponseVO
changeDepartments
(
@RequestBody
ChangeDepartmentsDTO
changeDepartmentsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
changeDepartments
(
changeDepartmentsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
changeDepartments
(
changeDepartmentsDTO
));
}
}
}
}
src/main/java/com/subsidy/controller/OprAdmDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.opr.GetHistoryDTO
;
import
com.subsidy.dto.opr.GetHistoryDTO
;
import
com.subsidy.service.OprAdmDictService
;
import
com.subsidy.service.OprAdmDictService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -31,6 +32,7 @@ public class OprAdmDictController {
...
@@ -31,6 +32,7 @@ public class OprAdmDictController {
@PostMapping
(
"getHistory"
)
@PostMapping
(
"getHistory"
)
@ApiOperation
(
"获取后台用户审计 {pageSize pageNum userName startDate endDate}"
)
@ApiOperation
(
"获取后台用户审计 {pageSize pageNum userName startDate endDate}"
)
@LoginRequired
public
ResponseVO
getHistory
(
@RequestBody
GetHistoryDTO
getHistoryDTO
){
public
ResponseVO
getHistory
(
@RequestBody
GetHistoryDTO
getHistoryDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
oprAdmDictService
.
getHistory
(
getHistoryDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
oprAdmDictService
.
getHistory
(
getHistoryDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/OprMemDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.opr.GetHistoryDTO
;
import
com.subsidy.dto.opr.GetHistoryDTO
;
import
com.subsidy.service.OprMemDictService
;
import
com.subsidy.service.OprMemDictService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -31,6 +32,7 @@ public class OprMemDictController {
...
@@ -31,6 +32,7 @@ public class OprMemDictController {
@PostMapping
(
"getHistory"
)
@PostMapping
(
"getHistory"
)
@ApiOperation
(
"获取学员审计 {pageSize pageNum userName startDate endDate}"
)
@ApiOperation
(
"获取学员审计 {pageSize pageNum userName startDate endDate}"
)
@LoginRequired
public
ResponseVO
getHistory
(
@RequestBody
GetHistoryDTO
getHistoryDTO
){
public
ResponseVO
getHistory
(
@RequestBody
GetHistoryDTO
getHistoryDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
oprMemDictService
.
getHistory
(
getHistoryDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
oprMemDictService
.
getHistory
(
getHistoryDTO
));
}
}
...
...
src/main/java/com/subsidy/controller/PaperDictController.java
View file @
b144856
...
@@ -33,28 +33,28 @@ public class PaperDictController {
...
@@ -33,28 +33,28 @@ public class PaperDictController {
@PostMapping
(
"queryPapers"
)
@PostMapping
(
"queryPapers"
)
@ApiOperation
(
"查看课程下的测试 {courseId paperName}"
)
@ApiOperation
(
"查看课程下的测试 {courseId paperName}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
queryPapers
(
@RequestBody
PaperDictDO
paperDictDO
)
{
public
ResponseVO
queryPapers
(
@RequestBody
PaperDictDO
paperDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
queryPapers
(
paperDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
queryPapers
(
paperDictDO
));
}
}
@PostMapping
(
"deletePaper"
)
@PostMapping
(
"deletePaper"
)
@ApiOperation
(
"删除卷子 {id}"
)
@ApiOperation
(
"删除卷子 {id}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deletePaper
(
@RequestBody
PaperDictDO
paperDictDO
)
{
public
ResponseVO
deletePaper
(
@RequestBody
PaperDictDO
paperDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
deletePaper
(
paperDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
deletePaper
(
paperDictDO
));
}
}
@PostMapping
(
"update"
)
@PostMapping
(
"update"
)
@ApiOperation
(
"启用/禁用 {id paperStatus}"
)
@ApiOperation
(
"启用/禁用 {id paperStatus}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateStatus
(
@RequestBody
PaperDictDO
paperDictDO
)
{
public
ResponseVO
updateStatus
(
@RequestBody
PaperDictDO
paperDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
updateStatus
(
paperDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
updateStatus
(
paperDictDO
));
}
}
@PostMapping
(
"addPaper"
)
@PostMapping
(
"addPaper"
)
@ApiOperation
(
"添加卷子 {courseId paperName}"
)
@ApiOperation
(
"添加卷子 {courseId paperName}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
addPaper
(
@RequestBody
PaperDictDO
paperDictDO
)
{
public
ResponseVO
addPaper
(
@RequestBody
PaperDictDO
paperDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
addPaper
(
paperDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
addPaper
(
paperDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/RankDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.mapper.RankDictMapper
;
import
com.subsidy.mapper.RankDictMapper
;
import
com.subsidy.model.RankDictDO
;
import
com.subsidy.model.RankDictDO
;
import
com.subsidy.service.RankDictService
;
import
com.subsidy.service.RankDictService
;
...
@@ -34,24 +35,28 @@ public class RankDictController {
...
@@ -34,24 +35,28 @@ public class RankDictController {
@PostMapping
(
"addRank"
)
@PostMapping
(
"addRank"
)
@ApiOperation
(
"添加职级 companyId rank"
)
@ApiOperation
(
"添加职级 companyId rank"
)
@LoginRequired
public
ResponseVO
addRank
(
@RequestBody
RankDictDO
rankDictDO
){
public
ResponseVO
addRank
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
addRank
(
rankDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
addRank
(
rankDictDO
));
}
}
@PostMapping
(
"deleteRank"
)
@PostMapping
(
"deleteRank"
)
@ApiOperation
(
"删除职级 id"
)
@ApiOperation
(
"删除职级 id"
)
@LoginRequired
public
ResponseVO
deleteById
(
@RequestBody
RankDictDO
rankDictDO
){
public
ResponseVO
deleteById
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
deleteRank
(
rankDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
deleteRank
(
rankDictDO
));
}
}
@PostMapping
(
"updateRank"
)
@PostMapping
(
"updateRank"
)
@ApiOperation
(
"添加职级 id rank"
)
@ApiOperation
(
"添加职级 id rank"
)
@LoginRequired
public
ResponseVO
updateRank
(
@RequestBody
RankDictDO
rankDictDO
){
public
ResponseVO
updateRank
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
updateRank
(
rankDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
updateRank
(
rankDictDO
));
}
}
@PostMapping
(
"queryRanks"
)
@PostMapping
(
"queryRanks"
)
@ApiOperation
(
"查看职级 companyId"
)
@ApiOperation
(
"查看职级 companyId"
)
@LoginRequired
public
ResponseVO
queryRanks
(
@RequestBody
RankDictDO
rankDictDO
){
public
ResponseVO
queryRanks
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
queryRanks
(
rankDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
queryRanks
(
rankDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/RotationImgDictController.java
View file @
b144856
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
...
@@ -3,6 +3,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.model.RotationImgDictDO
;
import
com.subsidy.model.RotationImgDictDO
;
import
com.subsidy.service.RotationImgDictService
;
import
com.subsidy.service.RotationImgDictService
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -32,24 +33,28 @@ public class RotationImgDictController {
...
@@ -32,24 +33,28 @@ public class RotationImgDictController {
@PostMapping
(
"addRotation"
)
@PostMapping
(
"addRotation"
)
@ApiOperation
(
"添加轮播图 {companyId 公司id rotationImg 轮播图地址}"
)
@ApiOperation
(
"添加轮播图 {companyId 公司id rotationImg 轮播图地址}"
)
@LoginRequired
public
ResponseVO
addRotation
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
public
ResponseVO
addRotation
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
addRotation
(
rotationImgDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
addRotation
(
rotationImgDictDO
));
}
}
@PostMapping
(
"deleteRotation"
)
@PostMapping
(
"deleteRotation"
)
@ApiOperation
(
"删除轮播图 {id}"
)
@ApiOperation
(
"删除轮播图 {id}"
)
@LoginRequired
public
ResponseVO
deleteRotation
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
public
ResponseVO
deleteRotation
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
deleteRotation
(
rotationImgDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
deleteRotation
(
rotationImgDictDO
));
}
}
@PostMapping
(
"updateRotation"
)
@PostMapping
(
"updateRotation"
)
@ApiOperation
(
"编辑轮播图 id"
)
@ApiOperation
(
"编辑轮播图 id"
)
@LoginRequired
public
ResponseVO
updateRotation
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
public
ResponseVO
updateRotation
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
updateRotation
(
rotationImgDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
updateRotation
(
rotationImgDictDO
));
}
}
@PostMapping
(
"getAllRotations"
)
@PostMapping
(
"getAllRotations"
)
@ApiOperation
(
"获取某企业的轮播图 companyId"
)
@ApiOperation
(
"获取某企业的轮播图 companyId"
)
@LoginRequired
public
ResponseVO
getAllRotations
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
public
ResponseVO
getAllRotations
(
@RequestBody
RotationImgDictDO
rotationImgDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
getAllRotations
(
rotationImgDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
rotationImgDictService
.
getAllRotations
(
rotationImgDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/SignInRecordController.java
View file @
b144856
...
@@ -35,25 +35,28 @@ public class SignInRecordController {
...
@@ -35,25 +35,28 @@ public class SignInRecordController {
@PostMapping
(
"getMemberSignInfo"
)
@PostMapping
(
"getMemberSignInfo"
)
@ApiOperation
(
"获取某个成员的签到记录 id 成员id pageSize pageNum"
)
@ApiOperation
(
"获取某个成员的签到记录 id 成员id pageSize pageNum"
)
@LoginRequired
public
ResponseVO
getMemberSignInfo
(
@RequestBody
GetMemberSignInfoDTO
getMemberSignInfoDTO
)
{
public
ResponseVO
getMemberSignInfo
(
@RequestBody
GetMemberSignInfoDTO
getMemberSignInfoDTO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
getMemberSignInfo
(
getMemberSignInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
getMemberSignInfo
(
getMemberSignInfoDTO
));
}
}
@PostMapping
(
"signIn"
)
@PostMapping
(
"signIn"
)
@ApiOperation
(
"签到 memberId"
)
@ApiOperation
(
"签到 memberId"
)
@LoginRequired
public
ResponseVO
signIn
(
@RequestBody
SignInRecordDO
signInRecordDO
)
{
public
ResponseVO
signIn
(
@RequestBody
SignInRecordDO
signInRecordDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signIn
(
signInRecordDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signIn
(
signInRecordDO
));
}
}
@PostMapping
(
"dataView"
)
@PostMapping
(
"dataView"
)
@ApiOperation
(
"数据概览 id 校区id className pageSize pageNum"
)
@ApiOperation
(
"数据概览 id 校区id className pageSize pageNum"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
dataView
(
@RequestBody
DataViewDTO
classSignInfoDTO
)
{
public
ResponseVO
dataView
(
@RequestBody
DataViewDTO
classSignInfoDTO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
dataView
(
classSignInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
dataView
(
classSignInfoDTO
));
}
}
@PostMapping
(
"signInStatus"
)
@PostMapping
(
"signInStatus"
)
@ApiOperation
(
"判断学生当天有没有打卡 {memberId 学生id}"
)
@ApiOperation
(
"判断学生当天有没有打卡 {memberId 学生id}"
)
@LoginRequired
public
ResponseVO
signInStatus
(
@RequestBody
SignInRecordDO
signInRecordDO
)
{
public
ResponseVO
signInStatus
(
@RequestBody
SignInRecordDO
signInRecordDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signInStatus
(
signInRecordDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signInStatus
(
signInRecordDO
));
}
}
...
...
src/main/java/com/subsidy/controller/VodDictController.java
View file @
b144856
...
@@ -41,28 +41,28 @@ public class VodDictController {
...
@@ -41,28 +41,28 @@ public class VodDictController {
@PostMapping
(
"getContendVods"
)
@PostMapping
(
"getContendVods"
)
@ApiOperation
(
"获取目录下的视频 {contentId vodName}"
)
@ApiOperation
(
"获取目录下的视频 {contentId vodName}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
getContendVods
(
@RequestBody
GetContendVodsDTO
getContendVodsDTO
)
{
public
ResponseVO
getContendVods
(
@RequestBody
GetContendVodsDTO
getContendVodsDTO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
getContendVods
(
getContendVodsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
getContendVods
(
getContendVodsDTO
));
}
}
@PostMapping
(
"deleteVod"
)
@PostMapping
(
"deleteVod"
)
@ApiOperation
(
"删除视频 id "
)
@ApiOperation
(
"删除视频 id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
deleteVod
(
@RequestBody
VodDictDO
vodDictDO
)
{
public
ResponseVO
deleteVod
(
@RequestBody
VodDictDO
vodDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
deleteVod
(
vodDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
deleteVod
(
vodDictDO
));
}
}
@PostMapping
(
"addVod"
)
@PostMapping
(
"addVod"
)
@ApiOperation
(
"新增视频 contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@ApiOperation
(
"新增视频 contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
public
ResponseVO
addVod
(
@RequestBody
VodDictDO
vodDictDO
)
{
public
ResponseVO
addVod
(
@RequestBody
VodDictDO
vodDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
addVod
(
vodDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
addVod
(
vodDictDO
));
}
}
@PostMapping
(
"updateVod"
)
@PostMapping
(
"updateVod"
)
@ApiOperation
(
"新增视频 id contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@ApiOperation
(
"新增视频 id contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
public
ResponseVO
updateVod
(
@RequestBody
VodDictDO
vodDictDO
)
{
public
ResponseVO
updateVod
(
@RequestBody
VodDictDO
vodDictDO
)
{
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
updateVod
(
vodDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
updateVod
(
vodDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/VodPlayHistoryController.java
View file @
b144856
...
@@ -4,6 +4,7 @@ package com.subsidy.controller;
...
@@ -4,6 +4,7 @@ package com.subsidy.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.vod.RemainSecondsDTO
;
import
com.subsidy.dto.vod.RemainSecondsDTO
;
import
com.subsidy.dto.vod.SignDatePlaysDTO
;
import
com.subsidy.dto.vod.SignDatePlaysDTO
;
import
com.subsidy.model.VodPlayHistoryDO
;
import
com.subsidy.model.VodPlayHistoryDO
;
...
@@ -34,12 +35,14 @@ public class VodPlayHistoryController {
...
@@ -34,12 +35,14 @@ public class VodPlayHistoryController {
@PostMapping
(
"insertHistory"
)
@PostMapping
(
"insertHistory"
)
@ApiOperation
(
"记录学生看视频位置 ajax请求 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
@ApiOperation
(
"记录学生看视频位置 ajax请求 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
@LoginRequired
public
ResponseVO
insertHistory
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
public
ResponseVO
insertHistory
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistory
(
vodPlayHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistory
(
vodPlayHistoryDO
));
}
}
@RequestMapping
(
"insertHistoryNew"
)
@RequestMapping
(
"insertHistoryNew"
)
@ApiOperation
(
"记录学生看视频位置 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
@ApiOperation
(
"记录学生看视频位置 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
@LoginRequired
public
ResponseVO
insertHistoryNew
(
@RequestBody
String
param
){
public
ResponseVO
insertHistoryNew
(
@RequestBody
String
param
){
VodPlayHistoryDO
vodPlayHistoryDO
=
JSON
.
parseObject
(
param
,
VodPlayHistoryDO
.
class
);
VodPlayHistoryDO
vodPlayHistoryDO
=
JSON
.
parseObject
(
param
,
VodPlayHistoryDO
.
class
);
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistoryNew
(
vodPlayHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistoryNew
(
vodPlayHistoryDO
));
...
@@ -47,24 +50,28 @@ public class VodPlayHistoryController {
...
@@ -47,24 +50,28 @@ public class VodPlayHistoryController {
@PostMapping
(
"dataFix"
)
@PostMapping
(
"dataFix"
)
@ApiOperation
(
"每个视频都看一次"
)
@ApiOperation
(
"每个视频都看一次"
)
@LoginRequired
public
void
dadaFix
(
@RequestBody
SignDatePlaysDTO
dataFixDTO
){
public
void
dadaFix
(
@RequestBody
SignDatePlaysDTO
dataFixDTO
){
vodPlayHistoryService
.
dataFix
(
dataFixDTO
);
vodPlayHistoryService
.
dataFix
(
dataFixDTO
);
}
}
@PostMapping
(
"signDatePlays"
)
@PostMapping
(
"signDatePlays"
)
@ApiOperation
(
"每天接着看几个视频 接dataFix的"
)
@ApiOperation
(
"每天接着看几个视频 接dataFix的"
)
@LoginRequired
public
void
signDatePlays
(
@RequestBody
SignDatePlaysDTO
signDatePlaysDTO
){
public
void
signDatePlays
(
@RequestBody
SignDatePlaysDTO
signDatePlaysDTO
){
vodPlayHistoryService
.
signDatePlays
(
signDatePlaysDTO
);
vodPlayHistoryService
.
signDatePlays
(
signDatePlaysDTO
);
}
}
@PostMapping
(
"remainSeconds"
)
@PostMapping
(
"remainSeconds"
)
@ApiOperation
(
"每个视频先看一下,然后剩余时长分配到每天里"
)
@ApiOperation
(
"每个视频先看一下,然后剩余时长分配到每天里"
)
@LoginRequired
public
void
remainSeconds
(
@RequestBody
RemainSecondsDTO
remainSecondsDTO
){
public
void
remainSeconds
(
@RequestBody
RemainSecondsDTO
remainSecondsDTO
){
vodPlayHistoryService
.
remainSeconds
(
remainSecondsDTO
);
vodPlayHistoryService
.
remainSeconds
(
remainSecondsDTO
);
}
}
@PostMapping
(
"playLengthFix"
)
@PostMapping
(
"playLengthFix"
)
@ApiOperation
(
"按照时长去跑脚本 {classId}"
)
@ApiOperation
(
"按照时长去跑脚本 {classId}"
)
@LoginRequired
public
void
playLengthFix
(
@RequestBody
RemainSecondsDTO
remainSecondsDTO
){
public
void
playLengthFix
(
@RequestBody
RemainSecondsDTO
remainSecondsDTO
){
vodPlayHistoryService
.
playLengthFix
(
remainSecondsDTO
);
vodPlayHistoryService
.
playLengthFix
(
remainSecondsDTO
);
}
}
...
...
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
b144856
...
@@ -53,6 +53,8 @@ import com.subsidy.model.VodDictDO;
...
@@ -53,6 +53,8 @@ import com.subsidy.model.VodDictDO;
import
com.subsidy.service.MemberService
;
import
com.subsidy.service.MemberService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.ConstantUtils
;
//import com.subsidy.util.RedisUtil;
//import com.subsidy.util.RedisUtil;
import
com.subsidy.util.JwtUtil
;
import
com.subsidy.util.RedisUtil
;
import
com.subsidy.vo.administer.UserRoleVO
;
import
com.subsidy.vo.administer.UserRoleVO
;
import
com.subsidy.vo.member.ContentFilesVO
;
import
com.subsidy.vo.member.ContentFilesVO
;
import
com.subsidy.vo.member.ContentVodNewVO
;
import
com.subsidy.vo.member.ContentVodNewVO
;
...
@@ -114,8 +116,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -114,8 +116,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
@Autowired
@Autowired
private
MemberDepartmentMappingMapper
memberDepartmentMappingMapper
;
private
MemberDepartmentMappingMapper
memberDepartmentMappingMapper
;
//
@Autowired
@Autowired
//
private RedisUtil redisUtil;
private
RedisUtil
redisUtil
;
@Autowired
@Autowired
private
CourseFieldMappingMapper
courseFieldMappingMapper
;
private
CourseFieldMappingMapper
courseFieldMappingMapper
;
...
@@ -384,6 +386,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -384,6 +386,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
.
lambda
()
.
lambda
()
.
eq
(
RotationImgDictDO:
:
getCompanyId
,
companyDictDO
.
getId
()));
.
eq
(
RotationImgDictDO:
:
getCompanyId
,
companyDictDO
.
getId
()));
userRoleVO
.
setRotationImgDictDOS
(
rotationImgDictDOS
);
userRoleVO
.
setRotationImgDictDOS
(
rotationImgDictDOS
);
String
token
=
JwtUtil
.
generateToken
(
memberDO
.
getId
()
,
ConstantUtils
.
MOBILE_TERMINATE
);
redisUtil
.
set
(
ConstantUtils
.
MOBILE_TERMINATE
+
"_"
+
memberDO
.
getId
(),
token
);
userRoleVO
.
setToken
(
token
);
return
userRoleVO
;
return
userRoleVO
;
}
}
...
@@ -407,8 +413,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -407,8 +413,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
}
}
CompanyDictDO
companyDictDO
=
companyDictMapper
.
selectById
(
memberDO
.
getCompanyId
());
CompanyDictDO
companyDictDO
=
companyDictMapper
.
selectById
(
memberDO
.
getCompanyId
());
if
(
memberDO
.
getPassword
().
equals
(
passwordLoginDTO
.
getPassword
())
&&
1
==
memberDO
.
getFirstLogin
()
&&
!
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
if
(
memberDO
.
getPassword
().
equals
(
passwordLoginDTO
.
getPassword
())
&&
1
==
memberDO
.
getFirstLogin
()
&&
!
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
MemberVO
memberVO
=
new
MemberVO
();
MemberVO
memberVO
=
new
MemberVO
();
BeanUtils
.
copyProperties
(
memberDO
,
memberVO
);
BeanUtils
.
copyProperties
(
memberDO
,
memberVO
);
...
@@ -434,6 +438,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -434,6 +438,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
memberVO
.
setRotationImgDictDOS
(
rotationImgDictDOS
);
memberVO
.
setRotationImgDictDOS
(
rotationImgDictDOS
);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_COMPANY_MEMBER_PREFIX + passwordLoginDTO.getCompanyId() + ":" + passwordLoginDTO.getAccountName(), memberDO);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_COMPANY_MEMBER_PREFIX + passwordLoginDTO.getCompanyId() + ":" + passwordLoginDTO.getAccountName(), memberDO);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), 1);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), 1);
String
token
=
JwtUtil
.
generateToken
(
memberDO
.
getId
()
,
ConstantUtils
.
MOBILE_TERMINATE
);
redisUtil
.
set
(
ConstantUtils
.
MOBILE_TERMINATE
+
"_"
+
memberDO
.
getId
(),
token
);
memberVO
.
setToken
(
token
);
return
memberVO
;
return
memberVO
;
}
else
{
}
else
{
if
(!
memberDO
.
getPassword
().
equals
(
passwordLoginDTO
.
getPassword
()))
{
if
(!
memberDO
.
getPassword
().
equals
(
passwordLoginDTO
.
getPassword
()))
{
...
@@ -451,6 +459,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -451,6 +459,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), oprMemDictDO);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), oprMemDictDO);
throw
new
HttpException
(
10016
);
throw
new
HttpException
(
10016
);
}
}
if
(
0
==
memberDO
.
getFirstLogin
())
{
if
(
0
==
memberDO
.
getFirstLogin
())
{
OprMemDictDO
oprMemDictDO
=
new
OprMemDictDO
();
OprMemDictDO
oprMemDictDO
=
new
OprMemDictDO
();
oprMemDictDO
.
setUserId
(
memberDO
.
getId
());
oprMemDictDO
.
setUserId
(
memberDO
.
getId
());
...
@@ -466,6 +475,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -466,6 +475,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), 0);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), 0);
throw
new
HttpException
(
10015
);
throw
new
HttpException
(
10015
);
}
}
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
throw
new
HttpException
(
10014
);
throw
new
HttpException
(
10014
);
}
}
...
...
src/main/java/com/subsidy/util/RedisUtil.java
View file @
b144856
This diff is collapsed.
Click to expand it.
src/main/java/com/subsidy/vo/administer/UserRoleVO.java
View file @
b144856
...
@@ -30,4 +30,6 @@ public class UserRoleVO {
...
@@ -30,4 +30,6 @@ public class UserRoleVO {
private
List
<
RotationImgDictDO
>
rotationImgDictDOS
;
private
List
<
RotationImgDictDO
>
rotationImgDictDOS
;
private
String
token
;
}
}
src/main/java/com/subsidy/vo/member/MemberVO.java
View file @
b144856
...
@@ -27,4 +27,6 @@ public class MemberVO {
...
@@ -27,4 +27,6 @@ public class MemberVO {
private
String
logo
;
private
String
logo
;
private
List
<
RotationImgDictDO
>
rotationImgDictDOS
;
private
List
<
RotationImgDictDO
>
rotationImgDictDOS
;
private
String
token
;
}
}
src/main/resources/application-prod.properties
View file @
b144856
...
@@ -38,9 +38,9 @@ spring.servlet.multipart.max-request-size=4098KB
...
@@ -38,9 +38,9 @@ spring.servlet.multipart.max-request-size=4098KB
#spring.redis.lettuce.pool.max-active=32
#spring.redis.lettuce.pool.max-active=32
#spring.redis.lettuce.pool.min-idle=8
#spring.redis.lettuce.pool.min-idle=8
spring.redis.host
=
r-uf6pdbuxqgy0ztfmn1pd.redis.rds.aliyuncs
.com
spring.redis.host
=
sh-crs-hq5xbrsq.sql.tencentcdb
.com
spring.redis.password
=
r-uf6pdbuxqgy0ztfmn1:Ykhl@208
spring.redis.password
=
Ykhl@302
spring.redis.port
=
6379
spring.redis.port
=
20260
spring.redis.lettuce.pool.max-
idle
=
16
spring.redis.lettuce.pool.max-
idle
=
16
spring.redis.lettuce.pool.max-
active
=
32
spring.redis.lettuce.pool.max-
active
=
32
spring.redis.lettuce.pool.min-
idle
=
8
spring.redis.lettuce.pool.min-
idle
=
8
\ No newline at end of file
src/main/resources/code.properties
View file @
b144856
meishu.code-message[0]=成功
meishu.code-message[0]=成功
meishu.code-message[1010]=无效的令牌
meishu.code-message[1010]=无效的令牌
meishu.code-message[1011]=当前账户已在其他设备登录
meishu.code-message[10003]=验证码错误
meishu.code-message[10003]=验证码错误
meishu.code-message[10004]=账号或密码错误
meishu.code-message[10004]=账号或密码错误
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment