Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
22f2516a
Commit
22f2516a
authored
Aug 19, 2023
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】修改bug
parent
187d39b5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
87 additions
and
39 deletions
+87
-39
ClickDetailController.java
...fice/modules/manage/controller/ClickDetailController.java
+4
-1
ClickDetailDTO.java
...a/io/office/modules/manage/entity/dto/ClickDetailDTO.java
+2
-0
ClickDetailServiceImpl.java
...e/modules/manage/service/impl/ClickDetailServiceImpl.java
+0
-0
MedicalServiceImpl.java
...ffice/modules/manage/service/impl/MedicalServiceImpl.java
+13
-15
GLNSearchUtils.java
...n/java/io/office/modules/manage/utils/GLNSearchUtils.java
+46
-0
SysRoleController.java
...a/io/office/modules/sys/controller/SysRoleController.java
+6
-6
SysUserController.java
...a/io/office/modules/sys/controller/SysUserController.java
+3
-3
SysMenuServiceImpl.java
...o/office/modules/sys/service/impl/SysMenuServiceImpl.java
+3
-3
SysRoleServiceImpl.java
...o/office/modules/sys/service/impl/SysRoleServiceImpl.java
+5
-5
SysUserServiceImpl.java
...o/office/modules/sys/service/impl/SysUserServiceImpl.java
+5
-6
ClickDetailDao.xml
src/main/resources/mapper/manage/ClickDetailDao.xml
+0
-0
No files found.
src/main/java/io/office/modules/manage/controller/ClickDetailController.java
View file @
22f2516a
...
@@ -58,7 +58,7 @@ public class ClickDetailController {
...
@@ -58,7 +58,7 @@ public class ClickDetailController {
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
//@RequiresPermissions("datamanage:clickdetail:list")
//@RequiresPermissions("datamanage:clickdetail:list")
public
R
list
(
@RequestBody
ClickDetailDTO
clickDetailDTO
)
{
public
R
list
(
@RequestBody
ClickDetailDTO
clickDetailDTO
)
{
Page
page
=
null
;
Page
<
ClickDetailDTO
>
page
=
new
Page
()
;
if
(
StrUtil
.
equals
(
"1"
,
clickDetailDTO
.
getTypeValue
()))
{
if
(
StrUtil
.
equals
(
"1"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
selectClickNewsList
(
clickDetailDTO
);
page
=
clickDetailService
.
selectClickNewsList
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"2"
,
clickDetailDTO
.
getTypeValue
()))
{
}
else
if
(
StrUtil
.
equals
(
"2"
,
clickDetailDTO
.
getTypeValue
()))
{
...
@@ -78,6 +78,8 @@ public class ClickDetailController {
...
@@ -78,6 +78,8 @@ public class ClickDetailController {
}
else
if
(
StrUtil
.
equals
(
"12"
,
clickDetailDTO
.
getTypeValue
()))
{
}
else
if
(
StrUtil
.
equals
(
"12"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageAnnounces
(
clickDetailDTO
);
page
=
clickDetailService
.
getListPageAnnounces
(
clickDetailDTO
);
}
}
PageUtils
pageUtils
=
new
PageUtils
(
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
}
...
@@ -108,6 +110,7 @@ public class ClickDetailController {
...
@@ -108,6 +110,7 @@ public class ClickDetailController {
clickDetailService
.
getListPageAnnouncesExport
(
clickDetailDTO
,
response
);
clickDetailService
.
getListPageAnnouncesExport
(
clickDetailDTO
,
response
);
}
}
}
}
...
...
src/main/java/io/office/modules/manage/entity/dto/ClickDetailDTO.java
View file @
22f2516a
...
@@ -86,5 +86,7 @@ public class ClickDetailDTO implements Serializable {
...
@@ -86,5 +86,7 @@ public class ClickDetailDTO implements Serializable {
private
String
order
;
private
String
order
;
private
String
releaseTimeStart
;
private
String
releaseTimeEnd
;
}
}
src/main/java/io/office/modules/manage/service/impl/ClickDetailServiceImpl.java
View file @
22f2516a
This diff is collapsed.
Click to expand it.
src/main/java/io/office/modules/manage/service/impl/MedicalServiceImpl.java
View file @
22f2516a
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.netty.util.internal.StringUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.service.MedicalService
;
...
@@ -11,11 +14,6 @@ import org.springframework.stereotype.Service;
...
@@ -11,11 +14,6 @@ import org.springframework.stereotype.Service;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
...
@@ -39,14 +37,14 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
...
@@ -39,14 +37,14 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
}
else
{
}
else
{
medicalEntityQueryWrapper
.
gt
(
"level"
,
0
);
medicalEntityQueryWrapper
.
gt
(
"level"
,
0
);
}
}
if
(
params
.
get
(
"sidx"
)!=
null
&&
StringUtils
.
isNotBlank
(
String
.
valueOf
(
params
.
get
(
"sidx"
)))){
//
if(params.get("sidx")!=null && StringUtils.isNotBlank(String.valueOf(params.get("sidx")))){
if
(
String
.
valueOf
(
params
.
get
(
"sidx"
)).
equalsIgnoreCase
(
"type"
))
{
//
if(String.valueOf(params.get("sidx")).equalsIgnoreCase("type")) {
params
.
put
(
"sidx"
,
"typeid"
);
//
params.put("sidx","typeid");
medicalEntityQueryWrapper
.
orderByAsc
(
"typeid"
);
//
medicalEntityQueryWrapper.orderByAsc("typeid");
}
//
}
}
else
{
//
} else{
medicalEntityQueryWrapper
.
orderByAsc
(
"typeid"
);
//
medicalEntityQueryWrapper.orderByAsc("typeid");
}
//
}
IPage
<
MedicalEntity
>
page
=
this
.
page
(
IPage
<
MedicalEntity
>
page
=
this
.
page
(
...
...
src/main/java/io/office/modules/manage/utils/GLNSearchUtils.java
View file @
22f2516a
...
@@ -5,6 +5,7 @@ import io.office.modules.manage.webservice.WebServiceXmlTemplate;
...
@@ -5,6 +5,7 @@ import io.office.modules.manage.webservice.WebServiceXmlTemplate;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -108,4 +109,49 @@ public class GLNSearchUtils {
...
@@ -108,4 +109,49 @@ public class GLNSearchUtils {
}
}
public
static
void
main
(
String
[]
args
)
{
String
smsTemplateXml
=
WebServiceXmlTemplate
.
SEND_MESSAGE_TEMPLATE
.
replaceAll
(
"\\$\\{cascade\\}"
,
"9"
).
replaceAll
(
"\\$\\{requestedKeyCode\\}"
,
"GLN"
)
.
replaceAll
(
"\\$\\{requestedKeyValue\\}"
,
"6929020221650"
).
replaceAll
(
"\\$\\{requestedLanguage\\}"
,
"en"
);
String
url
=
"http://webservice.anccnet.com:8080/gepir4/gepirv4.asmx"
;
RestTemplate
restTemplate
=
new
RestTemplate
();
//创建请求头
//创建请求头
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
TEXT_XML
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n"
+
" <soap:Header>\n"
+
" <gep:requestHeader xmlns=\"http://gepir4.ws.gs1.org/\">\n"
+
" <requesterGLN xmlns=\"\">6900000000007</requesterGLN>\n"
+
" <onBehalfOfGLN xmlns=\"\">6900000000007</onBehalfOfGLN>\n"
+
" <isAuthenticated xmlns=\"\">true</isAuthenticated>\n"
+
" <cascade xmlns=\"\">9</cascade>\n"
+
" </gep:requestHeader>\n"
+
" </soap:Header>\n"
+
" <soap:Body>\n"
+
" <getKeyLicensee xmlns=\"http://gepir4.ws.gs1.org/\">\n"
+
" <getKeyLicensee xmlns=\"\">\n"
+
" <getKeyLicensee>\n"
+
" <requestedKeyCode>GLN</requestedKeyCode>\n"
+
" <requestedKeyValue>6970974940012</requestedKeyValue>\n"
+
" <requestedLanguage>en</requestedLanguage>\n"
+
" </getKeyLicensee>\n"
+
" </getKeyLicensee>\n"
+
" </getKeyLicensee>\n"
+
" </soap:Body>\n"
+
"</soap:Envelope>\n"
,
headers
);
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
postForEntity
(
url
,
entity
,
String
.
class
);
System
.
out
.
println
(
responseEntity
);
}
}
}
src/main/java/io/office/modules/sys/controller/SysRoleController.java
View file @
22f2516a
...
@@ -44,9 +44,9 @@ public class SysRoleController extends AbstractController {
...
@@ -44,9 +44,9 @@ public class SysRoleController extends AbstractController {
@RequiresPermissions
(
"sys:role:list"
)
@RequiresPermissions
(
"sys:role:list"
)
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
//如果不是超级管理员,则只查询自己创建的角色列表
//如果不是超级管理员,则只查询自己创建的角色列表
//
if(getUserId() != Constant.SUPER_ADMIN){
if
(
getUserId
()
!=
Constant
.
SUPER_ADMIN
){
//
params.put("createUserId", getUserId());
params
.
put
(
"createUserId"
,
getUserId
());
//
}
}
PageUtils
page
=
sysRoleService
.
queryPage
(
params
);
PageUtils
page
=
sysRoleService
.
queryPage
(
params
);
...
@@ -62,9 +62,9 @@ public class SysRoleController extends AbstractController {
...
@@ -62,9 +62,9 @@ public class SysRoleController extends AbstractController {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//如果不是超级管理员,则只查询自己所拥有的角色列表
//如果不是超级管理员,则只查询自己所拥有的角色列表
//
if(getUserId() != Constant.SUPER_ADMIN){
if
(
getUserId
()
!=
Constant
.
SUPER_ADMIN
){
//
map.put("create_user_id", getUserId());
map
.
put
(
"create_user_id"
,
getUserId
());
//
}
}
List
<
SysRoleEntity
>
list
=
(
List
<
SysRoleEntity
>)
sysRoleService
.
listByMap
(
map
);
List
<
SysRoleEntity
>
list
=
(
List
<
SysRoleEntity
>)
sysRoleService
.
listByMap
(
map
);
return
R
.
ok
().
put
(
"list"
,
list
);
return
R
.
ok
().
put
(
"list"
,
list
);
...
...
src/main/java/io/office/modules/sys/controller/SysUserController.java
View file @
22f2516a
...
@@ -50,9 +50,9 @@ public class SysUserController extends AbstractController {
...
@@ -50,9 +50,9 @@ public class SysUserController extends AbstractController {
@RequiresPermissions
(
"sys:user:list"
)
@RequiresPermissions
(
"sys:user:list"
)
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
//只有超级管理员,才能查看所有管理员列表
//只有超级管理员,才能查看所有管理员列表
//
if(getUserId() != Constant.SUPER_ADMIN){
if
(
getUserId
()
!=
Constant
.
SUPER_ADMIN
){
//
params.put("createUserId", getUserId());
params
.
put
(
"createUserId"
,
getUserId
());
//
}
}
PageUtils
page
=
sysUserService
.
queryPage
(
params
);
PageUtils
page
=
sysUserService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
return
R
.
ok
().
put
(
"page"
,
page
);
...
...
src/main/java/io/office/modules/sys/service/impl/SysMenuServiceImpl.java
View file @
22f2516a
...
@@ -60,9 +60,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
...
@@ -60,9 +60,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
@Override
public
List
<
SysMenuEntity
>
getUserMenuList
(
Long
userId
)
{
public
List
<
SysMenuEntity
>
getUserMenuList
(
Long
userId
)
{
//系统管理员,拥有最高权限
//系统管理员,拥有最高权限
//
if(userId == Constant.SUPER_ADMIN){
if
(
userId
==
Constant
.
SUPER_ADMIN
){
//
return getAllMenuList(null);
return
getAllMenuList
(
null
);
//
}
}
//用户菜单列表
//用户菜单列表
List
<
Long
>
menuIdList
=
sysUserService
.
queryAllMenuId
(
userId
);
List
<
Long
>
menuIdList
=
sysUserService
.
queryAllMenuId
(
userId
);
...
...
src/main/java/io/office/modules/sys/service/impl/SysRoleServiceImpl.java
View file @
22f2516a
...
@@ -87,7 +87,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
...
@@ -87,7 +87,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
this
.
save
(
role
);
this
.
save
(
role
);
//检查权限是否越权
//检查权限是否越权
checkPrems
(
role
);
//
checkPrems(role);
//保存角色与菜单关系
//保存角色与菜单关系
sysRoleMenuService
.
saveOrUpdate
(
role
.
getRoleId
(),
role
.
getMenuIdList
());
sysRoleMenuService
.
saveOrUpdate
(
role
.
getRoleId
(),
role
.
getMenuIdList
());
...
@@ -99,7 +99,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
...
@@ -99,7 +99,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
this
.
updateById
(
role
);
this
.
updateById
(
role
);
//检查权限是否越权
//检查权限是否越权
checkPrems
(
role
);
//
checkPrems(role);
//更新角色与菜单关系
//更新角色与菜单关系
sysRoleMenuService
.
saveOrUpdate
(
role
.
getRoleId
(),
role
.
getMenuIdList
());
sysRoleMenuService
.
saveOrUpdate
(
role
.
getRoleId
(),
role
.
getMenuIdList
());
...
@@ -129,9 +129,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
...
@@ -129,9 +129,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
*/
*/
private
void
checkPrems
(
SysRoleEntity
role
)
{
private
void
checkPrems
(
SysRoleEntity
role
)
{
//如果不是超级管理员,则需要判断角色的权限是否超过自己的权限
//如果不是超级管理员,则需要判断角色的权限是否超过自己的权限
//
if(role.getCreateUserId() == Constant.SUPER_ADMIN){
if
(
role
.
getCreateUserId
()
==
Constant
.
SUPER_ADMIN
){
//
return ;
return
;
//
}
}
//查询用户所拥有的菜单列表
//查询用户所拥有的菜单列表
List
<
Long
>
menuIdList
=
sysUserService
.
queryAllMenuId
(
role
.
getCreateUserId
());
List
<
Long
>
menuIdList
=
sysUserService
.
queryAllMenuId
(
role
.
getCreateUserId
());
...
...
src/main/java/io/office/modules/sys/service/impl/SysUserServiceImpl.java
View file @
22f2516a
...
@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.exception.RRException
;
import
io.office.common.exception.RRException
;
import
io.office.common.utils.Constant
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.common.utils.Query
;
import
io.office.modules.sys.dao.SysUserDao
;
import
io.office.modules.sys.dao.SysUserDao
;
...
@@ -86,7 +85,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
...
@@ -86,7 +85,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
this
.
save
(
user
);
this
.
save
(
user
);
//检查角色是否越权
//检查角色是否越权
checkRole
(
user
);
//
checkRole(user);
//保存用户与角色关系
//保存用户与角色关系
sysUserRoleService
.
saveOrUpdate
(
user
.
getUserId
(),
user
.
getRoleIdList
());
sysUserRoleService
.
saveOrUpdate
(
user
.
getUserId
(),
user
.
getRoleIdList
());
...
@@ -103,7 +102,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
...
@@ -103,7 +102,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
this
.
updateById
(
user
);
this
.
updateById
(
user
);
//检查角色是否越权
//检查角色是否越权
checkRole
(
user
);
//
checkRole(user);
//保存用户与角色关系
//保存用户与角色关系
sysUserRoleService
.
saveOrUpdate
(
user
.
getUserId
(),
user
.
getRoleIdList
());
sysUserRoleService
.
saveOrUpdate
(
user
.
getUserId
(),
user
.
getRoleIdList
());
...
@@ -130,9 +129,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
...
@@ -130,9 +129,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
return
;
return
;
}
}
//如果不是超级管理员,则需要判断用户的角色是否自己创建
//如果不是超级管理员,则需要判断用户的角色是否自己创建
//
if(user.getCreateUserId() == Constant.SUPER_ADMIN){
//
if(user.getCreateUserId() == Constant.SUPER_ADMIN){
//
return ;
//
return ;
//
}
//
}
//查询用户创建的角色列表
//查询用户创建的角色列表
List
<
Long
>
roleIdList
=
sysRoleService
.
queryRoleIdList
(
user
.
getCreateUserId
());
List
<
Long
>
roleIdList
=
sysRoleService
.
queryRoleIdList
(
user
.
getCreateUserId
());
...
...
src/main/resources/mapper/manage/ClickDetailDao.xml
View file @
22f2516a
This diff is collapsed.
Click to expand it.
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