Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
0689ee7a
Commit
0689ee7a
authored
Feb 13, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/haoban3.0/haoban-manage3.0
into developer
parents
814e955a
edf4ac42
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
224 additions
and
61 deletions
+224
-61
DepartmentDTO.java
...ain/java/com/gic/haoban/manage/api/dto/DepartmentDTO.java
+10
-0
DepartmentApiService.java
...m/gic/haoban/manage/api/service/DepartmentApiService.java
+25
-0
DepartmentMapper.java
...ic/haoban/manage/service/dao/mapper/DepartmentMapper.java
+5
-0
TabHaobanDepartment.java
...gic/haoban/manage/service/entity/TabHaobanDepartment.java
+11
-0
DepartmentService.java
.../gic/haoban/manage/service/service/DepartmentService.java
+7
-0
ApplicationServiceImpl.java
...n/manage/service/service/impl/ApplicationServiceImpl.java
+1
-1
DepartmentServiceImpl.java
...an/manage/service/service/impl/DepartmentServiceImpl.java
+30
-1
StaffDepartmentRelatedServiceImpl.java
...rvice/service/impl/StaffDepartmentRelatedServiceImpl.java
+1
-1
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+1
-1
TestApiServiceImpl.java
...aoban/manage/service/service/impl/TestApiServiceImpl.java
+1
-1
WxEnterpriseRelatedServiceImpl.java
.../service/service/impl/WxEnterpriseRelatedServiceImpl.java
+1
-1
ApplicationApiServiceImpl.java
...e/service/service/out/impl/ApplicationApiServiceImpl.java
+1
-1
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+29
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+1
-1
TestServiceImpl.java
...oban/manage/service/service/out/impl/TestServiceImpl.java
+1
-1
WxEnterpriseRelatedApiServiceImpl.java
...e/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
+1
-1
DepartmentMapper.xml
...e3-service/src/main/resources/mapper/DepartmentMapper.xml
+10
-4
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+46
-2
TestController.java
...gic/haoban/manage/web/controller/test/TestController.java
+39
-39
WebInterceptor.java
...com/gic/haoban/manage/web/interceptor/WebInterceptor.java
+2
-4
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/DepartmentDTO.java
View file @
0689ee7a
...
...
@@ -30,6 +30,8 @@ public class DepartmentDTO implements Serializable {
private
Integer
level
;
private
Integer
sort
;
private
String
wxEnterpriseId
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -136,6 +138,14 @@ public class DepartmentDTO implements Serializable {
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DepartmentApiService.java
View file @
0689ee7a
...
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.api.service;
import
java.util.List
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
...
...
@@ -38,5 +40,28 @@ public interface DepartmentApiService {
* @return
*/
DepartmentDTO
selectByRelatedId
(
String
departId
);
/**
* 放入回收站
* @param departmentId
* @return
*/
HaobanResponse
recycle
(
String
departmentId
);
/**
* 根据参数查询
* @param pageInfo
* @param wxEnterpriseId
* @param keyword
* @param storeFlag
* @param recycleFlag
* @return
*/
Page
<
DepartmentDTO
>
pageDepartmentByParams
(
BasePageInfo
pageInfo
,
String
wxEnterpriseId
,
String
keyword
,
Integer
storeFlag
,
Integer
recycleFlag
);
/**
* 回收站恢复
* @param departmentId
*/
HaobanResponse
repairRecycle
(
String
departmentId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/DepartmentMapper.java
View file @
0689ee7a
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.github.pagehelper.Page
;
public
interface
DepartmentMapper
{
int
deleteByPrimaryKey
(
String
departmentId
);
...
...
@@ -24,4 +25,7 @@ public interface DepartmentMapper {
int
selectMaxSort
(
@Param
(
"parentDepartmentId"
)
String
parentDepartmentId
);
TabHaobanDepartment
selectByRelatedId
(
@Param
(
"relatedId"
)
String
relatedId
);
Page
<
TabHaobanDepartment
>
pageDepartmentByParams
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"storeFlag"
)
Integer
storeFlag
,
@Param
(
"recycleFlag"
)
Integer
recycleFlag
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanDepartment.java
View file @
0689ee7a
...
...
@@ -29,6 +29,8 @@ public class TabHaobanDepartment implements Serializable {
private
Integer
level
;
private
Integer
sort
;
private
String
wxEnterpriseId
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -135,6 +137,14 @@ public class TabHaobanDepartment implements Serializable {
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/DepartmentService.java
View file @
0689ee7a
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.github.pagehelper.Page
;
public
interface
DepartmentService
{
...
...
@@ -19,4 +20,10 @@ public interface DepartmentService {
TabHaobanDepartment
selectByRelatedId
(
String
relatedId
);
void
recycle
(
String
departmentId
);
Page
<
TabHaobanDepartment
>
pageDepartmentByParams
(
String
wxEnterpriseId
,
String
keyword
,
Integer
storeFlag
,
Integer
recycleFlag
);
void
repairRecycle
(
String
departmentId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/ApplicationServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ApplicationServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/DepartmentServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/DepartmentServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -7,11 +7,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.service.dao.mapper.DepartmentMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.github.pagehelper.Page
;
@Service
public
class
DepartmentServiceImpl
implements
DepartmentService
{
...
...
@@ -75,4 +77,31 @@ public class DepartmentServiceImpl implements DepartmentService {
return
mapper
.
selectByRelatedId
(
relatedId
);
}
@Override
public
void
recycle
(
String
departmentId
)
{
TabHaobanDepartment
tab
=
mapper
.
selectByPrimaryKey
(
departmentId
);
if
(
tab
!=
null
)
{
tab
.
setRecycleFlag
(
1
);
tab
.
setUpdateTime
(
new
Date
());
}
mapper
.
updateByPrimaryKeySelective
(
tab
);
}
@Override
public
Page
<
TabHaobanDepartment
>
pageDepartmentByParams
(
String
wxEnterpriseId
,
String
keyword
,
Integer
storeFlag
,
Integer
recycleFlag
)
{
return
mapper
.
pageDepartmentByParams
(
wxEnterpriseId
,
keyword
,
storeFlag
,
recycleFlag
);
}
@Override
public
void
repairRecycle
(
String
departmentId
)
{
TabHaobanDepartment
tab
=
mapper
.
selectByPrimaryKey
(
departmentId
);
if
(
tab
!=
null
)
{
tab
.
setRecycleFlag
(
0
);
tab
.
setUpdateTime
(
new
Date
());
}
mapper
.
updateByPrimaryKeySelective
(
tab
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/StaffDepartmentRelatedServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffDepartmentRelatedServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/StaffServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/TestServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/Test
Api
ServiceImpl.java
View file @
0689ee7a
...
...
@@ -3,5 +3,5 @@ package com.gic.haoban.manage.service.service.impl;
/**
* Created by tgs on 2020/2/9.
*/
public
class
TestServiceImpl
{
public
class
Test
Api
ServiceImpl
{
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/WxEnterpriseRelatedServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ApplicationApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/ApplicationApiServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/DepartmentApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/DepartmentApiServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -7,8 +7,11 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
...
...
@@ -16,6 +19,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.github.pagehelper.PageHelper
;
@Service
public
class
DepartmentApiServiceImpl
implements
DepartmentApiService
{
...
...
@@ -107,4 +111,28 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
return
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
tab
);
}
@Override
public
HaobanResponse
recycle
(
String
departmentId
)
{
HaobanResponse
hr
=
new
HaobanResponse
();
hr
.
setErrorCode
(
1
);
departmentService
.
recycle
(
departmentId
);
return
hr
;
}
@Override
public
Page
<
DepartmentDTO
>
pageDepartmentByParams
(
BasePageInfo
pageInfo
,
String
wxEnterpriseId
,
String
keyword
,
Integer
storeFlag
,
Integer
recycleFlag
)
{
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
return
PageUtil
.
changePageHelperToCurrentPage
(
departmentService
.
pageDepartmentByParams
(
wxEnterpriseId
,
keyword
,
storeFlag
,
recycleFlag
),
DepartmentDTO
.
class
);
}
@Override
public
HaobanResponse
repairRecycle
(
String
departmentId
)
{
HaobanResponse
hr
=
new
HaobanResponse
();
hr
.
setErrorCode
(
0
);
departmentService
.
repairRecycle
(
departmentId
);
return
hr
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/StaffApiServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/Test
Api
ServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/TestServiceImpl.java
View file @
0689ee7a
...
...
@@ -3,5 +3,5 @@ package com.gic.haoban.manage.service.service.out.impl;
/**
* Created by tgs on 2020/2/9.
*/
public
class
Test
Api
ServiceImpl
{
public
class
TestServiceImpl
{
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/WxEnterpriseRelatedApiServiceImpl.java
View file @
0689ee7a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.Date
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/resources/mapper/DepartmentMapper.xml
View file @
0689ee7a
...
...
@@ -13,12 +13,13 @@
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"wx_department_id"
property=
"wxDepartmentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"sort"
property=
"sort"
jdbcType=
"INTEGER"
/>
<result
column=
"level"
property=
"level"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
department_id, department_name, parent_department_id, related_id, chain_id, is_store,
status_flag, recycle_flag, create_time, update_time,wx_department_id,sort,level
status_flag, recycle_flag, create_time, update_time,wx_department_id,sort,level
,wx_enterprise_id
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -34,11 +35,11 @@
insert into tab_haoban_department (department_id, department_name, parent_department_id,
related_id, chain_id, is_store,
status_flag, recycle_flag, create_time,
update_time,wx_department_id,sort,level)
update_time,wx_department_id,sort,level
,wx_enterprise_id
)
values (#{departmentId,jdbcType=VARCHAR}, #{departmentName,jdbcType=VARCHAR}, #{parentDepartmentId,jdbcType=VARCHAR},
#{relatedId,jdbcType=VARCHAR}, #{chainId,jdbcType=VARCHAR}, #{isStore,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{recycleFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{wxDepartmentId},#{sort},#{level})
#{updateTime,jdbcType=TIMESTAMP},#{wxDepartmentId},#{sort},#{level}
,#{wxEnterpriseId}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanDepartment"
>
insert into tab_haoban_department
...
...
@@ -158,6 +159,9 @@
<if
test=
"wxDepartmentId != null"
>
wx_department_id = #{wxDepartmentId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
...
...
@@ -180,7 +184,9 @@
level = #{level,jdbcType=INTEGER},
recycle_flag = #{recycleFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
wx_enterprise_id = #{wxEnterpriseId}
where department_id = #{departmentId,jdbcType=VARCHAR}
</update>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
0689ee7a
...
...
@@ -9,16 +9,20 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONArray
;
import
com.gic.api.base.commons.Page
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.DepartmentService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.Constant
;
import
com.gic.haoban.common.utils.AuthRequestUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.DepartmentAddQO
;
import
com.gic.haoban.manage.web.qo.DepartmentEditQO
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
@RestController
public
class
DepartmentContoller
extends
WebBaseController
{
...
...
@@ -50,6 +54,7 @@ public class DepartmentContoller extends WebBaseController{
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
department
.
setDepartmentName
(
departmentName
);
department
.
setWxEnterpriseId
(
dto
.
getWxDepartmentId
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setIsStore
(
0
);
departmentApiService
.
add
(
department
);
...
...
@@ -88,8 +93,13 @@ public class DepartmentContoller extends WebBaseController{
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10003
);
}
HaobanResponse
hr
;
if
(
StringUtils
.
isBlank
(
dto
.
getRelatedId
()))
{
hr
=
departmentApiService
.
del
(
departmentId
);
}
else
{
hr
=
departmentApiService
.
recycle
(
departmentId
);
}
HaobanResponse
hr
=
departmentApiService
.
del
(
departmentId
);
if
(
hr
.
getErrorCode
()
==
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
hr
.
getMessage
());
}
...
...
@@ -112,6 +122,7 @@ public class DepartmentContoller extends WebBaseController{
}
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
department
.
setWxDepartmentId
(
dto
.
getWxDepartmentId
());
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setIsStore
(
0
);
...
...
@@ -152,7 +163,15 @@ public class DepartmentContoller extends WebBaseController{
if
(
StringUtils
.
isNotBlank
(
delDepartmentIds
))
{
String
[]
delIds
=
delDepartmentIds
.
split
(
","
);
for
(
String
string
:
delIds
)
{
departmentApiService
.
del
(
string
);
DepartmentDTO
dto
=
departmentApiService
.
selectById
(
string
);
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
continue
;
}
if
(
StringUtils
.
isBlank
(
dto
.
getRelatedId
()))
{
departmentApiService
.
del
(
string
);
}
else
{
departmentApiService
.
recycle
(
string
);
}
}
}
...
...
@@ -193,6 +212,30 @@ public class DepartmentContoller extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
dtoList
);
}
@RequestMapping
(
"department-recycle-list"
)
public
HaobanResponse
departmentRecycleList
(
String
keyword
,
Integer
storeFlag
,
BasePageInfo
pageInfo
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getAppLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
Integer
recycleFlag
=
1
;
Page
<
DepartmentDTO
>
page
=
departmentApiService
.
pageDepartmentByParams
(
pageInfo
,
wxEnterpriseId
,
keyword
,
storeFlag
,
recycleFlag
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
page
);
}
@RequestMapping
(
"department-repair"
)
public
HaobanResponse
departmentRepair
(
String
departmentId
)
{
DepartmentDTO
dto
=
departmentApiService
.
selectById
(
departmentId
);
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10003
);
}
departmentApiService
.
repairRecycle
(
departmentId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
private
void
handler
(
String
sonDepartment
,
String
parentId
)
{
if
(
StringUtils
.
isNotBlank
(
sonDepartment
))
{
...
...
@@ -212,6 +255,7 @@ public class DepartmentContoller extends WebBaseController{
if
(
StringUtils
.
isBlank
(
departmentId
))
{
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
department
.
setWxEnterpriseId
(
dto
.
getWxEnterpriseId
());
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setIsStore
(
0
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/test/TestController.java
View file @
0689ee7a
...
...
@@ -30,43 +30,43 @@ import java.util.Map;
@RequestMapping
(
"/test"
)
public
class
TestController
extends
WebBaseController
{
@Autowired
private
TestService
testService
;
@RequestMapping
(
"/testList"
)
@ResponseBody
public
HaobanResponse
testList
(
String
id
,
BasePageInfo
info
)
{
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_1
;
Page
<
TestDTO
>
testDTOPage
=
testService
.
queryPage
(
info
);
return
resultResponse
(
errCode
,
testDTOPage
);
}
@RequestMapping
(
"/imcallback"
)
@ResponseBody
public
JSONObject
imcallback
(
@RequestBody
JSONObject
msg
)
{
System
.
out
.
println
(
msg
);
System
.
out
.
println
(
msg
.
toJSONString
());
String
rest
=
"{\n"
+
" \"ActionStatus\": \"OK\",\n"
+
" \"ErrorInfo\": \"\",\n"
+
" \"ErrorCode\": 0 // 0 为允许发言\n"
+
"}"
;
return
JSONObject
.
parseObject
(
rest
);
}
@RequestMapping
(
"/testListVo"
)
@ResponseBody
public
HaobanResponse
testListVo
(
TestQo
qo
,
BasePageInfo
info
)
{
HaoBanErrCode
errCode
=
HaoBanErrCode
.
ERR_1
;
String
s
=
CheckContainUtil
.
checkAttr
(
qo
);
if
(
s
!=
null
)
{
System
.
out
.
println
(
"缺少参数"
);
errCode
=
HaoBanErrCode
.
ERR_5
;
return
resultResponse
(
errCode
);
}
Page
<
TestDTO
>
testDTOPage
=
testService
.
queryPage
(
info
);
List
<
TestVo
>
res
=
EntityUtil
.
changeEntityListByJSON
(
TestVo
.
class
,
testDTOPage
.
getResult
());
return
resultResponse
(
errCode
,
res
);
}
//
@Autowired
//
private TestService testService;
//
//
@RequestMapping("/testList")
//
@ResponseBody
//
public HaobanResponse testList(String id, BasePageInfo info) {
//
HaoBanErrCode errCode = HaoBanErrCode.ERR_1;
//
Page<TestDTO> testDTOPage = testService.queryPage(info);
//
return resultResponse(errCode, testDTOPage);
//
}
//
//
@RequestMapping("/imcallback")
//
@ResponseBody
//
public JSONObject imcallback(@RequestBody JSONObject msg) {
//
System.out.println(msg);
//
System.out.println(msg.toJSONString());
//
String rest = "{\n" +
//
" \"ActionStatus\": \"OK\",\n" +
//
" \"ErrorInfo\": \"\",\n" +
//
" \"ErrorCode\": 0 // 0 为允许发言\n" +
//
"}";
//
return JSONObject.parseObject(rest);
//
}
//
//
//
@RequestMapping("/testListVo")
//
@ResponseBody
//
public HaobanResponse testListVo(TestQo qo, BasePageInfo info) {
//
HaoBanErrCode errCode = HaoBanErrCode.ERR_1;
//
String s = CheckContainUtil.checkAttr(qo);
//
if (s != null) {
//
System.out.println("缺少参数");
//
errCode = HaoBanErrCode.ERR_5;
//
return resultResponse(errCode);
//
}
//
Page<TestDTO> testDTOPage = testService.queryPage(info);
//
List<TestVo> res = EntityUtil.changeEntityListByJSON(TestVo.class, testDTOPage.getResult());
//
return resultResponse(errCode, res);
//
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/interceptor/WebInterceptor.java
View file @
0689ee7a
...
...
@@ -4,14 +4,12 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.haoban.auth.api.anno.MenuCheck
;
import
com.gic.haoban.auth.api.dto.UserRightDetailDTO
;
import
com.gic.haoban.auth.api.enums.RoleCodeEnum
;
import
com.gic.haoban.auth.api.service.ClerkRightManageService
;
import
com.gic.haoban.common.utils.AuthRequestUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
...
...
@@ -32,8 +30,8 @@ public class WebInterceptor extends HandlerInterceptorAdapter {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
WebInterceptor
.
class
);
@Autowired
private
ClerkRightManageService
clerkRightManageService
;
//
@Autowired
//
private ClerkRightManageService clerkRightManageService;
private
void
errorResult
(
HttpServletResponse
httpServletResponse
,
HaoBanErrCode
errCode
)
{
...
...
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
0689ee7a
...
...
@@ -11,7 +11,7 @@
<context:component-scan
base-package=
"com.gic.haoban"
/>
<!-- 应用名称 -->
<dubbo:application
name=
"haoban-
apps
-web"
/>
<dubbo:application
name=
"haoban-
manage3
-web"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<!-- 使用zookeeper注册中心暴露服务地址 -->
...
...
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