Commit 3eb1a5c7 by 吴博

feat: [none] changeMiniChoose

parent 8abc91bf
......@@ -5,12 +5,14 @@ import com.pcloud.appcenter.assist.dto.AssistTempletDTO;
import com.pcloud.book.applet.biz.AppletNewsBiz;
import com.pcloud.book.applet.biz.AppletUserBookcaseBiz;
import com.pcloud.book.applet.contants.AppletConstants;
import com.pcloud.book.applet.dao.AppletThirdResourcesDao;
import com.pcloud.book.applet.dao.AppletUserBookcaseDao;
import com.pcloud.book.applet.dto.AppletNewsDTO;
import com.pcloud.book.applet.dto.AppletNewsServeDTO;
import com.pcloud.book.applet.dto.AppletUserBookcaseDTO;
import com.pcloud.book.applet.dto.BookResourceExcelDTO;
import com.pcloud.book.applet.dto.UserLastBookReDTO;
import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.book.applet.entity.AppletUserBookcase;
import com.pcloud.book.applet.entity.AppletUserClickRecord;
import com.pcloud.book.applet.enums.AppletNewsServeTypeEnum;
......@@ -111,6 +113,8 @@ public class AppletUserBookcaseBizImpl implements AppletUserBookcaseBiz {
private AdviserConsr adviserConsr;
@Autowired
private BookDao bookDao;
@Autowired
private AppletThirdResourcesDao appletThirdResourcesDao;
@Override
public void addUserBook(AppletUserBookcase appletUserBookcase) {
......@@ -634,26 +638,15 @@ public class AppletUserBookcaseBizImpl implements AppletUserBookcaseBiz {
appletUserBookcaseDTO.setGuideNewsItem(rightsNowItem);
}else if (AppAndProductTypeEnum.APPLET.name().equalsIgnoreCase(appletUserBookcaseDTO.getGuideType()) && appletUserBookcaseDTO.getGuideId()!=null){
Long newsId =appletUserBookcaseDTO.getGuideId();
Map<Long, PersonalApplets> personalAppletsMap = personalAppletsDao.mapByIds(Arrays.asList(newsId));
PersonalApplets personalApplets = personalAppletsMap.get(newsId);
AppletNewsServeDTO appletNewsServe = new AppletNewsServeDTO();
if(personalApplets == null){
Long newsId =rightsSetting.getGuideId();
if (null == newsId) {
return;
}
AppletThirdResources appletThirdResources= appletThirdResourcesDao.getByResourcesId(newsId);
if(appletThirdResources == null){
return;
}
appletNewsServe.setId(newsId);
appletNewsServe.setLinkUrl(personalApplets.getAppletsUrl());
appletNewsServe.setAppletsId(personalApplets.getAppletsId());
appletNewsServe.setSloganImgUrl(personalApplets.getSloganImgUrl());
appletNewsServe.setSlogan(personalApplets.getSlogan());
appletNewsServe.setRemark(personalApplets.getRemark());
appletNewsServe.setAppletsUrl(personalApplets.getAppletsUrl());
appletNewsServe.setServeId(appletUserBookcaseDTO.getRightsSettingId());
appletNewsServe.setServeType(AppletNewsServeTypeEnum.APPLET.code);
appletUserBookcaseDTO.setGuideAppletServe(appletNewsServe);
appletUserBookcaseDTO.setGuideAppletServe(appletThirdResources);
}else if ((RightsServeTypeEnum.PRODUCT.name().equalsIgnoreCase(rightsSetting.getGuideType()) ||
RightsServeTypeEnum.APP.name().equalsIgnoreCase(rightsSetting.getGuideType())) &&
rightsSetting.getGuideId()!=null ) {
......
package com.pcloud.book.applet.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.book.rightsSetting.entity.RightsNowItem;
import com.pcloud.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
......@@ -105,7 +106,7 @@ public class AppletUserBookcaseDTO extends BaseDto {
private RightsNowItem guideNewsItem;
@ApiModelProperty("小程序对象")
private AppletNewsServeDTO guideAppletServe;
private AppletThirdResources guideAppletServe;
@ApiModelProperty("应用或作品对象")
private RightsNowItem guideAppItem;
......
......@@ -28,6 +28,9 @@ public class AppletThirdResources extends BaseEntity {
@ApiModelProperty("链接")
private String url;
@ApiModelProperty("小程序跳转链接")
private String appletsUrl;
@ApiModelProperty("备注")
private String remark;
......
......@@ -11,12 +11,14 @@ import com.pcloud.book.applet.biz.AppletNewsBiz;
import com.pcloud.book.applet.biz.AppletUserBookcaseBiz;
import com.pcloud.book.applet.biz.ServeCollectBiz;
import com.pcloud.book.applet.dao.AppletNewsDao;
import com.pcloud.book.applet.dao.AppletThirdResourcesDao;
import com.pcloud.book.applet.dao.AppletUserBookcaseDao;
import com.pcloud.book.applet.dto.AppletGroupStatementDTO;
import com.pcloud.book.applet.dto.AppletNewsDTO;
import com.pcloud.book.applet.dto.AppletNewsServeDTO;
import com.pcloud.book.applet.dto.AppletOuterBooklistDTO;
import com.pcloud.book.applet.entity.AppletNews;
import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.book.applet.entity.AppletUserBookcase;
import com.pcloud.book.applet.entity.ServeCollect;
import com.pcloud.book.applet.enums.AppletNewsServeTypeEnum;
......@@ -227,6 +229,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
private ServeCollectBiz serveCollectBiz;
@Autowired
private RightsNowPopupDao rightsNowPopupDao;
@Autowired
private AppletThirdResourcesDao appletThirdResourcesDao;
@Override
@ParamLog("新增权益设置")
......@@ -816,26 +820,14 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}else if (AppAndProductTypeEnum.APPLET.name().equalsIgnoreCase(rightsSetting.getGuideType()) && rightsSetting.getGuideId()!=null){
Long newsId =rightsSetting.getGuideId();
Map<Long, PersonalApplets> personalAppletsMap = personalAppletsDao.mapByIds(Arrays.asList(newsId));
PersonalApplets personalApplets = personalAppletsMap.get(newsId);
AppletNewsServeDTO appletNewsServe = new AppletNewsServeDTO();
if(personalApplets == null){
if (null == newsId) {
return;
}
AppletThirdResources appletThirdResources= appletThirdResourcesDao.getByResourcesId(newsId);
if(appletThirdResources == null){
return;
}
appletNewsServe.setId(newsId);
appletNewsServe.setLinkUrl(personalApplets.getAppletsUrl());
appletNewsServe.setAppletsId(personalApplets.getAppletsId());
appletNewsServe.setSloganImgUrl(personalApplets.getSloganImgUrl());
appletNewsServe.setSlogan(personalApplets.getSlogan());
appletNewsServe.setServeId(1l);
appletNewsServe.setRemark(personalApplets.getRemark());
appletNewsServe.setAppletsUrl(personalApplets.getAppletsUrl());
appletNewsServe.setServeId(rightsSetting.getId());
appletNewsServe.setServeType(AppletNewsServeTypeEnum.APPLET.code);
rightsSetting.setGuideAppletServe(appletNewsServe);
rightsSetting.setGuideAppletServe(appletThirdResources);
} else if ((RightsServeTypeEnum.PRODUCT.name().equalsIgnoreCase(rightsSetting.getGuideType()) ||
RightsServeTypeEnum.APP.name().equalsIgnoreCase(rightsSetting.getGuideType())) &&
rightsSetting.getGuideId()!=null ) {
......
......@@ -2,6 +2,7 @@ package com.pcloud.book.rightsSetting.entity;
import com.pcloud.book.applet.dto.AppletNewsServeDTO;
import com.pcloud.book.applet.entity.AppletNewsServe;
import com.pcloud.book.applet.entity.AppletThirdResources;
import com.pcloud.common.entity.BaseEntity;
import com.pcloud.common.page.PageBeanNew;
import io.swagger.annotations.ApiModelProperty;
......@@ -142,7 +143,7 @@ public class RightsSetting extends BaseTempletClassify {
private RightsNowItem guideNewsItem;
@ApiModelProperty("小程序对象")
private AppletNewsServeDTO guideAppletServe;
private AppletThirdResources guideAppletServe;
@ApiModelProperty("版本标签")
private Long verLabelId;
......
......@@ -118,7 +118,8 @@
a.top_img_url topImgUrl,
a.float_img_url floatImgUrl,
a.button_img_url buttonImgUrl,
a.show_type showType
a.show_type showType,
a.resource_url AS appletsUrl
from applet_third_resources a
left join biz_material b on a.id = b.biz_id and b.biz_type = 1
where a.id=#{id}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment