PracticeGroupService.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. package com.ym.mec.biz.service;
  2. import com.ym.mec.biz.dal.dto.*;
  3. import com.ym.mec.biz.dal.entity.PracticeGroup;
  4. import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
  5. import com.ym.mec.biz.dal.enums.PracticeGroupType;
  6. import com.ym.mec.biz.dal.page.PracticeGroupQueryInfo;
  7. import com.ym.mec.biz.dal.page.StudentBuyPracticeQueryInfo;
  8. import com.ym.mec.biz.dal.page.StudentQueryInfo;
  9. import com.ym.mec.common.entity.HttpResponseResult;
  10. import com.ym.mec.common.page.PageInfo;
  11. import com.ym.mec.common.service.BaseService;
  12. import java.math.BigDecimal;
  13. import java.util.Date;
  14. import java.util.List;
  15. import java.util.Map;
  16. public interface PracticeGroupService extends BaseService<Long, PracticeGroup> {
  17. /**
  18. * @describe 获取学生的陪练课
  19. * @author Joburgess
  20. * @date 2020/2/3
  21. * @param userId:
  22. * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleDto>
  23. */
  24. List<CourseScheduleDto> findUserPracticeCourses(Integer userId);
  25. /**
  26. * @describe 检测用户是否能够申请免费陪练课
  27. * @author Joburgess
  28. * @date 2020/2/22
  29. * @param userId:
  30. * @return java.util.Map<java.lang.String,java.lang.Object>
  31. */
  32. Map<String,Object> checkCanApplyFreePracticeGroup(Integer userId);
  33. /**
  34. * 给学生指派老师
  35. * @param practiceGroup: 申请参数
  36. * @return
  37. */
  38. Integer searchTeacherId(PracticeGroup practiceGroup);
  39. /**
  40. * @describe 给广州分部的学生指派老师
  41. * @author Joburgess
  42. * @date 2020/2/4
  43. * @param practiceGroup:
  44. * @return java.lang.Integer
  45. */
  46. Integer searchTeacherIdForGuangZhou(PracticeGroup practiceGroup);
  47. /**
  48. * @describe 获取陪练课预约参数
  49. * @author Joburgess
  50. * @date 2020/1/31
  51. * @param userId: 用户编号
  52. * @return java.util.Map
  53. */
  54. Map getPracticeApplyParams(Integer userId);
  55. /**
  56. * @describe 获取陪练课可预约声部
  57. * @author Joburgess
  58. * @date 2020/3/5
  59. * @param :
  60. * @return com.ym.mec.common.entity.HttpResponseResult
  61. */
  62. Object getPracticeApplySubjects();
  63. /**
  64. * @describe 获取可以预约的教师
  65. * @author Joburgess
  66. * @date 2020/2/9
  67. * @param userId: 用户编号
  68. * @param subjectId: 声部编号
  69. * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
  70. */
  71. List<SimpleUserDto> getEnableApplyTeachers(Integer userId, Integer subjectId);
  72. /**
  73. * @describe 获取指定教师的空闲时间
  74. * @author Joburgess
  75. * @date 2020/2/10
  76. * @param userId: 用户编号
  77. * @param teacherId: 教师编号
  78. * @param firstClassTime: 第一节课开始时间
  79. * @return java.util.Map
  80. */
  81. Map getTeacherFreeTimes(Integer userId, Integer teacherId, Date firstClassTime);
  82. /**
  83. * @describe 获取指定学员所在分部下的教师空闲时间
  84. * @author Joburgess
  85. * @date 2020/2/2
  86. * @param userId: 用户编号
  87. * @param subjectId: 声部编号
  88. * @param firstClassTime: 第一节课开始时间
  89. * @return java.util.Map
  90. */
  91. Map getTeachersFreeTimes(Integer userId, Integer subjectId, Date firstClassTime);
  92. /**
  93. * @describe 获取指定日期内课一预约课程的时间
  94. * @author Joburgess
  95. * @date 2020/2/2
  96. * @param startDay: 天数
  97. * @param endDay: 天数
  98. * @return java.util.Map
  99. */
  100. List<Date> getEnableApplyDates(Date startDay,Date endDay);
  101. List<Date> getEnableApplyDatesIncludeAllTimes(Date startDay,Date endDay);
  102. /**
  103. * @describe 陪练课预约
  104. * @author Joburgess
  105. * @date 2020/1/31
  106. * @param practiceGroup: 预约信息
  107. * @return java.util.Map
  108. */
  109. Map practiceApply(PracticeGroup practiceGroup);
  110. /**
  111. * 获取陪练课列表
  112. * @param queryInfo
  113. * @return
  114. */
  115. PageInfo<PracticeGroupDto> findPracticeGroups(PracticeGroupQueryInfo queryInfo);
  116. /**
  117. * @description: 获取学员可购买的网管课列表
  118. * @param params
  119. * @return java.util.List<com.ym.mec.biz.dal.dto.StudentVipGroupShowListDto>
  120. * @author zx
  121. * @date 2021/10/12 14:56
  122. */
  123. List<StudentVipGroupShowListDto> findPracticeGroups(Map<String, Object> params);
  124. /**
  125. * 获取陪练课课程计划
  126. * @param queryInfo
  127. * @return
  128. */
  129. Object findPracticeGroupCourseSchedules(PracticeGroupQueryInfo queryInfo);
  130. /**
  131. * @describe 获取学生上一次购买的记录
  132. * @author Joburgess
  133. * @date 2020/2/18
  134. * @param userId:
  135. * @return com.ym.mec.biz.dal.entity.PracticeGroup
  136. */
  137. PracticeGroup findUserLatestPracticeGroup(Integer userId, Long groupId);
  138. /**
  139. * @describe 获取陪练课预约参数——付费
  140. * @author Joburgess
  141. * @date 2020/1/31
  142. * @param userId: 用户编号
  143. * @return java.util.Map
  144. */
  145. Map getPayPracticeApplyParams(Integer userId, Integer organId);
  146. /**
  147. * @describe 获取可以预约的教师——付费
  148. * @author Joburgess
  149. * @date 2020/2/9
  150. * @param userId: 用户编号
  151. * @param subjectId: 声部编号
  152. * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
  153. */
  154. List<SimpleUserDto> getEnableApplyTeachersWithPay(Integer userId, Integer subjectId);
  155. /**
  156. * @describe 获取指定教师的空闲时间——付费
  157. * @author Joburgess
  158. * @date 2020/2/10
  159. * @param userId: 用户编号
  160. * @param teacherId: 教师编号
  161. * @param firstClassTime: 第一节课开始时间
  162. * @param buyMonths: 购买月数
  163. * @return java.util.Map
  164. */
  165. Map getPayPracticeTeacherFreeTimes(Integer userId, Integer teacherId, Integer buyMonths, boolean renew, Long groupId);
  166. /**
  167. * @describe 获取一周内可以预约课程的时间——付费
  168. * @author Joburgess
  169. * @date 2020/2/2
  170. * @return java.util.Map
  171. */
  172. Map<Integer, List<String>> getEnableApplyDatesWithWeek();
  173. /**
  174. * @describe 陪练课购买
  175. * @author Joburgess
  176. * @date 2020/2/17
  177. * @param practiceGroupBuyParams: 购买参数
  178. * @return void
  179. */
  180. HttpResponseResult buyPracticeGroup(PracticeGroupBuyDto practiceGroupBuyParams);
  181. /**
  182. * @describe 创建关心包课程
  183. * @author Joburgess
  184. * @date 2021/1/28 0028
  185. * @param practiceGroupBuyParams:
  186. * @param operatorInfo:
  187. * @return com.ym.mec.common.entity.HttpResponseResult
  188. */
  189. HttpResponseResult createPackagePracticeGroup(PracticeGroupBuyDto practiceGroupBuyParams);
  190. /**
  191. * @describe 支付订单回调
  192. * @author Joburgess
  193. * @date 2020/2/17
  194. * @param order: 支付订单
  195. * @return void
  196. */
  197. void orderCallback(StudentPaymentOrder order);
  198. /**
  199. * @description: 活动购买支付订单回调
  200. * @param order
  201. * @return void
  202. * @author zx
  203. * @date 2021/10/13 19:52
  204. */
  205. void activityOrderCallback(StudentPaymentOrder order);
  206. /**
  207. * @describe 获取用户历史购买的陪练课
  208. * @author Joburgess
  209. * @date 2020/2/18
  210. * @param userId:
  211. * @return java.util.List<com.ym.mec.biz.dal.dto.PracticeCourseDto>
  212. */
  213. List<PracticeCourseDto> findUserHistoryBuyPracticeGroups(Integer userId, Long groupId, PracticeGroupType type);
  214. /**
  215. * @describe 查询订单信息
  216. * @author Joburgess
  217. * @date 2020/2/18
  218. * @param orderNo: 订单编号
  219. * @return com.ym.mec.biz.dal.dto.PracticeBuyResultDto
  220. */
  221. PracticeBuyResultDto queryOrderInfo(String orderNo);
  222. /**
  223. * @describe
  224. * @author Joburgess
  225. * @date 2020/2/21
  226. * @param practiceGroupId:
  227. * @return com.ym.mec.common.entity.HttpResponseResult
  228. */
  229. HttpResponseResult repay(Integer userId,Integer practiceGroupId, boolean useBalancePayment) throws Exception;
  230. /**
  231. * @describe 更新历史陪练课程组状态
  232. * @author Joburgess
  233. * @date 2020/2/23
  234. * @param :
  235. * @return void
  236. */
  237. void updateHistoryPracticeGroupStatus();
  238. /**
  239. * @describe 获取用户待支付的课程组订单
  240. * @author Joburgess
  241. * @date 2020/2/26
  242. * @param userId:
  243. * @return java.util.Map<java.lang.String,java.lang.Object>
  244. */
  245. Map<String, Object> checkExistWaitPayOrder(Integer userId, Long groupId);
  246. /**
  247. * @describe 取消待支付的订单
  248. * @author Joburgess
  249. * @date 2020/2/26
  250. * @param userId: 用户编号
  251. * @param groupId:
  252. * @return void
  253. */
  254. HttpResponseResult cancelWaitPayOrder(Integer userId, Integer groupId);
  255. /**
  256. * @describe 推送练习报告
  257. * @author Joburgess
  258. * @date 2020/2/28
  259. * @param expiredDate: 报告的截至时间
  260. * @param pushType: 推送类型:JIGUANG、SMS、ALL
  261. * @return void
  262. */
  263. void pushStudyReport(Date expiredDate,String pushType);
  264. /**
  265. * 获取陪练课列表
  266. * @param queryInfo
  267. * @return
  268. */
  269. PageInfo<PracticeGroupDto> findPracticeGroupReviews(PracticeGroupQueryInfo queryInfo);
  270. /**
  271. * 购买过网管课的学员列表
  272. * @param queryInfo
  273. * @return
  274. */
  275. PageInfo<StudentBuyPracticeDto> studentBuys(StudentBuyPracticeQueryInfo queryInfo);
  276. /**
  277. * @describe 获取转化失败的学员列表
  278. * @author Joburgess
  279. * @date 2020/4/23
  280. * @param queryInfo:
  281. * @return com.ym.mec.common.page.PageInfo<com.ym.mec.biz.dal.dto.SimpleUserDto>
  282. */
  283. PageInfo<SimpleUserDto> findConvertDefeatStudents(StudentQueryInfo queryInfo);
  284. /**
  285. * 修改网管课备注
  286. * @param groupId
  287. * @param memo
  288. */
  289. void updateMemo(Long groupId, String memo);
  290. /**
  291. * 用户是否购买网管课
  292. * @param userId
  293. * @return
  294. */
  295. boolean isPurchasedPracticeCourse(Integer userId);
  296. /**
  297. * @describe 网管课续费提醒
  298. * @author Joburgess
  299. * @date 2020.05.29
  300. * @return void
  301. */
  302. void practiceGroupRenewRemind();
  303. Map countPracticeGroupPredictFee(PracticeGroupApplyBaseInfoDto practice, Integer userId);
  304. Map<String, BigDecimal> countPracticeGroupPredictFee1(PracticeGroup practice, Integer userId);
  305. /**
  306. * @description: 网管课申请
  307. * @param practiceGroupApplyDto
  308. * @return java.lang.Object
  309. * @author zx
  310. * @date 2021/10/8 12:22
  311. */
  312. Object createPracticeGroup(PracticeGroupApplyDto practiceGroupApplyDto);
  313. /**
  314. * @description: 创建网管课
  315. * @param practiceGroupApplyDto
  316. * @return java.lang.Object
  317. * @author zx
  318. * @date 2021/10/11 19:17
  319. */
  320. Object createActivityPracticeGroup(PracticeGroupApplyDto practiceGroupApplyDto);
  321. /**
  322. * @description: 购买指导老师创建的网管课
  323. * @param practiceGroupBuyParams
  324. * @return java.lang.Object
  325. * @author zx
  326. * @date 2021/10/12 18:09
  327. */
  328. HttpResponseResult buyTeacherPracticeGroup(PracticeGroupBuyParamsDto practiceGroupBuyParams) throws Exception;
  329. /**
  330. * @description: 营销活动网管课购买
  331. * @param practiceGroupBuyParams
  332. * @return com.ym.mec.common.entity.HttpResponseResult
  333. * @author zx
  334. * @date 2021/10/13 15:12
  335. */
  336. Object buyActivityPracticeGroup(PracticeGroupBuyParamsDto practiceGroupBuyParams) throws Exception;
  337. /**
  338. * @description: 获取学生端网管课购买详情
  339. * @param groupId
  340. * @return com.ym.mec.biz.dal.dto.StudentVipGroupDetailDto
  341. * @author zx
  342. * @date 2021/10/15 14:35
  343. */
  344. StudentVipGroupDetailDto getPracticeGroupDetail(Long groupId);
  345. /**
  346. * @description: 获取老师开启的网管课的数量
  347. * @param teacherId
  348. * @return java.lang.Integer
  349. * @author zx
  350. * @date 2021/10/15 14:43
  351. */
  352. Integer countTeacherPracticeGroups(Integer teacherId);
  353. Object getPracticeGroupPayInfo(Long practiceGroupId, Integer userId);
  354. /**
  355. * @description: 获取学生指定网管课的剩余课时费用
  356. * @param practiceGroupId
  357. * @return java.lang.Object
  358. * @author zx
  359. * @date 2021/11/2 18:07
  360. */
  361. Map<String,BigDecimal> getStudentSurplusCourseFee(Long practiceGroupId);
  362. }