parent
50c8cc7351
commit
dbc5e46f7e
5 changed files with 118 additions and 0 deletions
@ -0,0 +1,37 @@ |
||||
package com.huoran.iasf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import java.io.Serializable; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* <p> |
||||
* 栏目样式、列表样式、详情样式配置表 |
||||
* </p> |
||||
* |
||||
* @author cheney |
||||
* @since 2022-11-24 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="SysTemplateStyleConfiguration对象", description="栏目样式、列表样式、详情样式配置表") |
||||
public class SysTemplateStyleConfiguration implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "主键") |
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
@ApiModelProperty(value = "栏目id") |
||||
private Integer templateId; |
||||
|
||||
@ApiModelProperty(value = "样式id") |
||||
private Integer styleId; |
||||
|
||||
|
||||
} |
@ -0,0 +1,20 @@ |
||||
package com.huoran.iasf.mapper; |
||||
|
||||
import com.huoran.iasf.entity.SysTemplateStyle; |
||||
import com.huoran.iasf.entity.SysTemplateStyleConfiguration; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 栏目样式、列表样式、详情样式配置表 Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author cheney |
||||
* @since 2022-11-24 |
||||
*/ |
||||
public interface SysTemplateStyleConfigurationMapper extends BaseMapper<SysTemplateStyleConfiguration> { |
||||
List<SysTemplateStyle> getTheStyleUnderTheTemplate(@Param("templateId") Integer templateId,@Param("type") Integer type); |
||||
} |
@ -0,0 +1,13 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.huoran.iasf.mapper.SysTemplateStyleConfigurationMapper"> |
||||
|
||||
<select id="getTheStyleUnderTheTemplate" resultType="com.huoran.iasf.entity.SysTemplateStyle"> |
||||
SELECT s.* |
||||
FROM sys_template_style_configuration c |
||||
inner join sys_template t on c.template_id = t.id |
||||
inner join sys_template_style s on s.id = c.style_id |
||||
WHERE c.template_id = #{templateId} |
||||
and s.type = #{type} |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,19 @@ |
||||
package com.huoran.iasf.service; |
||||
|
||||
import com.huoran.iasf.entity.SysTemplateStyle; |
||||
import com.huoran.iasf.entity.SysTemplateStyleConfiguration; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 栏目样式、列表样式、详情样式配置表 服务类 |
||||
* </p> |
||||
* |
||||
* @author cheney |
||||
* @since 2022-11-24 |
||||
*/ |
||||
public interface SysTemplateStyleConfigurationService extends IService<SysTemplateStyleConfiguration> { |
||||
List<SysTemplateStyle> getsTheStyleUnderTheTemplate(Integer templateId,Integer type); |
||||
} |
@ -0,0 +1,29 @@ |
||||
package com.huoran.iasf.service.impl; |
||||
|
||||
import com.huoran.iasf.entity.SysTemplateStyle; |
||||
import com.huoran.iasf.entity.SysTemplateStyleConfiguration; |
||||
import com.huoran.iasf.mapper.SysTemplateStyleConfigurationMapper; |
||||
import com.huoran.iasf.service.SysTemplateStyleConfigurationService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 栏目样式、列表样式、详情样式配置表 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author cheney |
||||
* @since 2022-11-24 |
||||
*/ |
||||
@Service |
||||
public class SysTemplateStyleConfigurationServiceImpl extends ServiceImpl<SysTemplateStyleConfigurationMapper, SysTemplateStyleConfiguration> implements SysTemplateStyleConfigurationService { |
||||
|
||||
|
||||
|
||||
@Override |
||||
public List<SysTemplateStyle> getsTheStyleUnderTheTemplate(Integer templateId, Integer type) { |
||||
return baseMapper.getTheStyleUnderTheTemplate(templateId, type); |
||||
} |
||||
} |
Loading…
Reference in new issue