Commit 264f9436 by 陶光胜

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-store into developer

parents e1769021 062d5011
......@@ -8,10 +8,9 @@ import java.util.List;
import java.util.Map;
/**
*
* @ClassName: TabClerkMapper
* @Description:
* @author zhiwj
* @ClassName: TabClerkMapper
* @Description:
* @date 2020-09-09 18:35
*/
public interface TabClerkMapper {
......@@ -65,36 +64,35 @@ public interface TabClerkMapper {
/**
* countByClerkCode
* @Title: countByClerkCode
* @Description:
* @author zhiwj
*
* @param storeId
* @param clerkCode
* @param clerkId
* @return java.lang.Integer
* @throws
* @Title: countByClerkCode
* @Description:
* @author zhiwj
*/
Integer countByClerkCode(@Param("storeId") Integer storeId, @Param("clerkCode") String clerkCode, @Param("clerkId") Integer clerkId);
/**
* countByPhoneNumber
* @Title: countByPhoneNumber
* @Description:
* @author zhiwj
*
* @param storeId
* @param phoneNumber
* @param clerkId
* @return java.lang.Integer
* @throws
* @Title: countByPhoneNumber
* @Description:
* @author zhiwj
*/
Integer countByPhoneNumber(@Param("storeId") Integer storeId, @Param("phoneNumber") String phoneNumber, @Param("clerkId") Integer clerkId);
/**
* listClerkByStoreInfoId
* @Title: listClerkByStoreInfoId
* @Description:
* @author zhiwj
* @param enterpriseId
*
* @param storeClerkIds
* @param storeInfoIds
* @param search
......@@ -102,95 +100,101 @@ public interface TabClerkMapper {
* @param status
* @return java.util.List<com.gic.store.entity.TabClerk>
* @throws
* @Title: listClerkByStoreInfoId
* @Description:
* @author zhiwj
*/
List<TabClerk> listClerkByStoreInfoId(@Param("enterpriseId") Integer enterpriseId, @Param("storeClerkIds") List<Integer> storeClerkIds, @Param("storeInfoIds") String storeInfoIds, @Param("search") String search, @Param("clerkType") Integer clerkType, @Param("status") Integer status);
List<TabClerk> listClerkByStoreInfoId(@Param("storeClerkIds") List<Integer> storeClerkIds, @Param("storeInfoIds") String storeInfoIds, @Param("search") String search, @Param("clerkType") Integer clerkType, @Param("status") Integer status);
/**
* getTotalClerk
* @Title: getTotalClerk
* @Description:
* @author zhiwj
* @param enterpriseId
*
* @param storeClerkIds
* @param search
* @param status
* @return java.lang.Integer
* @throws
* @Title: getTotalClerk
* @Description:
* @author zhiwj
*/
Integer getTotalClerk(@Param("enterpriseId") Integer enterpriseId, @Param("storeClerkIds") List<Integer> storeClerkIds, @Param("search") String search, @Param("status") Integer status);
Integer getTotalClerk(@Param("storeClerkIds") List<Integer> storeClerkIds, @Param("search") String search, @Param("status") Integer status);
/**
* getStoreInfoIdsBySearch
* @Title: getStoreInfoIdsBySearch
* @Description:
* @author zhiwj
*
* @param enterpriseId
* @param search
* @return java.util.List<java.lang.Integer>
* @throws
* @Title: getStoreInfoIdsBySearch
* @Description:
* @author zhiwj
*/
List<Integer> getStoreInfoIdsBySearch(@Param("enterpriseId") Integer enterpriseId, @Param("search") String search);
/**
* updateClerkStatus
* @Title: updateClerkStatus
* @Description:
* @author zhiwj
*
* @param enterpriseId
* @param clerkIds
* @param status
* @return java.lang.Integer
* @throws
* @Title: updateClerkStatus
* @Description:
* @author zhiwj
*/
Integer updateClerkStatus(@Param("enterpriseId") Integer enterpriseId,@Param("clerkIds") List<Integer> clerkIds, @Param("status") Integer status);
Integer updateClerkStatus(@Param("enterpriseId") Integer enterpriseId, @Param("clerkIds") List<Integer> clerkIds, @Param("status") Integer status);
/**
* getBySelective
* @Title: getBySelective
* @Description:
* @author zhiwj
*
* @param tabClerk
* @return com.gic.store.entity.TabClerk
* @throws
* @Title: getBySelective
* @Description:
* @author zhiwj
*/
TabClerk getBySelective(TabClerk tabClerk);
/**
* listClerkByIds
* @Title: listClerkByIds
* @Description:
* @author zhiwj
* @param enterpriseId
*
* @param clerkIdList
* @return java.util.List<com.gic.store.entity.TabClerk>
* @throws
* @Title: listClerkByIds
* @Description:
* @author zhiwj
*/
List<TabClerk> listClerkByIds(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> clerkIdList);
List<TabClerk> listClerkByIds(@Param("ids") List<Integer> clerkIdList);
/**
* getClerkByCode
* @Title: getClerkByCode
* @Description:
* @author zhiwj
* @param enterpriseId
*
* @param clerkCode
* @param storeInfoId
* @return com.gic.store.entity.TabClerk
* @throws
* @Title: getClerkByCode
* @Description:
* @author zhiwj
*/
TabClerk getClerkByCode(@Param("enterpriseId") Integer enterpriseId, @Param("clerkCode") String clerkCode, @Param("storeInfoId") Integer storeInfoId);
TabClerk getClerkByCode(@Param("clerkCode") String clerkCode, @Param("storeInfoId") Integer storeInfoId);
/**
* getClerkLeaderByStoreInfoId
* @Title: getClerkLeaderByStoreInfoId
* @Description:
* @author zhiwj
* @param enterpriseId
*
* @param storeInfoId
* @return com.gic.store.entity.TabClerk
* @throws
* @Title: getClerkLeaderByStoreInfoId
* @Description:
* @author zhiwj
*/
TabClerk getClerkLeaderByStoreInfoId(@Param("enterpriseId") Integer enterpriseId, @Param("storeInfoId") Integer storeInfoId);
TabClerk getClerkLeaderByStoreInfoId(@Param("storeInfoId") Integer storeInfoId);
@MapKey("clerkPositionId")
/**
......@@ -198,82 +202,87 @@ public interface TabClerkMapper {
* @Title: countMapByPosition
* @Description:
* @author zhiwj
* @param enterpriseId
* @param enterpriseId
* @param positionList
* @return java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>>
* @return java.util.Map<java.lang.Integer, java.util.Map < java.lang.String, java.lang.Object>>
* @throws
*/
Map<Integer, Map<String, Object>> countMapByPosition(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> positionList);
/**
* updatePosition
* @Title: updatePosition
* @Description:
* @author zhiwj
*
* @param enterpriseId
* @param clerkPositionId
* @param positionName
* @return void
* @throws
* @Title: updatePosition
* @Description:
* @author zhiwj
*/
void updatePosition(@Param("enterpriseId") Integer enterpriseId, @Param("positionId") Integer clerkPositionId, @Param("positionName") String positionName);
void updatePosition(@Param("enterpriseId") Integer enterpriseId,@Param("positionId") Integer clerkPositionId, @Param("positionName") String positionName);
/**
* listHaobanClerk
* @Title: listHaobanClerk
* @Description:
* @author zhiwj
*
* @param enterpriseIdList
* @param keyword
* @param storeInfoIdList
* @return java.util.List<com.gic.store.entity.TabClerk>
* @throws
* @Title: listHaobanClerk
* @Description:
* @author zhiwj
*/
List<TabClerk> listHaobanClerk(@Param("enterpriseIdList") List<Integer> enterpriseIdList, @Param("keyword") String keyword, @Param("storeInfoIdList") List<Integer> storeInfoIdList);
/**
* listClerkByPositionId
* @Title: listClerkByPositionId
* @Description:
* @author zhiwj
*
* @param enterpriseId
* @param positionId
* @return java.util.List<com.gic.store.entity.TabClerk>
* @throws
* @Title: listClerkByPositionId
* @Description:
* @author zhiwj
*/
List<TabClerk> listClerkByPositionId(@Param("enterpriseId") Integer enterpriseId, @Param("positionId") Integer positionId);
/**
* listAllClerkId
* @Title: listAllClerkId
* @Description:
* @author zhiwj
*
* @param enterpriseId
* @return java.util.List<java.lang.Integer>
* @throws
* @Title: listAllClerkId
* @Description:
* @author zhiwj
*/
List<Integer> listAllClerkId(@Param("enterpriseId") Integer enterpriseId);
/**
* listStoreInfoIdByStoreInfoId
* @Title: listStoreInfoIdByStoreInfoId
* @Description:
* @author zhiwj
* @param enterpriseId
*
* @param storeInfoIdList
* @return java.util.List<java.lang.Integer>
* @throws
* @Title: listStoreInfoIdByStoreInfoId
* @Description:
* @author zhiwj
*/
List<Integer> listStoreInfoIdByStoreInfoId(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> storeInfoIdList);
List<Integer> listStoreInfoIdByStoreInfoId(@Param("ids") List<Integer> storeInfoIdList);
/**
* listClerkIdByStoreInfoId
* @Title: listClerkIdByStoreInfoId
* @Description:
* @author taogs
*
* @param storeInfoIdList
* @return java.util.List<java.lang.Integer>
* @throws
* @throws
* @Title: listClerkIdByStoreInfoId
* @Description:
* @author taogs
*/
List<TabClerk> listClerkByStoreInfoIdList( @Param("ids") List<Integer> storeInfoIdList);
List<TabClerk> listClerkByStoreInfoIdList(@Param("ids") List<Integer> storeInfoIdList);
}
\ No newline at end of file
......@@ -106,12 +106,12 @@ public class ClerkServiceImpl implements ClerkService {
if (CollectionUtils.isNotEmpty(storeInfoIdList)) {
storeInfoIds = "(" + storeInfoIdList.stream().map(Object::toString).collect(Collectors.joining(",")) + ")";
}
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, null, storeInfoIds, search, null, 1);
return tabClerkMapper.listClerkByStoreInfoId( null, storeInfoIds, search, null, 1);
}
@Override
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, String storeInfoIds, String search) {
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, null, storeInfoIds, search, null, null);
return tabClerkMapper.listClerkByStoreInfoId( null, storeInfoIds, search, null, null);
}
@Override
......@@ -121,17 +121,17 @@ public class ClerkServiceImpl implements ClerkService {
if (CollectionUtils.isNotEmpty(storeInfoIdList)) {
storeInfoIds = "(" + storeInfoIdList.stream().map(Object::toString).collect(Collectors.joining(",")) + ")";
}
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, null, storeInfoIds, search, clerkType, null);
return tabClerkMapper.listClerkByStoreInfoId( null, storeInfoIds, search, clerkType, null);
}
@Override
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIds, Integer status, String search) {
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, storeInfoIds, null, search, null, status);
return tabClerkMapper.listClerkByStoreInfoId( storeInfoIds, null, search, null, status);
}
@Override
public Integer getTotalClerk(Integer enterpriseId, List<Integer> storeInfoIds, ClerkSearchDTO search) {
return tabClerkMapper.getTotalClerk(enterpriseId, storeInfoIds, search.getSearch(), search.getStatus());
return tabClerkMapper.getTotalClerk(storeInfoIds, search.getSearch(), search.getStatus());
}
@Override
......@@ -150,7 +150,7 @@ public class ClerkServiceImpl implements ClerkService {
List<Integer> clerkIdList;
String[] split = clerkIds.split(GlobalInfo.FLAG_COMMA);
clerkIdList = Stream.of(split).map(Integer::parseInt).collect(Collectors.toList());
return tabClerkMapper.listClerkByIds(enterpriseId, clerkIdList);
return tabClerkMapper.listClerkByIds( clerkIdList);
} else {
return Collections.emptyList();
}
......@@ -158,7 +158,7 @@ public class ClerkServiceImpl implements ClerkService {
@Override
public List<TabClerk> listClerkByIds(List<Integer> clerkIdList) {
return tabClerkMapper.listClerkByIds(null, clerkIdList);
return tabClerkMapper.listClerkByIds( clerkIdList);
}
@Override
......@@ -168,17 +168,17 @@ public class ClerkServiceImpl implements ClerkService {
@Override
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, String search) {
return this.tabClerkMapper.listClerkByStoreInfoId(enterpriseId, null, null, search, null, null);
return this.tabClerkMapper.listClerkByStoreInfoId( null, null, search, null, null);
}
@Override
public TabClerk getClerkByCode(Integer enterpriseId, String clerkCode, Integer storeInfoId) {
return tabClerkMapper.getClerkByCode(enterpriseId, clerkCode, storeInfoId);
return tabClerkMapper.getClerkByCode( clerkCode, storeInfoId);
}
@Override
public TabClerk getClerkLeaderByStoreInfoId(Integer enterpriseId, Integer storeInfoId) {
return tabClerkMapper.getClerkLeaderByStoreInfoId(enterpriseId, storeInfoId);
return tabClerkMapper.getClerkLeaderByStoreInfoId( storeInfoId);
}
@Override
......@@ -213,7 +213,7 @@ public class ClerkServiceImpl implements ClerkService {
@Override
public List<Integer> listStoreInfoIdByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIdList) {
return tabClerkMapper.listStoreInfoIdByStoreInfoId(enterpriseId, storeInfoIdList);
return tabClerkMapper.listStoreInfoIdByStoreInfoId( storeInfoIdList);
}
@Override
......
......@@ -238,9 +238,6 @@
<include refid="Base_Column_List" />
from tab_clerk
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="null != storeClerkIds and storeClerkIds.size() &gt; 0">
and store_info_id in
<foreach close=")" collection="storeClerkIds" index="index" item="item" open="(" separator=",">
......@@ -262,19 +259,20 @@
select
count(*)
from tab_clerk
where enterprise_id = #{enterpriseId}
<if test="status != null ">
and status = #{status}
</if>
<if test="null != storeClerkIds and storeClerkIds.size() &gt; 0">
and store_info_id in
<foreach close=")" collection="storeClerkIds" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
<if test="search != null and search != '' ">
and (clerk_code like concat('%', #{search} ,'%') or clerk_name like concat('%', #{search} ,'%') or phone_number like concat('%', #{search} ,'%') )
</if>
<where>
<if test="status != null ">
and status = #{status}
</if>
<if test="null != storeClerkIds and storeClerkIds.size() &gt; 0">
and store_info_id in
<foreach close=")" collection="storeClerkIds" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
<if test="search != null and search != '' ">
and (clerk_code like concat('%', #{search} ,'%') or clerk_name like concat('%', #{search} ,'%') or phone_number like concat('%', #{search} ,'%') )
</if>
</where>
</select>
<select id="getStoreInfoIdsBySearch" resultType="java.lang.Integer">
select
......@@ -325,9 +323,6 @@
<include refid="Base_Column_List" />
from tab_clerk
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="null != ids and ids.size &gt; 0">
and clerk_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
......@@ -343,9 +338,6 @@
where
store_info_id = #{storeInfoId}
and clerk_code = #{clerkCode}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
</select>
<select id="getClerkLeaderByStoreInfoId" resultMap="BaseResultMap">
select
......@@ -353,9 +345,6 @@
from tab_clerk
where
store_info_id = #{storeInfoId}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
and position_id = 1
limit 1
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment