|
|
|
@ -3,6 +3,8 @@ package com.huoran.iasf.controller; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.huoran.iasf.common.utils.Constant; |
|
|
|
|
import com.huoran.iasf.entity.SysTemplateStyle; |
|
|
|
|
import com.huoran.iasf.entity.SysTemplateStyleConfiguration; |
|
|
|
|
import com.huoran.iasf.service.SysTemplateStyleConfigurationService; |
|
|
|
|
import com.huoran.iasf.service.SysTemplateStyleService; |
|
|
|
|
import io.swagger.annotations.*; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
@ -41,7 +43,8 @@ public class SysTemplateController { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
public SysTemplateStyleService styleService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
public SysTemplateStyleConfigurationService templateStyleConfigurationService; |
|
|
|
|
|
|
|
|
|
@PostMapping("/listOfColumnTemplates") |
|
|
|
|
@ApiOperation(value = "获取文章模板列表、详情样式", response = SysTemplate.class) |
|
|
|
@ -54,7 +57,7 @@ public class SysTemplateController { |
|
|
|
|
@PostMapping("/longPageListStyle") |
|
|
|
|
@ApiOperation(value = "长页列表样式", response = SysTemplate.class) |
|
|
|
|
public R longPageListStyle() { |
|
|
|
|
List<SysTemplateStyle> list = styleService.list(new QueryWrapper<SysTemplateStyle>().eq("template_id",9)); |
|
|
|
|
List<SysTemplateStyle> list = styleService.list(new QueryWrapper<SysTemplateStyle>().eq("is_long_page", 1)); |
|
|
|
|
return R.success(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -62,16 +65,19 @@ public class SysTemplateController { |
|
|
|
|
@ApiOperation(value = "根据模板id获取样式", response = SysTemplateStyle.class) |
|
|
|
|
public R theTemplateIdGetsTheStyle(@ApiParam(name = "templateId", value = "模板id", required = true) @RequestParam Integer templateId) { |
|
|
|
|
|
|
|
|
|
QueryWrapper<SysTemplateStyle> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("template_id",templateId); |
|
|
|
|
/*QueryWrapper<SysTemplateStyle> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("type", Constant.LIST_TEMPLATE_TYPES); |
|
|
|
|
queryWrapper.eq("is_long_page", 0); |
|
|
|
|
List<SysTemplateStyle> listingTemplateTypes = styleService.list(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<SysTemplateStyle> queryWrapper1 = new QueryWrapper<>(); |
|
|
|
|
queryWrapper1.eq("template_id",templateId); |
|
|
|
|
queryWrapper1.eq("type", Constant.DETAILS_TEMPLATE_TYPE); |
|
|
|
|
List<SysTemplateStyle> detailsTypeOfTheTemplate = styleService.list(queryWrapper1); |
|
|
|
|
List<SysTemplateStyle> detailsTypeOfTheTemplate = styleService.list(queryWrapper1);*/ |
|
|
|
|
|
|
|
|
|
List<SysTemplateStyle> listingTemplateTypes = templateStyleConfigurationService.getsTheStyleUnderTheTemplate(templateId, 0); |
|
|
|
|
List<SysTemplateStyle> detailsTypeOfTheTemplate = templateStyleConfigurationService.getsTheStyleUnderTheTemplate(templateId, 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
@ -81,9 +87,6 @@ public class SysTemplateController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/fullDetailsTemplateStyle") |
|
|
|
|
@ApiOperation(value = "全部详情模板样式", response = SysTemplateStyle.class) |
|
|
|
|
public R fullDetailsTemplateStyle() { |
|
|
|
@ -93,5 +96,13 @@ public class SysTemplateController { |
|
|
|
|
List<SysTemplateStyle> listingTemplateTypes = styleService.list(queryWrapper); |
|
|
|
|
return R.success(listingTemplateTypes); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/individualTemplateDetailsStyle") |
|
|
|
|
@ApiOperation(value = "独立模板详情样式", response = SysTemplate.class) |
|
|
|
|
public R individualTemplateDetailsStyle() { |
|
|
|
|
List<SysTemplateStyle> list = styleService.list(new QueryWrapper<SysTemplateStyle>().eq("type", 1).eq("is_long_page", 0)); |
|
|
|
|
return R.success(list); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|