AuthService.java 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. package com.caimei.service.auth;
  2. import com.caimei.annotation.CurrentUser;
  3. import com.caimei.model.ResponseJson;
  4. import com.caimei.model.po.CmBrandAuthPo;
  5. import com.caimei.model.po.SysUser;
  6. import com.caimei.model.vo.*;
  7. import com.github.pagehelper.PageInfo;
  8. import org.springframework.web.bind.annotation.RequestBody;
  9. import org.springframework.web.multipart.MultipartFile;
  10. import javax.servlet.http.HttpServletResponse;
  11. import java.io.IOException;
  12. import java.util.List;
  13. /**
  14. * Description
  15. *
  16. * @author : Aslee
  17. * @date : 2021/5/11
  18. */
  19. public interface AuthService {
  20. /**
  21. * 授权列表
  22. *
  23. * @param listType 列表类型:1授权列表,2授权审核列表
  24. * @param authUserId 供应商用户id
  25. * @param authParty 授权机构
  26. * @param mobile
  27. * @param status 上线状态:0已下线,1已上线,2待上线
  28. * @param starFlag 明星机构标识:0不是,1是
  29. * @param lowerAuditStatus 商品信息审核状态:0未完成审核,1已完成审核
  30. * @param shopAuditStatus 供应商审核状态:0审核未通过,1审核通过,2待审核
  31. * @param pageNum 第几页
  32. * @param pageSize 一页多少条
  33. * @param auditStatus 审核状态:0审核未通过,1审核通过,2待审核
  34. * @return AuthVo
  35. */
  36. ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty, String mobile, Integer status, Integer starFlag, Integer auditStatus, Integer lowerAuditStatus, Integer shopAuditStatus, Integer sendStatus,String authCode ,Integer pageNum, Integer pageSize);
  37. ResponseJson<PageInfo<AuthVo>> getAuthListAll(Integer listType, Integer authUserId, String authParty, String mobile, Integer status, Integer starFlag, Integer auditStatus, Integer lowerAuditStatus, Integer shopAuditStatus, Integer sendStatus, String name,String snCode,Integer pageNum, Integer pageSize);
  38. /**
  39. * 更新授权状态
  40. *
  41. * @param authId 授权id
  42. * @param status 授权状态:0停用 1启用
  43. * @return ResponseJson
  44. */
  45. ResponseJson updateAuthStatus(Integer authId, Integer status);
  46. /**
  47. * 删除授权
  48. * @param authId 授权id
  49. * @return ResponseJson
  50. */
  51. ResponseJson deleteAuth(Integer authId);
  52. /**
  53. * 添加/编辑授权
  54. *
  55. * @param auth 授权机构
  56. * @param bannerList 轮播图列表
  57. * @param source 来源:1供应商保存,2机构保存
  58. * @return ResponseJson
  59. */
  60. ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag, Integer source);
  61. /**
  62. * 审核品牌授权
  63. *
  64. * @param authId 授权id
  65. * @param auditStatus 审核状态
  66. * @param invalidReason 审核不通过原因
  67. * @param auditBy 审核人用户id
  68. * @param source
  69. * @return ResponseJson
  70. */
  71. ResponseJson auditAuth(Integer authId, Integer auditStatus, String invalidReason, Integer auditBy, Integer source);
  72. /**
  73. * 导入excel中的授权机构和商品数据
  74. * @param file excel表格
  75. * @param authUserId 供应商用户id
  76. * @param createBy
  77. * @return
  78. */
  79. ResponseJson importDataByExcel(MultipartFile file, Integer authUserId, Integer createBy);
  80. /**
  81. * 授权机构回显数据
  82. * @param authId 机构id
  83. * @return
  84. */
  85. ResponseJson<AuthFormVo> getAuthFormData(Integer authId);
  86. /**
  87. * 机构下拉框列表
  88. */
  89. ResponseJson<List<AuthVo>> getAuthSelectList(Integer authUserId);
  90. /**
  91. * ldm门店图/备注导入
  92. * @param authUserId
  93. * @return
  94. */
  95. ResponseJson importLdmImage(Integer authUserId);
  96. /**
  97. * 生成机构授权牌
  98. * @param auth
  99. * @return
  100. */
  101. String generateAuthImage(TemplateVo authTemplate, CmBrandAuthPo auth);
  102. /**
  103. * 添加水印
  104. */
  105. String addWaterMark(String image,Integer type);
  106. /**
  107. * 更改查看标记
  108. * @param authId
  109. * @return
  110. */
  111. ResponseJson checkAuth(Integer authId);
  112. /**
  113. * 更改明星标识
  114. */
  115. ResponseJson starAuth(Integer authId, Integer starFlag,String starNum);
  116. /**
  117. * 获取机构关联的机构信息
  118. * 1.7.4版本:编辑时新加关联机构操作
  119. *
  120. */
  121. ResponseJson<List<AuthFormVo>> getRelationgInfo(String snCode, Integer authUserId);
  122. /**
  123. * 获取可绑定机构机构信息
  124. * **/
  125. ResponseJson<List<AuthFormVo>> getClubBindAuth(Integer authUserId);
  126. /**
  127. * 用户扫码授权,获取code值
  128. * @param response
  129. * @return
  130. * @throws IOException
  131. */
  132. ResponseJson getDouYingCode(HttpServletResponse response) throws IOException;
  133. /**
  134. * 根据用户的code值获取AcessToken
  135. * ccode 用户授权登录code
  136. **/
  137. ResponseJson getDouYingAcessToken(String ccode) throws IOException;
  138. /**
  139. * h5的方式上传视频
  140. * @return
  141. * @throws IOException
  142. */
  143. ResponseJson getclientToken(String title,String videoPath,Integer authId) throws IOException;
  144. /**
  145. * 保存视频信息
  146. * @return
  147. */
  148. ResponseJson saveVideoInfo(ChallengeRoundVo challengeRoundVo);
  149. /**
  150. * 1.7.7(ROSS)保存视频信息
  151. * @return
  152. */
  153. ResponseJson saveVideo(RossChallengeVideo rossChallengeVideo);
  154. /**
  155. * 根据authid获取authUserId
  156. */
  157. boolean getauthUserId(Integer authId);
  158. /**
  159. * 判断是否存在userName
  160. * @param userName
  161. * @return
  162. */
  163. boolean getuserName(String userName);
  164. /**
  165. * 验证是否在活动时间内
  166. * @return
  167. */
  168. boolean checkActivityTime(String releaseTime);
  169. /**
  170. * 获取已发布视频(前端)
  171. * @param clubUserName
  172. * @param status
  173. * @param cursor
  174. * @param count
  175. * @return
  176. */
  177. ResponseJson<PageInfo<ChallengeRoundVo>> getPublishedVideoList(String clubUserName,Integer status,Integer cursor,Integer count,Integer pageNum,Integer pageSize,Integer authUserId);
  178. /**
  179. * 获取已发布视频(后端)
  180. * @param mobile
  181. * @param authParty
  182. * @param status
  183. * @param cursor
  184. * @param count
  185. * @param authUserId
  186. * @return
  187. */
  188. ResponseJson<PageInfo<ChallengeRoundVo>> getPublishedVideo(String mobile,String authParty,Integer status,Integer cursor,Integer count,Integer authUserId,Integer pageNum,Integer pageSize,String startTIme,String endTime);
  189. /**
  190. * 获取机构已发布视频的机构下拉列表
  191. * @param authUserId
  192. * @return
  193. */
  194. ResponseJson<List<ChallengeRoundVo>> getAuthPartylist(Integer authUserId);
  195. /**
  196. * 保存活动信息
  197. * @param startTime
  198. * @param endTime
  199. * @param status
  200. * @return
  201. */
  202. ResponseJson saveActivityTime(String startTime,String endTime,Integer status,Integer authUserId);
  203. /**
  204. * 获取活动信息
  205. * @return
  206. */
  207. ResponseJson<ChallengeActivityVo> getActivityTime(Integer authUserId);
  208. /**
  209. * 判断shareId是否存在
  210. * @param shareId
  211. * @return
  212. */
  213. boolean getShareId(String shareId);
  214. /**
  215. * 根据ShareId保存itemId (webhook触发时调用)
  216. * @param shareId
  217. * @param itemId
  218. */
  219. void savaItemIdByShareId(String shareId,String itemId);
  220. /**
  221. * 判断活动开启状态
  222. * @param sysUser
  223. * @return
  224. */
  225. ResponseJson<ChallengeActivityVo> getActivitty(Integer sysUser);
  226. /**
  227. * 根据authId获取手机号
  228. * @param authId
  229. * @return
  230. */
  231. String getMobileByAuthId(Integer authId);
  232. /**
  233. * 根据authId获取供应商名称
  234. * @param authId
  235. * @return
  236. */
  237. String getAuthUserName(Integer authId);
  238. /**
  239. * 获取发布时间
  240. * @param userName
  241. * @return
  242. */
  243. String getReleaseTime(String userName);
  244. /**
  245. * 保存抖音口令
  246. */
  247. void savaDyCommand(Integer authId,String content);
  248. /**
  249. * 根据authId获取ossName
  250. * @param videoID
  251. * @return
  252. */
  253. String getOssNameAuthId(Integer videoID);
  254. /**
  255. * 删除视频
  256. * @param videoID
  257. */
  258. void deleteVideoByAuthId(Integer videoID);
  259. /**
  260. * 下载视频
  261. * @param fileId
  262. * @param response
  263. * @return
  264. */
  265. ResponseJson downLoadChoseZip(String fileId,HttpServletResponse response);
  266. /**
  267. * 根据id获取信息
  268. *
  269. */
  270. ResponseJson<ChallengeRoundVo> getInfoById(Integer videoId);
  271. ResponseJson getDyVidoInfo(Integer authUserId);
  272. /**
  273. * 新增参赛机构信息
  274. * @param rossChallengeRoundVo
  275. * @return
  276. */
  277. ResponseJson saveRossInfo(RossChallengeRoundVo rossChallengeRoundVo);
  278. /**
  279. * 根据手机号码获取信息
  280. * @param userName
  281. * @return
  282. */
  283. List<RossChallengeRoundVo> getInfoByUserName(String userName);
  284. /**
  285. * 验证用户是否已经报名
  286. * @param mobile
  287. * @return
  288. */
  289. ResponseJson<RossChallengeRoundVo> checkContestedInfo(String mobile);
  290. /**
  291. * 获取已报名信息列表
  292. * @return
  293. */
  294. ResponseJson<List<RossChallengeRoundVo>> getcontestedInfo();
  295. /**
  296. * 查询视频列表
  297. * @param mobileOrAuthpart 电话号码或者机构名称
  298. * @return
  299. */
  300. ResponseJson<List<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId);
  301. /**
  302. * 根据手机号码查询该机构视频列表
  303. * @param mobile 登录账号
  304. * @return
  305. */
  306. ResponseJson<List<RossChallengeVideo>> getVideoByUsername(String mobile,Integer clubUserId);
  307. /**
  308. * 验证机构是否已经上传了3个视频
  309. * @param mobile 登录账号
  310. * @return
  311. */
  312. ResponseJson<List<RossChallengeVideo>> checkVideoByUsername(String mobile);
  313. /**
  314. * 点赞与取消点赞
  315. * @param id
  316. * @param diggFlag
  317. * @return
  318. */
  319. ResponseJson upVideoDiggCount(Integer id,Integer diggFlag,Integer clubUserId,String clubUserIds);
  320. /**
  321. * 查询机构信息(后端)
  322. * @param mobile
  323. * @return
  324. */
  325. ResponseJson<List<RossChallengeRoundVo>> getAuthInfo(String mobile);
  326. /**
  327. * 根据id删除机构信息
  328. * @param id
  329. * @return
  330. */
  331. ResponseJson delAuthInfoById(Integer id);
  332. /**
  333. * 根据id删除视频信息
  334. * @param id
  335. * @return
  336. */
  337. ResponseJson delVideoInfoById(Integer id);
  338. }