IMaTechnicianService.java 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. package com.ylx.massage.service;
  2. import java.util.List;
  3. import java.util.Map;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.baomidou.mybatisplus.extension.service.IService;
  6. import com.ylx.common.core.domain.AjaxResult;
  7. import com.ylx.common.core.domain.model.LoginUser;
  8. import com.ylx.massage.domain.MaProject;
  9. import com.ylx.massage.domain.MaTechnician;
  10. import com.ylx.massage.domain.dto.*;
  11. import com.ylx.massage.domain.vo.*;
  12. import com.ylx.massage.domain.dto.MaProjectSaveDto;
  13. import com.ylx.massage.domain.dto.MaTechnicianAuditQueryDTO;
  14. import com.ylx.massage.domain.dto.MaTechnicianAuditSubmitDTO;
  15. import com.ylx.massage.domain.dto.MassageMerchantRecommendDto;
  16. import com.ylx.massage.domain.dto.MaTechnicianMerchantAddDTO;
  17. import com.ylx.massage.domain.dto.MaTechnicianMerchantQueryDTO;
  18. import com.ylx.massage.domain.dto.MaTechnicianPendingAuditSubmitDTO;
  19. import com.ylx.massage.domain.vo.MaTechnicianAppAddVo;
  20. import com.ylx.massage.domain.vo.MaTechnicianAuditListVO;
  21. import com.ylx.massage.domain.vo.MaTechnicianCertificateVO;
  22. import com.ylx.massage.domain.vo.MaTechnicianMerchantDetailVO;
  23. import com.ylx.massage.domain.vo.MaTechnicianMerchantListVO;
  24. import com.ylx.massage.domain.vo.MerchantVo;
  25. import com.ylx.project.domain.Project;
  26. import org.springframework.stereotype.Service;
  27. import org.springframework.web.multipart.MultipartFile;
  28. /**
  29. * 技师Service接口
  30. *
  31. * @author ylx
  32. * @date 2024-03-22
  33. */
  34. public interface IMaTechnicianService extends IService<MaTechnician> {
  35. /**
  36. * 查询技师
  37. *
  38. * @param id 技师主键
  39. * @return 技师
  40. */
  41. public MaTechnician selectMaTechnicianById(Long id);
  42. /**
  43. * 查询技师列表
  44. *
  45. * @param maTechnician 技师
  46. * @return 技师集合
  47. */
  48. public List<MaTechnician> selectMaTechnicianList(MaTechnician maTechnician);
  49. /**
  50. * 新增技师
  51. *
  52. * @param
  53. * @return 结果
  54. */
  55. public int insertMaTechnician(MaTechnicianAppAddVo maTechnicianAppAddVo);
  56. /**
  57. * 后台新增商户
  58. *
  59. * @param dto 新增商户参数
  60. * @param loginUser 当前登录用户
  61. * @return 结果
  62. */
  63. public int insertMerchant(MaTechnicianMerchantAddDTO dto, LoginUser loginUser);
  64. /**
  65. * 后台编辑商户
  66. *
  67. * @param id 商户ID
  68. * @param dto 编辑商户参数
  69. * @param loginUser 当前登录用户
  70. * @return 结果
  71. */
  72. public int updateMerchant(Integer id, MaTechnicianMerchantAddDTO dto, LoginUser loginUser);
  73. /**
  74. * 后台上传商户合同文件
  75. *
  76. * @param id 商户ID
  77. * @param file 合同文件
  78. * @param loginUser 当前登录用户
  79. * @return 上传结果
  80. */
  81. Integer uploadMerchantContract(Integer id, Map<String, Object> file, LoginUser loginUser);
  82. /**
  83. * 后台查询商户入驻审核列表
  84. *
  85. * @param page 分页参数
  86. * @param dto 查询条件
  87. * @return 商户入驻审核分页列表
  88. */
  89. Page<MaTechnicianAuditListVO> selectMerchantAuditList(Page<MaTechnicianAuditListVO> page,
  90. MaTechnicianAuditQueryDTO dto);
  91. /**
  92. * 商户待入驻提交审核。
  93. *
  94. * @param id 商户ID
  95. * @param loginUser 当前登录用户
  96. * @return 结果
  97. */
  98. int submitMerchantAudit(Integer id, MaTechnicianAuditSubmitDTO dto, LoginUser loginUser);
  99. /**
  100. * 后台待审核页面审核通过商户。
  101. *
  102. * @param id 商户ID
  103. * @param dto 待审核通过参数
  104. * @param loginUser 当前登录用户
  105. * @return 结果
  106. */
  107. int approvePendingMerchantAudit(Integer id, MaTechnicianPendingAuditSubmitDTO dto, LoginUser loginUser);
  108. /**
  109. * 后台查询商户列表
  110. *
  111. * @param page 分页参数
  112. * @param dto 查询条件
  113. * @return 商户分页列表
  114. */
  115. public Page<MaTechnicianMerchantListVO> selectMerchantList(Page<MaTechnicianMerchantListVO> page,
  116. MaTechnicianMerchantQueryDTO dto);
  117. /**
  118. * 后台查询商户详情
  119. *
  120. * @param id 商户ID
  121. * @return 商户详情
  122. */
  123. public MaTechnicianMerchantDetailVO selectMerchantDetail(Long id);
  124. /**
  125. * 后台查询商户证照
  126. *
  127. * @param id 商户ID
  128. * @return 商户证照
  129. */
  130. MaTechnicianCertificateVO selectMerchantCertificate(Integer id);
  131. /**
  132. * 修改技师
  133. *
  134. * @param
  135. * @return 结果
  136. */
  137. public int updateMaTechnician(MaTechnicianAppAddVo maTechnicianAppAddVo);
  138. /**
  139. * 批量删除技师
  140. *
  141. * @param ids 需要删除的技师主键集合
  142. * @return 结果
  143. */
  144. public int deleteMaTechnicianByIds(Long[] ids);
  145. /**
  146. * 删除技师信息
  147. *
  148. * @param id 技师主键
  149. * @return 结果
  150. */
  151. public int deleteMaTechnicianById(Long id);
  152. /**
  153. * 首页选中的城市是否有开通服务
  154. *
  155. * @param areaCode
  156. * @return
  157. */
  158. Boolean isHasMerchantCity(String areaCode);
  159. List<MerchantVo> getMerchantRecommend(MassageMerchantRecommendDto dto);
  160. /**
  161. * 申请技师
  162. *
  163. * @param req
  164. */
  165. void apply(MaTechnicianAppAddVo req);
  166. /**
  167. * 申请技师文件
  168. *
  169. * @param req
  170. */
  171. void applyFile(MerchantApplyFileRequestDto req);
  172. /**
  173. * 技师状态切换
  174. *
  175. * @param
  176. */
  177. Result switchToOffline(Long userId, Boolean forceConfirm);
  178. /**
  179. * 技师待处理订单列表
  180. *
  181. * @param query
  182. * @return
  183. */
  184. List<WaitOrderDTO> listWaitOrder(WaitOrderQueryDTO query);
  185. /**
  186. * 接单
  187. *
  188. * @param req
  189. * @return
  190. */
  191. String acceptOrder(AcceptOrderReqDTO req);
  192. /**
  193. * 技师接单确认接单
  194. *
  195. * @param techId
  196. * @param orderId
  197. * @return
  198. */
  199. String confirmRestAccept(Long techId, Long orderId);
  200. /**
  201. * 技师拒绝接单
  202. *
  203. * @param req
  204. * @return
  205. */
  206. void refuseOrder(RefuseOrderReqDTO req);
  207. /**
  208. * 技师列表
  209. *
  210. * @param userId
  211. * @param auditStatus
  212. * @return
  213. */
  214. List<MaProject> selectMaTechnicianListBy(String userId, String auditStatus);
  215. /**
  216. * 服务项目列表
  217. *
  218. * @param typeId
  219. * @return
  220. */
  221. List<Project> selectTechnicianListBy(String typeId);
  222. /**
  223. * 技师未申请项目列表
  224. *
  225. * @param userId
  226. * @param typeId
  227. * @return
  228. */
  229. List<Project> getNotApplyList(String userId, String typeId);
  230. /**
  231. * 申请开通新服务
  232. *
  233. * @param dto
  234. * @return
  235. */
  236. int applyForService(MaProjectSaveDto dto);
  237. /**
  238. * 商户入住信息
  239. *
  240. * @param userId
  241. * @return
  242. */
  243. MerchantAuditFile getTechnicianList(Long userId);
  244. }