NewOrderDao.java 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. package com.caimei.modules.order.dao;
  2. import com.caimei.modules.coupon.entity.CmCoupon;
  3. import com.caimei.modules.coupon.entity.CmCouponOrderRecord;
  4. import com.caimei.modules.order.entity.*;
  5. import com.caimei.modules.product.entity.CmPromotion;
  6. import com.caimei.modules.user.entity.NewCmSp;
  7. import com.thinkgem.jeesite.common.persistence.CrudDao;
  8. import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
  9. import org.apache.ibatis.annotations.Param;
  10. import java.util.Date;
  11. import java.util.List;
  12. import java.util.Set;
  13. @MyBatisDao
  14. public interface NewOrderDao extends CrudDao<NewOrder> {
  15. Integer updateClauseContent(NewOrder newOrder);
  16. NewOrder findByOrderID(@Param("orderID") Integer orderID);
  17. int confirmOrder(Integer orderID);
  18. void updateStatus(NewOrder order);
  19. NewOrder getOrderByShopOrderID(@Param("shopOrderID") String shopOrderID);
  20. void updatePayStatus(@Param("payStatus") String payStatus, @Param("orderID") Integer orderID);
  21. List<NewOrder> findOrderList(NewOrder newOrder);
  22. Double findPaidOrderID(@Param("orderID") Integer orderID);
  23. List<CmPromotion> findPromotionsByIds(@Param("promotionsIds") Set promotionsIds);
  24. CmPromotion getDbPromotionsByOrderId(@Param("orderId") Integer orderId, @Param("promotionsId") Integer promotionsId);
  25. int insertPromotionsRecord(CmPromotion promotion);
  26. int updatePromotionsRecord(CmPromotion promotion);
  27. /**
  28. * 置为已收款已付款
  29. * @param orderId
  30. */
  31. void updatePayAndReceipt(Integer orderId);
  32. /**
  33. * 子订单置为已收款已付款
  34. * @param orderId
  35. */
  36. void updatePayStatusSon(Integer orderId);
  37. /**
  38. * 删除此订单下订单促销
  39. *
  40. * @param orderId
  41. */
  42. void deleterPomotionsOrder(Integer orderId);
  43. /**
  44. * 更新订单付款状态和0成本标识
  45. *
  46. * @param newOrder
  47. */
  48. void updateOrderStatus(NewOrder newOrder);
  49. /**
  50. * 获取上线协销人员,排除采美默认协销经理
  51. *
  52. * @return ServiceProvider
  53. */
  54. List<NewCmSp> findServiceProviderList();
  55. /**
  56. * 修改订单返佣标识
  57. *
  58. * @param orderId
  59. */
  60. void updateByRebateFlag(Integer orderId);
  61. /**
  62. * 查询商品资质文件
  63. *
  64. * @param recordId
  65. * @return
  66. */
  67. List<CmFile> findQualificationFile(String recordId);
  68. /**
  69. * 查询资质图片
  70. *
  71. * @param recordId
  72. * @return
  73. */
  74. List<String> findQualificationImage(Integer recordId);
  75. /**
  76. * 删除所有的资质图片
  77. *
  78. * @param recordId
  79. */
  80. void deleteQualificationImage(Integer recordId);
  81. /**
  82. * 保存资质图片
  83. *
  84. * @param recordId
  85. * @param image
  86. */
  87. void insertQualificationImage(@Param("recordId") Integer recordId, @Param("image") String image);
  88. /**
  89. * 删除商品资质文件
  90. *
  91. * @param recordId
  92. */
  93. void deleteQualificationFile(Integer recordId);
  94. /**
  95. * 保存商品资质文件
  96. *
  97. * @param recordId
  98. * @param fileName
  99. * @param ossName
  100. */
  101. void insertQualificationFile(@Param("recordId") Integer recordId, @Param("fileName") String fileName, @Param("ossName") String ossName);
  102. /**
  103. * 查询短链接是否存在
  104. *
  105. * @param shortLink
  106. * @return
  107. */
  108. Integer findBYShortLink(String shortLink);
  109. /**
  110. * 保存短链接信息
  111. *
  112. * @param markId 短信类型
  113. * @param shortLink 短链接
  114. * @param url 跳转地址
  115. */
  116. void insertShortLink(@Param("markId") int markId, @Param("shortLink") String shortLink, @Param("url") String url);
  117. /**
  118. * 保存短信发送条数
  119. *
  120. * @param markId
  121. * @param num
  122. */
  123. void updateSendNum(@Param("markId") int markId, @Param("num") int num);
  124. /**
  125. * 获取订单定金商品Id
  126. * @param orderID
  127. * @return
  128. */
  129. Integer getDepositOrderProductId(Integer orderID);
  130. /**
  131. * 定金商品撤销收款,用户余额扣除
  132. */
  133. void updateUserMoneyByUserId(@Param("payTotalFee")Double payTotalFee,@Param("userID") Integer userID);
  134. /**
  135. * 查询订单优惠券信息
  136. *
  137. * @param orderID
  138. * @return
  139. */
  140. CmCouponOrderRecord findOrderCouponRecord(Integer orderID);
  141. /**
  142. * 查询优惠券信息
  143. *
  144. * @param clubCouponId
  145. * @return
  146. */
  147. CmCoupon findClubCouponById(Integer clubCouponId);
  148. /**
  149. * 保存优惠券与订单关联信息
  150. *
  151. * @param orderRecord
  152. */
  153. void insertCouponOrderRecord(CmCouponOrderRecord orderRecord);
  154. /**
  155. * 更新优惠券与订单关联信息
  156. *
  157. * @param orderRecord
  158. */
  159. void updateCouponOrderRecord(CmCouponOrderRecord orderRecord);
  160. /**
  161. * 删除优惠券与订单关联信息
  162. *
  163. * @param id
  164. */
  165. void deleteCouponOrderRecord(Integer id);
  166. List<OrderReceiptRelationPo> getUndividedPaidReceipt(String currentTime);
  167. List<OrderReceiptRelationPo> getOnlineBalance(String currentTime);
  168. List<OrderProductVo> getOrderProductByOrderId(Integer orderId);
  169. Double getOrderProductPaidAmount(Integer orderProductId);
  170. ShopOrderVo getShopOrderListByOrderId(Integer shopOrderId);
  171. List<ShopOrderVo> getShopOrderByOrderId(Integer orderId);
  172. Double getPaidShipping(Integer orderId, Integer shopId);
  173. String getShopCommercialCode(Integer shopId);
  174. OrderVo getOrderByOrderId(Integer orderId);
  175. void insertSplitAccount(SplitAccountPo splitAccount);
  176. Date findSplitTime();
  177. void updateOnlinePayFlag(@Param("onlinePayFlag") Integer onlinePayFlag,@Param("orderId") Integer orderId);
  178. void updateBrokerage(@Param("shopOrderID")Integer shopOrderID ,@Param("brokerage")Double brokerage);
  179. Integer findSupport(Integer shopOrderId);
  180. List<OrderProductVo> getOrderProductByShopOrderId(Integer shopOrderId);
  181. List<SplitAccountPo> getSplitAccountList(String mbOrderId);
  182. Double getPaidShopAmount(Integer shopOrderId);
  183. void updateShopOrderByPayStatus(@Param("shopOrderId")Integer shopOrderId,@Param("paidShop") Double paidShop,@Param("payStatus") Integer payStatus);
  184. void insertPayShop(PayShopPo payShop);
  185. void insertPayShopRecord(PayShopRecordPo shopRecord);
  186. void updateOrderByPayStatus(@Param("orderId")Integer orderId, @Param("payStatus")Integer payStatus);
  187. void updateBySplitStatus(String mbOrderId);
  188. Integer findOnlinePay(Integer orderID);
  189. String findSplitCode(String shopOrderId);
  190. Double findPayAmount(String shopOrderId);
  191. Double findShouldPayShopAmount(String shopOrderId);
  192. void updateSettleStatus(@Param("shopOrderId")String shopOrderId,@Param("productType") Integer productType);
  193. void updateShopOrderSettleStatus(@Param("shopOrderId")String shopOrderId, @Param("settleStatus")Integer settleStatus);
  194. void insertSettleRecord(SettleRecord settleRecord);
  195. Double findSettleSum(String shopOrderId);
  196. List<SettleRecord> findSettleRecord(Integer orderID);
  197. }