yujian
2020-05-17 de4110d3d3944ffcd797fd8c43f0d455cc731f84
活动详情
5个文件已删除
36个文件已修改
7个文件已添加
1767 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SpecialCardAdminController.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SwiperBannerAdminController.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5SwiperPictureController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/BanLiShopController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsClassController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/RecommendController.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserCouponController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java 299 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/JingDongControllerV2.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/PinDuoDuoControllerV2.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/PreviewInfoControllerV2.java 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserCouponControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/ConfigController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/DynamicController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/CommonShareInfoMapper.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/SpecialCardMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/SpecialExtraMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/CommonShareInfo.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SpecialExtra.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/system/ConfigKeyEnum.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/CommonShareInfoMapper.xml 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SpecialCardMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SpecialExtraMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/CommonShareInfoServiceImpl.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialCardServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialExtraServiceImpl.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/CommonShareInfoService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialCardService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialExtraService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialService.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperPictureService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/PreviewInfoService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/TimeUtil.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/mybatishandler/CommonShareInfoEnumHandler.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/homemodule/BannerVO.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
@@ -441,6 +441,7 @@
            GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid);
            if (goodsEvaluate != null && goodsEvaluate.getImgList() != null && goodsEvaluate.getImgList().size() > 0) {
                activityUrl = goodsEvaluate.getJumpLink();
                List<ImgInfo> imgList = goodsEvaluate.getImgList();
                for (ImgInfo imgInfo : imgList) {
                    ImgEnum type = imgInfo.getType();
@@ -449,6 +450,9 @@
                        videoUrl = imgInfo.getVideoUrl();
                    } else {
                        list.add(imgInfo.getUrl());
                        if (StringUtil.isNullOrEmpty(activityUrl) && !StringUtil.isNullOrEmpty(imgInfo.getActivityUrl())) {
                            activityUrl  = imgInfo.getActivityUrl();
                        }
                    }
                }
            }
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SpecialCardAdminController.java
@@ -19,9 +19,9 @@
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialCard;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.exception.homemodule.SpecialCardException;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.service.inter.config.AppVersionService;
@@ -78,6 +78,31 @@
        }
    }
    /**
     * 查询
     *
     * @param callback
     * @param pageIndex
     * @param pageSize
     * @param key
     *            模糊查询:说明、标识
     * @param out
     */
    @RequestMapping(value = "queryActivity")
    public void queryActivity(String callback, Integer pageIndex, Integer pageSize, String key, Integer sort,
              PrintWriter out) {
        List<Long> listPid = new ArrayList<Long>();
        listPid.add(15L);
        listPid.add(16L);
        listPid.add(17L);
        queryList(callback, pageIndex, pageSize, key, sort, listPid, out);
    }
    /**
     * 查询
     * 
@@ -90,6 +115,11 @@
     */
    @RequestMapping(value = "query")
    public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer sort, PrintWriter out) {
        queryList(callback, pageIndex, pageSize, key, sort, null, out);
    }
    public void queryList(String callback, Integer pageIndex, Integer pageSize, String key, Integer sort,
            List<Long> listPid, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
@@ -100,14 +130,14 @@
        }
        try {
            List<SpecialCard> list = specialCardService.listQuery((pageIndex - 1) * pageSize, pageSize, key, sort);
            List<SpecialCard> list = specialCardService.listQuery((pageIndex - 1) * pageSize, pageSize, key, sort, listPid);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
            long count = specialCardService.countlistQuery(key);
            long count = specialCardService.countlistQuery(key, listPid);
            int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
@@ -126,7 +156,6 @@
        }
    }
    /**
     * 删除
     * 
@@ -166,7 +195,7 @@
     * @param out
     */
    @RequestMapping(value = "saveSpecial")
    public void saveSpecial(String callback, Special record, String jumpType, SpecialExtra extra, HttpServletRequest request,
    public void saveSpecial(String callback, Special record, String jumpType, CommonShareInfo extra, HttpServletRequest request,
            PrintWriter out) {
        try {
            // 1. 先判断httpRequest 是否含有文件类型
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SwiperBannerAdminController.java
@@ -23,6 +23,8 @@
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
import com.yeshi.fanli.entity.bus.homemodule.SwiperBanner;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.common.JumpDetailV2;
@@ -33,11 +35,13 @@
import com.yeshi.fanli.service.inter.config.AppVersionService;
import com.yeshi.fanli.service.inter.config.SystemConfigService;
import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
import com.yeshi.fanli.service.inter.homemodule.CommonShareInfoService;
import com.yeshi.fanli.service.inter.homemodule.SwiperBannerService;
import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -72,6 +76,10 @@
    @Resource
    private AdActivityVersionControlService adActivityVersionControlService;
    @Resource
    private CommonShareInfoService commonShareInfoService;
    /**
     * 新增
@@ -329,7 +337,7 @@
        }
        try {
            List<SwiperPicture> list = swiperPictureService.queryByBannerID((pageIndex - 1) * pageSize, pageSize,
            List<BannerVO> list = swiperPictureService.queryByBannerID((pageIndex - 1) * pageSize, pageSize,
                    bannerId);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
@@ -338,7 +346,7 @@
            // 跳转链接
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
            for (SwiperPicture swiperPicture : list) {
            for (BannerVO swiperPicture : list) {
                if (swiperPicture.getState() != null && swiperPicture.getState() == 0) {
                    swiperPicture.setState(1);
                } else {
@@ -377,6 +385,21 @@
                    jumpDetailV2.setName("-未选择-");
                    jumpDetailV2.setType("default");
                    swiperPicture.setJumpDetail(jumpDetailV2);
                }
                // 分享补充信息
                CommonShareInfo info = commonShareInfoService.getByPidAndType(swiperPicture.getId(),
                        CommonShareInfoEnum.banner.name());
                if (info == null) {
                    swiperPicture.setNeedSpin(false);
                    swiperPicture.setComment("");
                } else {
                    swiperPicture.setNeedSpin(info.getNeedSpin());
                    if (StringUtil.isNullOrEmpty(info.getComment())) {
                        swiperPicture.setComment("");
                    } else {
                        swiperPicture.setComment(info.getComment());
                    }
                }
            }
@@ -432,15 +455,15 @@
     * @param out
     */
    @RequestMapping(value = "savePicInfo")
    public void savePicInfo(String callback, SwiperPicture record, String jumpType, HttpServletRequest request,
            PrintWriter out) {
    public void savePicInfo(String callback, SwiperPicture record, String jumpType, CommonShareInfo extra,
            HttpServletRequest request,    PrintWriter out) {
        try {
            // 1. 先判断httpRequest 是否含有文件类型
            if (request instanceof MultipartHttpServletRequest) {
                MultipartHttpServletRequest fileRequest = (MultipartHttpServletRequest) request;
                swiperPictureService.saveObject(fileRequest.getFile("file"), record, jumpType);
                swiperPictureService.saveObject(fileRequest.getFile("file"), record, jumpType, extra);
            } else {
                swiperPictureService.saveObject(null, record, jumpType);
                swiperPictureService.saveObject(null, record, jumpType, extra);
            }
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5SwiperPictureController.java
@@ -14,6 +14,7 @@
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONObject;
@@ -39,13 +40,13 @@
        }
            
        List<SwiperPicture> list = swiperPictureService.getByBannerCard(card);
        List<BannerVO> list = swiperPictureService.getByBannerCard(card);
        if (list == null || list.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
            return;
        }
        for (SwiperPicture swiperPicture: list) {
        for (BannerVO swiperPicture: list) {
            swiperPicture.setBannerId(null);
            swiperPicture.setCreatetime(null);
            swiperPicture.setUpdatetime(null);
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/BanLiShopController.java
@@ -14,7 +14,6 @@
import org.yeshi.utils.exception.WXOrderException;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.common.Config;
import com.yeshi.fanli.entity.shop.BanLiShopGoods;
@@ -40,6 +39,7 @@
import com.yeshi.fanli.util.email.MailSenderUtil;
import com.yeshi.fanli.util.factory.shop.BanLiShopOrderGoodsVOFactory;
import com.yeshi.fanli.util.wx.BanLiShopWXPayUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.shop.BanLiShopOrderVO;
import net.sf.json.JSONObject;
@@ -101,7 +101,7 @@
                Constant.PAGE_SIZE);
        long count = banLiShopGoodsService.countGoods(null, BanLiShopGoods.STATE_ONLINE);
        // 获取banner
        List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("hongbao_exchange_goods_list",
        List<BannerVO> pictureList = swiperPictureService.getByBannerCardAndVersion("hongbao_exchange_goods_list",
                acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
        JSONObject data = new JSONObject();
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
@@ -52,6 +52,7 @@
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.user.UserDialogBtnVO;
import com.yeshi.fanli.vo.user.UserDialogVO;
import com.yeshi.fanli.vo.user.VIPUpgradedNotifyVO;
@@ -334,10 +335,10 @@
                    data.put("banner", new JSONArray());
                } else {
                    // 我的界面banner
                    List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
                    List<BannerVO> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
                            acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
                    if (banner == null)
                        banner = new ArrayList<SwiperPicture>();
                        banner = new ArrayList<BannerVO>();
                    data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
                }
            }
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsClassController.java
@@ -24,7 +24,6 @@
import com.yeshi.fanli.entity.bus.clazz.GoodsSecondClass;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
import com.yeshi.fanli.entity.bus.clazz.TaoBaoClass;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.lable.QualityFactory;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.taobao.SearchFilter;
@@ -58,6 +57,7 @@
import com.yeshi.fanli.util.factory.MonitorFactory;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -167,13 +167,13 @@
            }
            // 轮播图
            List<SwiperPicture> picList = null;
            List<BannerVO> picList = null;
            if (swpid != null) {
                picList = swiperPictureService.getByBannerId(swpid, acceptData.getPlatform(),
                        Integer.parseInt(acceptData.getVersion()));
            }
            if (picList == null) {
                picList = new ArrayList<SwiperPicture>();
                picList = new ArrayList<BannerVO>();
            }
            List<GoodsSubClass> goodsSubClassList = goodsSubClassService.getSubClassCache(gcid, 1,
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java
@@ -39,6 +39,7 @@
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.account.UserUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -128,10 +129,10 @@
        data.put("activityRules", valueBr);
        data.put("inviteList", String.format("http://%s/%s/client/share/friends_new.html",
                Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName()));
        List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",
        List<BannerVO> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",
                acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
        if (pictureList != null && pictureList.size() > 0) {
            SwiperPicture picture = pictureList.get(0);
            BannerVO picture = pictureList.get(0);
            com.alibaba.fastjson.JSONObject pictureJson = new com.alibaba.fastjson.JSONObject();
            pictureJson.put("src", picture.getSrc());
            pictureJson.put("jumpDetail", picture.getJumpDetail());
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/RecommendController.java
@@ -126,6 +126,8 @@
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
import com.yeshi.fanli.vo.goods.taobao.TLJBuyHongBaoVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import com.yeshi.fanli.vo.tlj.SpreadHongBao;
import com.yeshi.fanli.vo.user.UserSettingsVO;
@@ -1592,15 +1594,13 @@
            return;
        }
        List<SwiperPicture> listswiper = null;
        List<BannerVO> listswiper = null;
        if (!StringUtil.isNullOrEmpty(specialCard)) {
            try {
                listswiper = swiperPictureService.getByBannerCardAndVersion(swiperCard, acceptData.getPlatform(),
                        Integer.parseInt(acceptData.getVersion()));
                if (listswiper == null) {
                    listswiper = new ArrayList<SwiperPicture>();
                    listswiper = new ArrayList<BannerVO>();
                }
            } catch (Exception e) {
@@ -1609,16 +1609,14 @@
        }
        Special miaoShaSpecial = null;
        List<Special> honestList = new ArrayList<Special>();
        List<Special> specialList = new ArrayList<Special>();
        List<SpecialVO> honestList = new ArrayList<SpecialVO>();
        List<SpecialVO> specialList = new ArrayList<SpecialVO>();
        if (!StringUtil.isNullOrEmpty(specialCard)) {
            try {
                List<Special> listSpecial = specialService.listBySystemAndCard(specialCard, system.getId());
                List<SpecialVO> listSpecial = specialService.listBySystemAndCard(specialCard, system.getId());
                if (listSpecial != null && listSpecial.size() > 0) {
                    for (Special special : listSpecial) {
                    for (SpecialVO special : listSpecial) {
                        if ("限时秒杀".equals(special.getName())) {
                            miaoShaSpecial = special;
                            continue;
@@ -1631,14 +1629,11 @@
                            // 其他专题
                            specialList.add(special);
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        /* 限时秒杀 - 时间处理 */
@@ -1717,14 +1712,14 @@
            JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex);
            // 2、顶部轮播图
            List<SwiperPicture> topPicList = getSwiperByCard("index_top", acceptData);
            List<BannerVO> topPicList = getSwiperByCard("index_top", acceptData);
            if (topPicList == null) {
                topPicList = new ArrayList<SwiperPicture>();
                topPicList = new ArrayList<BannerVO>();
            }
            root.put("topPicList", JsonUtil.getApiCommonGson().toJson(topPicList));
            // 3、邀请有奖
            List<SwiperPicture> invitePicList = null;
            List<BannerVO> invitePicList = null;
            if ("ios".equalsIgnoreCase(acceptData.getPlatform())
                    && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
                // 如果IOS当前版本处于审核状态就不返回
@@ -1733,7 +1728,7 @@
            }
            if (invitePicList == null) {
                invitePicList = new ArrayList<SwiperPicture>();
                invitePicList = new ArrayList<BannerVO>();
            }
            root.put("invitePicList", JsonUtil.getApiCommonGson().toJson(invitePicList));
@@ -1763,20 +1758,20 @@
     * @param acceptData
     * @return
     */
    public List<SwiperPicture> getInvitePicList(Long uid, AcceptData acceptData) {
    public List<BannerVO> getInvitePicList(Long uid, AcceptData acceptData) {
        // 如果IOS当前版本处于审核状态就不返回
        if ("ios".equalsIgnoreCase(acceptData.getPlatform())
                && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
            return null;
        }
        List<SwiperPicture> invitePicList = getSwiperByCard("index_invite", acceptData);
        List<BannerVO> invitePicList = getSwiperByCard("index_invite", acceptData);
        return invitePicList;
    }
    public List<SwiperPicture> getSwiperByCard(String card, AcceptData acceptData) {
        List<SwiperPicture> swiperList = null;
    public List<BannerVO> getSwiperByCard(String card, AcceptData acceptData) {
        List<BannerVO> swiperList = null;
        try {
            swiperList = swiperPictureService.getByBannerCardAndVersion(card, acceptData.getPlatform(),
                    Integer.parseInt(acceptData.getVersion()));
@@ -2555,23 +2550,21 @@
     */
    @RequestMapping(value = "getSpecialActivities")
    public void getSpecialActivities(AcceptData acceptData, Long uid, PrintWriter out, String callback) {
        List<Special> listSpecial = specialService.listByVersion(0, Integer.MAX_VALUE, "special_activities",
        List<SpecialVO> listSpecial = specialService.listByVersion(0, Integer.MAX_VALUE, "special_activities",
                acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
        List<Special> list = new ArrayList<Special>();
        List<SpecialVO> list = new ArrayList<SpecialVO>();
        if (listSpecial != null) {
            list.addAll(listSpecial);
        }
        for (int i = 0; i < list.size(); i++) {
            Special special = list.get(i);
            SpecialVO special = list.get(i);
            JumpDetailV2 jumpDetail = special.getJumpDetail();
            if (jumpDetail != null) {
                jumpDetail.setNeedLogin(special.isJumpLogin());
                special.setJumpDetail(jumpDetail);
            }
            String name = special.getName();
            if (StringUtil.isNullOrEmpty(name)) {
                continue;
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserCouponController.java
@@ -13,7 +13,6 @@
import org.yeshi.utils.JsonUtil;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.exception.user.UserSystemCouponException;
@@ -27,6 +26,7 @@
import com.yeshi.fanli.service.inter.user.invite.UserInviteService;
import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.user.UserSystemCouponRecordVO;
import com.yeshi.fanli.vo.user.UserSystemCouponVO;
@@ -98,7 +98,7 @@
            // 福利中心图片
            String topPicture = null;
            if (page == 1) {
                List<SwiperPicture> listswiper = swiperPictureService.getByBannerCardAndVersion("welfare_top",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
                List<BannerVO> listswiper = swiperPictureService.getByBannerCardAndVersion("welfare_top",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
                if (listswiper != null && listswiper.size() > 0) {
                    topPicture = listswiper.get(0).getSrc();
                }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java
@@ -21,7 +21,6 @@
import com.yeshi.fanli.entity.brand.BrandInfoRecord;
import com.yeshi.fanli.entity.brand.BrandShopCahe;
import com.yeshi.fanli.entity.brand.TaoBaoShopHistory;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.entity.taobao.TaoBaoShop;
@@ -51,6 +50,7 @@
import com.yeshi.fanli.vo.brand.BrandInfoVO;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.goods.ShopInfoVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -423,12 +423,12 @@
        }
        
        List<TaoBaoShop> shopList = new ArrayList<TaoBaoShop>();
        List<SwiperPicture> topPicList = new ArrayList<>();
        List<BannerVO> topPicList = new ArrayList<>();
        
        JSONObject data = new JSONObject();
        if (page == 1) {
            // 2、顶部轮播图
            List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (oldtopPicList != null && oldtopPicList.size() > 0)
                topPicList.addAll(oldtopPicList);
            TaoBaoShop taoBaoShop = taoBaoShopService.selectByPrimaryKey(id);
@@ -669,7 +669,7 @@
        
        JSONObject data = new JSONObject();
        if (page == 1  && cid == null) { // 精选页banner
            List<SwiperPicture> banners = swiperPictureService.getByBannerCardAndVersion("brand_banners",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<BannerVO> banners = swiperPictureService.getByBannerCardAndVersion("brand_banners",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (banners == null)
                banners = new ArrayList<>();
            data.put("banners", JsonUtil.getApiCommonGson().toJson(banners));
@@ -749,8 +749,8 @@
        JSONObject data = new JSONObject();
        if (page == 1 && array.size() > 0) {
            // 2、顶部轮播图
            List<SwiperPicture> topPicList = new ArrayList<>();
            List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<BannerVO> topPicList = new ArrayList<>();
            List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (oldtopPicList != null && oldtopPicList.size() > 0)
                topPicList.addAll(oldtopPicList);
            
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java
@@ -40,6 +40,7 @@
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -240,14 +241,14 @@
        JSONObject data = new JSONObject();
        if (page == 1) {
            // 2、顶部轮播图
            List<SwiperPicture> bannerList = null;
            List<BannerVO> bannerList = null;
            if (Constant.IS_TEST) {
                bannerList = swiperPictureService.getByBannerCardAndVersion("index_top", acceptData.getPlatform(),
                        Integer.parseInt(acceptData.getVersion()));
            }
            if (bannerList == null) {
                bannerList = new ArrayList<SwiperPicture>();
                bannerList = new ArrayList<BannerVO>();
            }
            data.put("bannerList", new Gson().toJson(bannerList));
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -12,7 +12,6 @@
import javax.annotation.Resource;
import org.apache.commons.beanutils.PropertyUtils;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -29,8 +28,9 @@
import com.yeshi.fanli.dto.jd.JDCouponInfo;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.entity.bus.homemodule.SpecialLabel;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
@@ -56,7 +56,7 @@
import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
import com.yeshi.fanli.service.inter.homemodule.SpecialExtraService;
import com.yeshi.fanli.service.inter.homemodule.CommonShareInfoService;
import com.yeshi.fanli.service.inter.homemodule.SpecialService;
import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
@@ -77,6 +77,7 @@
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.vo.dynamic.ArticleVO;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
@@ -144,7 +145,7 @@
    private DailyCountMomentsService dailyCountMomentsService;
    
    @Resource
    private SpecialExtraService specialExtraService;
    private CommonShareInfoService commonShareInfoService;
    
    
@@ -369,13 +370,12 @@
            listKey.add("special_channel_pdd");
        }
        List<Special> list = specialService.listByPlaceKeyHasLabel((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,
        List<SpecialVO> list = specialService.listByPlaceKeyHasLabel((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,
                listKey, platformCode, Integer.parseInt(acceptData.getVersion()));
        long time = System.currentTimeMillis();
        // 删除尚未启用的过期的
        List<SpecialVO> listVo = new ArrayList<SpecialVO>();
        for (int i = 0; i < list.size(); i++) {
            Special special = list.get(i);
            if (special.getState() == 1L) {
@@ -392,32 +392,18 @@
                }
            }
            
            SpecialVO specialVO = new SpecialVO();
            try {
                PropertyUtils.copyProperties(specialVO, special);
            } catch (Exception e) {
                e.printStackTrace();
                continue;
            }
            
            // 设置标签
            List<SpecialLabel> listLabels = specialVO.getListLabels();
            List<SpecialLabel> listLabels = special.getListLabels();
            if (listLabels != null && !listLabels.isEmpty()) {
                List<ClientTextStyleVO> labels = new ArrayList<>();
                for (SpecialLabel specialLabel : listLabels) {
                    labels.add(new ClientTextStyleVO(specialLabel.getName(), specialLabel.getBgColor()));
                }
                specialVO.setLabels(labels);
                special.setLabels(labels);
            }
            
            // 评论信息
            if (VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) {
                SpecialExtra extra = specialExtraService.selectByPrimaryKey(specialVO.getId());
                if (extra != null && !StringUtil.isNullOrEmpty(extra.getComment())) {
                    specialVO.setComment(extra.getComment());
                }
            }
            listVo.add(specialVO);
        }
        long count = specialService.countByPlaceKeyList(listKey, platformCode,
@@ -427,7 +413,7 @@
        Gson gson = gsonBuilder.create();
        JSONObject data = new JSONObject();
        data.put("count", count);
        data.put("list", gson.toJson(listVo));
        data.put("list", gson.toJson(list));
        out.print(JsonUtil.loadTrueResult(data));
    }
@@ -545,18 +531,18 @@
        JSONObject data = new JSONObject();
        if (page == 1 && !search) {
            List<SwiperPicture> banners = swiperPictureService.getByBannerCardAndVersion("article_banners",
            List<BannerVO> banners = swiperPictureService.getByBannerCardAndVersion("article_banners",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (banners == null)
                banners = new ArrayList<>();
            data.put("banners", gson.toJson(banners));
            List<Special> listSpecial = specialService.listByVersion(0, Integer.MAX_VALUE, "article_specials",
            List<SpecialVO> listSpecial = specialService.listByVersion(0, Integer.MAX_VALUE, "article_specials",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (listSpecial == null)
                listSpecial = new ArrayList<>();
            for (Special special : listSpecial) {
            for (SpecialVO special : listSpecial) {
                boolean needLogin = special.isJumpLogin();
                JumpDetailV2 jumpDetail = special.getJumpDetail();
                if (jumpDetail != null) {
@@ -628,7 +614,6 @@
     */
    @RequestMapping(value = "getDynamicList", method = RequestMethod.POST)
    public void getDynamicListNew(AcceptData acceptData, Integer page, Long cid, String subId, PrintWriter out) {
        try {
            int type = 1;
            if (cid == TYPE_FAQUAN) {
@@ -973,8 +958,10 @@
        return null;
    }
    /**
     * 评论复制
     * 评论复制-H5
     * 
     * @param acceptData
     * @param id
@@ -1071,6 +1058,9 @@
        });
    }
    
    /**
     * 评论复制-专题
     * 
@@ -1085,8 +1075,8 @@
            return;
        }
        SpecialExtra extra = specialExtraService.selectByPrimaryKey(id);
        if (extra == null ||  StringUtil.isNullOrEmpty(extra.getComment())) {
        CommonShareInfo shareInfo = commonShareInfoService.getByPidAndType(id, CommonShareInfoEnum.special.name());
        if (shareInfo == null ||  StringUtil.isNullOrEmpty(shareInfo.getComment())) {
            out.print(JsonUtil.loadFalseResult("该内容已不存在"));
            return;
        }
@@ -1113,9 +1103,9 @@
            return;
        }
        String text = extra.getComment();
        String text = shareInfo.getComment();
        String newText = text; 
        if (extra.getNeedSpin() != null && extra.getNeedSpin()) {
        if (shareInfo.getNeedSpin() != null && shareInfo.getNeedSpin()) {
            try {
                newText = convertLinkManager.convertLinkFromText(text, uid, true);
            } catch (ConvertLinkExceptionException e) {
@@ -1136,4 +1126,247 @@
    }
    
    @RequestMapping(value = "getActivityDetail")
    public void getActivityDetail(String callback, AcceptData acceptData, Long uid, String type, String id, PrintWriter out) {
        if (uid == null || StringUtil.isNullOrEmpty(id) || StringUtil.isNullOrEmpty(type)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空"));
            return;
        }
        String title = "";
        String comment = "";
        String params = "";
        JumpDetailV2 jumpDetail = null;
        List<String> imgs = new ArrayList<>();
        if ("circle".equalsIgnoreCase(type)) { // 发圈活动
            GoodsEvaluate evaluate = goodsEvaluateService.getById(id);
            if (evaluate == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该活动已下架"));
                return;
            }
            title = evaluate.getTitle();
            List<CommentInfo> comments = evaluate.getComments();
            if (comments != null && comments.size() > 0) {
                comment = comments.get(0).getContent();
            }
            String jumpLink = null;
            if (!StringUtil.isNullOrEmpty(evaluate.getJumpLink())) {
                jumpLink = evaluate.getJumpLink();
            }
            List<ImgInfo> imgList = evaluate.getImgList();
            if (imgList != null && imgList.size() > 0) {
                for (ImgInfo imgInfo : imgList) {
                    if (imgInfo.getType() == ImgEnum.img && !StringUtil.isNullOrEmpty(imgInfo.getUrl())) {
                        imgs.add(imgInfo.getUrl());
                    }
                    if (imgInfo.getType() == ImgEnum.img || imgInfo.getType() == ImgEnum.video) {
                        if (StringUtil.isNullOrEmpty(jumpLink) && !StringUtil.isNullOrEmpty(imgInfo.getActivityUrl())) {
                            jumpLink  = imgInfo.getActivityUrl();
                        }
                    }
                }
            }
            int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
            jumpDetail = jumpDetailV2Service.getByTypeCache("web", platformCode, Integer.parseInt(acceptData.getVersion()));
            JSONObject inner = new JSONObject();
            inner.put("url", jumpLink);
            params = inner.toString();
        } else {
            long pid = Long.parseLong(id);
            if (CommonShareInfoEnum.special.name().equalsIgnoreCase(type)) {
                Special special = specialService.selectByPrimaryKey(pid);
                if (special == null) {
                    JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该活动已下架"));
                    return;
                }
                params = special.getParams();
                jumpDetail = special.getJumpDetail();
                if (!StringUtil.isNullOrEmpty(special.getPicture())) {
                    imgs.add(special.getPicture());
                }
            } else if (CommonShareInfoEnum.banner.name().equalsIgnoreCase(type)) {
                SwiperPicture swiper = swiperPictureService.selectByPrimaryKey(pid);
                if (swiper == null) {
                    JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该活动已下架"));
                    return;
                }
                params = swiper.getParams();
                jumpDetail = swiper.getJumpDetail();
                if (!StringUtil.isNullOrEmpty(swiper.getSrc())) {
                    imgs.add(swiper.getSrc());
                }
            }
            CommonShareInfo shareInfo = commonShareInfoService.getByPidAndType(pid, type);
            if (shareInfo != null && !StringUtil.isNullOrEmpty(shareInfo.getComment())) {
                comment = shareInfo.getComment();
            }
        }
        JSONObject data = new JSONObject();
        data.put("title", title);
        data.put("comment", comment);
        data.put("params", params);
        data.put("jumpDetail", jumpDetail);
        data.put("imgs", imgs);
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
    }
    /**
     * 评论复制-专题
     *
     * @param acceptData
     * @param id
     * @param out
     */
    @RequestMapping(value = "copyShareComment")
    public void copyShareComment(String callback, AcceptData acceptData, Long uid, String id,
            String type, PrintWriter out) {
        if (uid == null || StringUtil.isNullOrEmpty(id) || StringUtil.isNullOrEmpty(type)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空"));
            return;
        }
        if ("circle".equalsIgnoreCase(type)) { // 发圈活动
            copyActivityComment(callback, acceptData, uid, id, out);
            return;
        }
        long pid = Long.parseLong(id);
        CommonShareInfo shareInfo = commonShareInfoService.getByPidAndType(pid, type);
        if (shareInfo == null || StringUtil.isNullOrEmpty(shareInfo.getComment())) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该内容已不存在"));
            return;
        }
        UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
        if (user == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
            return;
        }
        if (user != null && user.getState() != UserInfo.STATE_NORMAL) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC));
            return;
        }
        UserExtraTaoBaoInfo taoBaoInfo = userExtraTaoBaoInfoService.getByUid(uid);
        String relationId = null;
        if (taoBaoInfo != null && taoBaoInfo.getRelationId() != null && taoBaoInfo.getRelationValid() != null
                && taoBaoInfo.getRelationValid() == true)
            relationId = taoBaoInfo.getRelationId();
        if (StringUtil.isNullOrEmpty(relationId)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "淘宝未授权,请前往\"我的\"绑定淘宝账号"));
            return;
        }
        String text = shareInfo.getComment();
        String newText = text;
        if (shareInfo.getNeedSpin() != null && shareInfo.getNeedSpin()) {
            try {
                newText = convertLinkManager.convertLinkFromText(text, uid, true);
            } catch (ConvertLinkExceptionException e) {
                if (e.getCode() != ConvertLinkExceptionException.CODE_NONE) {
                    JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("评论生成失败"));
                    return;
                }
            } catch (Exception e) {
                LogHelper.errorDetailInfo(e);
                JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("评论生成失败"));
                return;
            }
        }
        JSONObject data = new JSONObject();
        data.put("text", newText);
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
    }
    /**
     * 评论复制
     *
     * @param acceptData
     * @param id
     * @param out
     */
    private void copyActivityComment(String callback, AcceptData acceptData, Long uid, String id, PrintWriter out) {
        if (StringUtil.isNullOrEmpty(id)) {
            JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("id不能为空"));
            return;
        }
        GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(id);
        if (goodsEvaluate == null) {
            JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("该内容已不存在"));
            return;
        }
        UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
        if (user == null) {
            JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("用户未登录"));
            return;
        }
        if (user != null && user.getState() != UserInfo.STATE_NORMAL) {
            JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC));
            return;
        }
        UserExtraTaoBaoInfo taoBaoInfo = userExtraTaoBaoInfoService.getByUid(uid);
        String relationId = null;
        if (taoBaoInfo != null && taoBaoInfo.getRelationId() != null && taoBaoInfo.getRelationValid() != null
                && taoBaoInfo.getRelationValid() == true)
            relationId = taoBaoInfo.getRelationId();
        if (StringUtil.isNullOrEmpty(relationId)) {
            JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult(2, "淘宝未授权,请前往\"我的\"绑定淘宝账号"));
            return;
        }
        String text = "";
        CommentInfo comment = null;
        List<CommentInfo> comments = goodsEvaluate.getComments();
        if (comments != null && comments.size() > 0) {
            CommentInfo info = comments.get(0);
            text = info.getContent();
            comment = info;
        }
        String newText = text; // 非通用券需要验证
        if (comment != null && (comment.getNeedSpin() == null || comment.getNeedSpin())) {
            try {
                newText = convertLinkManager.convertLinkFromText(text, uid, true);
            } catch (ConvertLinkExceptionException e) {
                if (e.getCode() != ConvertLinkExceptionException.CODE_NONE) {
                    JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("评论生成失败"));
                    return;
                }
            } catch (Exception e) {
                LogHelper.errorDetailInfo(e);
                JsonUtil.printMode(out, callback,JsonUtil.loadFalseResult("评论生成失败"));
                return;
            }
        }
        JSONObject data = new JSONObject();
        data.put("text", newText);
        JsonUtil.printMode(out, callback,JsonUtil.loadTrueResult(data));
        executor.execute(new Runnable() {
            @Override
            public void run() { // 添加每日统计
                dailyCountMomentsService.addCopyComment();
            }
        });
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/JingDongControllerV2.java
@@ -15,7 +15,6 @@
import com.yeshi.fanli.dto.ConfigParamsDTO;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.exception.jd.JDGoodsException;
@@ -31,6 +30,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -97,9 +97,9 @@
    public void getGoodsInfo(AcceptData acceptData, Long cid, Integer page, PrintWriter out) {
        JSONObject root = new JSONObject();
        if (cid == 1 && page == 1) {
            List<SwiperPicture> topPicList = swiperPictureService.getByBannerCardAndVersion("jingdong_special_index",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<BannerVO> topPicList = swiperPictureService.getByBannerCardAndVersion("jingdong_special_index",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (topPicList == null) {
                topPicList = new ArrayList<SwiperPicture>();
                topPicList = new ArrayList<BannerVO>();
            }
            root.put("listPic", JsonUtil.getApiCommonGson().toJson(topPicList));
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/PinDuoDuoControllerV2.java
@@ -15,7 +15,6 @@
import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.exception.pdd.PDDOrderException;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
@@ -28,6 +27,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -90,9 +90,9 @@
    public void getGoodsInfo(AcceptData acceptData, Long cid, Integer page, PrintWriter out) {
        JSONObject root = new JSONObject();
        if (cid == 1 && page == 1) {
            List<SwiperPicture> topPicList = swiperPictureService.getByBannerCardAndVersion("pinduoduo_special_index",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<BannerVO> topPicList = swiperPictureService.getByBannerCardAndVersion("pinduoduo_special_index",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (topPicList == null) {
                topPicList = new ArrayList<SwiperPicture>();
                topPicList = new ArrayList<BannerVO>();
            }
            root.put("listPic", JsonUtil.getApiCommonGson().toJson(topPicList));
            int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/PreviewInfoControllerV2.java
@@ -3,6 +3,7 @@
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -10,7 +11,6 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.yeshi.utils.JsonUtil;
import com.google.gson.Gson;
@@ -19,14 +19,22 @@
import com.yeshi.fanli.entity.bus.user.Extract;
import com.yeshi.fanli.entity.bus.user.PreviewInfo;
import com.yeshi.fanli.entity.bus.user.PreviewInfo.PreviewEnum;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
import com.yeshi.fanli.entity.order.OrderMoneyDailyCount;
import com.yeshi.fanli.exception.user.PreviewInfoException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.money.UserMoneyDetailService;
import com.yeshi.fanli.service.inter.order.OrderMoneyDailyCountService;
import com.yeshi.fanli.service.inter.user.PreviewInfoService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.account.UserUtil;
import com.yeshi.fanli.vo.money.MoneyPredictVO;
import com.yeshi.fanli.vo.money.MoneyStatisticVO;
import com.yeshi.fanli.vo.user.MineInfoVO;
@@ -46,7 +54,13 @@
    private RedisManager redisManager;
    
    @Resource
    private UserMoneyControllerV2 userMoneyControllerV2;
    private HongBaoV2CountService hongBaoV2CountService;
    @Resource
    private UserMoneyDetailService userMoneyDetailService;
    @Resource
    private OrderMoneyDailyCountService orderMoneyDailyCountService;
    
    /**
@@ -80,11 +94,144 @@
        if (previewInfo != null && !StringUtil.isNullOrEmpty(previewInfo.getContent())) {
            dto = new Gson().fromJson(previewInfo.getContent(), MoneyStatisticVO.class);
        } else {
            dto = userMoneyControllerV2.createMoneyStatistic(uid);
            dto = createMoneyStatistic(uid);
        }
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(dto));
    }
    private MoneyStatisticVO createMoneyStatistic(Long uid) {
        UserInfo user = userInfoService.getUserById(uid);
        MoneyStatisticVO vo = new MoneyStatisticVO();
        vo.setBalanceMoney(user.getMyHongBao());
        Date minDate = null;
        Date maxDate = null;
        long timeStamp = System.currentTimeMillis();
        List<UserMoneyDetailTypeEnum> typeList = new ArrayList<>();
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(timeStamp);
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.extract);
        typeList.add(UserMoneyDetailTypeEnum.extractNew);
        typeList.add(UserMoneyDetailTypeEnum.extractVerify);
        typeList.add(UserMoneyDetailTypeEnum.extractVerifyNew);
        typeList.add(UserMoneyDetailTypeEnum.extractReject);
        typeList.add(UserMoneyDetailTypeEnum.extractAutoWX);
        // 本月提现
        maxDate = new Date(timeStamp);
        calendar = Calendar.getInstance();
        minDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        vo.setMonthExtractMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
        // 上月提现
        maxDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        minDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        vo.setLastMonthExtractMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
        minDate = new Date(0L);
        maxDate = new Date(timeStamp);
        // 累计成功提现
        vo.setTotalExtractMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
        // 累计自购返利
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.fanli);
        typeList.add(UserMoneyDetailTypeEnum.fanliNew);
        typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan);
        typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew);
        typeList.add(UserMoneyDetailTypeEnum.orderReward);
        typeList.add(UserMoneyDetailTypeEnum.orderRewardNew);
        vo.setTotalFanLiMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
        // 累计分享赚
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.share);
        typeList.add(UserMoneyDetailTypeEnum.shareNew);
        typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
        vo.setTotalShareMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
        // 累计邀请赚
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.invite);
        typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan);
        typeList.add(UserMoneyDetailTypeEnum.inviteAndShare);
        typeList.add(UserMoneyDetailTypeEnum.subsidy);
        typeList.add(UserMoneyDetailTypeEnum.teamReward);
        vo.setTotalInviteMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
        // 本月收货
        maxDate = new Date(timeStamp);
        calendar = Calendar.getInstance();
        minDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        vo.setMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
        // 上月收货
        maxDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        minDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        vo.setLastMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
        // 待确认收货(180天内)
        vo.setNotSettleMoney(hongBaoV2CountService.sumMoneyByANotSettleAndUid(uid));
        // 今日预估
        calendar.add(Calendar.DAY_OF_YEAR, -1);
        minDate = new Date(TimeUtil.convertDateToTemp(TimeUtil.getGernalTime(timeStamp)));
        vo.setTodayPredict(cratePredictVO(orderMoneyDailyCountService.query(uid, minDate, null)));
        // 本月预估
        maxDate = new Date(timeStamp);
        calendar = Calendar.getInstance();
        minDate = new Date(TimeUtil
                .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        vo.setMonthPredict(cratePredictVO(orderMoneyDailyCountService.query(uid, minDate, maxDate)));
        return vo;
    }
    private MoneyPredictVO cratePredictVO(List<OrderMoneyDailyCount> list) {
        MoneyPredictVO predictVO = new MoneyPredictVO();
        predictVO.setMineNum(0);
        predictVO.setTeamNum(0);
        predictVO.setMineMoney(BigDecimal.valueOf(0));
        predictVO.setTeamMoney(BigDecimal.valueOf(0));
        BigDecimal hundred = BigDecimal.valueOf(100);
        if (list != null && list.size() > 0) {
            for (OrderMoneyDailyCount dailyCount : list) {
                if (dailyCount.getOrderNum() != null)
                    predictVO.setMineNum(predictVO.getMineNum() + dailyCount.getOrderNum());
                if (dailyCount.getOrderNumTeam() != null)
                    predictVO.setTeamNum(predictVO.getTeamNum() + dailyCount.getOrderNumTeam());
                if (dailyCount.getIncome() != null)
                    predictVO.setMineMoney(predictVO.getMineMoney()
                            .add(MoneyBigDecimalUtil.div(BigDecimal.valueOf(dailyCount.getIncome()), hundred)));
                if (dailyCount.getIncomeTeam() != null)
                    predictVO.setTeamMoney(predictVO.getTeamMoney()
                            .add(MoneyBigDecimalUtil.div(BigDecimal.valueOf(dailyCount.getIncomeTeam()), hundred)));
            }
        }
        predictVO.setTotalNum(predictVO.getTeamNum() + predictVO.getMineNum());
        predictVO.setTotalMoney(predictVO.getMineMoney().add(predictVO.getTeamMoney()));
        return predictVO;
    }
    
    /**
     * 保存提现记录
@@ -96,14 +243,14 @@
     * @param out
     */
    @RequestMapping(value = "saveExtractRecord")
    public void saveExtractRecord(String callback, AcceptData acceptData, Long uid, String time, BigDecimal money,
    public void saveExtractRecord(String callback, AcceptData acceptData, Long uid, String dayTime, BigDecimal money,
            PrintWriter out) {
        if (uid == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
            return;
        }
        try {
            previewInfoService.saveExtractRecord(uid, time, money);
            previewInfoService.saveExtractRecord(uid, dayTime, money);
        } catch (PreviewInfoException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        }
@@ -123,10 +270,12 @@
            list = new ArrayList<>();
        JSONArray JSONArray = new JSONArray();
        if (list.size() > 0) {
        for (Extract extract : list) {
            Date receiveTime = extract.getReceiveTime();
            if (receiveTime == null) {
                receiveTime = new Date(extract.getExtractTime());
                    continue;
            }
            String account = "支付宝:" + UserUtil.filterAlipayAccount(extract.getAccount());
            account = account + "-姓名:" + UserUtil.filterAlipayName(extract.getName());
@@ -138,11 +287,37 @@
            object.put("money", "¥" + extract.getMoney().setScale(2).toString());
            JSONArray.add(object);
        }
        }
        JSONObject json = new JSONObject();
        json.put("count", JSONArray.size());
        json.put("list", JSONArray);
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(json));
    }
    /**
     * 删除提现记录
     *
     * @param callback
     * @param acceptData
     * @param uid
     * @param vo
     * @param out
     */
    @RequestMapping(value = "previewExtractRecord")
    public void previewExtractRecord(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
        if (uid == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
            return;
        }
        try {
            previewInfoService.previewExtractRecord(uid);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("已添加预览"));
        } catch (PreviewInfoException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
            e.printStackTrace();
        }
    }
    
    /**
@@ -212,7 +387,7 @@
     * @param out
     */
    @RequestMapping(value = "saveMoneyArrival")
    public void saveMoneyArrival(String callback, AcceptData acceptData, Long uid, BigDecimal money, String time,
    public void saveMoneyArrival(String callback, AcceptData acceptData, Long uid, BigDecimal money, String dayTime,
            String orderNo, PrintWriter out) {
        if (uid == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
@@ -220,10 +395,12 @@
        }
        try {
            String link = previewInfoService.saveMoneyArrival(uid, money, time, orderNo);
            String link = previewInfoService.saveMoneyArrival(uid, money, dayTime, orderNo);
            JSONObject object = new JSONObject();
            object.put("link", link);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(object));
        } catch (PreviewInfoException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
@@ -243,4 +420,26 @@
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(object));
    }
    /**
     * 推送预览
     * @param callback
     * @param acceptData
     * @param uid
     * @param vo
     * @param out
     */
    @RequestMapping(value = "saveOrderInfo")
    public void saveOrderInfo(String callback, AcceptData acceptData, Long uid, Integer type, Integer num, PrintWriter out) {
        if (uid == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
            return;
        }
        if (type == null || num == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请完善数据"));
            return;
        }
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -67,6 +67,7 @@
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.goods.OtherInfo;
import com.yeshi.fanli.vo.goods.SpikeTimeVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import com.yeshi.fanli.vo.search.SearchKeyTOPVO;
import com.yeshi.fanli.vo.search.SearchKeyVO;
@@ -152,17 +153,17 @@
            JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex);
            // 2、顶部轮播图
            List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("index_top",
            List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("index_top",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<SwiperPicture> topPicList = new ArrayList<>();
            List<BannerVO> topPicList = new ArrayList<>();
            if (oldtopPicList != null && oldtopPicList.size() > 0)
                topPicList.addAll(oldtopPicList);
            root.put("topPicList", JsonUtil.getApiCommonGson().toJson(topPicList));
            // 3、邀请有奖
            List<SwiperPicture> invitePicList = null;
            List<BannerVO> invitePicList = null;
            if ("ios".equalsIgnoreCase(acceptData.getPlatform())
                    && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
                // 如果IOS当前版本处于审核状态就不返回
@@ -172,7 +173,7 @@
            }
            if (invitePicList == null) {
                invitePicList = new ArrayList<SwiperPicture>();
                invitePicList = new ArrayList<BannerVO>();
            }
            root.put("invitePicList", JsonUtil.getApiCommonGson().toJson(invitePicList));
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
@@ -74,6 +74,7 @@
import com.yeshi.fanli.vo.goods.MoneyInfoVO;
import com.yeshi.fanli.vo.goods.OtherInfo;
import com.yeshi.fanli.vo.goods.taobao.TLJBuyHongBaoVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import com.yeshi.fanli.vo.redpack.TaoLiJinWinDetailVO;
import com.yeshi.fanli.vo.tlj.ReduceHongBao;
@@ -618,7 +619,7 @@
        data.put("count", array.size());
        data.put("list", array);
        if (page == 1) {
            List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
            List<BannerVO> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (bannerList != null && bannerList.size() > 0)
@@ -707,7 +708,7 @@
        data.put("count", array.size());
        data.put("list", array);
        if (page == 1) {
            List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
            List<BannerVO> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (bannerList != null && bannerList.size() > 0)
@@ -755,9 +756,9 @@
            }
            // 2、顶部轮播图
            List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion(
            List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion(
                    "redpack_win_detail_banner", acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<SwiperPicture> topPicList = new ArrayList<>();
            List<BannerVO> topPicList = new ArrayList<>();
            if (oldtopPicList != null && oldtopPicList.size() > 0)
                topPicList.addAll(oldtopPicList);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserCouponControllerV2.java
@@ -14,7 +14,6 @@
import org.yeshi.utils.JsonUtil;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
import com.yeshi.fanli.entity.order.CommonOrder;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
@@ -31,6 +30,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.user.UserSystemCouponVO;
import net.sf.json.JSONObject;
@@ -99,7 +99,7 @@
            JSONObject data = new JSONObject();
            if (page == 1) {
                // 福利中心图片
                List<SwiperPicture> listswiper = swiperPictureService.getByBannerCardAndVersion("welfare_top_1.6.5",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
                List<BannerVO> listswiper = swiperPictureService.getByBannerCardAndVersion("welfare_top_1.6.5",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
                if (listswiper != null && listswiper.size() > 0) {
                    String topPicture = listswiper.get(0).getSrc();
                    data.put("topPicture", topPicture);
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/ConfigController.java
@@ -15,7 +15,6 @@
import com.yeshi.fanli.dto.WXMPAcceptData;
import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.push.DeviceActive;
import com.yeshi.fanli.entity.system.BusinessSystem;
@@ -30,6 +29,7 @@
import com.yeshi.fanli.service.inter.push.DeviceActiveService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.homemodule.FloatImgDetailVO;
import net.sf.json.JSONArray;
@@ -122,10 +122,10 @@
            data.put("privacyProtocolLink", privacyProtocol);
            // 我的界面banner
            List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
            List<BannerVO> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            if (banner == null)
                banner = new ArrayList<SwiperPicture>();
                banner = new ArrayList<BannerVO>();
            data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
            out.print(JsonUtil.loadTrueResult(data));
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/DynamicController.java
@@ -26,6 +26,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.JumpDetailUtil;
import com.yeshi.fanli.util.jd.JDApiUtil;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import net.sf.json.JSONObject;
@@ -115,14 +116,14 @@
        listKey.add("special_channel_jd");
        listKey.add("special_channel_pdd");
        List<Special> list = specialService.listByPlaceKeyHasLabel((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,
        List<SpecialVO> list = specialService.listByPlaceKeyHasLabel((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,
                listKey, platformCode, Integer.parseInt(acceptData.getVersion()));
        long time = System.currentTimeMillis();
        // 删除尚未启用的过期的
        for (int i = 0; i < list.size(); i++) {
            Special special = list.get(i);
            SpecialVO special = list.get(i);
            if (special.getJumpDetail() != null) {
                special.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(special.getJumpDetail()));
            }
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java
@@ -32,7 +32,6 @@
import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
import com.yeshi.fanli.dto.pdd.PDDPromotionUrl;
import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory;
import com.yeshi.fanli.entity.bus.user.ShamUser;
import com.yeshi.fanli.entity.bus.user.UserInfo;
@@ -81,6 +80,7 @@
import com.yeshi.fanli.vo.goods.RewardCouponVO;
import com.yeshi.fanli.vo.goods.ShareVO;
import com.yeshi.fanli.vo.goods.ShopInfoVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONObject;
@@ -199,13 +199,13 @@
            // 轮播图
            String platform = acceptData.getPlatform();
            int version = Integer.parseInt(acceptData.getVersion());
            List<SwiperPicture> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform,
            List<BannerVO> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform,
                    version);
            if (picList == null) {
                picList = new ArrayList<>();
            }
            for (SwiperPicture swiper : picList) {
            for (BannerVO swiper : picList) {
                JSONObject params = null;
                if (StringUtil.isNullOrEmpty(swiper.getParams())) {
                    params = JSONObject.fromObject(swiper.getParams());
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java
@@ -19,8 +19,6 @@
import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
@@ -50,6 +48,8 @@
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -129,50 +129,49 @@
            int version = Integer.parseInt(acceptData.getVersion());
            // 轮播图
            List<SwiperPicture> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform,
            List<BannerVO> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform,
                    version);
            if (picList == null) {
                picList = new ArrayList<>();
            }
            for (SwiperPicture swiper : picList) {
                JSONObject params = null;
                if (StringUtil.isNullOrEmpty(swiper.getParams())) {
                    params = JSONObject.fromObject(swiper.getParams());
                }
            for (BannerVO swiper : picList) {
//                JSONObject params = null;
//                if (StringUtil.isNullOrEmpty(swiper.getParams())) {
//                    params = JSONObject.fromObject(swiper.getParams());
//                }
                swiper.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(swiper.getJumpDetail()));
            }
            // 圆形专题
            List<Special> specials = specialService.listByVersion(0, 10, "index_arc_1.6.5", platform, version);
            List<SpecialVO> specials = specialService.listByVersion(0, 10, "index_arc_1.6.5", platform, version);
            if (specials == null)
                specials = new ArrayList<>();
            for (Special special : specials) {
            for (SpecialVO special : specials) {
                JumpDetailV2 jumpDetail = special.getJumpDetail();
                if (special.isJumpLogin() && jumpDetail != null) {
                    jumpDetail.setNeedLogin(true);
                }
                
                JSONObject params = null;
                if (StringUtil.isNullOrEmpty(special.getParams())) {
                    params = JSONObject.fromObject(special.getParams());
                }
//                JSONObject params = null;
//                if (StringUtil.isNullOrEmpty(special.getParams())) {
//                    params = JSONObject.fromObject(special.getParams());
//                }
                special.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(jumpDetail));
            }
            // 活动
            List<SwiperPicture> activitys = swiperPictureService.getByBannerCardAndVersion("index_invite", platform,
            List<BannerVO> activitys = swiperPictureService.getByBannerCardAndVersion("index_invite", platform,
                    version);
            if (activitys == null)
                activitys = new ArrayList<>();
            for (SwiperPicture swiper : activitys) {
                JSONObject params = null;
                if (StringUtil.isNullOrEmpty(swiper.getParams())) {
                    params = JSONObject.fromObject(swiper.getParams());
                }
            for (BannerVO swiper : activitys) {
//                JSONObject params = null;
//                if (StringUtil.isNullOrEmpty(swiper.getParams())) {
//                    params = JSONObject.fromObject(swiper.getParams());
//                }
                swiper.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(swiper.getJumpDetail()));
            }
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/CommonShareInfoMapper.java
New file
@@ -0,0 +1,26 @@
package com.yeshi.fanli.dao.mybatis.homemodule;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
public interface CommonShareInfoMapper extends BaseMapper<CommonShareInfo> {
    /**
     * 根据上级id 和类型查询
     * @param pid
     * @param type
     * @return
     */
    CommonShareInfo getByPidAndType(@Param("pid") Long pid, @Param("type") String type);
    /**
     * 删除
     * @param pid
     * @param type
     */
    void deleteByPidAndType(@Param("pid") Long pid, @Param("type") String type);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/SpecialCardMapper.java
@@ -13,9 +13,10 @@
    int deleteBatchByPrimaryKey(List<Long> list);
    
    
    List<SpecialCard> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key);
    List<SpecialCard> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("listPid")List<Long> listPid);
    
    long countlistQuery(@Param("key") String key);
    long countlistQuery(@Param("key") String key, @Param("listPid")List<Long> listPid);
    
    
    String getbottomPicture(@Param("placeKey") String placeKey);
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/SpecialExtraMapper.java
File was deleted
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/CommonShareInfo.java
New file
@@ -0,0 +1,111 @@
package com.yeshi.fanli.entity.bus.homemodule;
import java.util.Date;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
/**
 * 分享信息
 *
 */
@Table("yeshi_ec_common_share_info")
public class CommonShareInfo {
    public enum CommonShareInfoEnum {
        special("专题"), banner("轮播图");
        private final String desc;
        private CommonShareInfoEnum(String desc) {
            this.desc = desc;
        }
        public String getDesc() {
            return desc;
        }
    }
    @Column(name = "csi_id")
    private Long id;
    // 相关id
    @Column(name = "csi_pid")
    private Long pid;
    // 类型
    @Column(name = "csi_type")
    private CommonShareInfoEnum type;
    // 是否转链
    @Column(name = "csi_need_spin")
    private Boolean needSpin;
    // 评论语
    @Column(name = "csi_comment")
    private String comment;
    // 创建时间
    @Column(name = "csi_createtime")
    private Date createTime;
    // 更新时间
    @Column(name = "csi_updatetime")
    private Date updateTime;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    public CommonShareInfoEnum getType() {
        return type;
    }
    public void setType(CommonShareInfoEnum type) {
        this.type = type;
    }
    public Boolean getNeedSpin() {
        return needSpin;
    }
    public void setNeedSpin(Boolean needSpin) {
        this.needSpin = needSpin;
    }
    public String getComment() {
        return comment;
    }
    public void setComment(String comment) {
        this.comment = comment;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SpecialExtra.java
File was deleted
fanli/src/main/java/com/yeshi/fanli/entity/system/ConfigKeyEnum.java
@@ -190,7 +190,8 @@
    orderRebateDescLink("order_rebate_desc_link", "订单返利计算说明链接"),
    
    teamStatisticsLink("team_statistics_link", "推送发圈活动页面"),
    teamStatisticsLink("team_statistics_link", "队员统计页面链接"),
    activityDetailLink("activity_detail_link", "活动详情过渡页"),
    // 平台规则
    platformRule("platform_rule_link", "平台规则");
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/CommonShareInfoMapper.xml
New file
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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.homemodule.CommonShareInfoMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo">
    <id column="csi_id" property="id" jdbcType="BIGINT"/>
    <result column="csi_pid" property="pid" jdbcType="BIGINT"/>
    <result column="csi_need_spin" property="needSpin" jdbcType="BOOLEAN"/>
    <result column="csi_comment" property="comment" jdbcType="VARCHAR"/>
    <result column="csi_createtime" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="csi_updatetime" property="updateTime" jdbcType="TIMESTAMP"/>
    <result column="csi_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.CommonShareInfoEnumHandler"/>
  </resultMap>
  <sql id="Base_Column_List">csi_id,csi_pid,csi_type,csi_need_spin,csi_comment,csi_createtime,csi_updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_common_share_info where csi_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_common_share_info where csi_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_common_share_info (csi_id,csi_pid,csi_type,csi_need_spin,csi_comment,csi_createtime,csi_updatetime) values (#{id,jdbcType=BIGINT},#{pid,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{needSpin,jdbcType=BOOLEAN},#{comment,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_common_share_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">csi_id,</if>
      <if test="pid != null">csi_pid,</if>
      <if test="type != null">csi_type,</if>
      <if test="needSpin != null">csi_need_spin,</if>
      <if test="comment != null">csi_comment,</if>
      <if test="createTime != null">csi_createtime,</if>
      <if test="updateTime != null">csi_updatetime,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="pid != null">#{pid,jdbcType=BIGINT},</if>
      <if test="type != null">#{type,jdbcType=VARCHAR},</if>
      <if test="needSpin != null">#{needSpin,jdbcType=BOOLEAN},</if>
      <if test="comment != null">#{comment,jdbcType=VARCHAR},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo">update yeshi_ec_common_share_info set csi_pid = #{pid,jdbcType=BIGINT},csi_type = #{type,jdbcType=VARCHAR},csi_need_spin = #{needSpin,jdbcType=BOOLEAN},csi_comment = #{comment,jdbcType=VARCHAR},csi_createtime = #{createTime,jdbcType=TIMESTAMP},csi_updatetime = #{updateTime,jdbcType=TIMESTAMP} where csi_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo">update yeshi_ec_common_share_info
    <set>
      <if test="pid != null">csi_pid=#{pid,jdbcType=BIGINT},</if>
      <if test="type != null">csi_type=#{type,jdbcType=VARCHAR},</if>
      <if test="needSpin != null">csi_need_spin=#{needSpin,jdbcType=BOOLEAN},</if>
      <if test="comment != null">csi_comment=#{comment,jdbcType=VARCHAR},</if>
      <if test="createTime != null">csi_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">csi_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where csi_id = #{id,jdbcType=BIGINT}
  </update>
  <select id="getByPidAndType" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_common_share_info
    WHERE csi_pid = #{pid}  AND csi_type = #{type}
    ORDER BY csi_id DESC
    LIMIT 1
  </select>
 <delete id="deleteByPidAndType">
     delete from yeshi_ec_common_share_info where csi_pid = #{pid} AND csi_type = #{type}
 </delete>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SpecialCardMapper.xml
@@ -67,6 +67,10 @@
           <if test='key != null and key != ""'>
                  AND cd_name like '%${key}%'
           </if>
           <if test="listPid != null">
                AND cd_place_id in
                   <foreach collection="listPid" item="item" open="(" close=")" separator=",">#{item}</foreach>
           </if>
           ORDER BY cd_place_id,cd_state DESC
        LIMIT ${start},${count}
   </select>
@@ -77,6 +81,10 @@
           <if test='key != null and key != ""'>
                  AND cd_name like '%${key}%'
           </if>
            <if test="listPid != null">
                AND cd_place_id in
                   <foreach collection="listPid" item="item" open="(" close=")" separator=",">#{item}</foreach>
           </if>
    </select>
    
    <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SpecialExtraMapper.xml
File was deleted
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -1103,6 +1103,7 @@
            }
        }
 
        String activityUrl = imgInfo.getActivityUrl();
        // 编辑图片
        List<ImgInfo> tempList = new ArrayList<ImgInfo>();
        if (!StringUtil.isNullOrEmpty(picUrls)) {
@@ -1114,6 +1115,7 @@
                        if (listOld != null) {
                            for (ImgInfo info: listOld) {
                                if (info.getUrl().equals(picLink)) {
                                    info.setActivityUrl(activityUrl);
                                    tempList.add(info);
                                    break;
                                }
@@ -1123,6 +1125,7 @@
                }
            }
        }
        // 上传文件替换
        if (fileRequest != null) {
@@ -1139,7 +1142,7 @@
                    imgInfo0.setType(ImgEnum.img);
                    imgInfo0.setW(info.getW());
                    imgInfo0.setH(info.getH());
                    imgInfo0.setActivityUrl(activityUrl);
                    if (i < tempList.size()) {
                        tempList.set(i, imgInfo0);
                    } else {
@@ -1187,7 +1190,7 @@
            }
        }
        
        resultObj.setJumpLink(imgInfo.getActivityUrl());
        resultObj.setJumpLink(activityUrl);
        resultObj.setLineNum(lineNum);
        resultObj.setImgList(listImg);
        goodsEvaluateDao.save(resultObj);
@@ -1626,7 +1629,47 @@
            }
            // 按照发布显示时间段起始时间为准。
            goodsEvaluate.setPublishTime(goodsEvaluate.getStartTime());
            evaluateNew.setPublishTime(evaluateNew.getStartTime());
            // 活动链接跳转过渡页
            EvaluateEnum evaluateEnum = evaluateNew.getType();
            if (evaluateEnum != null && evaluateEnum == EvaluateEnum.activity) {
                if (evaluateNew.getComments() != null && evaluateNew.getComments().size() > 0) {
                    String jumpLink = configService.get(ConfigKeyEnum.activityDetailLink.getKey()) + "?type=%s&id=%s";
                    jumpLink = String.format(jumpLink, "circle", evaluateNew.getId());
                    if (!StringUtil.isNullOrEmpty(evaluateNew.getJumpLink())) {
                        evaluateNew.setJumpLink(jumpLink);
                    }
                    List<ImgInfo> imgListNew = new ArrayList<>();
                    List<ImgInfo> imgList = evaluateNew.getImgList();
                    if (imgList != null && imgList.size() > 0) {
                        for (ImgInfo imgInfo: imgList) {
                            if (imgInfo.getType() != ImgEnum.img || imgInfo.getType() == ImgEnum.activity) {
                                ImgInfo imgInfoNew = new ImgInfo();
                                try {
                                    PropertyUtils.copyProperties(imgInfoNew, imgInfo);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    continue;
                                }
                                if (!StringUtil.isNullOrEmpty(imgInfoNew.getActivityUrl())) {
                                    imgInfoNew.setActivityUrl(jumpLink);
                                }
                                imgListNew.add(imgInfoNew);
                                continue;
                            }
                            imgListNew.add(imgInfo);
                        }
                    }
                    evaluateNew.setImgList(imgListNew);
                }
            }
            List<CommentInfo> comments = evaluateNew.getComments();
            if (comments != null && comments.size() > 0) {
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/CommonShareInfoServiceImpl.java
New file
@@ -0,0 +1,68 @@
package com.yeshi.fanli.service.impl.homemodule;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.homemodule.CommonShareInfoMapper;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.service.inter.homemodule.CommonShareInfoService;
import com.yeshi.fanli.service.manger.goods.ConvertLinkManager;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
@Service
public class CommonShareInfoServiceImpl implements CommonShareInfoService {
    @Resource
    private CommonShareInfoMapper commonShareInfoMapper;
    @Resource
    private ConvertLinkManager convertLinkManager;
    @Override
    public void save(CommonShareInfo record) throws SpecialException {
        if (record == null || record.getPid() == null || record.getType() == null)
            throw new SpecialException(1, "参数不完整");
        if (!StringUtil.isNullOrEmpty(record.getComment())) {
            if (record.getNeedSpin() == null)
                record.setNeedSpin(false);
            if (record.getNeedSpin()) {
                try {
                    convertLinkManager.convertLinkFromText(record.getComment(), Constant.LINK_TOKEN_VERIFY_UID, true);
                } catch (ConvertLinkExceptionException e) {
                    if (ConvertLinkExceptionException.CODE_NONE != e.getCode()) {
                        throw new SpecialException(1, "包含不可转链的口令与链接");
                    }
                } catch (Exception e) {
                    throw new SpecialException(1, "包含不可转链的口令与链接");
                }
            }
        }
        CommonShareInfo info = commonShareInfoMapper.getByPidAndType(record.getPid(), record.getType().name());
        if (info == null) {
            commonShareInfoMapper.insertSelective(record);
        } else {
            record.setId(info.getId());
            commonShareInfoMapper.updateByPrimaryKeySelective(record);
        }
    }
    @Override
    public CommonShareInfo getByPidAndType(Long pid, String type) {
        return commonShareInfoMapper.getByPidAndType(pid, type);
    }
    @Override
    public void deleteByPidAndType(Long pid, String type) {
        commonShareInfoMapper.deleteByPidAndType(pid, type);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialCardServiceImpl.java
@@ -174,9 +174,9 @@
    }
    
    @Override
    public List<SpecialCard> listQuery(long start, int count, String key, Integer sort) {
    public List<SpecialCard> listQuery(long start, int count, String key, Integer sort, List<Long> listPid) {
        
        List<SpecialCard> listObj = specialCardMapper.listQuery(start, count, key);
        List<SpecialCard> listObj = specialCardMapper.listQuery(start, count, key, listPid);
        if (listObj == null || listObj.size() == 0) {
            return null;
        }
@@ -225,8 +225,8 @@
    }
    
    @Override
    public long countlistQuery(String key) {
        return specialCardMapper.countlistQuery(key);
    public long countlistQuery(String key, List<Long> listPid) {
        return specialCardMapper.countlistQuery(key, listPid);
    }
    
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialExtraServiceImpl.java
File was deleted
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
@@ -26,8 +26,9 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.exception.banner.SwiperPictureException;
@@ -36,8 +37,8 @@
import com.yeshi.fanli.service.inter.config.AppVersionService;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
import com.yeshi.fanli.service.inter.homemodule.CommonShareInfoService;
import com.yeshi.fanli.service.inter.homemodule.SpecialCardService;
import com.yeshi.fanli.service.inter.homemodule.SpecialExtraService;
import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService;
import com.yeshi.fanli.service.inter.homemodule.SpecialService;
import com.yeshi.fanli.util.Constant;
@@ -61,7 +62,7 @@
    private SpecialCardService specialCardService;
    @Resource
    private SpecialExtraService specialExtraService;
    private CommonShareInfoService commonShareInfoService;
    
    @Resource
    private JumpDetailV2Service jumpDetailV2Service;
@@ -82,7 +83,7 @@
    @Override
    public void saveObject(MultipartFile file, MultipartFile file2, MultipartFile file3, Special record,
            String jumpType, SpecialExtra extra) throws SpecialException, Exception {
            String jumpType, CommonShareInfo shareInfo) throws SpecialException, Exception {
        Long cardId = record.getCardId();
        if (cardId == null) {
@@ -156,7 +157,7 @@
            record.setUpdatetime(new Date());
            specialMapper.insert(record);
            extra.setId(record.getId());
            shareInfo.setPid(record.getId());
            
            Special s = new Special();
            s.setId(record.getId());
@@ -223,11 +224,12 @@
            record.setUpdatetime(new Date());
            specialMapper.updateByPrimaryKey(record);
            
            extra.setId(record.getId());
            shareInfo.setPid(record.getId());
        }
        
        // 添加补充信息
        specialExtraService.saveExtraInfo(extra);
        shareInfo.setType(CommonShareInfoEnum.special);
        commonShareInfoService.save(shareInfo);
    }
    /**
@@ -356,6 +358,8 @@
            if (!StringUtil.isNullOrEmpty(subPicture)) {
                COSManager.getInstance().deleteFile(subPicture);
            }
            commonShareInfoService.deleteByPidAndType(special.getId(), CommonShareInfoEnum.special.name());
        }
        if (listSpecial != null)
@@ -382,6 +386,8 @@
            if (!StringUtil.isNullOrEmpty(subPicture)) {
                COSManager.getInstance().deleteFile(subPicture);
            }
            commonShareInfoService.deleteByPidAndType(special.getId(), CommonShareInfoEnum.special.name());
        }
        return specialMapper.deleteBatchByCardID(list);
@@ -449,20 +455,20 @@
                specialVO.setJumpDetail(jumpDetailV2);
            }
            
            // 补充信息
            SpecialExtra extra = specialExtraService.selectByPrimaryKey(specialVO.getId());
            if (extra == null) {
            // 分享补充信息
            CommonShareInfo info = commonShareInfoService.getByPidAndType(specialVO.getId(),
                    CommonShareInfoEnum.special.name());
            if (info == null) {
                specialVO.setNeedSpin(false);
                specialVO.setComment("");
            } else {
                specialVO.setNeedSpin(extra.getNeedSpin());
                if (StringUtil.isNullOrEmpty(extra.getComment())) {
                specialVO.setNeedSpin(info.getNeedSpin());
                if (StringUtil.isNullOrEmpty(info.getComment())) {
                    specialVO.setComment("");
                } else {
                    specialVO.setComment(extra.getComment());
                    specialVO.setComment(info.getComment());
                }
            }
            listvo.add(specialVO);
        }
        return listvo;
@@ -475,22 +481,24 @@
    @Override
    @Cacheable(value = "specialCache", key = "'listBySystemAndCard-'+#card+'-'+#systemId")
    public List<Special> listBySystemAndCard(String card, Long systemId) {
        return specialMapper.listBySystemAndCard(card, systemId);
    public List<SpecialVO> listBySystemAndCard(String card, Long systemId) {
        List<Special> specialList = specialMapper.listBySystemAndCard(card, systemId);
        return transformVO(specialList);
    }
    @Override
    @Cacheable(value = "specialCache", key = "'listPageBySystemAndCard-'+#start+'-'+#count+'-'+#card+'-'+#systemId")
    public List<Special> listPageBySystemAndCard(long start, int count, String card, Long systemId) {
        return specialMapper.listPageBySystemAndCard(start, count, card, systemId);
    public List<SpecialVO> listPageBySystemAndCard(long start, int count, String card, Long systemId) {
        List<Special> specialList = specialMapper.listPageBySystemAndCard(start, count, card, systemId);
        return transformVO(specialList);
    }
    @Override
    @Cacheable(value = "specialCache", key = "'listByVersion-'+#start+'-'+#count+'-'+#card+'-'+#platform+'-'+#versionCode")
    public List<Special> listByVersion(long start, int count, String card, String platform, Integer versionCode) {
    public List<SpecialVO> listByVersion(long start, int count, String card, String platform, Integer versionCode) {
        List<Special> specialList = specialMapper.listByPlaceKey(card, null, null, null);
        filterSpecial(specialList, platform, versionCode);
        return specialList;
        return transformVO(specialList);
    }
    /**
@@ -591,7 +599,7 @@
        // 数据处理
//        handlelist(listArc);
        arcMap.put("list", JsonUtil.getApiCommonGson().toJson(listArc));
        arcMap.put("list", JsonUtil.getApiCommonGson().toJson(transformVO(listArc)));
        // 首页-活动区域(女王节)
        JSONObject activityMap = new JSONObject();
@@ -617,7 +625,7 @@
        handlelist(listActivity);
        activityMap.put("list", JsonUtil.getApiCommonGson().toJson(listActivity));
        activityMap.put("list", JsonUtil.getApiCommonGson().toJson(transformVO(listActivity)));
        // 首页-方形专题(品牌券、母婴...)
        String indexBlock = "index_block";
@@ -650,7 +658,7 @@
        // 数据处理
        handlelist(listBlock);
        blockJsonMap.put("list", JsonUtil.getApiCommonGson().toJson(listBlock));
        blockJsonMap.put("list", JsonUtil.getApiCommonGson().toJson(transformVO(listBlock)));
        JSONObject root = new JSONObject();
        root.put("arcArea", arcMap);
@@ -677,11 +685,54 @@
    @Override
    @Cacheable(value = "specialCache", key = "'listByPlaceKeyHasLabel'+#start+'-'+#platform+'-'+#versionCode+'-'+#list")
    public List<Special> listByPlaceKeyHasLabel(long start, int count, List<String> list, Integer platform,
    public List<SpecialVO> listByPlaceKeyHasLabel(long start, int count, List<String> list, Integer platform,
            Integer versionCode) {
        return specialMapper.listByPlaceKeyHasLabel(start, count, list, null, platform, versionCode);
        List<Special> listSpecial =  specialMapper.listByPlaceKeyHasLabel(start, count, list, null,
                platform, versionCode);
        return     transformVO(listSpecial);
    }
    /**
     * 转换VO
     * @param list
     * @return
     */
    private List<SpecialVO> transformVO(List<Special> list) {
        List<SpecialVO> listVo = new ArrayList<SpecialVO>();
        if (list != null && list.size() > 0) {
            for (Special special: list) {
                SpecialVO specialVO = new SpecialVO();
                try {
                    PropertyUtils.copyProperties(specialVO, special);
                } catch (Exception e) {
                    e.printStackTrace();
                    continue;
                }
                // 跳转活动过渡页
                CommonShareInfo info = commonShareInfoService.getByPidAndType(specialVO.getId(),
                        CommonShareInfoEnum.special.name());
                if (info != null && !StringUtil.isNullOrEmpty(info.getComment())) {
                    String link = configService.get(ConfigKeyEnum.activityDetailLink.getKey()) + "?type=%s&id=%s";
                    link = String.format(link, CommonShareInfoEnum.special.name(),specialVO.getId());
                    JSONObject params = new JSONObject();
                    params.put("url", link);
                    specialVO.setComment(info.getComment());
                    specialVO.setParams(params.toString());
                    specialVO.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
                }
                listVo.add(specialVO);
            }
        }
        return listVo;
    }
    /**
     * 处理 数据
     * 
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java
@@ -12,6 +12,7 @@
import javax.annotation.Resource;
import org.apache.commons.beanutils.PropertyUtils;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -22,15 +23,23 @@
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.exception.banner.SwiperPictureException;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.AppVersionService;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
import com.yeshi.fanli.service.inter.homemodule.CommonShareInfoService;
import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
import com.yeshi.fanli.util.FilePathEnum;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.homemodule.BannerVO;
import net.sf.json.JSONObject;
@Service
public class SwiperPictureServiceImpl implements SwiperPictureService {
@@ -46,6 +55,13 @@
    @Resource
    private AppVersionService appVersionService;
    @Resource
    private CommonShareInfoService commonShareInfoService;
    @Resource
    private ConfigService configService;
    @Override
    public int insertSelective(SwiperPicture record) {
@@ -68,8 +84,9 @@
    }
    @Override
    public List<SwiperPicture> queryByBannerID(long start, int count, Long bannerId) throws SwiperPictureException {
        return swiperPictureMapper.queryByBannerID(start, count, bannerId);
    public List<BannerVO> queryByBannerID(long start, int count, Long bannerId) throws SwiperPictureException {
        List<SwiperPicture> list = swiperPictureMapper.queryByBannerID(start, count, bannerId);
        return transformVO(list);
    }
    @Override
@@ -78,9 +95,8 @@
    }
    @Override
    public void saveObject(MultipartFile file, SwiperPicture record, String jumpType)
    public void saveObject(MultipartFile file, SwiperPicture record, String jumpType, CommonShareInfo shareInfo)
            throws SwiperPictureException, Exception {
        if (record == null) {
            throw new SwiperPictureException(1, "参数不能为空");
        }
@@ -139,7 +155,6 @@
        if (id == null) {
            int maxOrder = swiperPictureMapper.getMaxOrderByBannerID(bannerId);
            record.setOrder(maxOrder + 1);
            Integer state = record.getState();
            // 默认停用
            if (state == null) {
@@ -154,8 +169,9 @@
            record.setCreatetime(new Date());
            record.setUpdatetime(new Date());
            record.setSrc(picture);
            swiperPictureMapper.insert(record);
            shareInfo.setPid(record.getId());
        } else {
            // 修改
            SwiperPicture resultObj = swiperPictureMapper.selectByPrimaryKey(id);
@@ -166,7 +182,6 @@
            if (picture != null && picture.trim().length() > 0) {
                // 删除已存在图片
                removePicture(resultObj);
                record.setSrc(picture);
            } else {
                record.setSrc(resultObj.getSrc());
@@ -175,9 +190,14 @@
            record.setOrder(resultObj.getOrder());
            record.setCreatetime(resultObj.getCreatetime());
            record.setUpdatetime(new Date());
            swiperPictureMapper.updateByPrimaryKey(record);
            shareInfo.setPid(record.getId());
        }
        // 添加补充信息
        shareInfo.setType(CommonShareInfoEnum.banner);
        commonShareInfoService.save(shareInfo);
    }
    /**
@@ -250,6 +270,8 @@
            if (!StringUtil.isNullOrEmpty(src)) {
                COSManager.getInstance().deleteFile(src);
            }
            commonShareInfoService.deleteByPidAndType(swiperPicture.getId(), CommonShareInfoEnum.banner.name());
        }
        if (listSwiper != null)
@@ -265,6 +287,11 @@
    @Override
    public int deleteBatchByBannerID(List<Long> list) throws SwiperPictureException {
        if (list != null) {
            for (Long id : list) {
                commonShareInfoService.deleteByPidAndType(id, CommonShareInfoEnum.banner.name());
            }
        }
        return swiperPictureMapper.deleteBatchByBannerID(list);
    }
@@ -285,7 +312,7 @@
    @Override
    @Cacheable(value = "bannerCache", key = "'getByBannerCard-'+#card")
    public List<SwiperPicture> getByBannerCard(String card) {
    public List<BannerVO> getByBannerCard(String card) {
        List<SwiperPicture> list = swiperPictureMapper.getByBannerCard(card);
        if (list != null && list.size() > 0) {
            for (SwiperPicture swiperPicture : list) {
@@ -297,7 +324,7 @@
                }
            }
        }
        return list;
        return transformVO(list);
    }
    /**
@@ -333,7 +360,7 @@
    @Cacheable(value = "bannerCache", key = "'getByBannerCardAndVersion-'+#card+'-'+#platform+'-'+#version")
    @Override
    public List<SwiperPicture> getByBannerCardAndVersion(String card, String platform, int version) {
    public List<BannerVO> getByBannerCardAndVersion(String card, String platform, int version) {
        List<SwiperPicture> list = swiperPictureMapper.getByBannerCard(card);
        filterSwipePicture(list, platform, version);
        for (SwiperPicture picture : list) {
@@ -342,22 +369,23 @@
            }
        }
        return list;
        return transformVO(list);
    }
    @Override
    @Cacheable(value = "bannerCache", key = "'getByBannerId-'+#bannerId")
    public List<SwiperPicture> getByBannerId(Long bannerId) {
        return swiperPictureMapper.getByBannerId(bannerId);
    public List<BannerVO> getByBannerId(Long bannerId) {
        List<SwiperPicture>  pictureList = swiperPictureMapper.getByBannerId(bannerId);
        return transformVO(pictureList);
    }
    @Cacheable(value = "bannerCache", key = "'getByBannerId-'+#bannerId+'-'+#platform+'-'+#version")
    @Override
    public List<SwiperPicture> getByBannerId(Long bannerId, String platform, int version)
    public List<BannerVO> getByBannerId(Long bannerId, String platform, int version)
            throws SwiperPictureException {
        List<SwiperPicture> pictureList = swiperPictureMapper.getByBannerId(bannerId);
        filterSwipePicture(pictureList, platform, version);
        return pictureList;
        return transformVO(pictureList);
    }
    @Transactional(rollbackFor = Exception.class)
@@ -408,7 +436,45 @@
                throw new SwiperPictureException(2, e.getMessage());
            }
        }
    }
    /**
     * 转换VO
     * @param list
     * @return
     */
    private List<BannerVO> transformVO(List<SwiperPicture> list) {
        List<BannerVO> listVo = new ArrayList<BannerVO>();
        if (list != null && list.size() > 0) {
            for (SwiperPicture swiperPicture: list) {
                BannerVO bannerVO = new BannerVO();
                try {
                    PropertyUtils.copyProperties(bannerVO, swiperPicture);
                } catch (Exception e) {
                    e.printStackTrace();
                    continue;
                }
                // 跳转活动过渡页
                CommonShareInfo info = commonShareInfoService.getByPidAndType(bannerVO.getId(),
                        CommonShareInfoEnum.banner.name());
                if (info != null && !StringUtil.isNullOrEmpty(info.getComment())) {
                    String link = configService.get(ConfigKeyEnum.activityDetailLink.getKey()) + "?type=%s&id=%s";
                    link = String.format(link, CommonShareInfoEnum.banner.name(),bannerVO.getId());
                    JSONObject params = new JSONObject();
                    params.put("url", link);
                    bannerVO.setComment(info.getComment());
                    bannerVO.setParams(params.toString());
                    bannerVO.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
                }
                listVo.add(bannerVO);
            }
        }
        return listVo;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java
@@ -46,10 +46,10 @@
    
    
    
    @Override
    public void save(Long createUid, Long preUid, PreviewEnum type, String content) {
        String id = StringUtil.Md5(createUid + "#" + type.name());
        PreviewInfo info = new PreviewInfo();
        info.setId(id);
        info.setUid(preUid);
@@ -59,9 +59,28 @@
        info.setUpdateTime(new Date());
        previewInfoDao.save(info);
        
        if (type == PreviewEnum.extractRecord) {
            return;
        }
        if (StringUtil.isNullOrEmpty(content)) {
            removePreview(preUid, type);
        } else {
            adddPreview(preUid, type, content);
        }
    }
        // 缓存10分钟
        String key = StringUtil.Md5("preview" + preUid + "#" + type.name());
        redisManager.cacheCommonString(key, info.getContent(), 60 * 10);
    private void adddPreview(Long uid, PreviewEnum type, String content) {
        String key = StringUtil.Md5("preview" + uid + "#" + type.name());
        redisManager.cacheCommonString(key, content, 60 * 10);
    }
    // 缓存10分钟
    private void removePreview(Long uid, PreviewEnum type) {
        String key = StringUtil.Md5("preview" + uid + "#" + type.name());
        redisManager.removeCommonString(key);
    }
    
    
@@ -91,25 +110,29 @@
        BindingAccount alipay = bindingAccountService.getBindingAccountByUidAndType(uid, BindingAccount.TYPE_ALIPAY);
        if (alipay == null)
            throw new PreviewInfoException(1, "未绑定提现账号");
        if (money == null || money.compareTo(BigDecimal.ZERO) <= 0)
            throw new PreviewInfoException(1, "请输入正确的金额");
        if (StringUtil.isNullOrEmpty(time))
            throw new PreviewInfoException(1, "提现时间不能为空");
        if (money.compareTo(BigDecimal.ZERO) <= 0)
            throw new PreviewInfoException(1, "提现金额不能小于0");
        Date parse = TimeUtil.parseDotCommon2(time);
        if (parse == null)
            throw new PreviewInfoException(1, "请输入正确的时间格式,如:2020.01.01 01:01");
        
        Gson gson = new Gson();
        List<Extract> list = null;
        List<Extract> list = new ArrayList<Extract>();
        
        Extract extract = new Extract();
        extract.setName(alipay.getName());
        extract.setAccount(alipay.getAccount());
        extract.setMoney(money);
        extract.setReceiveTime(TimeUtil.parseDotCommon(time));
        extract.setReceiveTime(TimeUtil.parseDotCommon2(time));
        extract.setId(java.lang.System.currentTimeMillis());
        
        String id = StringUtil.Md5(uid + "#" + PreviewEnum.extractRecord.name());
        PreviewInfo previewInfo = previewInfoDao.get(id);
        if (previewInfo == null) {
             list = new ArrayList<Extract>();
             list.add(extract);
        } else {
            String content = previewInfo.getContent();
@@ -139,6 +162,24 @@
    
    @Override
    public void previewExtractRecord(Long uid) throws PreviewInfoException{
        String id = StringUtil.Md5(uid + "#" + PreviewEnum.extractRecord.name());
        PreviewInfo previewInfo = previewInfoDao.get(id);
        if (previewInfo == null) {
            throw new PreviewInfoException(1, "请添加提现记录信息");
        }
        String content = previewInfo.getContent();
        if (StringUtil.isNullOrEmpty(content)) {
            throw new PreviewInfoException(1, "请添加提现记录信息");
        }
        adddPreview(uid, PreviewEnum.extractRecord, content);
    }
    @Override
    public void deleteExtractRecord(Long uid, long tid) {
        String id = StringUtil.Md5(uid + "#" + PreviewEnum.extractRecord.name());
        PreviewInfo previewInfo = previewInfoDao.get(id);
@@ -163,7 +204,11 @@
                break;
            }
        }
        save(uid, uid, PreviewEnum.extractRecord, gson.toJson(list));
        // 取消预览
        removePreview(uid, PreviewEnum.extractRecord);
    }
    
    
@@ -199,9 +244,14 @@
        if (money == null )
            throw new PreviewInfoException(1, "请输入金额");
        if(StringUtil.isNullOrEmpty(time))
            throw new PreviewInfoException(1, "请输入创建时间");
        if(StringUtil.isNullOrEmpty(time))
            throw new PreviewInfoException(1, "请输入订单号");
        if(StringUtil.isNullOrEmpty(time))
            throw new PreviewInfoException(1, "请输入创建时间");
        Date parse = TimeUtil.parseDotCommon2(time);
        if (parse == null)
            throw new PreviewInfoException(1, "请输入正确的时间格式,如:2020.01.01 01:01");
        String content = ""; // TODO
        // save(uid, PreviewEnum.moneyArrival, gson.toJson(infoVO));
        return content;
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/CommonShareInfoService.java
New file
@@ -0,0 +1,33 @@
package com.yeshi.fanli.service.inter.homemodule;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.exception.homemodule.SpecialException;
/**
 *  专题额外
 *
 * @author Administrator
 *
 */
public interface CommonShareInfoService{
    /**
     * 保存信息
     * @param record
     */
    public void save(CommonShareInfo record) throws SpecialException;
    /**
     * 根据上级id +
     * @param pid
     * @param infoEnum
     * @return
     */
    public CommonShareInfo getByPidAndType(Long pid, String type);
    public void deleteByPidAndType(Long pid, String type);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialCardService.java
@@ -15,9 +15,9 @@
 */
public interface SpecialCardService {
    public List<SpecialCard> listQuery(long start, int count, String key, Integer sort);
    public List<SpecialCard> listQuery(long start, int count, String key, Integer sort, List<Long> listPid);
    public long countlistQuery(String key);
    public long countlistQuery(String key, List<Long> listPid);
    /**
     * 根据id批量删除
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialExtraService.java
File was deleted
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialService.java
@@ -5,8 +5,8 @@
import org.springframework.web.multipart.MultipartFile;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
@@ -51,7 +51,7 @@
     * @param systemId
     * @return
     */
    public List<Special> listBySystemAndCard(String card, Long systemId);
    public List<SpecialVO> listBySystemAndCard(String card, Long systemId);
    /**
     * 活动列表-分页
@@ -61,7 +61,7 @@
     * @param systemId
     * @return
     */
    public List<Special> listPageBySystemAndCard(long start, int count, String card, Long systemId);
    public List<SpecialVO> listPageBySystemAndCard(long start, int count, String card, Long systemId);
    /**
@@ -72,7 +72,8 @@
     * @throws SpecialException
     * @throws Exception
     */
    public void saveObject(MultipartFile file, MultipartFile file2, MultipartFile file3, Special record, String jumpType, SpecialExtra extra) throws SpecialException, Exception;
    public void saveObject(MultipartFile file, MultipartFile file2, MultipartFile file3, Special record
            , String jumpType, CommonShareInfo shareInfo) throws SpecialException, Exception;
    /**
     * 更换顺序
@@ -109,7 +110,7 @@
     * @param versionCode
     * @return
     */
    public List<Special> listByVersion(long start, int count, String card, String platform, Integer versionCode);
    public List<SpecialVO> listByVersion(long start, int count, String card, String platform, Integer versionCode);
    /**
@@ -132,7 +133,7 @@
     * @param versionCode
     * @return
     */
    public List<Special> listByPlaceKeyHasLabel(long start, int count, List<String> list, Integer platform, Integer versionCode);
    public List<SpecialVO> listByPlaceKeyHasLabel(long start, int count, List<String> list, Integer platform, Integer versionCode);
    
    
    /**
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperPictureService.java
@@ -4,8 +4,10 @@
import org.springframework.web.multipart.MultipartFile;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.exception.banner.SwiperPictureException;
import com.yeshi.fanli.vo.homemodule.BannerVO;
public interface SwiperPictureService {
@@ -26,7 +28,7 @@
     * @return
     * @throws SwiperPictureException
     */
    public List<SwiperPicture> queryByBannerID(long start, int count, Long bannerId) throws SwiperPictureException;
    public List<BannerVO> queryByBannerID(long start, int count, Long bannerId) throws SwiperPictureException;
    public long countQueryByBannerID(Long bannerId) throws SwiperPictureException;
@@ -85,7 +87,7 @@
     *            唯一标识
     * @return
     */
    public List<SwiperPicture> getByBannerCard(String card);
    public List<BannerVO> getByBannerCard(String card);
    /**
     * 根据标识与版本查询
@@ -95,7 +97,7 @@
     * @param version
     * @return
     */
    public List<SwiperPicture> getByBannerCardAndVersion(String card, String platform, int version);
    public List<BannerVO> getByBannerCardAndVersion(String card, String platform, int version);
    /**
     * 保存信息
@@ -103,7 +105,7 @@
     * @param record
     * @throws SwiperPictureException
     */
    public void saveObject(MultipartFile file, SwiperPicture record, String jumpType)
    public void saveObject(MultipartFile file, SwiperPicture record, String jumpType, CommonShareInfo shareInfo)
            throws SwiperPictureException, Exception;
    /**
@@ -113,7 +115,7 @@
     * @return
     * @throws SwiperPictureException
     */
    public List<SwiperPicture> getByBannerId(Long bannerId) throws SwiperPictureException;
    public List<BannerVO> getByBannerId(Long bannerId) throws SwiperPictureException;
    
    
    /**
@@ -124,7 +126,7 @@
     * @return
     * @throws SwiperPictureException
     */
    public List<SwiperPicture> getByBannerId(Long bannerId,String platform,int version) throws SwiperPictureException;
    public List<BannerVO> getByBannerId(Long bannerId,String platform,int version) throws SwiperPictureException;
    
    /**
fanli/src/main/java/com/yeshi/fanli/service/inter/user/PreviewInfoService.java
@@ -33,7 +33,7 @@
     * @param money
     * @throws PreviewInfoException
     */
    public void saveExtractRecord(Long uid, String time, BigDecimal money) throws PreviewInfoException;
    public void saveExtractRecord(Long uid, String dayTime, BigDecimal money) throws PreviewInfoException;
    /**
     * 删除提现记录
@@ -70,4 +70,11 @@
     * @return
     */
    public String getRedisContent(Long uid, PreviewEnum previewEnum);
    /**
     * 预览提现记录
     * @param uid
     * @throws PreviewInfoException
     */
    public void previewExtractRecord(Long uid) throws PreviewInfoException;
}
fanli/src/main/java/com/yeshi/fanli/util/TimeUtil.java
@@ -141,6 +141,16 @@
        }
    }
    
    public static Date parseDotCommon2(String st) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm");
        try {
            return sdf.parse(st);
        } catch (Exception e) {
             e.printStackTrace();
            return null;
        }
    }
    public static long convertAllTimeToTemp(String st) {
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
fanli/src/main/java/com/yeshi/fanli/util/mybatishandler/CommonShareInfoEnumHandler.java
New file
@@ -0,0 +1,53 @@
package com.yeshi.fanli.util.mybatishandler;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import com.yeshi.fanli.entity.bus.homemodule.CommonShareInfo.CommonShareInfoEnum;
public class CommonShareInfoEnumHandler extends BaseTypeHandler<CommonShareInfoEnum> {
    @Override
    public CommonShareInfoEnum getNullableResult(ResultSet arg0, String arg1) throws SQLException {
        String key = arg0.getString(arg1);
        if (arg0.wasNull()) {
            return null;
        } else {
            return CommonShareInfoEnum.valueOf(key);
        }
    }
    @Override
    public CommonShareInfoEnum getNullableResult(ResultSet arg0, int arg1) throws SQLException {
        String key = arg0.getString(arg1);
        if (arg0.wasNull()) {
            return null;
        } else {
            // 根据数据库中的key值,定位SexEnum子类
            return CommonShareInfoEnum.valueOf(key);
        }
    }
    @Override
    public CommonShareInfoEnum getNullableResult(CallableStatement arg0, int arg1) throws SQLException {
        String key = arg0.getString(arg1);
        if (arg0.wasNull()) {
            return null;
        } else {
            // 根据数据库中的key值,定位SexEnum子类
            return CommonShareInfoEnum.valueOf(key);
        }
    }
    @Override
    public void setNonNullParameter(PreparedStatement arg0, int arg1, CommonShareInfoEnum arg2, JdbcType arg3)
            throws SQLException {
        arg0.setString(arg1, arg2.name());
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/homemodule/BannerVO.java
New file
@@ -0,0 +1,32 @@
package com.yeshi.fanli.vo.homemodule;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
public class BannerVO extends SwiperPicture{
    private static final long serialVersionUID = 1L;
    private Boolean needSpin;
    @Expose
    private String comment;
    public String getComment() {
        return comment;
    }
    public void setComment(String comment) {
        this.comment = comment;
    }
    public Boolean getNeedSpin() {
        return needSpin;
    }
    public void setNeedSpin(Boolean needSpin) {
        this.needSpin = needSpin;
    }
}