From 88b54772dbcf5ecab1e2316e4e4626ac901b8908 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期二, 22 一月 2019 15:58:24 +0800 Subject: [PATCH] 邀请码添加返回状态 --- fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java | 187 +++++++++++++++++++++++++++++----------------- 1 files changed, 117 insertions(+), 70 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java b/fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java index 5eb7c69..dcf9194 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java @@ -6,6 +6,7 @@ import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserInfo; +import com.yeshi.fanli.exception.ThreeSaleException; public interface ThreeSaleSerivce { @@ -20,7 +21,7 @@ int findInviteCount(long id); - void bind(UserInfo invitee, UserInfo inviter); + void bind(UserInfo invitee, UserInfo inviter) throws ThreeSaleException; void effective(UserInfo find); @@ -50,12 +51,12 @@ // 鑾峰彇鏈�杩戞湁鏁堢殑鍒嗛攢鍒楄〃 List<ThreeSale> getLastestThreeSaleList(int i, String key); - //閭�璇峰叧绯� + // 閭�璇峰叧绯� int getLastestThreeSaleCount(String key); - /** * 鏌ヨ涓�搴﹂槦鍛橀泦鍚� + * * @param start * @param count * @param key @@ -68,6 +69,7 @@ /** * 鏌ヨ浜屽害闃熷憳闆嗗悎 + * * @param start * @param count * @param key @@ -80,78 +82,81 @@ /** * 鍒犻櫎閭�璇峰叧绯籭d + * * @param id * @return */ public int deleteByPrimaryKey(Long id); - - /** - * 闀挎椂闂存湭閭�璇锋垚鍔熺敤鎴� + * 闀挎椂闂存湭閭�璇锋垚鍔熺敤鎴� + * * @param daysNum * @return */ public List<Long> queryLongTimeFailed(int daysNum); - - /** - * 闀挎椂闂� 閭�璇锋垚鍔熺敤鎴� - * @param daysNum - * @return - */ + /** + * 闀挎椂闂� 閭�璇锋垚鍔熺敤鎴� + * + * @param daysNum + * @return + */ public List<ThreeSale> queryLongTimeSuccess(int daysNum); - /** * 璁剧疆瀵瑰簲閭�璇疯繃鏈� + * * @param list * @return */ public int updateExpire(List<Long> list); - /** - * 涓�绾ф煡璇� - * @param start - * @param count - * @param uid - * @param startTime - * @param endTime - * @return - */ - public List<ThreeSale> listFirstTeamQuery(long start, int count, Long uid, Integer state, - String startTime, String endTime); - + /** + * 涓�绾ф煡璇� + * + * @param start + * @param count + * @param uid + * @param startTime + * @param endTime + * @return + */ + public List<ThreeSale> listFirstTeamQuery(long start, int count, Long uid, Integer state, String startTime, + String endTime); + public long countFirstTeamQuery(Long uid, Integer state, String startTime, String endTime); - /** - * 浜岀骇鏌ヨ - * @param start - * @param count - * @param uid - * @param startTime - * @param endTime - * @return - */ - public List<ThreeSale> listSecondTeamQuery(long start, int count, Long uid, Integer state, - String startTime,String endTime); - + /** + * 浜岀骇鏌ヨ + * + * @param start + * @param count + * @param uid + * @param startTime + * @param endTime + * @return + */ + public List<ThreeSale> listSecondTeamQuery(long start, int count, Long uid, Integer state, String startTime, + String endTime); + public long countSecondTeamQuery(Long uid, Integer state, String startTime, String endTime); - - - /** - * 涓婄骇鏌ヨ - * @param start - * @param count - * @param uid - * @return - */ + + /** + * 涓婄骇鏌ヨ + * + * @param start + * @param count + * @param uid + * @return + */ public List<ThreeSale> listSuperiorQuery(long start, int count, Integer state, Long uid); - + public long countSuperiorQuery(Integer state, Long uid); /** * app绔竴绾ф煡璇�1.4.1 + * * @param start * @param count * @param uid @@ -161,55 +166,97 @@ /** * 缁熻鎵�鏈変竴绾ч槦鍛� + * * @param uid - * @param state 鐘舵�侊紝鍊� 涓虹┖鏃跺垯缁熻鎵�鏈� + * @param state + * 鐘舵�侊紝鍊� 涓虹┖鏃跺垯缁熻鎵�鏈� * @return */ public long countFirstTeam(Long uid, Integer state); - - - /** - * app绔簩绾ф煡璇�1.4.1 - * @param start - * @param count - * @param uid - * @return - */ + + /** + * app绔簩绾ф煡璇�1.4.1 + * + * @param start + * @param count + * @param uid + * @return + */ public List<ThreeSale> listSecondTeam(long start, int count, Long uid); /** - * 缁熻浜岀骇闃熷憳 - * @param uid - * @param state 鐘舵�侊紝鍊� 涓虹┖鏃跺垯缁熻鎵�鏈� - * @return - */ + * 缁熻浜岀骇闃熷憳 + * + * @param uid + * @param state + * 鐘舵�侊紝鍊� 涓虹┖鏃跺垯缁熻鎵�鏈� + * @return + */ public long countSecondTeam(Long uid, Integer state); - /** * 鍓嶇鏌ヨ涓�绾ч槦鍛� + * * @param start * @param count * @param uid * @return */ public JSONObject getMyFirstTeam(long start, int count, Long uid); - - + /** * 鍓嶇鏌ヨ浜岀骇闃熷憳 + * * @param start * @param count * @param uid * @return */ public JSONObject getMySecondTeam(long start, int count, Long uid); + + /** + * 鑾峰彇涓婄骇 + * + * @param uid + * @return + */ + public ThreeSale getMyBoss(Long uid); + + public ThreeSale selectByPrimaryKey(Long id); + + /** + * 鏌ヨ闃熷憳璁板綍 id+uid + * + * @param id + * @param uid + * @param expire + * 鏄惁澶辨晥鐘舵�� + * @return + */ + public List<ThreeSale> listbyIdAndBossId(Long id, Long uid, Integer expire); + + /** + * 鏍规嵁閭�璇疯�呮煡璇㈠叧绯� + * + * @param workerId + * @return + */ + public List<ThreeSale> listByWorkerId(Long workerId); + /** - * 鑾峰彇涓婄骇 - * @param uid - * @return - */ - public ThreeSale getMyBoss(Long uid); + * 鑾峰彇鎴愬姛閭�璇峰叧绯绘暟閲� + * @param uid + * @return + */ + public int getSuccessRelationshipNum(Long uid); + + /** + * 閭�璇风爜鐢熸垚涓婁笅绾у叧绯� + * @param invitee + * @param inviter + * @throws ThreeSaleException + */ + public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter) throws ThreeSaleException; } -- Gitblit v1.8.0