Commit 3cbcfb2b by 徐高华

单向好友

parent 7b83ee53
......@@ -332,4 +332,11 @@ public interface ExternalClerkRelatedApiService {
*/
List<ExternalUserClerkDTO> listExternalClerk(String enterpriseId , String memberId) ;
/**
* 单向好友数
*/
int halfFriendCount(String wxEnterpriseId , String storeId , String clerkId , String staffId) ;
Page<ExternalClerkRelatedDTO> halfFriendPage(String wxEnterpriseId , String storeId , String clerkId , String staffId,int type, BasePageInfo basePageInfo) ;
}
......@@ -435,4 +435,8 @@ public interface TabHaobanExternalClerkRelatedMapper {
* @return
*/
String getMemberIdByExternalId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("externalUserId") String externalUserId);
int halfFriendCount(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId")String storeId, @Param("clerkId")String clerkId, @Param("staffId")String staffId);
List<ExternalClerkRelatedDTO> halfFriendPage(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId")String storeId, @Param("clerkId")String clerkId, @Param("staffId")String staffId, @Param("staffId")int type);
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.dubbo.entity.ProviderLocalTag;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService;
......@@ -812,4 +813,18 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
log.info("好友={}",JSONObject.toJSONString(retList));
return retList;
}
@Override
public int halfFriendCount(String wxEnterpriseId, String storeId, String clerkId, String staffId) {
return this.tabHaobanExternalClerkRelatedMapper.halfFriendCount(wxEnterpriseId, storeId, clerkId, staffId) ;
}
@Override
public Page<ExternalClerkRelatedDTO> halfFriendPage(String wxEnterpriseId, String storeId, String clerkId, String staffId, int type, BasePageInfo basePageInfo) {
PageHelper.startPage(basePageInfo);
List<ExternalClerkRelatedDTO> list = this.tabHaobanExternalClerkRelatedMapper.halfFriendPage(wxEnterpriseId, storeId, clerkId, staffId, type);
Page<ExternalClerkRelatedDTO> retPage = PageHelperUtils.changePageHelperToCurrentPage(list,
ExternalClerkRelatedDTO.class);
return retPage;
}
}
......@@ -893,4 +893,22 @@
limit 1
</select>
<select id="halfFriendCount" resultType="java.lang.Integer">
select count(*) from tab_haoban_external_clerk_related where wx_enterprise_id = #{wxEnterpriseId} and status_flag in (1,3,4)
and staff_id = #{staffId} and clerk_id=#{clerkId} and store_id = #{storeId}
and external_status = 3
</select>
<select id="halfFriendPage" resultType="com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO">
select <include refid="Base_Column_List"/> from tab_haoban_external_clerk_related
where wx_enterprise_id = #{wxEnterpriseId} and status_flag in (1,3,4)
and staff_id = #{staffId} and clerk_id=#{clerkId} and store_id = #{storeId}
<if test="type==1">
and member_id is not null
</if>
<if test="type==2">
and member_id is null
</if>
</select>
</mapper>
\ No newline at end of file
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