ShopMapper.java 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. package com.caimei365.user.mapper;
  2. import com.caimei365.user.model.dto.ShopUpdateDto;
  3. import com.caimei365.user.model.po.ShopCertPo;
  4. import com.caimei365.user.model.po.UserPo;
  5. import com.caimei365.user.model.vo.*;
  6. import org.apache.ibatis.annotations.MapKey;
  7. import org.apache.ibatis.annotations.Mapper;
  8. import org.apache.ibatis.annotations.Param;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. * Description
  13. *
  14. * @author : Aslee
  15. * @date : 2021/3/16
  16. */
  17. @Mapper
  18. public interface ShopMapper {
  19. /**
  20. * 供应商快捷登录
  21. * @param userId
  22. * @return
  23. */
  24. UserLoginVo getShopByUserId(Integer userId);
  25. /**
  26. * 根据Id查询供应商
  27. * @param shopId 供应商Id
  28. * @return ShopVo
  29. */
  30. ShopVo getShopById(Integer shopId);
  31. /**
  32. * 修改供应商信息保存用户
  33. * @param user 用户数据
  34. */
  35. void updateShopUserByUpdateInfo(UserPo user);
  36. /**
  37. * 修改供应商信息保存供应商
  38. * @param shop 供应商数据
  39. */
  40. void updateShopByUpdateInfo(ShopUpdateDto shop);
  41. /**
  42. * 根据供应商Id和资质证书类型Id获取供应商资质证书
  43. * @param shopId 供应商Id
  44. * @param shopCertTypeId 资质证书类型Id
  45. * @return String
  46. */
  47. List<String> getShopCert(Integer shopId, Integer shopCertTypeId);
  48. /**
  49. * 根据供应商Id删除供应商资质证书数据
  50. * @param shopId 供应商Id
  51. */
  52. void deleteShopCertByShopId(Integer shopId);
  53. /**
  54. * 保存供应商资质证书
  55. * @param shopCert 资质证书数据
  56. */
  57. void insertShopCert(ShopCertPo shopCert);
  58. /**
  59. * 供应商首页数据
  60. * @param shopId 供应商Id
  61. */
  62. ShopHomeVo getShopHomeData(Integer shopId);
  63. /**
  64. * 公司资质照片
  65. */
  66. List<String> getShopCertById(Integer shopId, int shopCertTypeId);
  67. /**
  68. * 医疗器械经营许可
  69. */
  70. String medicalPracticeLicense(Integer shopId);
  71. /**
  72. * 供应商商品类别
  73. * @param shopId
  74. * @param category
  75. * @return
  76. */
  77. List<CmShopCategoryVo> getShopCategory(@Param("shopId") Integer shopId, @Param("category") String category);
  78. /**
  79. * 修改排序
  80. * @param id
  81. * @param sort
  82. */
  83. void updateCategorySort(@Param("id") Integer id, @Param("sort") Integer sort);
  84. /**
  85. * 获取供应商商品分类信息
  86. * @param id
  87. * @return
  88. */
  89. CmShopCategoryVo getShopCategoryById(@Param("id") Integer id);
  90. /**
  91. * 供应商类别商品
  92. * @param categoryId
  93. * @return
  94. */
  95. List<ProductItemVo> getCategoryProductById(@Param("categoryId") Integer categoryId);
  96. /**
  97. * 选择商品
  98. * @param shopId
  99. * @param name
  100. * @return
  101. */
  102. List<ProductItemVo> getShopProductList(@Param("shopId") Integer shopId, @Param("name") String name);
  103. /**
  104. * 供应商已选择商品
  105. * @param shopId
  106. * @param categoryId
  107. * @return
  108. */
  109. List<Integer> getCategoryProductIdList(@Param("shopId") Integer shopId, @Param("categoryId") Integer categoryId);
  110. /**
  111. * 添加供应商类别
  112. * @param cmShopCategory
  113. */
  114. void insertCategory(CmShopCategoryVo cmShopCategory);
  115. /**
  116. * 添加供应商类别商品
  117. * @param categoryId
  118. * @param productId
  119. */
  120. void insertCategoryProduct(@Param("categoryId") Integer categoryId, @Param("productId") Integer productId);
  121. /**
  122. * 修改类别信息
  123. * @param cmShopCategory
  124. */
  125. void updateCategory(CmShopCategoryVo cmShopCategory);
  126. /**
  127. * 删除类别商品
  128. * @param categoryId
  129. * @param productIdList
  130. */
  131. void updateCategoryProduct(@Param("categoryId") Integer categoryId, @Param("productIdList") List<Integer> productIdList);
  132. /**
  133. * 该列别瞎所有商品
  134. * @param categoryId
  135. * @return
  136. */
  137. List<Integer> getCategoryProductIds(@Param("categoryId") Integer categoryId);
  138. /**
  139. * 删除供应商商品类别
  140. * @param id
  141. */
  142. void deleteCategory(@Param("id") Integer id);
  143. /**
  144. * 供应商首页-轮播图片
  145. */
  146. List<ShopBannerVo> getShopHomeImages(@Param("shopId") Integer shopId, @Param("title") String title);
  147. /**
  148. * 排序
  149. * @param id
  150. * @param sort
  151. */
  152. void updateShopBannerSort(@Param("id") Integer id, @Param("sort") Integer sort);
  153. /**
  154. * 店铺促销活动
  155. */
  156. PromotionsVo getShopPromotionsByShopId(Integer shopId);
  157. /**
  158. * 促销赠品
  159. */
  160. List<ProductItemVo> getPromotionsGifts(Integer promotionsId);
  161. /**
  162. * 统计商品数量
  163. *
  164. * @param shopId 供应商id
  165. * @param productOrganize 上架平台
  166. * @param validFlag 商品状态
  167. */
  168. Integer getShopProductCount(@Param("shopId") Integer shopId, @Param("productOrganize") Integer productOrganize, @Param("validFlag") Integer validFlag);
  169. /**
  170. * 统计前五的商品销售信息
  171. */
  172. @MapKey("productId")
  173. List<Map<String, Object>> getSalesRankingList(@Param("shopId") Integer shopId, @Param("organizeId") Integer organizeId);
  174. /**
  175. * 获取商品信息
  176. */
  177. ProductItemVo getProductShown(Integer productId);
  178. /**
  179. * 销售统计
  180. */
  181. @MapKey("orderQuantity")
  182. Map<String, Object> getSalesStatistics(Integer shopId, Integer organizeId, String startTime, String endTime);
  183. /**
  184. * 是否为营销供应商
  185. * @param shopId
  186. * @return
  187. */
  188. Integer getShopIsMark(@Param("shopId") Integer shopId);
  189. /**
  190. * 轮播图片数量
  191. */
  192. int getShopHomeImageCount(Integer shopId);
  193. /**
  194. * 新增轮播图
  195. */
  196. void insertShopHomeImage(ShopBannerVo shopBanner);
  197. /**
  198. * 更新轮播图
  199. */
  200. void updateShopHomeImage(ShopBannerVo shopBanner);
  201. /**
  202. * 删除轮播图
  203. */
  204. void deleteShopHomeImage(Integer id);
  205. /**
  206. * 获取报表对应的供应商信息
  207. * @param shopId
  208. * @param type
  209. * @return
  210. */
  211. CmMarketShopVo getShopInfoById(@Param("shopId") Integer shopId, @Param("type") Integer type, @Param("marketReportId") Integer marketReportId);
  212. /**
  213. * 营销供应商报表Id
  214. * @param marketId
  215. * @param startTime
  216. * @param endTime
  217. * @return
  218. */
  219. List<Integer> getMarketReportIds(@Param("marketId") Integer marketId, @Param("type") Integer type, @Param("marketReportId") Integer marketReportId, @Param("startTime") String startTime, @Param("endTime") String endTime);
  220. /**
  221. * 获取阶段描述
  222. * @param marketReportIds
  223. * @return
  224. */
  225. List<StageVo> getMarketStage(@Param("marketReportIds") List<Integer> marketReportIds);
  226. /**
  227. * 获取漏洞模型数据
  228. * @param marketReportIds
  229. * @return
  230. */
  231. List<FunnelModelVo> getMarketFunnelModel(@Param("marketReportIds") List<Integer> marketReportIds);
  232. /**
  233. * 获取推文数据
  234. * @param marketReportIds
  235. * @return
  236. */
  237. List<ArticleReadVolumeVo> getMarketArticleReadVolume(@Param("marketReportIds") List<Integer> marketReportIds);
  238. /**
  239. * 获取展现量数据
  240. * @param marketReportIds
  241. * @return
  242. */
  243. List<ImpressionsVo> getMarketImpressions(@Param("marketReportIds") List<Integer> marketReportIds);
  244. /**
  245. * 获取点击量数据
  246. * @param marketReportIds
  247. * @return
  248. */
  249. List<ReadVolumeVo> getMarketReadVolume(@Param("marketReportIds") List<Integer> marketReportIds);
  250. /**
  251. * 获取SEO汇总数据
  252. * @param marketReportIds
  253. * @return
  254. */
  255. List<SummaryVo> getMarketSummary(@Param("marketReportIds") List<Integer> marketReportIds);
  256. /**
  257. * 获取访问量数据
  258. * @param marketReportIds
  259. * @return
  260. */
  261. List<VisitsVo> getMarketVisits(@Param("marketReportIds") List<Integer> marketReportIds);
  262. /**
  263. * 获取访客来源分布数据
  264. * @param marketReportIds
  265. * @return
  266. */
  267. List<ProportionVo> getMarketProportion(@Param("marketReportIds") List<Integer> marketReportIds);
  268. /**
  269. * 获取页面平均访问时长数据
  270. * @param marketReportIds
  271. * @return
  272. */
  273. List<PageDurationVo> getMarketPageDuration(@Param("marketReportIds") List<Integer> marketReportIds);
  274. /**
  275. * 获取广告图点击量数据
  276. * @param marketReportIds
  277. * @return
  278. */
  279. List<AdvertHitsVo> getMarketAdvertHits(@Param("marketReportIds") List<Integer> marketReportIds);
  280. /**
  281. * 获取咨询数量数据
  282. * @param marketReportIds
  283. * @return
  284. */
  285. List<CmMarketRemarkVo> getMarketRemark(@Param("marketReportIds") List<Integer> marketReportIds);
  286. /**
  287. * 供应商包含的标签词
  288. * @param shopId
  289. * @return
  290. */
  291. List<String> getShopKeyword(@Param("shopId") Integer shopId);
  292. /**
  293. * 访问供应商相关用户所在地区
  294. * @param startTime
  295. * @param endTime
  296. * @param labels
  297. * @return
  298. */
  299. List<String> getRegion(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("labels") List<String> labels);
  300. /**
  301. * 用户身份
  302. * @param startTime
  303. * @param endTime
  304. * @param labels
  305. * @return
  306. */
  307. List<ReturnEntityVo> getUserIdentity(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("labels") List<String> labels);
  308. /**
  309. * 机构类型
  310. * @param startTime
  311. * @param endTime
  312. * @param labels
  313. * @return
  314. */
  315. List<ReturnEntityVo> getClubType(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("labels") List<String> labels);
  316. /**
  317. * 供应商下有报表的月份集合
  318. * @param shopId
  319. * @return
  320. */
  321. List<String> getMarketReportDataList(@Param("shopId") Integer shopId);
  322. }