| | |
| | | package com.yeshi.fanli.controller.admin;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/activity")
|
| | |
| | |
|
| | | @RequestMapping(value = "getActivity")
|
| | | public void getActivity(String callback, long id, PrintWriter out) {
|
| | | RecommendActivity recommendActivity = activityService.getRecommendActivityById(id);
|
| | | if (recommendActivity.getType() == RecommendActivity.TYPE_INVITE) {
|
| | | RecommendActivityInviteInfo info = activityService
|
| | | .getRecommendActivityInviteInfoByActivityId(recommendActivity.getId());
|
| | | recommendActivity.setInviteInfo(info);
|
| | | }
|
| | | |
| | | try {
|
| | | RecommendActivity recommendActivity = activityService.getRecommendActivityById(id);
|
| | | if (recommendActivity ==null) {
|
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadFalseResult("该动态已不存在"));
|
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult("该动态已不存在") + ")");
|
| | | }
|
| | | return;
|
| | | }
|
| | | |
| | | if (recommendActivity.getType() == RecommendActivity.TYPE_INVITE) {
|
| | | RecommendActivityInviteInfo info = activityService
|
| | | .getRecommendActivityInviteInfoByActivityId(recommendActivity.getId());
|
| | | recommendActivity.setInviteInfo(info);
|
| | | }
|
| | |
|
| | | if (recommendActivity !=null) {
|
| | | Date startTime = recommendActivity.getStartTime();
|
| | | Date endTime = recommendActivity.getEndTime();
|
| | | |
| | | if (startTime == null && endTime == null) {
|
| | | recommendActivity.setTimeTask(false);
|
| | | recommendActivity.setStartTime_str("");
|
| | | recommendActivity.setEndTime_str("");
|
| | | } else {
|
| | | recommendActivity.setTimeTask(true);
|
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
|
| | | if (startTime == null) {
|
| | | recommendActivity.setStartTime_str("");
|
| | | } else {
|
| | | recommendActivity.setStartTime_str(sdf.format(startTime));
|
| | | }
|
| | | |
| | | if (endTime == null) {
|
| | | recommendActivity.setEndTime_str("");
|
| | | } else {
|
| | | recommendActivity.setEndTime_str(sdf.format(endTime));
|
| | | }
|
| | | }
|
| | | |
| | | ActivityUser activityUser = recommendActivity.getActivityUser();
|
| | | if (activityUser != null) {
|
| | | ActivityUser resultUser = activityService.selectActivityUserByPrimaryKey(activityUser.getId());
|
| | | if (resultUser != null) {
|
| | | recommendActivity.setActivityUser(resultUser);
|
| | | }
|
| | | recommendActivity.setActivityUser(resultUser);
|
| | | }
|
| | | |
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadTrueResult(recommendActivity));
|
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadTrueResult(recommendActivity) + ")");
|
| | | }
|
| | | } catch (Exception e) {
|
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadFalseResult("操作失败"));
|
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult("操作失败") + ")");
|
| | | }
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadTrueResult(recommendActivity));
|
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadTrueResult(recommendActivity) + ")");
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "addShareGoodsActivity")
|
| | | public void addShareGoodsActivity(String callback, Long uid, String title, String actionIds, boolean top,
|
| | | int shareCount, PrintWriter out) {
|
| | | public void addShareGoodsActivity(String callback, Long uid, String actionIds, RecommendActivity activity, PrintWriter out) {
|
| | |
|
| | | if (uid == null) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请选择发布用户") + ")");
|
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传标题") + ")");
|
| | | return;
|
| | | }
|
| | |
|
| | | |
| | | if (StringUtil.isNullOrEmpty(actionIds)) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "选择商品") + ")");
|
| | | return;
|
| | | }
|
| | |
|
| | | // title = Jsoup.parse(title).text();
|
| | |
|
| | | JSONArray array = JSONArray.fromObject(actionIds);
|
| | | List<Long> auctionIds = new ArrayList<>();
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | auctionIds.add(array.optLong(i));
|
| | | }
|
| | | |
| | | try {
|
| | | activityService.addShareGoodsRecommendActivity(uid, title, auctionIds, top, shareCount);
|
| | | activityService.addShareGoodsRecommendActivity(uid,auctionIds, activity);
|
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | | } else {
|
| | |
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(e.getCode(), e.getMsg()) + ")");
|
| | | }
|
| | | } catch (Exception e) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "操作失败") + ")");
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // 修改商品分享动态
|
| | | @RequestMapping(value = "updateShareGoodsActivity")
|
| | | public void updateShareGoodsActivity(String callback, Long id, Long uid, String title, String actionIds,
|
| | | boolean top, int shareCount, PrintWriter out) {
|
| | | public void updateShareGoodsActivity(String callback, Long uid, String actionIds, RecommendActivity activity, PrintWriter out) {
|
| | |
|
| | | if (id == null) {
|
| | | if (activity.getId() == null) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传ID") + ")");
|
| | | return;
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | if (StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传标题") + ")");
|
| | | return;
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | // title = Jsoup.parse(title).text();
|
| | |
|
| | | JSONArray array = JSONArray.fromObject(actionIds);
|
| | | List<Long> auctionIds = new ArrayList<>();
|
| | |
| | | auctionIds.add(array.optLong(i));
|
| | | }
|
| | | try {
|
| | | activityService.updateShareGoodsRecommendActivity(id, uid, title, auctionIds, top, shareCount);
|
| | | activityService.updateShareGoodsRecommendActivity(uid, auctionIds, activity);
|
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | | } else {
|
| | |
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(e.getCode(), e.getMsg()) + ")");
|
| | | }
|
| | | } catch (Exception e) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "操作失败") + ")");
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "addInviteActivity")
|
| | | public void addInviteActivity(String callback, Long uid, String title, String img, boolean top, int shareCount,
|
| | | public void addInviteActivity(String callback, Long uid,RecommendActivity activity, String img,
|
| | | int px, int py, int size, PrintWriter out) {
|
| | |
|
| | | if (uid == null) {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | if (StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传标题") + ")");
|
| | | return;
|
| | | }
|
| | |
| | | img = img.trim();
|
| | |
|
| | | try {
|
| | | activityService.addInviteImgRecommendActivity(uid, title, img, top, shareCount, px, py, size);
|
| | | activityService.addInviteImgRecommendActivity(uid, activity, img, px, py, size);
|
| | | if (StringUtil.isNullOrEmpty(callback)) {
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | | } else {
|
| | |
| | | } else {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(e.getCode(), e.getMsg()) + ")");
|
| | | }
|
| | | } catch (Exception e) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "操作失败") + ")");
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateInviteActivity")
|
| | | public void updateInviteActivity(String callback, Long id, Long uid, String title, String img, boolean top,
|
| | | int shareCount, int px, int py, int size, PrintWriter out) {
|
| | | public void updateInviteActivity(String callback, Long uid, RecommendActivity activity, String img, |
| | | int px, int py, int size, PrintWriter out) {
|
| | |
|
| | | if (id == null) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请选择用户") + ")");
|
| | | if (activity.getId() == null) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "ID不能为空") + ")");
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | if (StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传标题") + ")");
|
| | | return;
|
| | | }
|
| | |
| | | // title = Jsoup.parse(title).text();
|
| | |
|
| | | try {
|
| | | activityService.updateInviteImgRecommendActivity(id, uid, title, img, top, shareCount, px, py, size);
|
| | | activityService.updateInviteImgRecommendActivity(uid, activity, img, px, py, size);
|
| | | if (StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | | else
|
| | |
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | else
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(e.getCode(), e.getMsg()) + ")");
|
| | | } catch (Exception e) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "操作失败") + ")");
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "addTextImgActivity")
|
| | | public void addTextImgActivity(String callback, Long uid, String title, String imgs, boolean top, int shareCount,
|
| | | public void addTextImgActivity(String callback, Long uid, RecommendActivity activity, String imgs, |
| | | PrintWriter out) {
|
| | | if (uid == null) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请选择发布用户") + ")");
|
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | if (StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传标题") + ")");
|
| | | return;
|
| | | }
|
| | |
|
| | | // title = Jsoup.parse(title).text();
|
| | |
|
| | | List<String> imgList = new ArrayList<>();
|
| | | if (!StringUtil.isNullOrEmpty(imgs)) {
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | activityService.addTextAndImgRecommendActivity(uid, title, imgList, top, shareCount);
|
| | | activityService.addTextAndImgRecommendActivity(uid, imgList, activity);
|
| | | if (StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | | else
|
| | |
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | else
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(e.getCode(), e.getMsg()) + ")");
|
| | | } catch (Exception e) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "操作失败") + ")");
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateTextImgActivity")
|
| | | public void updateTextImgActivity(String callback, Long id, Long uid, String title, String imgs, boolean top,
|
| | | int shareCount, PrintWriter out) {
|
| | | public void updateTextImgActivity(String callback, Long uid, String imgs, RecommendActivity activity, PrintWriter out) {
|
| | |
|
| | | if (id == null) {
|
| | | if (activity.getId() == null) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传ID") + ")");
|
| | | return;
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | if (StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "请上传标题") + ")");
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | activityService.updateTextAndImgRecommendActivity(id, uid, title, imgList, top, shareCount);
|
| | | activityService.updateTextAndImgRecommendActivity(uid, imgList, activity);
|
| | | if (StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | | else
|
| | |
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | else
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(e.getCode(), e.getMsg()) + ")");
|
| | | } catch (Exception e) {
|
| | | out.print(callback + "(" + JsonUtil.loadFalseResult(1, "操作失败") + ")");
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @param pageIndex
|
| | | * 页数
|
| | | * @param key
|
| | | * 查询条件
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getRecommendActivityList", method = RequestMethod.POST)
|
| | | public void getRecommendActivityList(int pageIndex, String key, PrintWriter out) {
|
| | | List<RecommendActivity> recommendActivityList = null;
|
| | | if (StringUtil.isNullOrEmpty(key)) {
|
| | | recommendActivityList = activityService.getRecommendActivityList(pageIndex, Constant.PAGE_SIZE);
|
| | | } else {
|
| | | recommendActivityList = activityService.queryRecommendActivityList(key, pageIndex, Constant.PAGE_SIZE);
|
| | | }
|
| | |
|
| | | int count = (int) activityService.getRecommendActivityCount();
|
| | |
|
| | | int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1;
|
| | |
|
| | | PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage);
|
| | |
|
| | | Map<String, String> map = new HashMap<String, String>();
|
| | | map.put("key", key);
|
| | | pe.setParams(map);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("recommendActivityList", recommendActivityList);
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | return;
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "deleteRecommendActivity", method = RequestMethod.POST)
|
| | | public void deleteRecommendActivity(long[] rsids, PrintWriter out) {
|
| | | // recommendSpecialService.deleteSpecials(rsids);
|
| | |
|
| | | activityService.deleteRecommendActivity(rsids);
|
| | | out.print(JsonUtil.loadTrueResult("删除成功"));
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | *
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | List<RecommendActivity> list = null;
|
| | | if (StringUtil.isNullOrEmpty(key)) {
|
| | | list = activityService.getRecommendActivityList(pageIndex, Constant.PAGE_SIZE);
|
| | | } else {
|
| | | list = activityService.queryRecommendActivityList(key, pageIndex, Constant.PAGE_SIZE);
|
| | | }
|
| | | |
| | | List<RecommendActivity> list = activityService.queryRecommendActivityList(key, pageIndex, Constant.PAGE_SIZE);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | for (RecommendActivity activity: list) {
|
| | | |
| | | Date startTime = activity.getStartTime();
|
| | | Date endTime = activity.getEndTime();
|
| | | |
| | | if (startTime == null && endTime == null) {
|
| | | activity.setTimeTask(false);
|
| | | activity.setStartTime_str("");
|
| | | activity.setEndTime_str("");
|
| | | } else {
|
| | | activity.setTimeTask(true);
|
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
|
| | | if (startTime == null) {
|
| | | activity.setStartTime_str("");
|
| | | } else {
|
| | | activity.setStartTime_str(sdf.format(startTime));
|
| | | }
|
| | | |
| | | if (endTime == null) {
|
| | | activity.setEndTime_str("");
|
| | | } else {
|
| | | activity.setEndTime_str(sdf.format(endTime));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int count = (int) activityService.getRecommendActivityCount();
|
| | |
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.jsoup.Jsoup;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | | import org.yeshi.utils.entity.FileUploadResult;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | | import com.yeshi.fanli.service.inter.activity.ActivityService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | /**
|
| | | * 动态
|
| | |
| | | if (page <= 0)
|
| | | page = 1;
|
| | | List<RecommendActivity> list = activityService.getRecommendActivityListCache(page, Constant.PAGE_SIZE);
|
| | | // 过滤一遍
|
| | | if (list != null)
|
| | | for (RecommendActivity activity : list) {
|
| | | if (!StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | activity.setTitle(Jsoup.parse(activity.getTitle()).text());
|
| | | if (activity.getShareCount() >= 10000)
|
| | | activity.setShareCountShow(
|
| | | NumberUtil.get1PointNumber(activity.getShareCount() / 10000.0) + "万");
|
| | | else
|
| | | activity.setShareCountShow(activity.getShareCount() + "");
|
| | | }
|
| | | }
|
| | | long count = activityService.getRecommendActivityCountCache();
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("data", getGson().toJson(list));
|
| | |
| | | @RequestMapping("api/v1/user")
|
| | | public class RecommendController {
|
| | |
|
| | | @Resource
|
| | | private RecommendBannerService recommendService;
|
| | |
|
| | | @Resource
|
| | | private BusinessSystemService businessSystemService;
|
| | |
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoOrderUtil taoBaoOrderUtil;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoCouponService taoBaoCouponService;
|
| | |
| | |
|
| | | @Resource
|
| | | private CollectionGoodsV2Service collectionGoodsV2Service;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageMapper hongBaoManageMapper;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsBriefService taoBaoGoodsBriefService;
|
| | |
| | |
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 新版推荐专题管理(1.5.3)
|
| | | * |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getRecommendIndex")
|
| | | public void getRecommendIndex(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "系统不存在"));
|
| | | return;
|
| | | }
|
| | |
|
| | | // 轮播图
|
| | | List<SwiperPicture> swiperList = null;
|
| | | try {
|
| | | swiperList = swiperPictureService.getByBannerCard("weex_index");
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | if (swiperList == null) {
|
| | | swiperList = new ArrayList<SwiperPicture>();
|
| | | }
|
| | | |
| | | |
| | | Special miaoShaSpecial = null;
|
| | | // 两行圆形专题
|
| | | List<Special> arcList = new ArrayList<Special>();
|
| | | |
| | | // 活动列表
|
| | | List<Special> activityList = new ArrayList<Special>();
|
| | | |
| | | // 方块部分
|
| | | List<Special> blockList = new ArrayList<Special>();
|
| | | |
| | | |
| | | try {
|
| | | List<Special> listSpecial = specialService.listBySystemAndCard("index", system.getId());
|
| | |
|
| | | if (listSpecial != null && listSpecial.size() > 0) {
|
| | | for (Special special : listSpecial) {
|
| | |
|
| | | if ("限时秒杀".equals(special.getName())) {
|
| | | miaoShaSpecial = special;
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (Special.SHOWTYPE_ARC.equals(special.getShowType())) {
|
| | | // 两行圆形专题
|
| | | arcList.add(special);
|
| | | } else if (Special.SHOWTYPE_BLOCK.equals(special.getShowType())) {
|
| | | // 方块部分
|
| | | blockList.add(special);
|
| | | } else if (Special.SHOWTYPE_ACTIVITY.equals(special.getShowType())) {
|
| | | // 动态
|
| | | activityList.add(special);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | |
|
| | | /* 限时秒杀 - 时间处理 */
|
| | | JSONObject msJSON = JSONObject.fromObject(new Gson().toJson(miaoShaSpecial));
|
| | | if (miaoShaSpecial != null) {
|
| | | // 获取秒杀
|
| | | int[] hours = new int[] { 0, 9, 12, 14, 16, 20, 22 };
|
| | | int hour = -1;
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(Long.parseLong(acceptData.getTime()));
|
| | | int nowHour = calendar.get(Calendar.HOUR_OF_DAY);
|
| | | for (int i = 0; i < hours.length - 1; i++) {
|
| | | if (nowHour >= hours[i] && nowHour < hours[i + 1]) {
|
| | | hour = hours[i + 1];
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if (hour < 0)
|
| | | hour = 24;
|
| | | long time = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(calendar.getTimeInMillis(), "yyyy-MM-dd"),
|
| | | "yyyy-MM-dd") + 1000 * 60 * 60 * hour;
|
| | | msJSON.put("time", time);
|
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("swiperList", JsonUtil.getApiCommonGson().toJson(swiperList));
|
| | | root.put("arcList", JsonUtil.getApiCommonGson().toJson(arcList));
|
| | | root.put("activityList", JsonUtil.getApiCommonGson().toJson(activityList));
|
| | | root.put("blockList", JsonUtil.getApiCommonGson().toJson(blockList));
|
| | | root.put("miaoSha", msJSON);
|
| | |
|
| | | // 增加邀请有奖
|
| | | JSONObject invite = new JSONObject();
|
| | | JumpDetailV2 jumpDetail = jumpDetailV2Service.getByTypeCache("invite");
|
| | | invite.put("jumpDetail", jumpDetail);
|
| | | invite.put("picture", configService.get("home_invite_banner"));
|
| | |
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
|
| | | // 如果IOS当前版本处于审核状态就不返回
|
| | | } else {
|
| | |
|
| | | // 按照版本返回,版本覆盖足够后可删除
|
| | | if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 30)
|
| | | || ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && Integer.parseInt(acceptData.getVersion()) > 37)) {
|
| | | if (uid != null) {
|
| | | try {
|
| | | UserSettingsVO vo = userCustomSettingsService.getMySettings(uid);
|
| | | if (vo == null || vo.getNoInvitationBonus() == null || vo.getNoInvitationBonus() == 0)// 没有关闭邀请
|
| | | root.put("invite", invite);
|
| | | } catch (UserCustomSettingsException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | } else
|
| | | root.put("invite", invite);
|
| | | }
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | |
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 商品基本详情 (1.4.0)
|
| | | *
|
| | |
| | | List<RecommendActivity> getRecommendActivityList(@Param("start") long start, @Param("count") int count); |
| | | |
| | | long getRecommendActivityCount(); |
| | | |
| | | long getRecommendActivityEffectiveCount(); |
| | | |
| | | List<RecommendActivity> getRecommendActivityListByType(@Param("type") int type, @Param("start") long start, |
| | | @Param("count") int count); |
| | |
| | | @Column(name = "ar_activity_uid")
|
| | | private ActivityUser activityUser;// 发布动态的用户
|
| | |
|
| | | @Expose
|
| | | private List<RecommendActivityTaoBaoGoods> goodsList;// 商品列表-商品分享有此属性
|
| | |
|
| | | @Expose
|
| | | private List<String> imageList;// 图片列表
|
| | |
|
| | | @Expose
|
| | | private List<String> widthAndHeight;
|
| | |
|
| | | |
| | | @Column(name = "ar_share_count")
|
| | | private Integer shareCount;// 分享数
|
| | |
|
| | |
| | | private String shareCountShow;
|
| | |
|
| | |
|
| | | @Column(name = "ar_start_time")
|
| | | private Date startTime;//起始时间
|
| | | |
| | | @Column(name = "ar_end_time")
|
| | | private Date endTime;//结束时间
|
| | | |
| | | // 是否定时
|
| | | private boolean timeTask;
|
| | | // 起始时间
|
| | | private String startTime_str;
|
| | | // 结束时间
|
| | | private String endTime_str;
|
| | | |
| | | |
| | | @Expose
|
| | | private List<RecommendActivityTaoBaoGoods> goodsList;// 商品列表-商品分享有此属性
|
| | |
|
| | | @Expose
|
| | | private List<String> imageList;// 图片列表
|
| | |
|
| | | @Expose
|
| | | private List<String> widthAndHeight;
|
| | |
|
| | | private RecommendActivityInviteInfo inviteInfo;
|
| | |
|
| | | public RecommendActivityInviteInfo getInviteInfo() {
|
| | |
| | | public void setWidthAndHeight(List<String> widthAndHeight) {
|
| | | this.widthAndHeight = widthAndHeight;
|
| | | }
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public Date getEndTime() {
|
| | | return endTime;
|
| | | }
|
| | |
|
| | | public void setEndTime(Date endTime) {
|
| | | this.endTime = endTime;
|
| | | }
|
| | |
|
| | | public boolean isTimeTask() {
|
| | | return timeTask;
|
| | | }
|
| | |
|
| | | public void setTimeTask(boolean timeTask) {
|
| | | this.timeTask = timeTask;
|
| | | }
|
| | |
|
| | | public String getStartTime_str() {
|
| | | return startTime_str;
|
| | | }
|
| | |
|
| | | public void setStartTime_str(String startTime_str) {
|
| | | this.startTime_str = startTime_str;
|
| | | }
|
| | |
|
| | | public String getEndTime_str() {
|
| | | return endTime_str;
|
| | | }
|
| | |
|
| | | public void setEndTime_str(String endTime_str) {
|
| | | this.endTime_str = endTime_str;
|
| | | }
|
| | | |
| | | }
|
| | |
| | | <include refid="Base_Column_List"/>from yeshi_ec_system_clientparams where id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_system_clientparams where id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.system.SystemClientParams" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_system_clientparams (id,`systemid`,`key`,`value`,`name`,updatetime) values (#{id,jdbcType=BIGINT},#{system.id,jdbcType=BIGINT},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{updatetime,jdbcType=BIGINT})</insert>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.system.SystemClientParams" useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_system_clientparams |
| | | (id,`systemid`,`key`,`value`,`name`,updatetime) |
| | | values |
| | | (#{id,jdbcType=BIGINT},
|
| | | #{system.id,jdbcType=BIGINT},
|
| | | #{key,jdbcType=VARCHAR},
|
| | | #{value,jdbcType=VARCHAR},
|
| | | #{name,jdbcType=VARCHAR},
|
| | | #{updatetime,jdbcType=BIGINT})
|
| | | </insert>
|
| | | |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.system.SystemClientParams" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_system_clientparams
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">id,</if>
|
| | | <if test="system != null">`systemid`,</if>
|
| | | <if test="key != null">`key`,</if>
|
| | | <if test="value != null">`value`,</if>
|
| | | <if test="name != null">`name,</if>
|
| | | <if test="name != null">`name`,</if>
|
| | | <if test="updatetime != null">updatetime,</if>
|
| | | </trim>values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="system != null">#{system.id,jdbcType=BIGINT},</if>
|
| | | <if test="key != null">#{`key`,jdbcType=VARCHAR},</if>
|
| | | <if test="value != null">#{`value`,jdbcType=VARCHAR},</if>
|
| | | <if test="name != null">#{name`,jdbcType=VARCHAR},</if>
|
| | | <if test="key != null">#{key,jdbcType=VARCHAR},</if>
|
| | | <if test="value != null">#{value,jdbcType=VARCHAR},</if>
|
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
| | | <if test="updatetime != null">#{updatetime,jdbcType=BIGINT},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.system.SystemClientParams">update yeshi_ec_system_clientparams set systemid = #{system.id,jdbcType=BIGINT},`key` = #{key,jdbcType=VARCHAR},`value` = #{value,jdbcType=VARCHAR},`name` = #{name,jdbcType=VARCHAR},updatetime = #{updatetime,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.system.SystemClientParams">update yeshi_ec_system_clientparams
|
| | | <set>
|
| | | <if test="system != null">systemid=#{system.id,jdbcType=BIGINT},</if>
|
| | | <if test="system != null">`systemid`=#{system.id,jdbcType=BIGINT},</if>
|
| | | <if test="key != null">`key`=#{key,jdbcType=VARCHAR},</if>
|
| | | <if test="value != null">`value`=#{value,jdbcType=VARCHAR},</if>
|
| | | <if test="name != null">`name`=#{name,jdbcType=VARCHAR},</if>
|
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.activity.RecommendActivity"> |
| | | <id column="ar_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="ar_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="ar_type" property="type" jdbcType="INTEGER" /> |
| | | <result column="ar_order_by" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="ar_share_count" property="shareCount" jdbcType="INTEGER" /> |
| | | <result column="ar_total_getmoney" property="totalGetMoney" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="ar_video_post_picture" property="videoPostPictire" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="ar_video_url" property="videoUrl" jdbcType="VARCHAR" /> |
| | | <result column="ar_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="ar_top" property="top" jdbcType="BOOLEAN" /> |
| | | <association property="activityUser" column="ar_activity_uid" |
| | | resultMap="com.yeshi.fanli.dao.mybatis.activity.ActivityUserMapper.BaseResultMap" /> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.activity.RecommendActivity"> |
| | | <id column="ar_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="ar_title" property="title" jdbcType="VARCHAR"/> |
| | | <result column="ar_type" property="type" jdbcType="INTEGER"/> |
| | | <result column="ar_order_by" property="orderBy" jdbcType="INTEGER"/> |
| | | <result column="ar_share_count" property="shareCount" jdbcType="INTEGER"/> |
| | | <result column="ar_total_getmoney" property="totalGetMoney" jdbcType="VARCHAR"/> |
| | | <result column="ar_video_post_picture" property="videoPostPictire" jdbcType="VARCHAR"/> |
| | | <result column="ar_video_url" property="videoUrl" jdbcType="VARCHAR"/> |
| | | <result column="ar_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="ar_top" property="top" jdbcType="BOOLEAN"/> |
| | | <result column="ar_start_time" property="startTime" jdbcType="TIMESTAMP"/> |
| | | <result column="ar_end_time" property="endTime" jdbcType="TIMESTAMP"/> |
| | | |
| | | <association property="goodsList" column="ar_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityTaoBaoGoodsMapper.selectByActivityId"> |
| | | </association> |
| | | <association property="imageList" column="ar_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityImgMapper.getImgByActivityId"> |
| | | </association> |
| | | <association property="activityUser" column="ar_activity_uid" |
| | | resultMap="com.yeshi.fanli.dao.mybatis.activity.ActivityUserMapper.BaseResultMap" /> |
| | | |
| | | <association property="widthAndHeight" column="ar_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityImgMapper.getImgWithAndHeightByActivityId"> |
| | | </association> |
| | | <association property="goodsList" column="ar_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityTaoBaoGoodsMapper.selectByActivityId"> |
| | | </association> |
| | | <association property="imageList" column="ar_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityImgMapper.getImgByActivityId"> |
| | | </association> |
| | | |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">ar_id,ar_title,ar_type,ar_order_by,ar_activity_uid as |
| | | au_id,ar_share_count,ar_total_getmoney,ar_video_post_picture,ar_video_url,ar_create_time,ar_top |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_activity_recommend where ar_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <association property="widthAndHeight" column="ar_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.RecommendActivityImgMapper.getImgWithAndHeightByActivityId"> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">ar_id,ar_title,ar_type,ar_order_by,ar_activity_uid,ar_share_count,ar_total_getmoney,ar_video_post_picture,ar_video_url,ar_create_time,ar_top,ar_start_time,ar_end_time</sql> |
| | | |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long"> |
| | | select *,ar_activity_uid AS au_id from yeshi_ec_activity_recommend |
| | | where ar_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="getRecommendActivityList" resultMap="BaseResultMap"> |
| | | select |
| | | * |
| | | from |
| | | yeshi_ec_activity_recommend left join yeshi_ec_activity_user on |
| | | ar_activity_uid=au_id order by ar_top desc,ar_order_by |
| | | asc,ar_create_time desc limit #{start},#{count} |
| | | SELECT *,IF(ar_start_time IS NULL,ar_create_time,ar_start_time) AS orderbyTime FROM yeshi_ec_activity_recommend |
| | | LEFT JOIN yeshi_ec_activity_user ON ar_activity_uid=au_id |
| | | WHERE IF(ar_start_time IS NULL,TRUE, ar_start_time<![CDATA[<=]]> NOW()) |
| | | AND IF(ar_end_time IS NULL,TRUE, ar_end_time <![CDATA[>=]]> NOW()) |
| | | ORDER BY ar_top DESC,ar_order_by ASC,orderbyTime DESC |
| | | LIMIT #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="getRecommendActivityEffectiveCount" resultType="java.lang.Long"> |
| | | SELECT count(ar_id) FROM yeshi_ec_activity_recommend |
| | | WHERE IF(ar_start_time IS NULL,TRUE, ar_start_time<![CDATA[<=]]> NOW()) |
| | | AND IF(ar_end_time IS NULL,TRUE, ar_end_time <![CDATA[>=]]> NOW()) |
| | | </select> |
| | | |
| | | |
| | | <select id="queryRecommendActivityList" resultMap="BaseResultMap"> |
| | | select |
| | | * |
| | | from |
| | | yeshi_ec_activity_recommend left join yeshi_ec_activity_user on |
| | | ar_activity_uid=au_id where ar_title like '%${title}%' order by ar_top |
| | | desc,ar_order_by |
| | | asc,ar_create_time desc limit ${start},${count} |
| | | select * from yeshi_ec_activity_recommend |
| | | left join yeshi_ec_activity_user on ar_activity_uid=au_id |
| | | where 1=1 |
| | | <if test="title != null and title != '' "> |
| | | ar_title like '%${title}%' |
| | | </if> |
| | | order by ar_top desc,ar_order_by asc,ar_create_time desc |
| | | limit ${start},${count} |
| | | </select> |
| | | |
| | | <select id="getRecommendActivityCount" resultType="java.lang.Long"> |
| | |
| | | count(ar_id) |
| | | from yeshi_ec_activity_recommend |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getRecommendActivityListByType" resultMap="BaseResultMap"> |
| | |
| | | asc,ar_create_time desc limit ${start},${count} |
| | | </select> |
| | | |
| | | |
| | | <select id="getRecommendActivityCountByType" resultType="java.lang.Long" |
| | | parameterType="java.lang.Integer"> |
| | | select |
| | |
| | | from yeshi_ec_activity_recommend where |
| | | ar_type=#{type} |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_activity_recommend where ar_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <delete id="batchDeleteByPrimaryKey" parameterType="int"> |
| | | <!-- 批量删除动态信息 --> |
| | |
| | | #{arids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | |
| | | <insert id="insert" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_activity_recommend |
| | | (ar_id,ar_title,ar_type,ar_order_by,ar_activity_uid,ar_share_count,ar_total_getmoney,ar_video_post_picture,ar_video_url,ar_create_time,ar_top) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{orderBy,jdbcType=INTEGER},#{activityUser.id,jdbcType=BIGINT},#{shareCount,jdbcType=INTEGER},#{totalGetMoney,jdbcType=VARCHAR},#{videoPostPictire,jdbcType=VARCHAR},#{videoUrl,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{top,jdbcType=BOOLEAN}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_activity_recommend |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">ar_id,</if> |
| | | <if test="title != null">ar_title,</if> |
| | | <if test="type != null">ar_type,</if> |
| | | <if test="orderBy != null">ar_order_by,</if> |
| | | <if test="activityUser != null">ar_activity_uid,</if> |
| | | <if test="shareCount != null">ar_share_count,</if> |
| | | <if test="totalGetMoney != null">ar_total_getmoney,</if> |
| | | <if test="videoPostPictire != null">ar_video_post_picture,</if> |
| | | <if test="videoUrl != null">ar_video_url,</if> |
| | | <if test="createTime != null">ar_create_time,</if> |
| | | <if test="top != null">ar_top,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">#{type,jdbcType=INTEGER},</if> |
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="activityUser != null">#{activityUser.id,jdbcType=BIGINT},</if> |
| | | <if test="shareCount != null">#{shareCount,jdbcType=INTEGER},</if> |
| | | <if test="totalGetMoney != null">#{totalGetMoney,jdbcType=VARCHAR},</if> |
| | | <if test="videoPostPictire != null">#{videoPostPictire,jdbcType=VARCHAR},</if> |
| | | <if test="videoUrl != null">#{videoUrl,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="top != null">#{top,jdbcType=BOOLEAN}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity">update yeshi_ec_activity_recommend set ar_title = |
| | | #{title,jdbcType=VARCHAR},ar_type = |
| | | #{type,jdbcType=INTEGER},ar_order_by = |
| | | #{orderBy,jdbcType=INTEGER},ar_activity_uid = |
| | | #{activityUser.id,jdbcType=BIGINT},ar_share_count = |
| | | #{shareCount,jdbcType=INTEGER},ar_total_getmoney = |
| | | #{totalGetMoney,jdbcType=VARCHAR},ar_video_post_picture = |
| | | #{videoPostPictire,jdbcType=VARCHAR},ar_video_url = |
| | | #{videoUrl,jdbcType=VARCHAR},ar_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP} ,ar_top =#{top,jdbcType=BOOLEAN} |
| | | where ar_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <update id="addShareCount">update yeshi_ec_activity_recommend set ar_share_count |
| | | =ar_share_count+#{count} |
| | | where ar_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity"> |
| | | update yeshi_ec_activity_recommend |
| | | <set> |
| | | <if test="title != null">ar_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">ar_type=#{type,jdbcType=INTEGER},</if> |
| | | <if test="orderBy != null">ar_order_by=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="activityUser != null">ar_activity_uid=#{activityUser.id,jdbcType=BIGINT},</if> |
| | | <if test="shareCount != null">ar_share_count=#{shareCount,jdbcType=INTEGER},</if> |
| | | <if test="totalGetMoney != null">ar_total_getmoney=#{totalGetMoney,jdbcType=VARCHAR},</if> |
| | | <if test="videoPostPictire != null">ar_video_post_picture=#{videoPostPictire,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="videoUrl != null">ar_video_url=#{videoUrl,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">ar_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="top !=null">ar_top =#{top,jdbcType=BOOLEAN},</if> |
| | | </set> |
| | | where ar_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_activity_recommend where ar_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_activity_recommend (ar_id,ar_title,ar_type,ar_order_by,ar_activity_uid,ar_share_count,ar_total_getmoney,ar_video_post_picture,ar_video_url,ar_create_time,ar_top,ar_start_time,ar_end_time) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{orderBy,jdbcType=INTEGER},#{activityUser.id,jdbcType=BIGINT},#{shareCount,jdbcType=INTEGER},#{totalGetMoney,jdbcType=VARCHAR},#{videoPostPictire,jdbcType=VARCHAR},#{videoUrl,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{top,jdbcType=BOOLEAN},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_activity_recommend |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">ar_id,</if> |
| | | <if test="title != null">ar_title,</if> |
| | | <if test="type != null">ar_type,</if> |
| | | <if test="orderBy != null">ar_order_by,</if> |
| | | <if test="activityUser != null">ar_activity_uid,</if> |
| | | <if test="shareCount != null">ar_share_count,</if> |
| | | <if test="totalGetMoney != null">ar_total_getmoney,</if> |
| | | <if test="videoPostPictire != null">ar_video_post_picture,</if> |
| | | <if test="videoUrl != null">ar_video_url,</if> |
| | | <if test="createTime != null">ar_create_time,</if> |
| | | <if test="top != null">ar_top,</if> |
| | | <if test="startTime != null">ar_start_time,</if> |
| | | <if test="endTime != null">ar_end_time,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">#{type,jdbcType=INTEGER},</if> |
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="activityUser != null">#{activityUser.id,jdbcType=BIGINT},</if> |
| | | <if test="shareCount != null">#{shareCount,jdbcType=INTEGER},</if> |
| | | <if test="totalGetMoney != null">#{totalGetMoney,jdbcType=VARCHAR},</if> |
| | | <if test="videoPostPictire != null">#{videoPostPictire,jdbcType=VARCHAR},</if> |
| | | <if test="videoUrl != null">#{videoUrl,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="top != null">#{top,jdbcType=BOOLEAN},</if> |
| | | <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity">update yeshi_ec_activity_recommend set ar_title = #{title,jdbcType=VARCHAR},ar_type = #{type,jdbcType=INTEGER},ar_order_by = #{orderBy,jdbcType=INTEGER},ar_activity_uid = #{activityUser.id,jdbcType=BIGINT},ar_share_count = #{shareCount,jdbcType=INTEGER},ar_total_getmoney = #{totalGetMoney,jdbcType=VARCHAR},ar_video_post_picture = #{videoPostPictire,jdbcType=VARCHAR},ar_video_url = #{videoUrl,jdbcType=VARCHAR},ar_create_time = #{createTime,jdbcType=TIMESTAMP},ar_top = #{top,jdbcType=BOOLEAN},ar_start_time = #{startTime,jdbcType=TIMESTAMP},ar_end_time = #{endTime,jdbcType=TIMESTAMP} where ar_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivity">update yeshi_ec_activity_recommend |
| | | <set> |
| | | <if test="title != null">ar_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">ar_type=#{type,jdbcType=INTEGER},</if> |
| | | <if test="orderBy != null">ar_order_by=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="activityUser != null">ar_activity_uid=#{activityUser.id,jdbcType=BIGINT},</if> |
| | | <if test="shareCount != null">ar_share_count=#{shareCount,jdbcType=INTEGER},</if> |
| | | <if test="totalGetMoney != null">ar_total_getmoney=#{totalGetMoney,jdbcType=VARCHAR},</if> |
| | | <if test="videoPostPictire != null">ar_video_post_picture=#{videoPostPictire,jdbcType=VARCHAR},</if> |
| | | <if test="videoUrl != null">ar_video_url=#{videoUrl,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">ar_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="top != null">ar_top=#{top,jdbcType=BOOLEAN},</if> |
| | | <if test="startTime != null">ar_start_time=#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">ar_end_time=#{endTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where ar_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.yeshi.fanli.service.impl.activity;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.jsoup.Jsoup;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | | import org.yeshi.utils.entity.FileUploadResult;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | |
| | | import com.yeshi.fanli.util.factory.CommonGoodsFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Service
|
| | | public class ActivityServiceImpl implements ActivityService {
|
| | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public RecommendActivity addShareGoodsRecommendActivity(Long activityUid, String title, List<Long> goodsList,
|
| | | boolean top, int shareCount) throws ActivityException {
|
| | | public RecommendActivity addShareGoodsRecommendActivity(Long activityUid, List<Long> goodsList,
|
| | | RecommendActivity activity) throws ActivityException , Exception{
|
| | |
|
| | | if (goodsList == null || goodsList.size() == 0 || goodsList.size() > 9)
|
| | | throw new ActivityException(1, "商品数量错误:10>商品数量>0");
|
| | |
|
| | | RecommendActivity activity = new RecommendActivity();
|
| | | |
| | | if (StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | throw new ActivityException(1, "标题不能为空");
|
| | | }
|
| | | |
| | | Integer shareCount = activity.getShareCount();
|
| | | if (shareCount == null) {
|
| | | activity.setShareCount(0);
|
| | | }
|
| | | |
| | | Boolean top = activity.getTop();
|
| | | if (top == null) {
|
| | | activity.setTop(false);
|
| | | }
|
| | | |
| | | // 时间转换
|
| | | conversionTime(activity);
|
| | | |
| | | activity.setActivityUser(new ActivityUser(activityUid));
|
| | | activity.setCreateTime(new Date());
|
| | | activity.setGoodsList(null);
|
| | | activity.setOrderBy(0);
|
| | | activity.setShareCount(shareCount);
|
| | | activity.setTitle(title);
|
| | | activity.setTop(top);
|
| | | activity.setType(RecommendActivity.TYPE_SHARE_GOODS);
|
| | | recommendActivityMapper.insertSelective(activity);
|
| | |
|
| | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public RecommendActivity addInviteImgRecommendActivity(Long activityUid, String title, String url, boolean top,
|
| | | int shareCount, int px, int py, int erCodeSize) throws ActivityException {
|
| | | public RecommendActivity addInviteImgRecommendActivity(Long activityUid, RecommendActivity activity, String url,
|
| | | int px, int py, int erCodeSize) throws ActivityException, Exception {
|
| | | if (StringUtil.isNullOrEmpty(url))
|
| | | throw new ActivityException(1, "图片为空");
|
| | | RecommendActivity activity = new RecommendActivity();
|
| | | |
| | | Integer shareCount = activity.getShareCount();
|
| | | if (shareCount == null) {
|
| | | activity.setShareCount(0);
|
| | | }
|
| | | |
| | | Boolean top = activity.getTop();
|
| | | if (top == null) {
|
| | | activity.setTop(false);
|
| | | }
|
| | | |
| | | // 时间转换
|
| | | conversionTime(activity);
|
| | | |
| | | activity.setActivityUser(new ActivityUser(activityUid));
|
| | | activity.setCreateTime(new Date());
|
| | | activity.setGoodsList(null);
|
| | | activity.setOrderBy(0);
|
| | | activity.setShareCount(shareCount);
|
| | | activity.setTitle(title);
|
| | | activity.setTop(top);
|
| | | activity.setType(RecommendActivity.TYPE_INVITE);
|
| | | recommendActivityMapper.insertSelective(activity);
|
| | | RecommendActivityImg img = new RecommendActivityImg();
|
| | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public RecommendActivity addTextAndImgRecommendActivity(Long activityUid, String title, List<String> imgList,
|
| | | boolean top, int shareCount) throws ActivityException {
|
| | | RecommendActivity activity = new RecommendActivity();
|
| | | public RecommendActivity addTextAndImgRecommendActivity(Long activityUid, List<String> imgList,
|
| | | RecommendActivity activity) throws ActivityException, Exception {
|
| | | |
| | | Integer shareCount = activity.getShareCount();
|
| | | if (shareCount == null) {
|
| | | activity.setShareCount(0);
|
| | | }
|
| | | |
| | | Boolean top = activity.getTop();
|
| | | if (top == null) {
|
| | | activity.setTop(false);
|
| | | }
|
| | | |
| | | // 时间转换
|
| | | conversionTime(activity);
|
| | | |
| | | activity.setActivityUser(new ActivityUser(activityUid));
|
| | | activity.setCreateTime(new Date());
|
| | | activity.setGoodsList(null);
|
| | | activity.setOrderBy(0);
|
| | | activity.setShareCount(shareCount);
|
| | | activity.setTitle(title);
|
| | | activity.setTop(top);
|
| | | activity.setType(RecommendActivity.TYPE_TEXTIMG);
|
| | | recommendActivityMapper.insertSelective(activity);
|
| | | for (String imgUrl : imgList) {
|
| | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public RecommendActivity updateShareGoodsRecommendActivity(Long id, Long activityUid, String title,
|
| | | List<Long> goodsList, boolean top, int shareCount) throws ActivityException {
|
| | | public RecommendActivity updateShareGoodsRecommendActivity(Long activityUid,
|
| | | List<Long> goodsList, RecommendActivity activity) throws ActivityException , Exception{
|
| | | |
| | | if (goodsList == null || goodsList.size() == 0 || goodsList.size() > 9)
|
| | | throw new ActivityException(1, "商品数量错误:10>商品数量>0");
|
| | | |
| | | // 删除之前的商品
|
| | | recommendActivityTaoBaoGoodsMapper.batchDeleteByActivityid(new long[] { id });
|
| | | RecommendActivity activity = new RecommendActivity();
|
| | | activity.setId(id);
|
| | | recommendActivityTaoBaoGoodsMapper.batchDeleteByActivityid(new long[] { activity.getId() });
|
| | | |
| | | |
| | | activity.setActivityUser(new ActivityUser(activityUid));
|
| | | activity.setGoodsList(null);
|
| | | activity.setOrderBy(0);
|
| | | activity.setShareCount(shareCount);
|
| | | activity.setTitle(title);
|
| | | activity.setTop(top);
|
| | | |
| | | Integer shareCount = activity.getShareCount();
|
| | | if (shareCount == null) {
|
| | | activity.setShareCount(0);
|
| | | }
|
| | | |
| | | Boolean top = activity.getTop();
|
| | | if (top == null) {
|
| | | activity.setTop(false);
|
| | | }
|
| | | |
| | | // 时间转换
|
| | | conversionTime(activity);
|
| | |
|
| | | activity.setType(RecommendActivity.TYPE_SHARE_GOODS);
|
| | | recommendActivityMapper.updateByPrimaryKeySelective(activity);
|
| | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public RecommendActivity updateInviteImgRecommendActivity(Long id, Long activityUid, String title, String url,
|
| | | boolean top, int shareCount, int px, int py, int erCodeSize) throws ActivityException {
|
| | | recommendActivityImgMapper.batchDeleteByActivityid(new long[] { id });
|
| | | RecommendActivity activity = new RecommendActivity();
|
| | | activity.setId(id);
|
| | | public RecommendActivity updateInviteImgRecommendActivity(Long activityUid, RecommendActivity activity, String url,
|
| | | int px, int py, int erCodeSize) throws ActivityException , Exception{
|
| | | recommendActivityImgMapper.batchDeleteByActivityid(new long[] { activity.getId() });
|
| | | |
| | | Integer shareCount = activity.getShareCount();
|
| | | if (shareCount == null) {
|
| | | activity.setShareCount(0);
|
| | | }
|
| | | |
| | | Boolean top = activity.getTop();
|
| | | if (top == null) {
|
| | | activity.setTop(false);
|
| | | }
|
| | | |
| | | // 时间转换
|
| | | conversionTime(activity);
|
| | | |
| | | activity.setActivityUser(new ActivityUser(activityUid));
|
| | | activity.setGoodsList(null);
|
| | | activity.setOrderBy(0);
|
| | | activity.setShareCount(shareCount);
|
| | | activity.setTitle(title);
|
| | | activity.setTop(top);
|
| | | activity.setType(RecommendActivity.TYPE_INVITE);
|
| | | recommendActivityMapper.updateByPrimaryKeySelective(activity);
|
| | | RecommendActivityImg img = new RecommendActivityImg();
|
| | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public RecommendActivity updateTextAndImgRecommendActivity(Long id, Long activityUid, String title,
|
| | | List<String> imgList, boolean top, int shareCount) throws ActivityException {
|
| | | recommendActivityImgMapper.batchDeleteByActivityid(new long[] { id });
|
| | | RecommendActivity activity = new RecommendActivity();
|
| | | activity.setId(id);
|
| | | public RecommendActivity updateTextAndImgRecommendActivity(Long activityUid, List<String> imgList, |
| | | RecommendActivity activity) throws ActivityException , Exception{
|
| | | recommendActivityImgMapper.batchDeleteByActivityid(new long[] { activity.getId() });
|
| | | |
| | | Integer shareCount = activity.getShareCount();
|
| | | if (shareCount == null) {
|
| | | activity.setShareCount(0);
|
| | | }
|
| | | |
| | | Boolean top = activity.getTop();
|
| | | if (top == null) {
|
| | | activity.setTop(false);
|
| | | }
|
| | | // 时间转换
|
| | | conversionTime(activity);
|
| | | |
| | | activity.setActivityUser(new ActivityUser(activityUid));
|
| | | activity.setGoodsList(null);
|
| | | activity.setOrderBy(0);
|
| | | activity.setShareCount(shareCount);
|
| | | activity.setTitle(title);
|
| | | activity.setTop(top);
|
| | | activity.setType(RecommendActivity.TYPE_TEXTIMG);
|
| | | recommendActivityMapper.updateByPrimaryKeySelective(activity);
|
| | | for (String imgUrl : imgList) {
|
| | |
| | | @Override
|
| | | public List<RecommendActivity> getRecommendActivityListCache(int page, int pageSize) {
|
| | | List<RecommendActivity> activityList = getRecommendActivityList(page, pageSize);
|
| | | if (activityList != null)
|
| | | if (activityList != null) {
|
| | | for (RecommendActivity activity : activityList) {
|
| | | if (activity != null && activity.getGoodsList() != null)
|
| | | |
| | | if (activity != null && activity.getGoodsList() != null) {
|
| | | for (RecommendActivityTaoBaoGoods goods : activity.getGoodsList()) {
|
| | | goods.setQuanPrice(goods.getDesc().replace("券后价:¥", ""));
|
| | | }
|
| | | }
|
| | | |
| | | // 过滤一遍
|
| | | if (!StringUtil.isNullOrEmpty(activity.getTitle())) {
|
| | | activity.setTitle(Jsoup.parse(activity.getTitle()).text());
|
| | | if (activity.getShareCount() >= 10000) {
|
| | | activity.setShareCountShow(NumberUtil.get1PointNumber(activity.getShareCount() / 10000.0) + "万");
|
| | | } else {
|
| | | activity.setShareCountShow(activity.getShareCount() + "");
|
| | | }
|
| | | }
|
| | | |
| | | Date startTime = activity.getStartTime();
|
| | | if (startTime != null) {
|
| | | activity.setCreateTime(startTime);
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | }
|
| | | return activityList;
|
| | | }
|
| | |
|
| | | @Cacheable(value = "activityCache", key = "'getRecommendActivityCount'")
|
| | | @Override
|
| | | public long getRecommendActivityCountCache() {
|
| | | return getRecommendActivityCount();
|
| | | return recommendActivityMapper.getRecommendActivityEffectiveCount();
|
| | | }
|
| | |
|
| | | @Transactional
|
| | |
| | | recommendActivityTaoBaoGoodsMapper.updateByPrimaryKeySelective(updateGoods);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * web段时间转换
|
| | | * @param record
|
| | | */
|
| | | public void conversionTime(RecommendActivity record) throws ActivityException, Exception {
|
| | | // 是否时间控制
|
| | | if(!record.isTimeTask()) {
|
| | | record.setStartTime(null);
|
| | | record.setEndTime(null);
|
| | | } else {
|
| | | String startTime_str = record.getStartTime_str();
|
| | | String endTime_str = record.getEndTime_str();
|
| | | |
| | | if ((startTime_str == null|| startTime_str.trim().length() == 0) |
| | | && (endTime_str == null || endTime_str.trim().length() == 0)) {
|
| | | throw new ActivityException(1, "请输入控制时间");
|
| | | } else {
|
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
| | | if (startTime_str != null && startTime_str.trim().length() > 0) {
|
| | | startTime_str = startTime_str.replaceAll("T", " ");
|
| | | record.setStartTime(format.parse(startTime_str));
|
| | | }
|
| | | |
| | | if (endTime_str != null && endTime_str.trim().length() > 0) {
|
| | | endTime_str = endTime_str.replaceAll("T", " ");
|
| | | record.setEndTime(format.parse(endTime_str));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | * @param top
|
| | | * @return
|
| | | */
|
| | | public RecommendActivity addShareGoodsRecommendActivity(Long activityUid, String title, List<Long> goodsList,
|
| | | boolean top, int shareCount) throws ActivityException;
|
| | | public RecommendActivity addShareGoodsRecommendActivity(Long activityUid, List<Long> goodsList,RecommendActivity activity) throws ActivityException, Exception;
|
| | |
|
| | | /**
|
| | | * 修改商品分享动态
|
| | |
| | | * @return
|
| | | * @throws ActivityException
|
| | | */
|
| | | public RecommendActivity updateShareGoodsRecommendActivity(Long id, Long activityUid, String title,
|
| | | List<Long> goodsList, boolean top, int shareCount) throws ActivityException;
|
| | | public RecommendActivity updateShareGoodsRecommendActivity(Long activityUid, List<Long> goodsList,
|
| | | RecommendActivity activity) throws ActivityException, Exception;
|
| | |
|
| | | /**
|
| | | * 更新分享商品动态的商品
|
| | |
| | | * @return
|
| | | * @throws ActivityException
|
| | | */
|
| | | public RecommendActivity addInviteImgRecommendActivity(Long activityUid, String title, String url, boolean top,
|
| | | int shareCount, int px, int py, int erCodeSize) throws ActivityException;
|
| | | public RecommendActivity addInviteImgRecommendActivity(Long activityUid, RecommendActivity activity, String url,
|
| | | int px, int py, int erCodeSize) throws ActivityException, Exception;
|
| | |
|
| | | /**
|
| | | * 修改邀请图动态
|
| | |
| | | * @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;
|
| | | public RecommendActivity updateInviteImgRecommendActivity(Long activityUid, RecommendActivity activity, String url,
|
| | | int px, int py, int erCodeSize) throws ActivityException, Exception;
|
| | |
|
| | | /**
|
| | | * 添加图文动态
|
| | |
| | | * @param top
|
| | | * @return
|
| | | */
|
| | | public RecommendActivity addTextAndImgRecommendActivity(Long activityUid, String title, List<String> imgList,
|
| | | boolean top, int shareCount) throws ActivityException;
|
| | | public RecommendActivity addTextAndImgRecommendActivity(Long activityUid, List<String> imgList,
|
| | | RecommendActivity activity) throws ActivityException, Exception;
|
| | |
|
| | | /**
|
| | | * 修改图文动态
|
| | |
| | | * @return
|
| | | * @throws ActivityException
|
| | | */
|
| | | public RecommendActivity updateTextAndImgRecommendActivity(Long id, Long activityUid, String title,
|
| | | List<String> imgList, boolean top, int shareCount) throws ActivityException;
|
| | | public RecommendActivity updateTextAndImgRecommendActivity(Long activityUid, List<String> imgList, |
| | | RecommendActivity activity) throws ActivityException, Exception;
|
| | |
|
| | | /**
|
| | | * 获取推荐活动列表
|