@@ -29,7 +29,7 @@ public class InfoContentWebSearchQueryParam extends QueryParam { | |||
private String typeId; | |||
@ApiModelProperty(value = "标题") | |||
@NotBlank(message = "搜索内容不能为空!") | |||
// @NotBlank(message = "搜索内容不能为空!") | |||
private String title; | |||
} |
@@ -34,6 +34,10 @@ public class InfoContentHomePageQueryVo implements Serializable { | |||
@ApiModelProperty(value = "栏目名称") | |||
private String infoName; | |||
@ApiModelProperty(value = "图片地址") | |||
private String imageUrl; | |||
@ApiModelProperty(value = "终审时间") | |||
private Date finalAuditTime; | |||
@@ -46,4 +50,12 @@ public class InfoContentHomePageQueryVo implements Serializable { | |||
@ApiModelProperty(value = "置顶时间") | |||
private Date istopTime; | |||
@ApiModelProperty(value = "新闻内容类型") | |||
private Integer contentType; | |||
@ApiModelProperty(value = "超链接") | |||
private String hyperlink; | |||
} |
@@ -70,6 +70,10 @@ public class InfoContentWebAllQueryVo extends QueryParam { | |||
@ApiModelProperty(value = "置顶时间") | |||
private Date istopTime; | |||
@ApiModelProperty(value = "栏目类型id") | |||
private String typeId; | |||
/** | |||
* 信息详情 | |||
*/ |
@@ -52,4 +52,13 @@ public class InfoContentWebSearchQueryVo implements Serializable { | |||
@ApiModelProperty(value = "超链接") | |||
private String hyperlink; | |||
@ApiModelProperty(value = "新闻内容类型") | |||
private Integer contentType; | |||
@ApiModelProperty(value = "图片地址") | |||
private String imageUrl; | |||
} |
@@ -9,27 +9,31 @@ import lombok.Getter; | |||
@JsonFormat(shape = JsonFormat.Shape.OBJECT) | |||
public enum ServiceFileDirEnum { | |||
//0 banner 1 动态新闻 2活动 3专项资金 4政策导航 5 其他 | |||
SERVICE_FILE_DIR_PUBLIC_BANNER(1, "banner"), | |||
SERVICE_FILE_DIR_PUBLIC_BANNER(101, "banner"), | |||
//信息发布文件 | |||
SERVICE_FILE_DIR_PUBLIC_NOTICE(2, "notice"), | |||
SERVICE_FILE_DIR_PUBLIC_NOTICE(102, "notice"), | |||
//信息发布文件 | |||
SERVICE_FILE_DIR_PUBLIC_DYNAMIC(3, "dynamic"), | |||
SERVICE_FILE_DIR_PUBLIC_DYNAMIC(103, "dynamic"), | |||
//区划信息 | |||
SERVICE_FILE_DIR_PUBLIC_DIVISION(7, "division"), | |||
SERVICE_FILE_DIR_PUBLIC_DIVISION(104, "division"), | |||
//园区信息 | |||
SERVICE_FILE_DIR_PUBLIC_PARK(8, "park"), | |||
//活动发布图片 | |||
SERVICE_FILE_DIR_PUBLIC_ACTIVITY(9, "activity"), | |||
//文化速递 | |||
SERVICE_FILE_DIR_PUBLIC_EXPRESS(13, "express"), | |||
SERVICE_FILE_DIR_PUBLIC_PARK(105, "park"), | |||
//文创金融 | |||
SERVICE_FILE_DIR_PUBLIC_FINANCIAL(106, "financial"), | |||
//品牌活动 | |||
SERVICE_FILE_DIR_PUBLIC_ACTIVITY(107, "activity"), | |||
//政策导航 | |||
SERVICE_FILE_DIR_POLICY(14, "policy "), | |||
//他山之石 | |||
SERVICE_FILE_DIR_STONE(19, "stone"), | |||
SERVICE_FILE_DIR_POLICY(108, "policy "), | |||
//专项资金 | |||
SERVICE_FILE_DIR_SUPPORT(22, "support"), | |||
SERVICE_FILE_DIR_SUPPORT(110, "support"), | |||
//其他 | |||
SERVICE_FILE_DIR_OTHER(5, "other"); | |||
SERVICE_FILE_DIR_OTHER(999, "other"); | |||
private Integer code; | |||
private String name; |
@@ -182,7 +182,11 @@ public class InfoContentServiceImpl extends BaseServiceImpl<InfoContentMapper, I | |||
if (null == infoContent) { | |||
return ApiResult.error(StatusCode.FORM_SUBMIT_UPDATE_VERIFY); | |||
} | |||
InfoType infoType = infoTypeService.getById(infoContent.getInfoTypeId()); | |||
InfoContentWebAllQueryVo infoContentWebAllQueryVo = new InfoContentWebAllQueryVo(); | |||
infoContentWebAllQueryVo.setTypeId(infoType.getTypeId()); | |||
BeanUtils.copyProperties(infoContent, infoContentWebAllQueryVo); | |||
if (StringUtil.isNotEmpty(infoContent.getForeignId())) { | |||
InfoDetail infoDetail = infoDetailService.getOne(new QueryWrapper<InfoDetail>().eq("foreign_id", infoContent.getForeignId())); |
@@ -28,37 +28,34 @@ public class ServerUploadDirUtil { | |||
public static String getFileUploadDir(Integer type) { | |||
String uploadDir = ""; | |||
switch (type) { | |||
case 1: | |||
case 101: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_BANNER.getName(); | |||
break; | |||
case 2: | |||
case 102: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_NOTICE.getName(); | |||
break; | |||
case 3: | |||
case 103: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_DYNAMIC.getName(); | |||
break; | |||
case 7: | |||
case 104: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_DIVISION.getName(); | |||
break; | |||
case 8: | |||
case 105: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_PARK.getName(); | |||
break; | |||
case 9: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_ACTIVITY.getName(); | |||
case 106: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_FINANCIAL.getName(); | |||
break; | |||
case 13: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_EXPRESS.getName(); | |||
case 107: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_ACTIVITY.getName(); | |||
break; | |||
case 14: | |||
case 108: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_POLICY.getName(); | |||
break; | |||
case 19: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_STONE.getName(); | |||
break; | |||
case 22: | |||
case 110: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_SUPPORT.getName(); | |||
break; | |||
case 5: | |||
case 999: | |||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_OTHER.getName(); | |||
break; | |||
default: //可选 |
@@ -54,8 +54,10 @@ | |||
<select id="getHomePageInfo" | |||
resultType="com.xdf.creative.base.vo.creative.InfoContentHomePageQueryVo" | |||
parameterType="com.xdf.creative.base.params.creative.InfoContentHomePageQueryParam"> | |||
select a.id,a.title,a.final_audit_time,a.sort,a.istop,a.istop_time,b.type_id,b.info_name from info_content a | |||
left join info_type b on a.info_type_id =b.id where a.deleted=0 and a.online_type=1 and a.state = 3 | |||
select a.id,a.title,a.final_audit_time,a.sort,a.image_url,a.istop,a.istop_time,b.type_id,b.info_name,c.hyperlink,a.content_type from info_content a | |||
left join info_type b on a.info_type_id =b.id | |||
left join info_detail c on a.foreign_id = c.foreign_id | |||
where a.deleted=0 and a.online_type=1 and a.state = 3 | |||
<if test="param.typeId !=null and param.typeId!=''"> | |||
and b.type_id like CONCAT('',#{param.typeId},'%') | |||
</if> | |||
@@ -67,7 +69,7 @@ | |||
<select id="getSearchWebInfo" | |||
resultType="com.xdf.creative.base.vo.creative.InfoContentWebSearchQueryVo" | |||
parameterType="com.xdf.creative.base.params.creative.InfoContentWebSearchQueryParam"> | |||
select a.id,a.title,a.final_audit_time,a.sort,a.istop,a.istop_time,b.type_id,b.info_name,c.digest,c.hyperlink | |||
select a.id,a.title,a.final_audit_time,a.image_url,a.sort,a.istop,a.istop_time,b.type_id,b.info_name,c.digest,c.hyperlink,a.content_type | |||
from info_content a left join info_detail c on a.foreign_id = c.foreign_id left join info_type b on a.info_type_id =b.id where | |||
a.deleted=0 and a.online_type=1 and a.state = 3 | |||
<if test="param.typeId !=null and param.typeId!=''"> |