| | |
| | | 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;
|
| | |
| | | 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;
|
| | |
| | |
|
| | | @Resource
|
| | | private AdActivityVersionControlService adActivityVersionControlService;
|
| | | |
| | | @Resource
|
| | | private CommonShareInfoService commonShareInfoService;
|
| | | |
| | |
|
| | | /**
|
| | | * 新增
|
| | |
| | | }
|
| | |
|
| | | 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("暂无数据"));
|
| | |
| | |
|
| | | // 跳转链接
|
| | | 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 {
|
| | |
| | | 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());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * @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("保存成功"));
|