Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
online-edu
online-edu-backend
Commits
3e660760
Commit
3e660760
authored
Jun 10, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
06a8f54a
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
80 additions
and
11 deletions
+80
-11
CourseController.java
...om/qkdata/biz/management/controller/CourseController.java
+5
-0
CourseTagController.java
...qkdata/biz/management/controller/CourseTagController.java
+1
-0
EnterpriseController.java
...kdata/biz/management/controller/EnterpriseController.java
+1
-0
InstitutionController.java
...data/biz/management/controller/InstitutionController.java
+2
-0
MainPageTagConfigController.java
...iz/management/controller/MainPageTagConfigController.java
+5
-0
MemberController.java
...om/qkdata/biz/management/controller/MemberController.java
+2
-0
PriceConfigController.java
...data/biz/management/controller/PriceConfigController.java
+1
-0
ProductOrderController.java
...ata/biz/management/controller/ProductOrderController.java
+2
-0
RecommendConfigController.java
.../biz/management/controller/RecommendConfigController.java
+5
-0
SwiperConfigController.java
...ata/biz/management/controller/SwiperConfigController.java
+6
-0
TeacherController.java
...m/qkdata/biz/management/controller/TeacherController.java
+1
-0
ProductOrderService.java
...om/qkdata/biz/management/service/ProductOrderService.java
+3
-3
CourseConsumeRecordController.java
...ata/biz/web/controller/CourseConsumeRecordController.java
+2
-0
FrontendProductOrderController.java
...ta/biz/web/controller/FrontendProductOrderController.java
+6
-0
LoginController.java
...n/java/com/qkdata/biz/web/controller/LoginController.java
+1
-1
MainPageController.java
...ava/com/qkdata/biz/web/controller/MainPageController.java
+5
-0
MyEnterpriseController.java
...com/qkdata/biz/web/controller/MyEnterpriseController.java
+27
-7
UserCenterController.java
...a/com/qkdata/biz/web/controller/UserCenterController.java
+5
-0
No files found.
src/main/java/com/qkdata/biz/management/controller/CourseController.java
View file @
3e660760
...
...
@@ -38,6 +38,7 @@ public class CourseController {
@ApiOperation
(
"课程查询"
)
@PostMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"课程查询"
)
public
PageResult
<
CourseListItemModel
>
list
(
@RequestBody
QueryCourseModel
param
){
return
courseService
.
queryPageList
(
param
);
...
...
@@ -45,12 +46,14 @@ public class CourseController {
@ApiOperation
(
"获取课程详情"
)
@GetMapping
(
"/{id}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取课程详情"
)
public
Result
<
CourseDetailModel
>
courseDetail
(
@PathVariable
Long
id
){
return
Result
.
succeed
(
courseService
.
getCourseDetail
(
id
));
}
@ApiOperation
(
"课程上、下架操作"
)
@PostMapping
(
"/modifyStatus"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"课程上、下架操作"
)
public
Result
<
String
>
modifyStatus
(
@RequestBody
ModifyCourseStatusModel
model
){
courseService
.
modifyStatus
(
model
);
return
Result
.
succeed
(
"ok"
);
...
...
@@ -112,6 +115,7 @@ public class CourseController {
@ApiOperation
(
"获取课程系列列表"
)
@PostMapping
(
"/seriesList"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取课程系列列表"
)
public
PageResult
<
CourseSeriesPO
>
seriesList
(
@RequestBody
QueryCourseSeriesModel
model
){
return
courseService
.
querySeriesPageList
(
model
);
}
...
...
@@ -127,6 +131,7 @@ public class CourseController {
@ApiOperation
(
"获取视频信息"
)
@GetMapping
(
"/videoInfo/{videoId}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取视频信息"
)
public
Result
<
VideoInfoModel
>
videoInfo
(
@PathVariable
String
videoId
)
throws
ClientException
{
return
Result
.
succeed
(
courseService
.
getVideoInfo
(
videoId
));
}
...
...
src/main/java/com/qkdata/biz/management/controller/CourseTagController.java
View file @
3e660760
...
...
@@ -64,6 +64,7 @@ public class CourseTagController {
@ApiOperation
(
"查询课程标签"
)
@PostMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"查询课程标签"
)
public
PageResult
<
CourseTagPO
>
list
(
@RequestBody
QueryCourseTagModel
param
){
return
courseTagService
.
queryPageList
(
param
);
}
...
...
src/main/java/com/qkdata/biz/management/controller/EnterpriseController.java
View file @
3e660760
...
...
@@ -25,6 +25,7 @@ public class EnterpriseController {
@ApiOperation
(
"企业列表查询"
)
@PostMapping
(
"/list"
)
@SysLog
(
"企业列表查询"
)
public
PageResult
<
EnterpriseListItemModel
>
list
(
@RequestBody
QueryEnterpriseModel
param
){
return
orgService
.
queryEnterprisePageList
(
param
);
}
...
...
src/main/java/com/qkdata/biz/management/controller/InstitutionController.java
View file @
3e660760
...
...
@@ -76,6 +76,7 @@ public class InstitutionController {
@ApiOperation
(
"获取机构信息"
)
@PostMapping
(
"/info/{id}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取机构信息"
)
public
Result
<
InstitutionModel
>
getInfoById
(
@PathVariable
Long
id
){
OrganizationPO
po
=
orgService
.
getById
(
id
);
if
(
po
==
null
){
...
...
@@ -89,6 +90,7 @@ public class InstitutionController {
@ApiOperation
(
"查询机构信息"
)
@PostMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"查询机构信息"
)
public
PageResult
<
InstitutionModel
>
list
(
@RequestBody
QueryOrgModel
param
){
param
.
setType
(
OrgTypeEnum
.
INSTITUTION
);
PageResult
<
OrganizationPO
>
pageList
=
orgService
.
queryPageList
(
param
);
...
...
src/main/java/com/qkdata/biz/management/controller/MainPageTagConfigController.java
View file @
3e660760
...
...
@@ -6,6 +6,7 @@ import com.qkdata.biz.management.entity.CourseTagPO;
import
com.qkdata.biz.management.service.CourseTagService
;
import
com.qkdata.biz.management.vo.AddMainPageTagConfigModel
;
import
com.qkdata.biz.management.vo.QueryCourseTagModel
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.model.PageResult
;
import
com.qkdata.common.base.model.Result
;
import
io.swagger.annotations.Api
;
...
...
@@ -27,6 +28,7 @@ public class MainPageTagConfigController {
@ApiOperation
(
"获取标签待选列表"
)
@PostMapping
(
"/tags"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取标签待选列表"
)
public
PageResult
<
CourseTagPO
>
tags
(
@RequestBody
QueryCourseTagModel
model
){
model
.
setIncludeRecommend
(
false
);
return
tagService
.
queryPageList
(
model
);
...
...
@@ -35,6 +37,7 @@ public class MainPageTagConfigController {
@ApiOperation
(
"获取首页标签配置"
)
@GetMapping
(
""
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取首页标签配置"
)
public
Result
<
List
<
CourseTagPO
>>
getRemommend
(){
List
<
CourseTagPO
>
list
=
tagService
.
list
(
Wrappers
.<
CourseTagPO
>
lambdaQuery
().
eq
(
CourseTagPO:
:
getRecommend
,
true
));
return
Result
.
succeed
(
list
);
...
...
@@ -43,6 +46,7 @@ public class MainPageTagConfigController {
@ApiOperation
(
"添加标签"
)
@PostMapping
(
"/add"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"添加标签"
)
public
Result
<
String
>
add
(
@RequestBody
List
<
Long
>
tagIds
){
for
(
Long
tagId
:
tagIds
){
CourseTagPO
po
=
new
CourseTagPO
();
...
...
@@ -55,6 +59,7 @@ public class MainPageTagConfigController {
@ApiOperation
(
"删除标签"
)
@GetMapping
(
"/delete/{tagId}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"删除标签"
)
public
Result
<
String
>
delete
(
@PathVariable
Long
tagId
){
CourseTagPO
po
=
new
CourseTagPO
();
po
.
setId
(
tagId
);
...
...
src/main/java/com/qkdata/biz/management/controller/MemberController.java
View file @
3e660760
...
...
@@ -3,6 +3,7 @@ package com.qkdata.biz.management.controller;
import
com.qkdata.biz.management.service.MemberService
;
import
com.qkdata.biz.management.vo.MemberListModel
;
import
com.qkdata.biz.management.vo.QueryMemberModel
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.model.PageResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -22,6 +23,7 @@ public class MemberController {
@ApiOperation
(
"查询客户列表"
)
@PostMapping
(
"/list"
)
@SysLog
(
"查询客户列表"
)
public
PageResult
<
MemberListModel
>
list
(
@RequestBody
QueryMemberModel
param
){
return
memberService
.
queryPage
(
param
);
}
...
...
src/main/java/com/qkdata/biz/management/controller/PriceConfigController.java
View file @
3e660760
...
...
@@ -23,6 +23,7 @@ public class PriceConfigController {
@ApiOperation
(
"获取系统价格配置"
)
@GetMapping
(
"/get"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
,
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取系统价格配置"
)
public
Result
<
PriceConfigModel
>
get
()
{
return
Result
.
succeed
(
priceConfigService
.
findConfig
());
}
...
...
src/main/java/com/qkdata/biz/management/controller/ProductOrderController.java
View file @
3e660760
...
...
@@ -4,6 +4,7 @@ import com.qkdata.biz.common.BizConstants;
import
com.qkdata.biz.management.service.ProductOrderService
;
import
com.qkdata.biz.management.vo.ProductOrderModel
;
import
com.qkdata.biz.management.vo.QueryProductOrderModel
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.model.PageResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -25,6 +26,7 @@ public class ProductOrderController {
@ApiOperation
(
"订单查询"
)
@PostMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"订单查询"
)
public
PageResult
<
ProductOrderModel
>
list
(
@RequestBody
QueryProductOrderModel
model
){
return
orderService
.
queryPageList
(
model
);
}
...
...
src/main/java/com/qkdata/biz/management/controller/RecommendConfigController.java
View file @
3e660760
...
...
@@ -8,6 +8,7 @@ import com.qkdata.biz.management.service.RecommendConfigService;
import
com.qkdata.biz.management.vo.CourseListItemModel
;
import
com.qkdata.biz.management.vo.QueryCourseModel
;
import
com.qkdata.biz.management.vo.RecommendConfigModel
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.model.PageResult
;
import
com.qkdata.common.base.model.Result
;
import
io.swagger.annotations.Api
;
...
...
@@ -41,6 +42,7 @@ public class RecommendConfigController {
@ApiOperation
(
"待选课程列表"
)
@PostMapping
(
"/select"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"待选课程列表"
)
public
PageResult
<
CourseListItemModel
>
select
(
@RequestBody
QueryCourseModel
model
){
List
<
RecommendConfigPO
>
list
=
configService
.
list
();
List
<
Long
>
courseIds
=
list
.
stream
().
map
(
RecommendConfigPO:
:
getCourseId
).
collect
(
Collectors
.
toList
());
...
...
@@ -51,6 +53,7 @@ public class RecommendConfigController {
@ApiOperation
(
"获取推荐列表"
)
@GetMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取推荐列表"
)
public
Result
<
List
<
RecommendConfigModel
>>
list
(){
return
Result
.
succeed
(
configService
.
listConfig
());
}
...
...
@@ -58,6 +61,7 @@ public class RecommendConfigController {
@ApiOperation
(
"添加推荐"
)
@PostMapping
(
"/add"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"添加推荐"
)
public
Result
<
String
>
add
(
@RequestBody
List
<
RecommendConfigPO
>
list
){
for
(
RecommendConfigPO
po
:
list
){
configService
.
save
(
po
);
...
...
@@ -67,6 +71,7 @@ public class RecommendConfigController {
@ApiOperation
(
"删除推荐"
)
@GetMapping
(
"/delete/{id}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"删除推荐"
)
public
Result
<
String
>
delete
(
@PathVariable
Long
id
){
configService
.
removeById
(
id
);
return
Result
.
succeed
(
"ok"
);
...
...
src/main/java/com/qkdata/biz/management/controller/SwiperConfigController.java
View file @
3e660760
...
...
@@ -8,6 +8,7 @@ import com.qkdata.biz.management.service.SwiperConfigService;
import
com.qkdata.biz.management.vo.SwiperConfigModel
;
import
com.qkdata.biz.management.vo.SwiperLInkCourseModel
;
import
com.qkdata.biz.management.vo.SwiperModifyStatusModel
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.model.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -36,6 +37,7 @@ public class SwiperConfigController {
@ApiOperation
(
"获取轮播图配置"
)
@GetMapping
(
""
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取轮播图配置"
)
public
Result
<
List
<
SwiperConfigModel
>>
list
(){
List
<
SwiperConfigModel
>
list
=
swiperConfigService
.
listConfig
(
null
);
return
Result
.
succeed
(
list
);
...
...
@@ -43,6 +45,7 @@ public class SwiperConfigController {
@ApiOperation
(
"添加轮播图"
)
@PostMapping
(
"/save"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"添加轮播图"
)
public
Result
<
Long
>
add
(
@RequestBody
SwiperConfigPO
po
){
swiperConfigService
.
saveOrUpdate
(
po
);
return
Result
.
succeed
(
0L
);
...
...
@@ -50,6 +53,7 @@ public class SwiperConfigController {
@ApiOperation
(
"关联课程"
)
@PostMapping
(
"/linkCourse"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"关联课程"
)
public
Result
<
String
>
linkCourse
(
@RequestBody
SwiperLInkCourseModel
model
){
swiperConfigService
.
linkCourse
(
model
);
return
Result
.
succeed
(
"ok"
);
...
...
@@ -57,6 +61,7 @@ public class SwiperConfigController {
@ApiOperation
(
"修改状态"
)
@PostMapping
(
"/modifyStatus"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"修改状态"
)
public
Result
<
String
>
modifyStatus
(
@RequestBody
SwiperModifyStatusModel
model
){
swiperConfigService
.
modifyStatus
(
model
);
return
Result
.
succeed
(
"ok"
);
...
...
@@ -64,6 +69,7 @@ public class SwiperConfigController {
@ApiOperation
(
"删除配置"
)
@GetMapping
(
"/remove/{id}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"删除配置"
)
public
Result
<
String
>
remove
(
@PathVariable
Long
id
){
swiperConfigService
.
removeById
(
id
);
return
Result
.
succeed
(
"ok"
);
...
...
src/main/java/com/qkdata/biz/management/controller/TeacherController.java
View file @
3e660760
...
...
@@ -64,6 +64,7 @@ public class TeacherController {
@ApiOperation
(
"查询讲师信息"
)
@PostMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
@SysLog
(
"查询讲师信息"
)
public
PageResult
<
TeacherModel
>
list
(
@RequestBody
QueryTeacherModel
param
){
return
teacherService
.
queryPage
(
param
);
...
...
src/main/java/com/qkdata/biz/management/service/ProductOrderService.java
View file @
3e660760
...
...
@@ -91,8 +91,8 @@ public class ProductOrderService extends ServiceImpl<ProductOrderMapper, Product
//金额元转为分
BigDecimal
fee
=
order
.
getPaymentMoney
().
multiply
(
new
BigDecimal
(
100
));
if
(
wxService
.
getConfig
().
isUseSandboxEnv
()){
//
payRequest.setTotalFee(101);//成功用例
payRequest
.
setTotalFee
(
102
);
//失败用例
payRequest
.
setTotalFee
(
101
);
//成功用例
//
payRequest.setTotalFee(102);//失败用例
}
else
{
payRequest
.
setTotalFee
(
fee
.
intValue
());
}
...
...
@@ -130,7 +130,7 @@ public class ProductOrderService extends ServiceImpl<ProductOrderMapper, Product
payModel
.
setSubject
(
orderPO
.
getOrderName
());
payModel
.
setTotalAmount
(
orderPO
.
getPaymentMoney
().
toString
());
payModel
.
setQuitUrl
(
returnUrl
+
"&result=true"
);
payModel
.
setProductCode
(
"QUICK_WAP_WAY"
);
//todo
payModel
.
setProductCode
(
"QUICK_WAP_WAY"
);
try
{
String
form
=
alipayService
.
prePayOrder
(
payModel
);
return
form
;
...
...
src/main/java/com/qkdata/biz/web/controller/CourseConsumeRecordController.java
View file @
3e660760
...
...
@@ -3,6 +3,7 @@ package com.qkdata.biz.web.controller;
import
com.qkdata.biz.common.BizConstants
;
import
com.qkdata.biz.management.entity.CourseConsumeRecordPO
;
import
com.qkdata.biz.web.vo.SaveConsumeRecord
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.model.Result
;
import
com.qkdata.common.util.UserContext
;
import
io.swagger.annotations.Api
;
...
...
@@ -30,6 +31,7 @@ public class CourseConsumeRecordController {
@ApiOperation
(
"记录课程消耗记录"
)
@PostMapping
(
"/save"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"记录课程消耗记录"
)
public
Result
<
String
>
save
(
@RequestBody
SaveConsumeRecord
model
){
if
(
redisTemplate
.
opsForHash
().
hasKey
(
BizConstants
.
CACHE_KE_CONSUME_RECORD
,
model
.
getUuid
())){
...
...
src/main/java/com/qkdata/biz/web/controller/FrontendProductOrderController.java
View file @
3e660760
...
...
@@ -11,6 +11,7 @@ import com.qkdata.biz.management.service.CourseService;
import
com.qkdata.biz.management.service.ProductOrderService
;
import
com.qkdata.biz.web.vo.CreateOrderModel
;
import
com.qkdata.biz.web.vo.CreateOrderResult
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.exception.BusinessException
;
import
com.qkdata.common.base.model.Result
;
import
com.qkdata.common.util.UserContext
;
...
...
@@ -41,6 +42,7 @@ public class FrontendProductOrderController {
@ApiOperation
(
"购买时新建订单"
)
@PostMapping
(
"/createOrder"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"购买时新建订单"
)
public
Result
<
CreateOrderResult
>
createOrder
(
@RequestBody
CreateOrderModel
model
){
model
.
setUserId
(
UserContext
.
getUserId
());
model
.
setUsername
(
UserContext
.
getUser
().
getUsername
());
...
...
@@ -70,6 +72,7 @@ public class FrontendProductOrderController {
@ApiOperation
(
"查询订单状态"
)
@GetMapping
(
"/user/queryOrderStatus"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"查询订单状态"
)
public
Result
<
ProductOrderStatusEnum
>
queryOrderStatus
(
@RequestParam
String
orderNo
){
ProductOrderStatusEnum
status
=
orderService
.
queryStatus
(
orderNo
);
return
Result
.
succeed
(
status
);
...
...
@@ -77,6 +80,7 @@ public class FrontendProductOrderController {
@ApiOperation
(
"重新支付"
)
@PostMapping
(
"/payAgain"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"重新支付"
)
public
Result
<
CreateOrderResult
>
payAgain
(
@RequestBody
CreateOrderModel
model
){
if
(
StrUtil
.
isBlank
(
model
.
getOrderNo
())){
throw
new
BusinessException
(
"请求错误,订单号不能为空"
);
...
...
@@ -93,6 +97,7 @@ public class FrontendProductOrderController {
@ApiOperation
(
"获取openId"
)
@GetMapping
(
"/openIdByCode"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取openId"
)
public
Result
<
String
>
getOpenIdByCode
(
@RequestParam
String
code
)
throws
WxErrorException
{
WxOAuth2AccessToken
accessToken
=
wxMpService
.
getOAuth2Service
().
getAccessToken
(
code
);
return
Result
.
succeed
(
accessToken
.
getOpenId
());
...
...
@@ -100,6 +105,7 @@ public class FrontendProductOrderController {
@ApiOperation
(
"获取appId"
)
@GetMapping
(
"/appId"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取appId"
)
public
Result
<
String
>
getAppId
(){
return
Result
.
succeed
(
wxMpProperties
.
getAppId
());
}
...
...
src/main/java/com/qkdata/biz/web/controller/LoginController.java
View file @
3e660760
...
...
@@ -33,7 +33,7 @@ public class LoginController {
@ApiOperation
(
"手机号+验证码登陆"
)
@PostMapping
(
"/loginByCode"
)
@SysLog
(
value
=
"手机号+验证码登陆"
,
includeParam
=
false
)
@SysLog
(
value
=
"手机号+验证码登陆"
)
public
Result
<
FullUserInfo
>
loginByCode
(
@RequestBody
@Validated
LoginByCodeModel
model
){
return
Result
.
succeed
(
shiroService
.
loginByCode
(
model
));
...
...
src/main/java/com/qkdata/biz/web/controller/MainPageController.java
View file @
3e660760
...
...
@@ -43,6 +43,7 @@ public class MainPageController {
@ApiOperation
(
"获取配置信息"
)
@GetMapping
(
""
)
@SysLog
(
"获取配置信息"
)
public
Result
<
MainPageModel
>
get
(){
List
<
SwiperConfigModel
>
swiperConfigModels
=
swiperConfigService
.
listConfig
(
SwiperStatusEnum
.
ENABLE
);
List
<
CourseTagPO
>
tagList
=
courseTagService
.
list
(
Wrappers
.<
CourseTagPO
>
lambdaQuery
().
eq
(
CourseTagPO:
:
getRecommend
,
true
));
...
...
@@ -54,6 +55,7 @@ public class MainPageController {
}
@ApiOperation
(
"首页推存课程列表"
)
@PostMapping
(
"/course/recommend/list"
)
@SysLog
(
"首页推存课程列表"
)
public
PageResult
<
SearchCourseResultModel
>
recommendCourseList
(
@RequestBody
SearchCourseConditionModel
model
){
return
courseService
.
mainPageRecommendList
(
model
);
}
...
...
@@ -67,6 +69,7 @@ public class MainPageController {
@ApiOperation
(
"获取全部标签"
)
@GetMapping
(
"/course/tags"
)
@SysLog
(
"获取全部标签"
)
public
Result
<
List
<
CourseTagPO
>>
findCourseTags
(){
List
<
CourseTagPO
>
tags
=
tagService
.
list
();
return
Result
.
succeed
(
tags
);
...
...
@@ -74,6 +77,7 @@ public class MainPageController {
@ApiOperation
(
"详情页关联课程推荐"
)
@GetMapping
(
"/course/recommend/{courseId}"
)
@SysLog
(
"详情页关联课程推荐"
)
public
Result
<
List
<
SearchCourseResultModel
>>
courseRecommend
(
Long
courseId
){
List
<
SearchCourseResultModel
>
list
=
courseService
.
relationRecommend
(
courseId
);
return
Result
.
succeed
(
list
);
...
...
@@ -90,6 +94,7 @@ public class MainPageController {
@ApiOperation
(
"获取教师信息"
)
@GetMapping
(
"/teacher/{teacherId}"
)
@SysLog
(
"获取教师信息"
)
public
Result
<
TeacherPO
>
getTeacherInfo
(
@PathVariable
Long
teacherId
){
return
Result
.
succeed
(
teacherService
.
getById
(
teacherId
));
}
...
...
src/main/java/com/qkdata/biz/web/controller/MyEnterpriseController.java
View file @
3e660760
...
...
@@ -14,6 +14,7 @@ import com.qkdata.biz.management.service.*;
import
com.qkdata.biz.management.vo.*
;
import
com.qkdata.biz.sys.service.SysUserService
;
import
com.qkdata.biz.web.vo.*
;
import
com.qkdata.common.annotation.SysLog
;
import
com.qkdata.common.base.exception.BusinessException
;
import
com.qkdata.common.base.model.PageResult
;
import
com.qkdata.common.base.model.Result
;
...
...
@@ -51,6 +52,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"获取我的企业信息"
)
@GetMapping
(
"/info"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取我的企业信息"
)
public
Result
<
OrganizationPO
>
info
(){
FullUserInfo
userInfo
=
userService
.
findFullUserInfo
(
UserContext
.
getUser
().
getUsername
());
if
(
userInfo
.
getType
()
!=
AccountTypeEnum
.
ENTERPRISE_VIP
||
userInfo
.
getEnterpriseId
()
==
null
){
...
...
@@ -66,6 +68,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"获取企业课程列表"
)
@PostMapping
(
"/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取企业课程列表"
)
public
PageResult
<
SearchCourseResultModel
>
list
(
@RequestBody
QueryMyEnterpriseCourseModel
model
){
FullUserInfo
userInfo
=
userService
.
findFullUserInfo
(
UserContext
.
getUser
().
getUsername
());
if
(
userInfo
.
getType
()
!=
AccountTypeEnum
.
ENTERPRISE_VIP
||
userInfo
.
getEnterpriseId
()
==
null
){
...
...
@@ -76,6 +79,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"获取企业会员余额"
)
@GetMapping
(
"/orgSurplus"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取企业会员余额"
)
public
Result
<
OrgSurplusPO
>
getOrgSurplus
(){
Long
orgId
=
userService
.
getUserEnterpriesId
(
UserContext
.
getUserId
());
OrgSurplusPO
result
=
orgSurplusService
.
getOne
(
Wrappers
.<
OrgSurplusPO
>
lambdaQuery
().
eq
(
OrgSurplusPO:
:
getOrgId
,
orgId
).
eq
(
OrgSurplusPO:
:
getProductType
,
ProductTypeEnum
.
ENTERPRISE_VIP
));
...
...
@@ -84,6 +88,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"获取企业购买课程余额列表"
)
@PostMapping
(
"/orgCourseSurplus"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取企业购买课程余额列表"
)
public
PageResult
<
OrgCourseSurplusModel
>
orgCourseSurplusList
(
@RequestBody
QueryOrgCourseSurplusModel
model
){
Long
orgId
=
userService
.
getUserEnterpriesId
(
UserContext
.
getUserId
());
model
.
setOrgId
(
orgId
);
...
...
@@ -92,6 +97,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"领取会员"
)
@GetMapping
(
"/receiveVIP"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"领取会员"
)
public
Result
<
String
>
receiveVIP
(){
userService
.
receiveOrgVIP
();
return
Result
.
succeed
(
"ok"
);
...
...
@@ -99,6 +105,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"领取企业购买课程"
)
@GetMapping
(
"/receiveCourse/{courseId}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"领取企业购买课程"
)
public
Result
<
String
>
receiveCourse
(
@PathVariable
Long
courseId
){
userService
.
receiveOrgCourse
(
courseId
);
return
Result
.
succeed
(
"ok"
);
...
...
@@ -106,6 +113,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"领取会员历史记录列表"
)
@PostMapping
(
"/history/receiveVIP"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"领取会员历史记录列表"
)
public
PageResult
<
OrgUserReceiveRecordModel
>
receiveVIPHistory
(
@RequestBody
QueryReceiveHistoryModel
model
){
model
.
setUserId
(
UserContext
.
getUserId
());
return
orgUserReceiveRecordService
.
queryPageList
(
model
);
...
...
@@ -115,6 +123,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"修改企业信息"
)
@PostMapping
(
"/info/update"
)
@RequiresRoles
(
value
=
BizConstants
.
ROLE_ENTERPRISE_ADMIN
)
@SysLog
(
"修改企业信息"
)
public
Result
<
String
>
updateOrgInfo
(
@RequestBody
OrganizationPO
orgInfo
){
orgService
.
updateById
(
orgInfo
);
return
Result
.
succeed
(
"ok"
);
...
...
@@ -122,6 +131,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"企业成员列表"
)
@PostMapping
(
"/member/list"
)
@RequiresRoles
(
value
=
BizConstants
.
ROLE_ENTERPRISE_ADMIN
)
@SysLog
(
"企业成员列表"
)
public
PageResult
<
MemberListModel
>
memberList
(
@RequestBody
QueryMemberModel
model
){
if
(
model
.
getOrgId
()
==
null
){
throw
new
BusinessException
(
"请求参数错误,企业ID不能为空"
);
...
...
@@ -131,19 +141,25 @@ public class MyEnterpriseController {
@ApiOperation
(
"获取企业成员详情"
)
@GetMapping
(
"/memeber/detail"
)
@RequiresRoles
(
value
=
BizConstants
.
ROLE_ENTERPRISE_ADMIN
)
public
Result
<
Map
<
String
,
Object
>>
memberDetail
(
@RequestParam
String
username
){
Map
<
String
,
Object
>
map
=
Maps
.
newConcurrentMap
();
@SysLog
(
"获取企业成员详情"
)
public
Result
<
MemberInfoModel
>
memberDetail
(
@RequestParam
String
username
){
MemberInfoModel
memberInfo
=
memberService
.
getByUsername
(
username
,
true
);
map
.
put
(
"memberInfo"
,
memberInfo
);
return
Result
.
succeed
(
memberInfo
);
}
@ApiOperation
(
"企业成员领取记录"
)
@GetMapping
(
"/member/receive/record"
)
@RequiresRoles
(
value
=
BizConstants
.
ROLE_ENTERPRISE_ADMIN
)
@SysLog
(
"企业成员领取记录"
)
public
PageResult
<
OrgUserReceiveRecordModel
>
memberReceiveRecord
(
@RequestParam
Long
memberId
){
QueryReceiveHistoryModel
query
=
new
QueryReceiveHistoryModel
();
query
.
setUserId
(
UserContext
.
getUserId
());
PageResult
<
OrgUserReceiveRecordModel
>
pageResult
=
orgUserReceiveRecordService
.
queryPageList
(
query
);
map
.
put
(
"receiveRecordList"
,
pageResult
);
return
Result
.
succeed
(
map
);
query
.
setUserId
(
memberId
);
return
orgUserReceiveRecordService
.
queryPageList
(
query
);
}
@ApiOperation
(
"获取企业会员、点播库领取配置"
)
@GetMapping
(
"/receiveConfig"
)
@RequiresRoles
(
value
=
BizConstants
.
ROLE_ENTERPRISE_ADMIN
)
@SysLog
(
"获取企业会员、点播库领取配置"
)
public
Result
<
EnterpriesReceiveConfig
>
receiveConfig
(){
EnterpriesReceiveConfig
config
=
new
EnterpriesReceiveConfig
();
Long
userId
=
UserContext
.
getUserId
();
...
...
@@ -158,6 +174,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"修改企业会员、点播库领取配置"
)
@GetMapping
(
"/receiveConfig/save"
)
@RequiresRoles
(
value
=
BizConstants
.
ROLE_ENTERPRISE_ADMIN
)
@SysLog
(
"修改企业会员、点播库领取配置"
)
public
Result
<
String
>
receiveConfigSave
(
@RequestBody
EnterpriesReceiveConfig
model
){
EnterpriesReceiveConfig
config
=
new
EnterpriesReceiveConfig
();
Long
userId
=
UserContext
.
getUserId
();
...
...
@@ -174,6 +191,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"企业购买记录列表"
)
@PostMapping
(
"/order/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ENTERPRISE_ADMIN
})
@SysLog
(
"企业购买记录列表"
)
public
PageResult
<
ProductOrderModel
>
userOrderList
(
@RequestBody
QueryProductOrderModel
model
){
model
.
setEnterprise
(
true
);
model
.
setOrgId
(
userService
.
getUserEnterpriesId
(
UserContext
.
getUserId
()));
...
...
@@ -182,6 +200,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"添加企业成员"
)
@PostMapping
(
"/member/add"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ENTERPRISE_ADMIN
})
@SysLog
(
"添加企业成员"
)
public
Result
<
String
>
addMember
(
@RequestBody
@Validated
AddMemberModel
model
){
Long
orgId
=
userService
.
getUserEnterpriesId
(
UserContext
.
getUserId
());
MemberInfoModel
memberInfo
=
new
MemberInfoModel
();
...
...
@@ -197,6 +216,7 @@ public class MyEnterpriseController {
@ApiOperation
(
"删除成员"
)
@GetMapping
(
"/member/delete"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ENTERPRISE_ADMIN
})
@SysLog
(
"删除成员"
)
public
Result
<
String
>
deleteMember
(
@RequestParam
Long
userId
){
//todo
return
Result
.
succeed
(
"ok"
);
...
...
src/main/java/com/qkdata/biz/web/controller/UserCenterController.java
View file @
3e660760
...
...
@@ -39,6 +39,7 @@ public class UserCenterController {
@ApiOperation
(
"获取个人信息"
)
@GetMapping
(
"/userInfo"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取个人信息"
)
public
Result
<
FullUserInfo
>
userInfo
(){
String
username
=
UserContext
.
getUser
().
getUsername
();
FullUserInfo
userInfo
=
sysUserService
.
findFullUserInfo
(
username
);
...
...
@@ -47,6 +48,7 @@ public class UserCenterController {
@ApiOperation
(
"修改个人信息"
)
@PostMapping
(
"/userInfo/modify"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"修改个人信息"
)
public
Result
<
String
>
modifyUserInfo
(
@RequestBody
ModifyUserInfoModel
model
){
model
.
setId
(
UserContext
.
getUserId
());
sysUserService
.
modifyUserInfo
(
model
);
...
...
@@ -55,6 +57,7 @@ public class UserCenterController {
@ApiOperation
(
"获取收藏列表"
)
@PostMapping
(
"/myFavorite/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取收藏列表"
)
public
PageResult
<
SearchCourseResultModel
>
myFavoriteList
(
@RequestBody
QueryFavoriteCourseModel
model
){
return
userCenterService
.
myFavoriteQueryPageList
(
model
);
}
...
...
@@ -101,6 +104,7 @@ public class UserCenterController {
@ApiOperation
(
"已购课程列表"
)
@PostMapping
(
"/course/buy/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"已购课程列表"
)
public
PageResult
<
BuyCourseListItem
>
buyCourseList
(
@RequestBody
QueryBuyCourseListModel
model
){
model
.
setUserId
(
UserContext
.
getUserId
());
return
courseService
.
queryBuyCourseList
(
model
);
...
...
@@ -108,6 +112,7 @@ public class UserCenterController {
@ApiOperation
(
"用户购买记录列表"
)
@PostMapping
(
"/user/order/list"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"用户购买记录列表"
)
public
PageResult
<
ProductOrderModel
>
userOrderList
(
@RequestBody
QueryProductOrderModel
model
){
model
.
setUsername
(
UserContext
.
getUser
().
getUsername
());
return
orderService
.
queryPageList
(
model
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment