GroupsRelationMapper.java 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. package com.cyksj.mapper;
  2. import cn.hutool.core.date.DateTime;
  3. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.cyksj.model.entity.GroupsRelation;
  6. import com.cyksj.model.entity.PhoneCode;
  7. import com.cyksj.model.manage.views.GroupsRelationBackView;
  8. import com.cyksj.model.manage.views.GroupsRelationView;
  9. import com.cyksj.model.views.GroupsRelationUserView;
  10. import com.cyksj.model.views.RenewalView;
  11. import com.cyksj.model.views.UserRecommendGoodsFrontView;
  12. import com.cyksj.model.views.UserTicketView;
  13. import org.apache.ibatis.annotations.Param;
  14. import org.apache.ibatis.annotations.Update;
  15. import java.util.Date;
  16. import java.util.List;
  17. /**
  18. * @author chan
  19. * @date 2022/9/27 11:10 AM
  20. */
  21. public interface GroupsRelationMapper extends BaseMapper<GroupsRelation> {
  22. List<Long> getAccountIdsByUserIdOrNickNameOrSubmitAccount(@Param("userId") Long userId, @Param("nickName") String nickName, @Param("submitAccount") String submitAccount);
  23. Integer updateExpiryTime(@Param("entity") GroupsRelation relation, @Param("expireTime") Date expireTime);
  24. Long getGroupTripsSkuIdByRelationId(Long relationId);
  25. @Update("update groups_relation set customer_service = null where id = #{id}")
  26. void updateCustomerService(Long id);
  27. Long selectSimilarExpiredRelation(@Param("skuId") Long skuId, @Param("minExpiryTime") DateTime minExpiryTime, @Param("maxNum") Integer maxNum, @Param("ip") String ip);
  28. List<GroupsRelationView> selectRelationByGoodsId(@Param("goodsId") Long goodsId, @Param("userIds") List<Long> userIds, @Param("yhsId") Long yhsId);
  29. GroupsRelationView getGroupRelationViewByUserIdAndRelationId(@Param("userId") Long userId, @Param("relationId") Long relationId);
  30. String getBindPhoneByUserId(Long userId);
  31. Integer selectViewPwdCount(Long groupsId);
  32. GroupsRelation selectRandomOneRelationByGroupsId(Long groupsId);
  33. List<GroupsRelation> selectExpiredRelationByCondition(@Param("now") DateTime now, @Param("list") List<Long> filterSkuIds);
  34. GroupsRelation selectOutsideRelationByGroupsId(@Param("groupsId") Long groupsId, @Param("relationNum") Integer relationNum);
  35. List<GroupsRelation> selectExpiredChatGPTRelation(@Param("nextBeginDay") DateTime nextBeginDay, @Param("list") List<Long> gptSkuIds);
  36. List<GroupsRelationUserView> getUserRelationUserViews(@Param("groupsId") Long groupsId, @Param("relationId") Long relationId, @Param("userId") Long userId, @Param("status") List<GroupsRelation.Status> status);
  37. List<Long> getTicketGoodsId(@Param("list") List<Long> userIds, @Param("status") List<String> status);
  38. Page<UserRecommendGoodsFrontView> getRecommendGoodsViews(@Param("page") Page<UserRecommendGoodsFrontView> page, @Param("list") List<Long> filter_goods_id, @Param("isPayNf") Boolean isPayNf, @Param("filterCourseGoods") Boolean filterCourseGoods);
  39. Long getOutSideGroupsTripsRelationByGoodsId(@Param("skuId") Long skuId, @Param("beginOfDay") DateTime beginOfDay, @Param("extraNum") Integer extraNum, @Param("userId") Long userId, @Param("skuNum") Integer skuNum, @Param("maxNum") Integer maxNum);
  40. Integer selectAvailableRelation(@Param("skuId") Long skuId, @Param("skuNum") Integer skuNum);
  41. Integer selectSpecialGroupsRelationAvailable(@Param("skuId") Long skuId, @Param("maxNum") Integer maxNum, @Param("skuNum") Integer skuNum, @Param("extractNum") Integer extractNum, @Param("tenExpiry") DateTime tenExpiry);
  42. Integer selectNumWaitingGroups(Long skuId);
  43. Integer selectLimitAvailableNum(@Param("skuId") Long skuId, @Param("maxNum") Integer maxNum);
  44. GroupsRelationBackView getGroupRelationAccountView(Long relationId);
  45. PhoneCode getAreaPhoneByUserId(Long userId);
  46. List<RenewalView> getUserHasPayGoods(@Param("list") List<Long> userIds, @Param("now") DateTime now);
  47. Long getExperienceTicket(@Param("userId") Long userId, @Param("skuId") Long skuId);
  48. Long selectGoodsDonQaByGoodsId(Long goodsId);
  49. GroupsRelation selectRelationByAccountAndNum(@Param("account") String account, @Param("password") String password, @Param("goodsId") Long goodsId, @Param("num") Integer num);
  50. List<GroupsRelation> selectExtraRelation(@Param("userId") Long userId, @Param("skuId") Long skuId, @Param("relationId") Long relationId);
  51. void incrExpiryTime(@Param("relationId") Long relationId, @Param("userId") Long userId);
  52. List<UserTicketView> selectUserTickets(@Param("userIds") List<Long> userIds, @Param("goodsId") Long goodsId, @Param("skuId") Long skuId);
  53. Integer selectCountByGoodsId(@Param("userIds") List<Long> userIdList, @Param("goodsId") Long goodsId, @Param("now") DateTime now);
  54. }