master
rong.liu 5 months ago
parent 9b29319c5d
commit 52af918cda
  1. 4
      src/main/java/com/huoran/iasf/controller/SysProductDetailsController.java
  2. 40
      src/main/java/com/huoran/iasf/entity/ProductDetails.java
  3. 7
      src/main/java/com/huoran/iasf/mapper/xml/SysProductDetailsMapper.xml
  4. 7
      src/main/java/com/huoran/iasf/service/impl/SysProductDetailsServiceImpl.java
  5. 19
      src/main/java/com/huoran/iasf/vo/resp/PageCourseProductRespVO.java

@ -144,12 +144,12 @@ public class SysProductDetailsController {
return R.success(productDetails); return R.success(productDetails);
} }
@PostMapping("/articlePreview") /* @PostMapping("/articlePreview")
@ApiOperation(value = "增加文章浏览量(点击一次算一次)", response = ProductDetails.class) @ApiOperation(value = "增加文章浏览量(点击一次算一次)", response = ProductDetails.class)
public R articlePreview(@ApiParam(name = "contentId", value = "文章id", required = true) @RequestParam Integer contentId) { public R articlePreview(@ApiParam(name = "contentId", value = "文章id", required = true) @RequestParam Integer contentId) {
return R.success(service.statisticsOfPageViews(contentId)); return R.success(service.statisticsOfPageViews(contentId));
} }
*/
@PostMapping("/articleEnableOrDisable") @PostMapping("/articleEnableOrDisable")
@ApiOperation(value = "文章启用禁用", response = ProductDetails.class) @ApiOperation(value = "文章启用禁用", response = ProductDetails.class)

@ -113,6 +113,42 @@ public class ProductDetails implements Serializable {
@ApiModelProperty(value = "发布时间") @ApiModelProperty(value = "发布时间")
private String releaseTime; private String releaseTime;
@ApiModelProperty(value = "链接类型")
private Integer connectionType;
@ApiModelProperty(value = "链接地址")
private String linkAddress;
@ApiModelProperty(value = "站点选择(连接类型为其它站点连接时储存)")
private Integer siteSelection;
@ApiModelProperty(value = "是否在新窗口打开(0:否 1:是)")
private Integer isOpen;
@ApiModelProperty(value = "学科专业类") @ApiModelProperty(value = "学科专业类")
@TableField(exist = false) @TableField(exist = false)
@ -130,5 +166,9 @@ public class ProductDetails implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String professionalName; private String professionalName;
@ApiModelProperty(value = "栏目名称")
@TableField(exist = false)
private String columnName;
} }

@ -169,6 +169,13 @@
d.is_top, d.is_top,
d.introduction, d.introduction,
d.detailed_description, d.detailed_description,
d.connection_type,
d.link_address,
d.is_open,
d.site_selection,
d.article_template,
d.template_status,
c.NAME AS category c.NAME AS category
FROM FROM
sys_product_details d sys_product_details d

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huoran.iasf.common.utils.R; import com.huoran.iasf.common.utils.R;
import com.huoran.iasf.entity.ProductDetails; import com.huoran.iasf.entity.ProductDetails;
import com.huoran.iasf.entity.SysColumn;
import com.huoran.iasf.mapper.SysColumnMapper; import com.huoran.iasf.mapper.SysColumnMapper;
import com.huoran.iasf.mapper.SysProductDetailsMapper; import com.huoran.iasf.mapper.SysProductDetailsMapper;
import com.huoran.iasf.service.SysProductDetailsService; import com.huoran.iasf.service.SysProductDetailsService;
@ -105,10 +106,12 @@ public class SysProductDetailsServiceImpl extends ServiceImpl<SysProductDetailsM
//预览增加次数 //预览增加次数
statisticsOfPageViews(id); statisticsOfPageViews(id);
DisciplineAndSpecialtyVO disciplineAndSpecialtyVO = baseMapper.queryDisciplineAndSpecialty(id); DisciplineAndSpecialtyVO disciplineAndSpecialtyVO = baseMapper.queryDisciplineAndSpecialty(id);
ProductDetails productDetails = baseMapper.foregroundPreview(id); ProductDetails productDetails = baseMapper.foregroundPreview(id);
//查看栏目名称
SysColumn column = columnMapper.selectById(productDetails.getColumnId());
productDetails.setColumnName(column.getColumnName());
if (ObjectUtil.isNotEmpty(productDetails)) { if (ObjectUtil.isNotEmpty(productDetails)) {
if (ObjectUtil.isNotEmpty(disciplineAndSpecialtyVO)) { if (ObjectUtil.isNotEmpty(disciplineAndSpecialtyVO)) {
productDetails.setDisciplineName(disciplineAndSpecialtyVO.getDisciplineName()); productDetails.setDisciplineName(disciplineAndSpecialtyVO.getDisciplineName());

@ -56,4 +56,23 @@ public class PageCourseProductRespVO {
@ApiModelProperty(value = "是否置顶(0否,1是)") @ApiModelProperty(value = "是否置顶(0否,1是)")
private Integer isTop; private Integer isTop;
@ApiModelProperty(value = "链接类型")
private Integer connectionType;
@ApiModelProperty(value = "链接地址")
private String linkAddress;
@ApiModelProperty(value = "站点选择(连接类型为其它站点连接时储存)")
private Integer siteSelection;
@ApiModelProperty(value = "是否在新窗口打开(0:否 1:是)")
private Integer isOpen;
@ApiModelProperty(value = "文章模板(前端自定义)")
private Integer articleTemplate;
@ApiModelProperty(value = "模板状态(0禁用;1启用)")
private Integer templateStatus;
} }
Loading…
Cancel
Save