package com.yeshi.fanli.service.inter.activity;
|
|
import java.util.List;
|
|
import net.sf.json.JSONObject;
|
|
import com.yeshi.fanli.entity.bus.activity.ActivityShareResult;
|
import com.yeshi.fanli.entity.bus.activity.ActivityUser;
|
import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
|
import com.yeshi.fanli.entity.bus.activity.RecommendActivityInviteInfo;
|
import com.yeshi.fanli.exception.ActivityException;
|
import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
|
/**
|
* 动态服务
|
*
|
* @author Administrator
|
*
|
*/
|
public interface ActivityService {
|
|
public int insert(RecommendActivity record);
|
|
public int insertSelective(RecommendActivity record);
|
|
public RecommendActivity selectByPrimaryKey(Long id);
|
|
public int updateByPrimaryKeySelective(RecommendActivity record);
|
|
public int updateByPrimaryKey(RecommendActivity record);
|
|
/**
|
* 获取活动用户列表
|
*
|
* @return
|
*/
|
public List<ActivityUser> getActivityUserList();
|
|
/**
|
* 添加商品分享的动态
|
*
|
* @param activityUid
|
* @param title
|
* @param goodsList
|
* @param top
|
* @return
|
*/
|
public RecommendActivity addShareGoodsRecommendActivity(Long activityUid, String title, List<Long> goodsList,
|
boolean top, int shareCount) throws ActivityException;
|
|
/**
|
* 修改商品分享动态
|
*
|
* @param id
|
* @param activityUid
|
* @param title
|
* @param goodsList
|
* @param top
|
* @param shareCount
|
* @return
|
* @throws ActivityException
|
*/
|
public RecommendActivity updateShareGoodsRecommendActivity(Long id, Long activityUid, String title,
|
List<Long> goodsList, boolean top, int shareCount) throws ActivityException;
|
|
/**
|
* 更新分享商品动态的商品
|
*
|
* @param id
|
* @param activityUid
|
* @param title
|
* @param goodsList
|
* @param top
|
* @param shareCount
|
* @return
|
* @throws ActivityException
|
*/
|
public void upgradeShareGoodsRecommendActivity(Long id) throws ActivityException;
|
|
/**
|
* 添加邀请图动态
|
*
|
* @param activityUid
|
* @param title
|
* @param url
|
* @param top
|
* @param shareCount
|
* @param px
|
* -二维码坐标X
|
* @param py
|
* -二维码坐标Y
|
* @param erCodeSize
|
* -二维码尺寸
|
* @return
|
* @throws ActivityException
|
*/
|
public RecommendActivity addInviteImgRecommendActivity(Long activityUid, String title, String url, boolean top,
|
int shareCount, int px, int py, int erCodeSize) throws ActivityException;
|
|
/**
|
* 修改邀请图动态
|
*
|
* @param id
|
* @param activityUid
|
* @param title
|
* @param url
|
* @param top
|
* @param shareCount
|
* @param px
|
* @param py
|
* @param erCodeSize
|
* @return
|
* @throws ActivityException
|
*/
|
public RecommendActivity updateInviteImgRecommendActivity(Long id, Long activityUid, String title, String url,
|
boolean top, int shareCount, int px, int py, int erCodeSize) throws ActivityException;
|
|
/**
|
* 添加图文动态
|
*
|
* @param activityUid
|
* @param title
|
* @param imgList
|
* @param top
|
* @return
|
*/
|
public RecommendActivity addTextAndImgRecommendActivity(Long activityUid, String title, List<String> imgList,
|
boolean top, int shareCount) throws ActivityException;
|
|
/**
|
* 修改图文动态
|
*
|
* @param id
|
* @param activityUid
|
* @param title
|
* @param imgList
|
* @param top
|
* @param shareCount
|
* @return
|
* @throws ActivityException
|
*/
|
public RecommendActivity updateTextAndImgRecommendActivity(Long id, Long activityUid, String title,
|
List<String> imgList, boolean top, int shareCount) throws ActivityException;
|
|
/**
|
* 获取推荐活动列表
|
*
|
* @param page
|
* @param pageSize
|
* @return
|
*/
|
public List<RecommendActivity> getRecommendActivityList(int page, int pageSize);
|
|
|
public List<RecommendActivity> getRecommendActivityListCache(int page, int pageSize);
|
|
/**
|
* 获取推荐活动的数量
|
*
|
* @return
|
*/
|
public long getRecommendActivityCount();
|
|
|
public long getRecommendActivityCountCache();
|
|
public List<RecommendActivity> getRecommendActivityList(int type, int page, int pageSize);
|
|
public long getRecommendActivityCount(int type);
|
|
/**
|
* 分享商品
|
*
|
* @param uid
|
* @param activityId
|
* @return
|
* @throws UserShareGoodsRecordException
|
*/
|
public ActivityShareResult shareActivityGoods(Long uid, Long activityId) throws ActivityException, UserShareGoodsRecordException;
|
|
/**
|
* 分享邀请图片
|
*
|
* @param uid
|
* @param activityId
|
* @return
|
* @throws ActivityException
|
*/
|
public ActivityShareResult shareInviteImg(Long uid, Long activityId) throws ActivityException;
|
|
/**
|
* 动态列表查询
|
*
|
* @param title
|
* @param page
|
* @param pageSize
|
* @return
|
*/
|
public List<RecommendActivity> queryRecommendActivityList(String title, int page, int pageSize);
|
|
/**
|
* 动态列表删除
|
*
|
* @param ids
|
*/
|
public void deleteRecommendActivity(long[] ids);
|
|
/**
|
* 获取推荐详情
|
*
|
* @param id
|
* @return
|
*/
|
public RecommendActivity getRecommendActivityById(Long id);
|
|
/**
|
* 增加分享的次数
|
*
|
* @param activityId
|
* @param count
|
*/
|
public void addShareCount(Long activityId, int count);
|
|
/**
|
* 获取邀请信息
|
*
|
* @param activityId
|
* @return
|
*/
|
public RecommendActivityInviteInfo getRecommendActivityInviteInfoByActivityId(Long activityId);
|
|
/**
|
* 处理淘宝的商品下架问题
|
*
|
* @param auctionId
|
*/
|
public void downTaoBaoGoods(Long auctionId);
|
|
public RecommendActivity getRecommendActivityDetail(Long activityId);
|
|
public ActivityUser selectActivityUserByPrimaryKey(Long id);
|
|
/**
|
* 动态分享
|
* @param uid
|
* @param activityId
|
* @return
|
* @throws ActivityException
|
*/
|
public JSONObject shareGoodsV2(Long uid, Long activityId) throws ActivityException, UserShareGoodsRecordException;
|
}
|