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
76b5253b
Commit
76b5253b
authored
Oct 13, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:合并根据导购和企业id查询绑定关联关系代码
parent
81720f74
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
99 deletions
+37
-99
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+0
-12
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+1
-14
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+0
-12
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+1
-6
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-7
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+21
-30
HmStoreController.java
...ic/haoban/manage/web/controller/hm/HmStoreController.java
+12
-18
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
76b5253b
...
@@ -173,18 +173,6 @@ public interface StaffClerkRelationApiService {
...
@@ -173,18 +173,6 @@ public interface StaffClerkRelationApiService {
List
<
StaffClerkRelationDTO
>
listByStaffId
(
String
wxEnterpriseId
,
String
staffId
);
List
<
StaffClerkRelationDTO
>
listByStaffId
(
String
wxEnterpriseId
,
String
staffId
);
/**
/**
* 通过职员id 查询职员id列表
*
* @param clerkIds 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-07-07 17:28:01
*/
List
<
StaffClerkRelationDTO
>
listClerkIdConcatFlagByClerkIds
(
List
<
String
>
clerkIds
,
String
wxEnterpriseId
);
/**
* 导购门店转移或者删除
* 导购门店转移或者删除
* clerkStoreMoveDelMq
* clerkStoreMoveDelMq
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
76b5253b
...
@@ -64,7 +64,7 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -64,7 +64,7 @@ public interface TabHaobanStaffClerkRelationMapper {
* @author mozhu
* @author mozhu
* @date 2022-01-13 11:36:11
* @date 2022-01-13 11:36:11
*/
*/
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
List
<
TabHaobanStaffClerkRelation
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
...
@@ -238,19 +238,6 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -238,19 +238,6 @@ public interface TabHaobanStaffClerkRelationMapper {
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
* 通过职员id 查询职员id列表
*
* @param clerkIds 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-07-07 16:30:32
*/
List
<
StaffClerkRelationDTO
>
listClerkIdConcatFlagByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
void
deleteByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
void
deleteByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
76b5253b
...
@@ -167,18 +167,6 @@ public interface StaffClerkRelationService {
...
@@ -167,18 +167,6 @@ public interface StaffClerkRelationService {
*/
*/
int
updateOpenConcatFlagById
(
Integer
openConcatFlag
,
String
staffClerkRelationId
);
int
updateOpenConcatFlagById
(
Integer
openConcatFlag
,
String
staffClerkRelationId
);
/**
* 通过职员id 查询职员id列表
*
* @param clerkIds 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-07-07 16:41:35
*/
List
<
StaffClerkRelationDTO
>
listClerkIdConcatFlagByClerkIds
(
List
<
String
>
clerkIds
,
String
wxEnterpriseId
);
/**
/**
* 是否有区经
* 是否有区经
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
76b5253b
...
@@ -262,7 +262,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -262,7 +262,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
Collections
.
EMPTY_LIST
;
return
Collections
.
EMPTY_LIST
;
}
}
return
mapper
.
listByClerkIds
(
clerkList
,
null
);
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
mapper
.
listByClerkIds
(
clerkList
,
null
)
);
}
}
@Override
@Override
...
@@ -363,11 +363,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -363,11 +363,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
}
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listClerkIdConcatFlagByClerkIds
(
List
<
String
>
clerkIds
,
String
wxEnterpriseId
)
{
return
mapper
.
listClerkIdConcatFlagByClerkIds
(
clerkIds
,
wxEnterpriseId
);
}
@Override
public
boolean
getBindByManage
(
String
enterpriseId
)
{
public
boolean
getBindByManage
(
String
enterpriseId
)
{
return
mapper
.
getBindByManage
(
enterpriseId
)
>
0
;
return
mapper
.
getBindByManage
(
enterpriseId
)
>
0
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
76b5253b
...
@@ -217,7 +217,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -217,7 +217,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
return
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
null
);
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
null
)
);
}
}
@Override
@Override
...
@@ -225,7 +225,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -225,7 +225,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
return
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
wxEnterpriseId
);
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
,
wxEnterpriseId
)
);
}
}
@Override
@Override
...
@@ -454,11 +454,6 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -454,11 +454,6 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listClerkIdConcatFlagByClerkIds
(
List
<
String
>
clerkIds
,
String
wxEnterpriseId
)
{
return
staffClerkRelationService
.
listClerkIdConcatFlagByClerkIds
(
clerkIds
,
wxEnterpriseId
);
}
@Override
public
void
clerkStoreMoveDel
(
String
param
)
{
public
void
clerkStoreMoveDel
(
String
param
)
{
logger
.
info
(
"导购转移删除修改通知:{}"
,
param
);
logger
.
info
(
"导购转移删除修改通知:{}"
,
param
);
if
(
StringUtils
.
isBlank
(
param
))
{
if
(
StringUtils
.
isBlank
(
param
))
{
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
76b5253b
...
@@ -18,8 +18,19 @@
...
@@ -18,8 +18,19 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
staff_clerk_relation_id
staff_clerk_relation_id
, staff_id, wx_enterprise_id, enterprise_id, store_id,
,
clerk_id, clerk_code, status_flag, create_time, update_time,open_concat_flag,manage_flag,clerk_type
staff_id,
wx_enterprise_id,
enterprise_id,
store_id,
clerk_id,
clerk_code,
status_flag,
create_time,
update_time,
open_concat_flag,
manage_flag,
clerk_type
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
...
@@ -121,27 +132,19 @@
...
@@ -121,27 +132,19 @@
and status_flag = 1
and status_flag = 1
</update>
</update>
<select
id=
"listByClerkIds"
result
Type=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
"
<select
id=
"listByClerkIds"
result
Map=
"BaseResultMap
"
parameterType=
"java.lang.String"
>
parameterType=
"java.lang.String"
>
select
select
a.staff_clerk_relation_id staffClerkRelationId,
<include
refid=
"Base_Column_List"
></include>
a.staff_id staffId,
from tab_haoban_staff_clerk_relation
a.wx_enterprise_id wxEnterpriseId,
where status_flag=1
a.enterprise_id enterpriseId,
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
a.store_id storeId,
and wx_enterprise_id = #{wxEnterpriseId}
a.clerk_id clerkId,
</if>
a.clerk_code clerkCode,
and clerk_id in
a.status_flag statusFlag,
a.manage_flag manageFlag
from tab_haoban_staff_clerk_relation a
where a.status_flag=1
and a.clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and a.wx_enterprise_id = #{wxEnterpriseId}
</if>
</select>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
...
@@ -498,18 +501,6 @@
...
@@ -498,18 +501,6 @@
group by a.staff_clerk_relation_id
group by a.staff_clerk_relation_id
</select>
</select>
<select
id=
"listClerkIdConcatFlagByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
clerk_id clerkId,
open_concat_flag openConcatFlag
from tab_haoban_staff_clerk_relation
where status_flag=1 and wx_enterprise_id = #{wxEnterpriseId}
and clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</select>
<update
id=
"deleteByEnterpriseId"
>
<update
id=
"deleteByEnterpriseId"
>
update tab_haoban_staff_clerk_relation
update tab_haoban_staff_clerk_relation
set status_flag = 0,
set status_flag = 0,
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmStoreController.java
View file @
76b5253b
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
hm
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
...
@@ -41,6 +24,17 @@ import com.gic.haoban.manage.web.vo.hm.ClerkListVO;
...
@@ -41,6 +24,17 @@ import com.gic.haoban.manage.web.vo.hm.ClerkListVO;
import
com.gic.haoban.manage.web.vo.hm.ClerkStoreListVO
;
import
com.gic.haoban.manage.web.vo.hm.ClerkStoreListVO
;
import
com.gic.haoban.manage.web.vo.hm.StoreVO
;
import
com.gic.haoban.manage.web.vo.hm.StoreVO
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@RequestMapping
(
"hm"
)
@RequestMapping
(
"hm"
)
...
@@ -163,7 +157,7 @@ public class HmStoreController {
...
@@ -163,7 +157,7 @@ public class HmStoreController {
List
<
String
>
statusList
=
new
ArrayList
<>();
List
<
String
>
statusList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
clerkIdList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
clerkIdList
))
{
List
<
StaffClerkRelationDTO
>
clerkRelationList
=
this
.
staffClerkRelationApiService
List
<
StaffClerkRelationDTO
>
clerkRelationList
=
this
.
staffClerkRelationApiService
.
list
ClerkIdConcatFlagByClerkIds
(
clerkIdList
,
wxEnterpriseId
);
.
list
ByClerkIdsWxEnterpriseId
(
clerkIdList
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isNotEmpty
(
clerkRelationList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
clerkRelationList
))
{
status2List
.
addAll
(
clerkRelationList
.
stream
().
filter
(
dto
->
dto
.
getOpenConcatFlag
()
==
0
)
status2List
.
addAll
(
clerkRelationList
.
stream
().
filter
(
dto
->
dto
.
getOpenConcatFlag
()
==
0
)
.
map
(
dto
->
dto
.
getClerkId
()).
collect
(
Collectors
.
toList
()));
.
map
(
dto
->
dto
.
getClerkId
()).
collect
(
Collectors
.
toList
()));
...
...
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