package com.cyksj.mapper; import cn.hutool.core.date.DateTime; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.cyksj.model.entity.GroupsRelation; import com.cyksj.model.manage.views.GroupsRelationView; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Update; import java.util.Date; import java.util.List; /** * @author chan * @date 2022/9/27 11:10 AM */ public interface GroupsRelationMapper extends BaseMapper { List getAccountIdsByUserIdOrNickNameOrSubmitAccount(@Param("userId") Long userId, @Param("nickName") String nickName, @Param("submitAccount") String submitAccount); Integer updateExpiryTime(@Param("entity") GroupsRelation relation, @Param("expireTime") Date expireTime); Long getGroupTripsSkuIdByRelationId(Long relationId); @Update("update groups_relation set customer_service = null where id = #{id}") void updateCustomerService(Long id); Long selectSimilarExpiredRelation(@Param("skuId") Long skuId, @Param("minExpiryTime") DateTime minExpiryTime); List selectRelationByGoodsId(@Param("goodsId") Long goodsId, @Param("userId") Long userId); GroupsRelationView getGroupRelationViewByUserIdAndRelationId(@Param("userId") Long userId, @Param("relationId") Long relationId); String getBindPhoneByUserId(Long userId); Integer selectViewPwdCount(Long groupsId); GroupsRelation selectRandomOneRelationByGroupsId(Long groupsId); List selectExpiredRelationByCondition(@Param("now") DateTime now, @Param("list") List filterSkuIds); GroupsRelation selectOutsideRelationByGroupsId(@Param("groupsId") Long groupsId, @Param("relationNum") Integer relationNum); List selectExpiredChatGPTRelation(@Param("nextBeginDay") DateTime nextBeginDay, @Param("list") List gptSkuIds); }