Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resource_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高宇
tea_resource_api
Commits
d125e9f8
Commit
d125e9f8
authored
Sep 03, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了bug
parent
c00b32da
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
PCSysUserServiceImpl.java
...t/business/sysuser/service/impl/PCSysUserServiceImpl.java
+34
-1
TeaTrialCourseController.java
...s/teatrialcourse/controller/TeaTrialCourseController.java
+2
-2
No files found.
src/main/java/org/rcisoft/business/sysuser/service/impl/PCSysUserServiceImpl.java
View file @
d125e9f8
...
@@ -788,7 +788,10 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
...
@@ -788,7 +788,10 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
List
<
String
>
statusIsIncorrect
=
new
ArrayList
<>();
List
<
String
>
statusIsIncorrect
=
new
ArrayList
<>();
//姓名
//姓名
List
<
String
>
nameIsIncorrect
=
new
ArrayList
<>();
List
<
String
>
nameIsIncorrect
=
new
ArrayList
<>();
//角色名称
List
<
String
>
roleNameIncorrect
=
new
ArrayList
<>();
//小组名称
List
<
String
>
groupNameIncorrect
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
pcUserImportDTOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
pcUserImportDTOS
))
{
...
@@ -810,6 +813,20 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
...
@@ -810,6 +813,20 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
if
(
StringUtils
.
isEmpty
(
pcUserImportDTO
.
getName
())
||
pcUserImportDTO
.
getName
().
length
()
>
20
)
{
if
(
StringUtils
.
isEmpty
(
pcUserImportDTO
.
getName
())
||
pcUserImportDTO
.
getName
().
length
()
>
20
)
{
errorNum
+=
1
;
errorNum
+=
1
;
nameIsIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
nameIsIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
continue
;
}
//角色名称长度
if
(
StringUtils
.
isEmpty
(
pcUserImportDTO
.
getRoleNames
())
||
pcUserImportDTO
.
getRoleNames
().
length
()
>
100
)
{
errorNum
+=
1
;
roleNameIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
continue
;
}
//小组名称长度
if
(
StringUtils
.
isEmpty
(
pcUserImportDTO
.
getGroupNames
())
||
pcUserImportDTO
.
getGroupNames
().
length
()
>
20
)
{
errorNum
+=
1
;
groupNameIncorrect
.
add
(
String
.
valueOf
(
i
+
1
));
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
// errorMessage.append("第").append(i + 1).append("条姓名错误数据导入失败").append("\n");
continue
;
continue
;
}
}
...
@@ -963,6 +980,14 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
...
@@ -963,6 +980,14 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
if
(
nameIsIncorrect
.
size
()
>
0
)
{
if
(
nameIsIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
nameIsIncorrect
)
+
"】条姓名数据有问题"
));
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
nameIsIncorrect
)
+
"】条姓名数据有问题"
));
}
}
//角色名称
if
(
roleNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
roleNameIncorrect
)
+
"】条角色名称数据有问题"
));
}
//小组名称
if
(
groupNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
groupNameIncorrect
)
+
"】条小组名称数据有问题"
));
}
return
successNum
+
"条数据导入成功,"
+
errorMessage
;
return
successNum
+
"条数据导入成功,"
+
errorMessage
;
}
else
{
}
else
{
//list判断将登录名重复的拼接成stirng.stream流
//list判断将登录名重复的拼接成stirng.stream流
...
@@ -986,6 +1011,14 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
...
@@ -986,6 +1011,14 @@ public class PCSysUserServiceImpl extends ServiceImpl<PCSysUserRepository, SysUs
if
(
nameIsIncorrect
.
size
()
>
0
)
{
if
(
nameIsIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
nameIsIncorrect
)
+
"】条姓名数据有问题"
));
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
nameIsIncorrect
)
+
"】条姓名数据有问题"
));
}
}
//角色名称
if
(
roleNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
roleNameIncorrect
)
+
"】条角色名称数据有问题"
));
}
//小组名称
if
(
groupNameIncorrect
.
size
()
>
0
)
{
errorMessage
=
errorMessage
.
append
(
new
StringBuilder
(
"第【"
+
String
.
join
(
","
,
groupNameIncorrect
)
+
"】条小组名称数据有问题"
));
}
throw
new
CyServiceException
(
"导入失败:"
+
errorMessage
);
throw
new
CyServiceException
(
"导入失败:"
+
errorMessage
);
}
}
}
else
{
}
else
{
...
...
src/main/java/org/rcisoft/business/teatrialcourse/controller/TeaTrialCourseController.java
View file @
d125e9f8
...
@@ -183,7 +183,7 @@ public class TeaTrialCourseController extends CyPaginationController<TeaTrialCou
...
@@ -183,7 +183,7 @@ public class TeaTrialCourseController extends CyPaginationController<TeaTrialCou
//PC端查询开课课程
//PC端查询开课课程
//@PreAuthorize("@cyPerm.hasPerm('sys:trialCourse:list')")
//@PreAuthorize("@cyPerm.hasPerm('sys:trialCourse:list')")
//
@PreAuthorize("@cyPerm.hasPerm('opm:teatrialcourse:queryTeaTrialCourses')")
@PreAuthorize
(
"@cyPerm.hasPerm('opm:teatrialcourse:queryTeaTrialCourses')"
)
@CyOpeLogAnno
(
title
=
"system-试用开课管理-查询试用开课"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@CyOpeLogAnno
(
title
=
"system-试用开课管理-查询试用开课"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询试用开课集合"
,
notes
=
"查询试用开课集合"
)
@ApiOperation
(
value
=
"查询试用开课集合"
,
notes
=
"查询试用开课集合"
)
@GetMapping
(
value
=
"/queryTeaTrialCourses"
)
@GetMapping
(
value
=
"/queryTeaTrialCourses"
)
...
@@ -196,7 +196,7 @@ public class TeaTrialCourseController extends CyPaginationController<TeaTrialCou
...
@@ -196,7 +196,7 @@ public class TeaTrialCourseController extends CyPaginationController<TeaTrialCou
// 管理端查询开课课程
// 管理端查询开课课程
//@PreAuthorize("@cyPerm.hasPerm('sys:trialCourse:list')")
//@PreAuthorize("@cyPerm.hasPerm('sys:trialCourse:list')")
//
@PreAuthorize("@cyPerm.hasPerm('opm:teatrialcourse:queryTeaTrialCourses')")
@PreAuthorize
(
"@cyPerm.hasPerm('opm:teatrialcourse:queryTeaTrialCourses')"
)
@CyOpeLogAnno
(
title
=
"system-试用开课管理-查询试用开课"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@CyOpeLogAnno
(
title
=
"system-试用开课管理-查询试用开课"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询试用开课集合"
,
notes
=
"分页查询试用开课集合"
)
@ApiOperation
(
value
=
"分页查询试用开课集合"
,
notes
=
"分页查询试用开课集合"
)
@GetMapping
(
value
=
"/queryTeaTrialCourseByPagination"
)
@GetMapping
(
value
=
"/queryTeaTrialCourseByPagination"
)
...
...
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