Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
base_platform_enterprise
gic-platform-auth
Commits
7cbbe4c0
Commit
7cbbe4c0
authored
Oct 27, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步应用菜单调整:给一份好办小程序应用数据
parent
915d471a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
3 deletions
+108
-3
TabSysMenuMapper.java
...c/main/java/com/gic/auth/dao/mapper/TabSysMenuMapper.java
+11
-0
MenuService.java
...rvice/src/main/java/com/gic/auth/service/MenuService.java
+10
-0
MenuServiceImpl.java
.../main/java/com/gic/auth/service/impl/MenuServiceImpl.java
+10
-1
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+12
-2
TabSysMenuMapper.xml
...th-service/src/main/resources/mapper/TabSysMenuMapper.xml
+65
-0
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysMenuMapper.java
View file @
7cbbe4c0
package
com
.
gic
.
auth
.
dao
.
mapper
;
package
com
.
gic
.
auth
.
dao
.
mapper
;
import
com.gic.auth.dto.AuthItemListDTO
;
import
com.gic.auth.dto.AuthItemListDTO
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.entity.TabSysMenu
;
import
com.gic.auth.entity.TabSysMenu
;
import
com.gic.auth.qo.MenuListQO
;
import
com.gic.auth.qo.MenuListQO
;
import
com.gic.auth.qo.MenuOperationItemListQO
;
import
com.gic.auth.qo.MenuOperationItemListQO
;
...
@@ -51,6 +52,16 @@ public interface TabSysMenuMapper {
...
@@ -51,6 +52,16 @@ public interface TabSysMenuMapper {
int
updateByPrimaryKeySelective
(
TabSysMenu
record
);
int
updateByPrimaryKeySelective
(
TabSysMenu
record
);
/**
/**
* 更新好办小程序应用
* @Title: updatePageForHaobanApplet
* @Description:
* @author guojuxing
* @param record
* @return int
*/
int
updatePageForHaobanApplet
(
TabSysMenu
record
);
/**
* 根据主键更新记录
* 根据主键更新记录
*
*
* @param record 实体对象
* @param record 实体对象
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/MenuService.java
View file @
7cbbe4c0
...
@@ -71,6 +71,16 @@ public interface MenuService {
...
@@ -71,6 +71,16 @@ public interface MenuService {
void
updatePage
(
MenuDTO
menuDTO
);
void
updatePage
(
MenuDTO
menuDTO
);
/**
/**
* 更新好办小程序应用数据
* @Title: updatePageForHaobanApplet
* @Description:
* @author guojuxing
* @param menuDTO
* @return void
*/
void
updatePageForHaobanApplet
(
MenuDTO
menuDTO
);
/**
* 查询页面下面的操作项列表数据
* 查询页面下面的操作项列表数据
* @Title: listMenuRoleByParentId
* @Title: listMenuRoleByParentId
* @Description:
* @Description:
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/MenuServiceImpl.java
View file @
7cbbe4c0
...
@@ -80,6 +80,14 @@ public class MenuServiceImpl implements MenuService {
...
@@ -80,6 +80,14 @@ public class MenuServiceImpl implements MenuService {
}
}
@Override
@Override
public
void
updatePageForHaobanApplet
(
MenuDTO
menuDTO
)
{
TabSysMenu
record
=
EntityUtil
.
changeEntityNew
(
TabSysMenu
.
class
,
menuDTO
);
record
.
setUpdateTime
(
new
Date
());
record
.
setPlatformType
(
MenuPlatformTypeEnum
.
HAOBAN_APPLET_APP
.
getCode
());
tabSysMenuMapper
.
updatePageForHaobanApplet
(
record
);
}
@Override
public
List
<
TabSysMenu
>
listMenuItemByParentId
(
Integer
parentId
)
{
public
List
<
TabSysMenu
>
listMenuItemByParentId
(
Integer
parentId
)
{
List
<
TabSysMenu
>
list
=
tabSysMenuMapper
.
listMenuItemByParentId
(
parentId
);
List
<
TabSysMenu
>
list
=
tabSysMenuMapper
.
listMenuItemByParentId
(
parentId
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
...
@@ -211,10 +219,11 @@ public class MenuServiceImpl implements MenuService {
...
@@ -211,10 +219,11 @@ public class MenuServiceImpl implements MenuService {
@Override
@Override
public
void
deleteNotInApp
(
List
<
String
>
projectList
)
{
public
void
deleteNotInApp
(
List
<
String
>
projectList
)
{
//目前删除platform_type 为
0和2的
//目前删除platform_type 为
XXX的数据,做到同步应用市场应用数据
List
<
Integer
>
platformTypeList
=
new
ArrayList
<>(
2
);
List
<
Integer
>
platformTypeList
=
new
ArrayList
<>(
2
);
platformTypeList
.
add
(
MenuPlatformTypeEnum
.
GIC
.
getCode
());
platformTypeList
.
add
(
MenuPlatformTypeEnum
.
GIC
.
getCode
());
platformTypeList
.
add
(
MenuPlatformTypeEnum
.
HAOBAN_APP
.
getCode
());
platformTypeList
.
add
(
MenuPlatformTypeEnum
.
HAOBAN_APP
.
getCode
());
platformTypeList
.
add
(
MenuPlatformTypeEnum
.
HAOBAN_APPLET_APP
.
getCode
());
tabSysMenuMapper
.
deleteNotInApp
(
projectList
,
platformTypeList
);
tabSysMenuMapper
.
deleteNotInApp
(
projectList
,
platformTypeList
);
}
}
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
7cbbe4c0
...
@@ -967,6 +967,8 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -967,6 +967,8 @@ public class MenuApiServiceImpl implements MenuApiService {
//删除不在projectList中的应用菜单:逻辑删除
//删除不在projectList中的应用菜单:逻辑删除
menuService
.
deleteNotInApp
(
projectList
);
menuService
.
deleteNotInApp
(
projectList
);
for
(
ApplicationDTO
app
:
appList
)
{
for
(
ApplicationDTO
app
:
appList
)
{
//gic应用
boolean
isGicApp
=
MenuPlatformTypeEnum
.
GIC
.
getCode
().
equals
(
app
.
getAppType
());
if
(
appMenu
.
containsKey
(
app
.
getApplicationId
().
toString
()))
{
if
(
appMenu
.
containsKey
(
app
.
getApplicationId
().
toString
()))
{
//如果已存在,则更新版本信息
//如果已存在,则更新版本信息
MenuDTO
menuDTO
=
new
MenuDTO
();
MenuDTO
menuDTO
=
new
MenuDTO
();
...
@@ -976,6 +978,11 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -976,6 +978,11 @@ public class MenuApiServiceImpl implements MenuApiService {
// setMenuAuthType(menuDTO);
// setMenuAuthType(menuDTO);
menuDTO
.
setMenuId
(
appMenu
.
get
(
app
.
getApplicationId
().
toString
()));
menuDTO
.
setMenuId
(
appMenu
.
get
(
app
.
getApplicationId
().
toString
()));
menuService
.
updatePage
(
menuDTO
);
menuService
.
updatePage
(
menuDTO
);
//
if
(!
isGicApp
)
{
menuDTO
.
setMenuId
(
null
);
menuService
.
updatePageForHaobanApplet
(
menuDTO
);
}
}
else
{
}
else
{
MenuDTO
menuDTO
=
new
MenuDTO
();
MenuDTO
menuDTO
=
new
MenuDTO
();
menuDTO
.
setMenuName
(
app
.
getName
());
menuDTO
.
setMenuName
(
app
.
getName
());
...
@@ -983,10 +990,13 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -983,10 +990,13 @@ public class MenuApiServiceImpl implements MenuApiService {
setMenuVersion
(
app
.
getPropDTOList
(),
app
.
getServeExpanList
(),
menuDTO
);
setMenuVersion
(
app
.
getPropDTOList
(),
app
.
getServeExpanList
(),
menuDTO
);
// setMenuAuthType(menuDTO);
// setMenuAuthType(menuDTO);
setNormalFieldValue
(
menuDTO
);
setNormalFieldValue
(
menuDTO
);
//3:好办应用
boolean
isGicApp
=
MenuPlatformTypeEnum
.
GIC
.
getCode
().
equals
(
app
.
getAppType
());
menuDTO
.
setPlatformType
(
isGicApp
?
MenuPlatformTypeEnum
.
GIC
.
getCode
()
:
MenuPlatformTypeEnum
.
HAOBAN_APP
.
getCode
());
menuDTO
.
setPlatformType
(
isGicApp
?
MenuPlatformTypeEnum
.
GIC
.
getCode
()
:
MenuPlatformTypeEnum
.
HAOBAN_APP
.
getCode
());
menuService
.
savePage
(
menuDTO
);
menuService
.
savePage
(
menuDTO
);
//好办小程序应用生成一份和好办应用同样的数据
if
(!
isGicApp
)
{
menuDTO
.
setPlatformType
(
MenuPlatformTypeEnum
.
HAOBAN_APPLET_APP
.
getCode
());
menuService
.
savePage
(
menuDTO
);
}
}
}
}
}
}
}
...
...
gic-platform-auth-service/src/main/resources/mapper/TabSysMenuMapper.xml
View file @
7cbbe4c0
...
@@ -273,6 +273,71 @@
...
@@ -273,6 +273,71 @@
</set>
</set>
where menu_id = #{menuId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
</update>
<update
id=
"updatePageForHaobanApplet"
parameterType=
"com.gic.auth.entity.TabSysMenu"
>
update tab_sys_menu
<set>
<if
test=
"menuName != null"
>
menu_name = #{menuName,jdbcType=VARCHAR},
</if>
<if
test=
"menuUrl != null"
>
menu_url = #{menuUrl,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if
test=
"target != null"
>
target = #{target,jdbcType=INTEGER},
</if>
<if
test=
"iconUrl != null"
>
icon_url = #{iconUrl,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"level != null"
>
level = #{level,jdbcType=INTEGER},
</if>
<if
test=
"isShow != null"
>
is_show = #{isShow,jdbcType=INTEGER},
</if>
<if
test=
"menuCode != null"
>
menu_code = #{menuCode,jdbcType=VARCHAR},
</if>
<if
test=
"parentCode != null"
>
parent_code = #{parentCode,jdbcType=VARCHAR},
</if>
<if
test=
"menuVersion != null"
>
menu_version = #{menuVersion,jdbcType=VARCHAR},
</if>
<if
test=
"menuType != null"
>
menu_type = #{menuType,jdbcType=INTEGER},
</if>
<if
test=
"menuVersionName != null"
>
menu_version_name = #{menuVersionName,jdbcType=VARCHAR},
</if>
<if
test=
"projectUrlForWeb != null"
>
project_url_for_web = #{projectUrlForWeb,jdbcType=VARCHAR},
</if>
<if
test=
"adminOnlySign != null"
>
admin_only_sign = #{adminOnlySign,jdbcType=INTEGER},
</if>
<if
test=
"authType != null"
>
auth_type = #{authType,jdbcType=INTEGER},
</if>
</set>
where platform_type = #{platformType,jdbcType=INTEGER}
and project = #{project,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.auth.entity.TabSysMenu"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.auth.entity.TabSysMenu"
>
update tab_sys_menu
update tab_sys_menu
set menu_name = #{menuName,jdbcType=VARCHAR},
set menu_name = #{menuName,jdbcType=VARCHAR},
...
...
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