| | |
| | | package com.ks.daylucky.controller.api.client; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.ks.daylucky.pojo.DO.ActivityScanRecord; |
| | | import com.ks.daylucky.pojo.DO.AppConfig; |
| | | import com.ks.daylucky.pojo.DTO.SimpleShareInfo; |
| | | import com.ks.daylucky.pojo.VO.AlipayXCXShareInfoVO; |
| | | import com.ks.daylucky.pojo.DTO.ConfigKeyEnum; |
| | | import com.ks.daylucky.pojo.VO.AcceptData; |
| | |
| | | import org.yeshi.utils.JsonUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | AppConfig appConfig = appConfigService.getConfigCache(acceptData.getApp().getId(), ConfigKeyEnum.activityShareInfo, acceptData.getVersion()); |
| | | SimpleShareInfo info = new Gson().fromJson(appConfig.getValue(), SimpleShareInfo.class); |
| | | |
| | | AlipayXCXShareInfoVO shareInfoDTO = new AlipayXCXShareInfoVO(); |
| | | shareInfoDTO.setPath(String.format("/pages/activity-detail/activity-detail?id=%s&joinInfo=%s", activityId, ActivityUtil.getShareJoinInfo(acceptData.getUid(), activityId))); |
| | | shareInfoDTO.setTitle("测试标题"); |
| | | shareInfoDTO.setDesc("测试简介"); |
| | | shareInfoDTO.setTitle(info.getTitle()); |
| | | shareInfoDTO.setDesc(info.getDesc()); |
| | | shareInfoDTO.setBgImgUrl(activityShareImage); |
| | | vo.setShareInfo(shareInfoDTO); |
| | | |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | shareInfoDTO = new AlipayXCXShareInfoVO(); |
| | | shareInfoDTO.setPath(String.format("/pages/activity-detail/activity-detail?id=%s&joinInfo=%s", activityId, ActivityUtil.getShareJoinInfo(acceptData.getUid(), activityId))); |
| | | shareInfoDTO.setTitle("测试标题"); |
| | | shareInfoDTO.setDesc("测试简介"); |
| | | shareInfoDTO.setPath(String.format("/pages/activity-detail/activity-detail?id=%s&joinInfo=%s", activityId, URLEncoder.encode(ActivityUtil.getShareJoinInfo(acceptData.getUid(), activityId)))); |
| | | shareInfoDTO.setTitle(info.getTitle()); |
| | | shareInfoDTO.setDesc(info.getDesc()); |
| | | shareInfoDTO.setBgImgUrl(assistShareImage); |
| | | vo.setAssistShareInfo(shareInfoDTO); |
| | | } |
| | |
| | | } |
| | | } |
| | | List<ActivityDetailInfoDTO> dtoList = activityService.getActivityDetail(activityIds, acceptData.getApp().getId(), acceptData.getUid(), false); |
| | | |
| | | // //TODO 测试 |
| | | // for (int i = 0; i < 20; i++) { |
| | | // dtoList.add(dtoList.get(0)); |
| | | // } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("data", JsonUtil.getSimpleGson().toJson(ActivityListItemInfoVOFactory.create(dtoList))); |