private String typeId; | private String typeId; | ||||
@ApiModelProperty(value = "标题") | @ApiModelProperty(value = "标题") | ||||
@NotBlank(message = "搜索内容不能为空!") | |||||
// @NotBlank(message = "搜索内容不能为空!") | |||||
private String title; | private String title; | ||||
} | } |
@ApiModelProperty(value = "栏目名称") | @ApiModelProperty(value = "栏目名称") | ||||
private String infoName; | private String infoName; | ||||
@ApiModelProperty(value = "图片地址") | |||||
private String imageUrl; | |||||
@ApiModelProperty(value = "终审时间") | @ApiModelProperty(value = "终审时间") | ||||
private Date finalAuditTime; | private Date finalAuditTime; | ||||
@ApiModelProperty(value = "置顶时间") | @ApiModelProperty(value = "置顶时间") | ||||
private Date istopTime; | private Date istopTime; | ||||
@ApiModelProperty(value = "新闻内容类型") | |||||
private Integer contentType; | |||||
@ApiModelProperty(value = "超链接") | |||||
private String hyperlink; | |||||
} | } |
@ApiModelProperty(value = "置顶时间") | @ApiModelProperty(value = "置顶时间") | ||||
private Date istopTime; | private Date istopTime; | ||||
@ApiModelProperty(value = "栏目类型id") | |||||
private String typeId; | |||||
/** | /** | ||||
* 信息详情 | * 信息详情 | ||||
*/ | */ |
@ApiModelProperty(value = "超链接") | @ApiModelProperty(value = "超链接") | ||||
private String hyperlink; | private String hyperlink; | ||||
@ApiModelProperty(value = "新闻内容类型") | |||||
private Integer contentType; | |||||
@ApiModelProperty(value = "图片地址") | |||||
private String imageUrl; | |||||
} | } |
@JsonFormat(shape = JsonFormat.Shape.OBJECT) | @JsonFormat(shape = JsonFormat.Shape.OBJECT) | ||||
public enum ServiceFileDirEnum { | public enum ServiceFileDirEnum { | ||||
//0 banner 1 动态新闻 2活动 3专项资金 4政策导航 5 其他 | //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 Integer code; | ||||
private String name; | private String name; |
if (null == infoContent) { | if (null == infoContent) { | ||||
return ApiResult.error(StatusCode.FORM_SUBMIT_UPDATE_VERIFY); | return ApiResult.error(StatusCode.FORM_SUBMIT_UPDATE_VERIFY); | ||||
} | } | ||||
InfoType infoType = infoTypeService.getById(infoContent.getInfoTypeId()); | |||||
InfoContentWebAllQueryVo infoContentWebAllQueryVo = new InfoContentWebAllQueryVo(); | InfoContentWebAllQueryVo infoContentWebAllQueryVo = new InfoContentWebAllQueryVo(); | ||||
infoContentWebAllQueryVo.setTypeId(infoType.getTypeId()); | |||||
BeanUtils.copyProperties(infoContent, infoContentWebAllQueryVo); | BeanUtils.copyProperties(infoContent, infoContentWebAllQueryVo); | ||||
if (StringUtil.isNotEmpty(infoContent.getForeignId())) { | if (StringUtil.isNotEmpty(infoContent.getForeignId())) { | ||||
InfoDetail infoDetail = infoDetailService.getOne(new QueryWrapper<InfoDetail>().eq("foreign_id", infoContent.getForeignId())); | InfoDetail infoDetail = infoDetailService.getOne(new QueryWrapper<InfoDetail>().eq("foreign_id", infoContent.getForeignId())); |
public static String getFileUploadDir(Integer type) { | public static String getFileUploadDir(Integer type) { | ||||
String uploadDir = ""; | String uploadDir = ""; | ||||
switch (type) { | switch (type) { | ||||
case 1: | |||||
case 101: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_BANNER.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_BANNER.getName(); | ||||
break; | break; | ||||
case 2: | |||||
case 102: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_NOTICE.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_NOTICE.getName(); | ||||
break; | break; | ||||
case 3: | |||||
case 103: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_DYNAMIC.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_DYNAMIC.getName(); | ||||
break; | break; | ||||
case 7: | |||||
case 104: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_DIVISION.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_DIVISION.getName(); | ||||
break; | break; | ||||
case 8: | |||||
case 105: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_PARK.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_PARK.getName(); | ||||
break; | break; | ||||
case 9: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_ACTIVITY.getName(); | |||||
case 106: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_FINANCIAL.getName(); | |||||
break; | break; | ||||
case 13: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_EXPRESS.getName(); | |||||
case 107: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_PUBLIC_ACTIVITY.getName(); | |||||
break; | break; | ||||
case 14: | |||||
case 108: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_POLICY.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_POLICY.getName(); | ||||
break; | break; | ||||
case 19: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_STONE.getName(); | |||||
break; | |||||
case 22: | |||||
case 110: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_SUPPORT.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_SUPPORT.getName(); | ||||
break; | break; | ||||
case 5: | |||||
case 999: | |||||
uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_OTHER.getName(); | uploadDir = ServiceFileDirEnum.SERVICE_FILE_DIR_OTHER.getName(); | ||||
break; | break; | ||||
default: //可选 | default: //可选 |
<select id="getHomePageInfo" | <select id="getHomePageInfo" | ||||
resultType="com.xdf.creative.base.vo.creative.InfoContentHomePageQueryVo" | resultType="com.xdf.creative.base.vo.creative.InfoContentHomePageQueryVo" | ||||
parameterType="com.xdf.creative.base.params.creative.InfoContentHomePageQueryParam"> | 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!=''"> | <if test="param.typeId !=null and param.typeId!=''"> | ||||
and b.type_id like CONCAT('',#{param.typeId},'%') | and b.type_id like CONCAT('',#{param.typeId},'%') | ||||
</if> | </if> | ||||
<select id="getSearchWebInfo" | <select id="getSearchWebInfo" | ||||
resultType="com.xdf.creative.base.vo.creative.InfoContentWebSearchQueryVo" | resultType="com.xdf.creative.base.vo.creative.InfoContentWebSearchQueryVo" | ||||
parameterType="com.xdf.creative.base.params.creative.InfoContentWebSearchQueryParam"> | 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 | 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 | a.deleted=0 and a.online_type=1 and a.state = 3 | ||||
<if test="param.typeId !=null and param.typeId!=''"> | <if test="param.typeId !=null and param.typeId!=''"> |