Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
cloud-web
Commits
fe0b8c47
Commit
fe0b8c47
authored
Dec 02, 2024
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问卷调查优化
parent
64b2208d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
10 deletions
+38
-10
cloud-web-student/src/main/java/com/yizhi/application/project/controller/TrainingProjectController.java
+3
-1
cloud-web-student/src/main/java/com/yizhi/application/protal/constant/BannerNameEnum.java
+1
-1
cloud-web-student/src/main/java/com/yizhi/application/protal/controller/BannerApiController.java
+20
-1
cloud-web-student/src/main/java/com/yizhi/application/research/controller/ResearchController.java
+3
-2
cloud-web-student/src/main/java/com/yizhi/application/system/controller/SystemController.java
+11
-5
No files found.
cloud-web-student/src/main/java/com/yizhi/application/project/controller/TrainingProjectController.java
View file @
fe0b8c47
...
@@ -107,6 +107,8 @@ public class TrainingProjectController {
...
@@ -107,6 +107,8 @@ public class TrainingProjectController {
}
}
}
}
}
}
/*//2024-11-28注释,不需要调用课程服务
List<Long> trProectIds = new ArrayList<>();
List<Long> trProectIds = new ArrayList<>();
if (!CollectionUtils.isEmpty(listVos)) {
if (!CollectionUtils.isEmpty(listVos)) {
for (TrainingProjectListVo tr : listVos) {
for (TrainingProjectListVo tr : listVos) {
...
@@ -125,7 +127,7 @@ public class TrainingProjectController {
...
@@ -125,7 +127,7 @@ public class TrainingProjectController {
}
}
}
}
}
}
}
}
*/
return
Response
.
ok
(
resultPage
);
return
Response
.
ok
(
resultPage
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
""
,
e
);
LOGGER
.
error
(
""
,
e
);
...
...
cloud-web-student/src/main/java/com/yizhi/application/protal/constant/BannerNameEnum.java
View file @
fe0b8c47
...
@@ -2,7 +2,7 @@ package com.yizhi.application.protal.constant;
...
@@ -2,7 +2,7 @@ package com.yizhi.application.protal.constant;
public
enum
BannerNameEnum
{
public
enum
BannerNameEnum
{
MARKET
(
"营销"
),
TRAIN
(
"项目"
),
HOMEPAGE
(
"首页"
),
COURSE
(
"课程"
),
NEWS
(
"新闻资讯"
),
ALBUM
(
"专辑"
),
TRAIN_EXAM
(
"培训测验"
);
MARKET
(
"营销"
),
TRAIN
(
"项目"
),
HOMEPAGE
(
"首页"
),
COURSE
(
"课程"
),
NEWS
(
"新闻资讯"
),
ALBUM
(
"专辑"
),
TRAIN_EXAM
(
"培训测验"
)
,
RESEARCH
(
"问卷调查"
)
;
private
String
key
;
private
String
key
;
...
...
cloud-web-student/src/main/java/com/yizhi/application/protal/controller/BannerApiController.java
View file @
fe0b8c47
...
@@ -7,6 +7,8 @@ import com.yizhi.application.protal.constant.BannerNameEnum;
...
@@ -7,6 +7,8 @@ import com.yizhi.application.protal.constant.BannerNameEnum;
import
com.yizhi.application.protal.constant.TerminalEnum
;
import
com.yizhi.application.protal.constant.TerminalEnum
;
import
com.yizhi.core.application.context.ContextHolder
;
import
com.yizhi.core.application.context.ContextHolder
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.core.application.context.RequestContext
;
import
com.yizhi.research.application.feign.ResearchClient
;
import
com.yizhi.research.application.vo.domain.ResearchVo
;
import
com.yizhi.site.application.feign.BannerManageFeignClients
;
import
com.yizhi.site.application.feign.BannerManageFeignClients
;
import
com.yizhi.site.application.vo.site.AllHomeBannerImageVO
;
import
com.yizhi.site.application.vo.site.AllHomeBannerImageVO
;
import
com.yizhi.site.application.vo.site.ImageListVO
;
import
com.yizhi.site.application.vo.site.ImageListVO
;
...
@@ -43,13 +45,16 @@ public class BannerApiController {
...
@@ -43,13 +45,16 @@ public class BannerApiController {
@Autowired
@Autowired
TrainingProjectClient
trainingProjectClient
;
TrainingProjectClient
trainingProjectClient
;
@Autowired
ResearchClient
researchClient
;
/**
/**
* 所有首页 轮播图
* 所有首页 轮播图
*/
*/
@ApiOperation
(
value
=
"轮播学员端管理"
,
notes
=
"轮播学员端管理"
,
response
=
ImageListVO
.
class
)
@ApiOperation
(
value
=
"轮播学员端管理"
,
notes
=
"轮播学员端管理"
,
response
=
ImageListVO
.
class
)
@PostMapping
(
value
=
"/home/image/list"
)
@PostMapping
(
value
=
"/home/image/list"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"bannerName"
,
value
=
"轮播图所属栏目, MARKET:营销, TRAIN:培训, HOMEPAGE:首页, COURSE:课程, NEWS:新闻资讯,ALBUM:专辑;TRAIN_EXAM:培训测验"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"bannerName"
,
value
=
"轮播图所属栏目, MARKET:营销, TRAIN:培训, HOMEPAGE:首页, COURSE:课程, NEWS:新闻资讯,ALBUM:专辑;TRAIN_EXAM:培训测验
;RESEARCH:问卷调查
"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"terminalName"
,
value
=
"终端名称, PC端:PC; APP: MOBILE; 微信: WECHAT"
,
dataType
=
"Long"
)
@ApiImplicitParam
(
name
=
"terminalName"
,
value
=
"终端名称, PC端:PC; APP: MOBILE; 微信: WECHAT"
,
dataType
=
"Long"
)
})
})
public
Response
<
List
<
ImageListVO
>>
listAllHomeBannerImage
(
@RequestBody
AllHomeBannerImageVO
vo
){
public
Response
<
List
<
ImageListVO
>>
listAllHomeBannerImage
(
@RequestBody
AllHomeBannerImageVO
vo
){
...
@@ -90,6 +95,20 @@ public class BannerApiController {
...
@@ -90,6 +95,20 @@ public class BannerApiController {
result
.
add
(
img
);
result
.
add
(
img
);
}
}
}
}
}
else
if
(
vo
!=
null
&&
BannerNameEnum
.
RESEARCH
.
getKey
().
equals
(
vo
.
getBannerName
())){
List
<
ResearchVo
>
list
=
researchClient
.
getResearchTop
(
1
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
result
=
new
ArrayList
<
ImageListVO
>(
1
);
for
(
ResearchVo
item
:
list
){
ImageListVO
img
=
new
ImageListVO
();
img
.
setImgTitle
(
item
.
getName
());
img
.
setId
(
item
.
getId
());
img
.
setBannerPath
(
item
.
getLogoImg
());
img
.
setCreateByName
(
item
.
getCreateByName
());
img
.
setCreateTime
(
item
.
getCreateTime
());
result
.
add
(
img
);
}
}
}
else
{
}
else
{
result
=
bannerManageFeignClients
.
listAllHomeBannerImage
(
vo
);
result
=
bannerManageFeignClients
.
listAllHomeBannerImage
(
vo
);
}
}
...
...
cloud-web-student/src/main/java/com/yizhi/application/research/controller/ResearchController.java
View file @
fe0b8c47
...
@@ -39,8 +39,8 @@ public class ResearchController {
...
@@ -39,8 +39,8 @@ public class ResearchController {
@GetMapping
(
"/page/list"
)
@GetMapping
(
"/page/list"
)
@ApiOperation
(
value
=
"分页查询学员能看到的调研"
,
notes
=
"分两种状态"
,
response
=
ResearchVo
.
class
)
@ApiOperation
(
value
=
"分页查询学员能看到的调研"
,
notes
=
"分两种状态"
,
response
=
ResearchVo
.
class
)
public
Response
<
ResearchVo
>
listPage
(
public
Response
<
ResearchVo
>
listPage
(
@ApiParam
(
name
=
"state"
,
value
=
"状态:1已完成,2进行中"
,
required
=
true
)
@RequestParam
(
"state"
)
Integer
state
,
@ApiParam
(
name
=
"state"
,
value
=
"状态:1已完成,2进行中"
,
required
=
false
)
@RequestParam
(
name
=
"state"
,
required
=
false
)
Integer
state
,
@ApiParam
(
name
=
"bizType"
,
value
=
"业务类型:1调研(问卷、投票);2考试测验,默认1"
,
required
=
true
)
@RequestParam
(
name
=
"bizType"
,
defaultValue
=
"1"
)
Integer
bizType
,
@ApiParam
(
name
=
"pageNo"
,
value
=
"跳转页数,默认第一页"
,
required
=
true
)
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@ApiParam
(
name
=
"pageNo"
,
value
=
"跳转页数,默认第一页"
,
required
=
true
)
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@ApiParam
(
name
=
"pageSize"
,
value
=
"每页条数,默认20条"
,
required
=
true
)
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
@ApiParam
(
name
=
"pageSize"
,
value
=
"每页条数,默认20条"
,
required
=
true
)
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
)
{
)
{
...
@@ -53,6 +53,7 @@ public class ResearchController {
...
@@ -53,6 +53,7 @@ public class ResearchController {
pageVo
.
setPageNo
(
pageNo
);
pageVo
.
setPageNo
(
pageNo
);
pageVo
.
setPageSize
(
pageSize
);
pageVo
.
setPageSize
(
pageSize
);
pageVo
.
setState
(
state
);
pageVo
.
setState
(
state
);
pageVo
.
setBizType
(
bizType
);
com
.
yizhi
.
research
.
application
.
vo
.
BaseModel
<
PageVo
>
model
=
new
BaseModel
<>();
com
.
yizhi
.
research
.
application
.
vo
.
BaseModel
<
PageVo
>
model
=
new
BaseModel
<>();
model
.
setDate
(
new
Date
());
model
.
setDate
(
new
Date
());
model
.
setObj
(
pageVo
);
model
.
setObj
(
pageVo
);
...
...
cloud-web-student/src/main/java/com/yizhi/application/system/controller/SystemController.java
View file @
fe0b8c47
...
@@ -215,16 +215,19 @@ public class SystemController {
...
@@ -215,16 +215,19 @@ public class SystemController {
//我的消息
//我的消息
Integer
sum
=
null
;
Integer
sum
=
null
;
try
{
try
{
// sum = messageClient.unreadCount(ContextHolder.get().getAccountId());
/*//2024-11-2需求不需要统计数据,先注释
sum = messageClient.unreadCount(ContextHolder.get().getAccountId());*/
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
MyItemVO
xx
=
new
MyItemVO
(
ItemCode
.
XX
.
getCode
(),
ItemCode
.
XX
.
getName
(),
sum
==
null
?
0
:
sum
);
/*
MyItemVO xx = new MyItemVO(ItemCode.XX.getCode(), ItemCode.XX.getName(), sum == null ? 0 : sum);
if (!data2.contains(xx)) {
if (!data2.contains(xx)) {
data2.add(xx);
data2.add(xx);
}
}
*/
//课程收藏
//课程收藏
Integer
courseCount
=
0
;
Integer
courseCount
=
0
;
/*//2024-11-2需求不需要统计数据,先注释
try {
try {
courseCount = courseClient.getMyFavoriteCount(context.getAccountId(), context.getCompanyId(), context.getSiteId());
courseCount = courseClient.getMyFavoriteCount(context.getAccountId(), context.getCompanyId(), context.getSiteId());
Integer courseCount1 = studentCaseClient.getFavoritesCount(context.getCompanyId(), context.getSiteId(), context.getAccountId());
Integer courseCount1 = studentCaseClient.getFavoritesCount(context.getCompanyId(), context.getSiteId(), context.getAccountId());
...
@@ -235,7 +238,7 @@ public class SystemController {
...
@@ -235,7 +238,7 @@ public class SystemController {
}
}
} catch (Exception e) {
} catch (Exception e) {
LOG.info("异常信息={}", e);
LOG.info("异常信息={}", e);
}
}
*/
MyItemVO
kcsc
=
new
MyItemVO
(
ItemCode
.
KCSC
.
getCode
(),
ItemCode
.
KCSC
.
getName
(),
courseCount
==
null
?
0
:
courseCount
);
MyItemVO
kcsc
=
new
MyItemVO
(
ItemCode
.
KCSC
.
getCode
(),
ItemCode
.
KCSC
.
getName
(),
courseCount
==
null
?
0
:
courseCount
);
data1
.
put
(
ItemCode
.
KCSC
.
getCode
(),
kcsc
);
data1
.
put
(
ItemCode
.
KCSC
.
getCode
(),
kcsc
);
}
}
...
@@ -248,6 +251,8 @@ public class SystemController {
...
@@ -248,6 +251,8 @@ public class SystemController {
private
void
getApiData
(
List
<
MyItemConfigVO
>
voList
,
RequestContext
context
,
List
<
MyItemVO
>
data2
)
{
private
void
getApiData
(
List
<
MyItemConfigVO
>
voList
,
RequestContext
context
,
List
<
MyItemVO
>
data2
)
{
for
(
MyItemConfigVO
vo
:
voList
)
{
for
(
MyItemConfigVO
vo
:
voList
)
{
MyItemVO
item
=
new
MyItemVO
();
MyItemVO
item
=
new
MyItemVO
();
/*//2024-11-2需求不需要统计数据,先注释
switch (vo.getItemType()) {
switch (vo.getItemType()) {
case 1://我的培训
case 1://我的培训
BaseModel<TrainingProjectParamVo> model = new BaseModel<>();
BaseModel<TrainingProjectParamVo> model = new BaseModel<>();
...
@@ -426,10 +431,11 @@ public class SystemController {
...
@@ -426,10 +431,11 @@ public class SystemController {
break;
break;
default:
default:
break;
break;
}
}
*/
item
.
setCode
(
vo
.
getWeixinCode
());
item
.
setCode
(
vo
.
getWeixinCode
());
item
.
setName
(
vo
.
getName
());
item
.
setName
(
vo
.
getName
());
item
.
setSortNo
(
vo
.
getSort
());
item
.
setSortNo
(
vo
.
getSort
());
item
.
setLogoImg
(
vo
.
getLogoImg
());
data2
.
add
(
item
);
data2
.
add
(
item
);
LOG
.
info
(
"---栏目名:"
+
item
.
getName
()
+
"---统计数据:"
+
item
.
getQuantity
());
LOG
.
info
(
"---栏目名:"
+
item
.
getName
()
+
"---统计数据:"
+
item
.
getQuantity
());
}
}
...
...
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