Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
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
吴学德
gdtel-gztel-school-center
Commits
84bd493a
Commit
84bd493a
authored
Apr 08, 2020
by
彭祥礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台管理增加网点编码和网点名称字段
parent
07dd91e7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
common/src/main/java/com/winsun/bean/School.java
+8
-4
core-service/src/main/java/com/winsun/item/modular/system/controller/GetPhoneCodeController.java
+0
-1
service-manager/src/main/java/com/winsun/controller/SchoolManagementController.java
+13
-17
No files found.
common/src/main/java/com/winsun/bean/School.java
View file @
84bd493a
...
@@ -103,8 +103,12 @@ public class School implements Serializable {
...
@@ -103,8 +103,12 @@ public class School implements Serializable {
* 是否显示融合
* 是否显示融合
*/
*/
private
String
isShowrh
;
private
String
isShowrh
;
/**
* 网点编码
*/
private
String
networkCode
;
/**
* 网点名称
*/
private
String
networkName
;
}
}
core-service/src/main/java/com/winsun/item/modular/system/controller/GetPhoneCodeController.java
View file @
84bd493a
...
@@ -84,7 +84,6 @@ public class GetPhoneCodeController extends BaseController {
...
@@ -84,7 +84,6 @@ public class GetPhoneCodeController extends BaseController {
if
(
expire
>(
60
*
4
)){
if
(
expire
>(
60
*
4
)){
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"message"
,
"请勿频繁发送手机验证码操作!"
);
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"message"
,
"请勿频繁发送手机验证码操作!"
);
}
}
log
.
info
(
"验证码:"
+
verificationCode
);
stringRedisTemplate
.
opsForValue
().
set
(
code
,
verificationCode
,
CODETIME
,
TimeUnit
.
MILLISECONDS
);
stringRedisTemplate
.
opsForValue
().
set
(
code
,
verificationCode
,
CODETIME
,
TimeUnit
.
MILLISECONDS
);
Map
<
String
,
Object
>
sent
=
new
HashMap
<>();
Map
<
String
,
Object
>
sent
=
new
HashMap
<>();
sent
.
put
(
"code"
,
400
);
sent
.
put
(
"code"
,
400
);
...
...
service-manager/src/main/java/com/winsun/controller/SchoolManagementController.java
View file @
84bd493a
...
@@ -8,8 +8,8 @@ import com.winsun.auth.core.annotion.Permission;
...
@@ -8,8 +8,8 @@ import com.winsun.auth.core.annotion.Permission;
import
com.winsun.auth.core.base.controller.BaseController
;
import
com.winsun.auth.core.base.controller.BaseController
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.shiro.ShiroUser
;
import
com.winsun.auth.core.shiro.ShiroUser
;
import
com.winsun.bean.*
;
import
com.winsun.bean.Package
;
import
com.winsun.bean.Package
;
import
com.winsun.bean.*
;
import
com.winsun.constant.FilePath
;
import
com.winsun.constant.FilePath
;
import
com.winsun.mapper.*
;
import
com.winsun.mapper.*
;
import
com.winsun.utils.FileUtil
;
import
com.winsun.utils.FileUtil
;
...
@@ -47,8 +47,6 @@ public class SchoolManagementController extends BaseController {
...
@@ -47,8 +47,6 @@ public class SchoolManagementController extends BaseController {
private
static
ProductMapper
productMapper
;
private
static
ProductMapper
productMapper
;
private
static
NetworkInfoMapper
networkInfoMapper
;
//默认路径
//默认路径
private
static
String
DEFAULTPATH
=
"images/schoolPartner/"
;
private
static
String
DEFAULTPATH
=
"images/schoolPartner/"
;
...
@@ -61,13 +59,13 @@ public class SchoolManagementController extends BaseController {
...
@@ -61,13 +59,13 @@ public class SchoolManagementController extends BaseController {
SchoolManagementController
.
schoolPackageMapper
=
schoolPackageMapper
;
SchoolManagementController
.
schoolPackageMapper
=
schoolPackageMapper
;
SchoolManagementController
.
packageMapper
=
packageMapper
;
SchoolManagementController
.
packageMapper
=
packageMapper
;
SchoolManagementController
.
productMapper
=
productMapper
;
SchoolManagementController
.
productMapper
=
productMapper
;
SchoolManagementController
.
networkInfoMapper
=
networkInfoMapper
;
}
}
@Permission
(
menuname
=
"添加学校信息"
,
value
=
"insert"
,
method
=
RequestMethod
.
POST
)
@Permission
(
menuname
=
"添加学校信息"
,
value
=
"insert"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
insertSchool
(
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
"schoolName"
)
String
schoolName
,
@RequestParam
(
"netId"
)
String
netId
,
public
ResponseData
<
String
>
insertSchool
(
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
"schoolName"
)
String
schoolName
,
@RequestParam
(
"netId"
)
String
netId
,
@RequestParam
(
"lzgh"
)
String
lzgh
,
@RequestParam
(
"bandproductId"
)
String
bandproductId
,
@RequestParam
(
"netPhone"
)
String
netPhone
,
@RequestParam
(
"isShowband"
)
String
isShowband
,
@RequestParam
(
"lzgh"
)
String
lzgh
,
@RequestParam
(
"bandproductId"
)
String
bandproductId
,
@RequestParam
(
"netPhone"
)
String
netPhone
,
@RequestParam
(
"isShowrh"
)
String
isShowrh
,
@RequestParam
(
"isRecv"
)
String
isRecv
,
@RequestParam
(
"chosePages"
)
String
chosePages
)
{
@RequestParam
(
"isShowband"
)
String
isShowband
,
@RequestParam
(
"isShowrh"
)
String
isShowrh
,
@RequestParam
(
"isRecv"
)
String
isRecv
,
@RequestParam
(
"chosePages"
)
String
chosePages
,
@RequestParam
(
"networkCode"
)
String
networkCode
,
@RequestParam
(
"networkName"
)
String
networkName
)
{
School
school
=
new
School
();
School
school
=
new
School
();
school
.
setBandproductId
(
bandproductId
);
school
.
setBandproductId
(
bandproductId
);
...
@@ -80,6 +78,8 @@ public class SchoolManagementController extends BaseController {
...
@@ -80,6 +78,8 @@ public class SchoolManagementController extends BaseController {
school
.
setSubName
(
subName
);
school
.
setSubName
(
subName
);
school
.
setIsShowband
(
isShowband
);
school
.
setIsShowband
(
isShowband
);
school
.
setIsShowrh
(
isShowrh
);
school
.
setIsShowrh
(
isShowrh
);
school
.
setNetworkCode
(
networkCode
);
school
.
setNetworkName
(
networkName
);
if
(
StringUtils
.
isNotBlank
(
netPhone
)){
if
(
StringUtils
.
isNotBlank
(
netPhone
)){
school
.
setNetPhone
(
Integer
.
valueOf
(
netPhone
));
school
.
setNetPhone
(
Integer
.
valueOf
(
netPhone
));
}
}
...
@@ -138,7 +138,8 @@ public class SchoolManagementController extends BaseController {
...
@@ -138,7 +138,8 @@ public class SchoolManagementController extends BaseController {
@Permission
(
menuname
=
"修改学校信息"
,
value
=
"update"
,
method
=
RequestMethod
.
POST
)
@Permission
(
menuname
=
"修改学校信息"
,
value
=
"update"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
updateSchool
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
"schoolName"
)
String
schoolName
,
@RequestParam
(
"netId"
)
String
netId
,
public
ResponseData
<
String
>
updateSchool
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
"schoolName"
)
String
schoolName
,
@RequestParam
(
"netId"
)
String
netId
,
@RequestParam
(
"lzgh"
)
String
lzgh
,
@RequestParam
(
"bandproductId"
)
String
bandproductId
,
@RequestParam
(
"netPhone"
)
String
netPhone
,
@RequestParam
(
"isShowband"
)
String
isShowband
,
@RequestParam
(
"lzgh"
)
String
lzgh
,
@RequestParam
(
"bandproductId"
)
String
bandproductId
,
@RequestParam
(
"netPhone"
)
String
netPhone
,
@RequestParam
(
"isShowband"
)
String
isShowband
,
@RequestParam
(
"isShowrh"
)
String
isShowrh
,
@RequestParam
(
"isRecv"
)
String
isRecv
,
@RequestParam
(
"chosePages"
)
String
chosePages
)
{
@RequestParam
(
"isShowrh"
)
String
isShowrh
,
@RequestParam
(
"isRecv"
)
String
isRecv
,
@RequestParam
(
"chosePages"
)
String
chosePages
,
@RequestParam
(
"networkCode"
)
String
networkCode
,
@RequestParam
(
"networkName"
)
String
networkName
)
{
Wrapper
<
School
>
wrapper
=
new
EntityWrapper
<>();
Wrapper
<
School
>
wrapper
=
new
EntityWrapper
<>();
wrapper
.
eq
(
"id"
,
id
);
wrapper
.
eq
(
"id"
,
id
);
...
@@ -152,6 +153,8 @@ public class SchoolManagementController extends BaseController {
...
@@ -152,6 +153,8 @@ public class SchoolManagementController extends BaseController {
dataMapping
.
put
(
"bandproduct_id"
,
bandproductId
);
dataMapping
.
put
(
"bandproduct_id"
,
bandproductId
);
dataMapping
.
put
(
"is_showband"
,
isShowband
);
dataMapping
.
put
(
"is_showband"
,
isShowband
);
dataMapping
.
put
(
"is_showrh"
,
isShowrh
);
dataMapping
.
put
(
"is_showrh"
,
isShowrh
);
dataMapping
.
put
(
"network_code"
,
networkCode
);
dataMapping
.
put
(
"network_name"
,
networkName
);
schoolMapper
.
updateForSet
(
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
schoolMapper
.
updateForSet
(
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
//插入学校与套餐中间表数据
//插入学校与套餐中间表数据
if
(
StringUtils
.
isNotBlank
(
chosePages
)){
if
(
StringUtils
.
isNotBlank
(
chosePages
)){
...
@@ -184,26 +187,19 @@ public class SchoolManagementController extends BaseController {
...
@@ -184,26 +187,19 @@ public class SchoolManagementController extends BaseController {
@Permission
(
menuname
=
"查询学校信息"
,
value
=
"findByList"
,
method
=
RequestMethod
.
POST
)
@Permission
(
menuname
=
"查询学校信息"
,
value
=
"findByList"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Page
<
Map
<
String
,
Object
>>>
listSchool
(
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
"status"
)
String
status
,
public
ResponseData
<
Page
<
Map
<
String
,
Object
>>>
listSchool
(
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
"status"
)
String
status
,
@RequestParam
(
"schoolName"
)
String
schoolName
,
@RequestParam
(
name
=
"pageNo"
,
required
=
false
)
int
pageIndex
,
@RequestParam
(
"schoolName"
)
String
schoolName
,
@RequestParam
(
name
=
"pageNo"
,
required
=
false
)
int
pageIndex
,
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
int
pageSize
)
{
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
int
pageSize
,
@RequestParam
(
"networkName"
)
String
networkName
)
{
ShiroUser
user
=
getShiroUser
();
ShiroUser
user
=
getShiroUser
();
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
if
(!
user
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"超级管理员"
)))
{
return
ResponseData
.
error
(
"无数据权限"
);
return
ResponseData
.
error
(
"无数据权限"
);
}
}
Wrapper
<
School
>
wrapper
=
new
EntityWrapper
();
Wrapper
<
School
>
wrapper
=
new
EntityWrapper
();
wrapper
.
like
(
StringUtils
.
isNotBlank
(
networkName
),
"network_name"
,
networkName
,
SqlLike
.
DEFAULT
);
wrapper
.
like
(
StringUtils
.
isNotBlank
(
schoolName
),
"school_name"
,
schoolName
,
SqlLike
.
DEFAULT
);
wrapper
.
like
(
StringUtils
.
isNotBlank
(
schoolName
),
"school_name"
,
schoolName
,
SqlLike
.
DEFAULT
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
subName
),
"sub_name"
,
subName
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
subName
),
"sub_name"
,
subName
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
status
),
"status"
,
status
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
status
),
"status"
,
status
);
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
pageIndex
,
pageSize
);
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
pageIndex
,
pageSize
);
List
<
Map
<
String
,
Object
>>
maps
=
schoolMapper
.
selectMapsPage
(
page
,
wrapper
);
List
<
Map
<
String
,
Object
>>
maps
=
schoolMapper
.
selectMapsPage
(
page
,
wrapper
);
//查询网点编码和网点名称
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Wrapper
<
NetworkInfo
>
networkWrapper
=
new
EntityWrapper
<>();
networkWrapper
.
setSqlSelect
(
" network_code,network_name "
);
networkWrapper
.
addFilter
(
"school_name = '"
+
map
.
get
(
"school_name"
)
+
"'"
);
Map
<
String
,
Object
>
networkMap
=
networkInfoMapper
.
selectMaps
(
networkWrapper
).
get
(
0
);
map
.
put
(
"network_code"
,
networkMap
.
get
(
"network_code"
));
map
.
put
(
"network_name"
,
networkMap
.
get
(
"network_name"
));
}
//查询县分列表
//查询县分列表
Wrapper
<
School
>
wrapperSubName
=
new
EntityWrapper
();
Wrapper
<
School
>
wrapperSubName
=
new
EntityWrapper
();
wrapperSubName
.
setSqlSelect
(
"sub_name as subNameList"
).
groupBy
(
"sub_name"
);
wrapperSubName
.
setSqlSelect
(
"sub_name as subNameList"
).
groupBy
(
"sub_name"
);
...
...
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