IMaTechnicianService.java 7.0 KB

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