后台服务
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

305 行
8.3 KiB

  1. package com.iformall.service;
  2. import java.util.*;
  3. import javax.servlet.http.HttpServletRequest;
  4. import javax.servlet.http.HttpServletResponse;
  5. import com.github.pagehelper.PageInfo;
  6. import com.iformall.common.ResultData;
  7. import com.iformall.domain.po.TtCouponChannelPoi;
  8. import com.iformall.domain.po.WxAppinfo;
  9. import com.iformall.domain.po.WxCoupon;
  10. import com.iformall.domain.po.WxMall;
  11. import com.iformall.domain.po.WxMerchant;
  12. import com.iformall.domain.po.base.TenantEntity;
  13. import com.iformall.domain.vo.TtCouponVo;
  14. import com.iformall.domain.vo.WxCouponCVo;
  15. import com.iformall.domain.vo.WxCouponStatisVo;
  16. import com.iformall.domain.vo.WxMerchantVo;
  17. public interface WxCouponService {
  18. ResultData list(TenantEntity tenantEntity,WxCoupon wxCoupon, Integer pageNum, Integer pageSize);
  19. List<WxCoupon> list(WxCoupon wxCoupon);
  20. /**
  21. * 根据实体查询分页列表
  22. *
  23. * @param record
  24. * @param pageIndex
  25. * @param pageSize
  26. * @return
  27. */
  28. PageInfo<WxCoupon> listAsPage(WxCoupon record, Integer pageIndex, Integer pageSize);
  29. PageInfo<WxCoupon> simplelistAsPage(WxCoupon record, Integer pageIndex, Integer pageSize);
  30. /**
  31. * 卡类列表,包括统计
  32. * @param record
  33. * @param tenantEntitys
  34. * @return
  35. */
  36. PageInfo<WxCouponStatisVo> findCountData(WxCoupon record, List<TenantEntity> tenantEntitys, Integer pageNum, Integer pageSize);
  37. void exportCardData(WxCoupon record, List<TenantEntity> tenantEntitys, HttpServletRequest request, HttpServletResponse response);
  38. /**
  39. * 券列表,包括统计
  40. * @param record
  41. * @param tenantEntitys
  42. * @return
  43. */
  44. PageInfo<WxCouponStatisVo> findCouponData(WxCoupon record, List<TenantEntity> tenantEntitys, Integer pageNum, Integer pageSize);
  45. void exportCouponData(WxCoupon record, List<TenantEntity> tenantEntitys, HttpServletRequest request, HttpServletResponse response);
  46. /**
  47. * 砍价列表,包括统计
  48. * @param record
  49. * @param tenantEntitys
  50. * @param pageNum
  51. * @param pageSize
  52. * @return
  53. */
  54. PageInfo<WxCouponStatisVo> findPressData(WxCoupon record, List<TenantEntity> tenantEntitys, Integer pageNum, Integer pageSize);
  55. void exportPressData(WxCoupon record, List<TenantEntity> tenantEntitys, HttpServletRequest request, HttpServletResponse response);
  56. /**
  57. * 根据Id获得实体
  58. *
  59. * @param id
  60. * @return
  61. */
  62. WxCoupon getById(Long id,String tenantId);
  63. WxCoupon getPriceAndStock(Long id,String tenantId);
  64. List<WxCoupon> getPriceAndStock(List<Long> id,String tenantId);
  65. WxCoupon getHtmlById(Long id,String tenantId);
  66. WxCouponCVo getVoById(Long id,String couponTenantId,TenantEntity mallTenantEntity);
  67. WxCouponCVo getVoStatusById(Long id,String tenantId);
  68. WxCoupon getAttrsById(Long couponId, String tenantId);
  69. /**
  70. * 保存或更新实体
  71. *
  72. * @param record
  73. */
  74. ResultData saveOrUpdate(WxCoupon record);
  75. ResultData updateTtProduct(WxCoupon wxCoupon);
  76. /**
  77. * 更新实体
  78. *
  79. * @param record
  80. */
  81. void update(WxCoupon record);
  82. /**
  83. * 根据Id删除实体
  84. *
  85. * @param id
  86. */
  87. void deleteById(Long id,String tenantId);
  88. /**
  89. * 查询时间段内销售金额
  90. *
  91. * @param tenantEntitys
  92. * @param wxCoupon
  93. * @return
  94. */
  95. List<WxCouponStatisVo> findSaleMoneyByDate(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  96. /**
  97. * 查询时间段内核销金额
  98. *
  99. * @param tenantEntitys
  100. * @param wxCoupon
  101. * @return
  102. */
  103. List<WxCouponStatisVo> findPaymentByDate(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  104. /**
  105. * 查询售出卡数量
  106. * @return
  107. */
  108. Long findSaleCardCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  109. /**
  110. * 查询转增数量
  111. * @return
  112. */
  113. Long findTranCardCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  114. /**
  115. * 查询补贴金额
  116. * @return
  117. */
  118. String findSubsidyMoney(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  119. //----------------券--------------
  120. /**
  121. * 券发放数量
  122. * @return
  123. */
  124. //List<WxCoupon> findCouponSendCount(WxCoupon wxCoupon);
  125. /**
  126. * 券购买数量
  127. * @return
  128. */
  129. List<WxCouponStatisVo> findCouponOrderCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  130. /**
  131. * 券领取数量
  132. * @return
  133. */
  134. //List<WxCoupon> findCouponGetCount(WxCoupon wxCoupon);
  135. /**
  136. * 券核销数量
  137. * @return
  138. */
  139. List<WxCouponStatisVo> findCouponPaymentCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  140. /**
  141. * 有价券销售数量
  142. * @return
  143. */
  144. List<WxCouponStatisVo> priceCouponSaleCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  145. /**
  146. * 有价券核销数量
  147. * @return
  148. */
  149. List<WxCouponStatisVo> priceCouponPaymentCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  150. /**
  151. * 有价券退款数量
  152. * @return
  153. */
  154. Long priceCouponCancelCount(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  155. /**
  156. * 有价券销售总额
  157. *
  158. * @param tenantEntitys
  159. * @param wxCoupon
  160. * @return
  161. */
  162. String findSumPriceSaleMoney(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  163. String findSumPricePayMent(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  164. String findSumSubsidyMoney(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  165. /**
  166. * 砍价发起次数走势
  167. * @return
  168. */
  169. List<WxCouponStatisVo> pressSendHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  170. /**
  171. * 砍价成功次数走势
  172. * @return
  173. */
  174. List<WxCouponStatisVo> pressSuccHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  175. /**
  176. * 砍价核销数量走势
  177. * @return
  178. */
  179. List<WxCouponStatisVo> pressPaymentHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  180. /**
  181. * 砍价转化率
  182. * @return
  183. */
  184. String pressSuccRate(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  185. /**
  186. * 砍价参与人数
  187. * @return
  188. */
  189. Long sumJoin(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  190. /**
  191. * 查询售出卡数量历史
  192. * @return
  193. */
  194. List<WxCouponStatisVo> findSaleCardCountHistory(List<TenantEntity> tenantEntitys, WxCoupon wxCoupon);
  195. /**
  196. * 增加库存及修改有效时间
  197. */
  198. ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon);
  199. WxCoupon findById(WxCoupon wxCoupon);
  200. /**
  201. * 库存减少
  202. *
  203. * @param id 券ID
  204. * @param number 减少数量
  205. * @param remainInventory 当前库存
  206. */
  207. void reduceRemainInventory(TenantEntity tenantEntity,Long id, Integer number);
  208. /**
  209. * 库存退回
  210. *
  211. * @param id 券ID
  212. * @param number 回退数量
  213. * @param remainInventory 当前库存
  214. */
  215. void backRemainInventory(TenantEntity tenantEntity,Long id, Integer number, Integer remainInventory);
  216. /**
  217. * 卡延期
  218. * @param wxCoupon
  219. * @return
  220. */
  221. ResultData cardDefer(Long id,String tenantId,Date validEndDate);
  222. boolean validCouponDate(WxCoupon wxCoupon);
  223. ResultData validGiftCouponDate(WxCoupon wxCoupon);
  224. /**
  225. * 获取券商户map
  226. *
  227. */
  228. Map<Long,String> getCouponMerchantMap(List<Long> couponIds,TenantEntity tenantEntity,boolean onlyOneMerchantCoupons);
  229. Map<Long, WxCoupon> getCouponMap(List<Long> couponIds, TenantEntity tenantEntity);
  230. Map<String,List<WxMerchantVo>> getCouponMerchantList(TenantEntity tenantInfo, Long couponId);
  231. /**
  232. * 作废卷
  233. * @param tenantInfo
  234. * @param couponId
  235. * @return
  236. */
  237. ResultData disable(TenantEntity tenantInfo, Long couponId);
  238. void setParentCouponMallMerchants(TenantEntity mallTenantEntity,WxCoupon wxCoupon) throws Exception;
  239. Map<Long,Boolean> couponMerchantAutoShare(TenantEntity tenantEntity,WxCoupon wxCoupon) throws Exception;
  240. /**
  241. * 判断门店商户是否可用
  242. * @param couponId
  243. * @param couponType
  244. * @param couponTenantEntity
  245. * @return
  246. */
  247. boolean isCouponMerchantValid(Long couponId,Integer couponType,TenantEntity couponTenantEntity);
  248. }