增加新模块
This commit is contained in:
parent
c178a662fe
commit
f3550bd4b8
7
pom.xml
7
pom.xml
|
|
@ -221,6 +221,13 @@
|
|||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 内容中心-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-content</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@
|
|||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 内容中心-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-content</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,235 @@
|
|||
package com.ruoyi.content.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文章广告对象 cms_article_ad_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-03-23
|
||||
*/
|
||||
public class CmsArticleAdInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long adId;
|
||||
|
||||
/** 公司id */
|
||||
@Excel(name = "公司id")
|
||||
private String companyId;
|
||||
|
||||
/** 广告类型 */
|
||||
@Excel(name = "广告类型")
|
||||
private String adType;
|
||||
|
||||
/** 广告类型名 */
|
||||
@Excel(name = "广告类型名")
|
||||
private String adTypeName;
|
||||
|
||||
/** 广告跳转地址 */
|
||||
@Excel(name = "广告跳转地址")
|
||||
private String adLinkUrl;
|
||||
|
||||
/** 广告标题 */
|
||||
@Excel(name = "广告标题")
|
||||
private String adTitle;
|
||||
|
||||
/** 广告名称 */
|
||||
@Excel(name = "广告名称")
|
||||
private String adName;
|
||||
|
||||
/** 广告简介 */
|
||||
@Excel(name = "广告简介")
|
||||
private String adSummary;
|
||||
|
||||
/** 广告背景颜色 */
|
||||
@Excel(name = "广告背景颜色")
|
||||
private String adColorType;
|
||||
|
||||
/** 广告图片地址 */
|
||||
@Excel(name = "广告图片地址")
|
||||
private String adImageUrl;
|
||||
|
||||
/** 广告状态 0:展示 1:不可用 */
|
||||
@Excel(name = "广告状态 0:展示 1:不可用")
|
||||
private String adState;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String createDate;
|
||||
|
||||
/** 广告创建者 */
|
||||
@Excel(name = "广告创建者")
|
||||
private String createUser;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String updateUser;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private String updateDate;
|
||||
|
||||
public void setAdId(Long adId)
|
||||
{
|
||||
this.adId = adId;
|
||||
}
|
||||
|
||||
public Long getAdId()
|
||||
{
|
||||
return adId;
|
||||
}
|
||||
public void setCompanyId(String companyId)
|
||||
{
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCompanyId()
|
||||
{
|
||||
return companyId;
|
||||
}
|
||||
public void setAdType(String adType)
|
||||
{
|
||||
this.adType = adType;
|
||||
}
|
||||
|
||||
public String getAdType()
|
||||
{
|
||||
return adType;
|
||||
}
|
||||
public void setAdTypeName(String adTypeName)
|
||||
{
|
||||
this.adTypeName = adTypeName;
|
||||
}
|
||||
|
||||
public String getAdTypeName()
|
||||
{
|
||||
return adTypeName;
|
||||
}
|
||||
public void setAdLinkUrl(String adLinkUrl)
|
||||
{
|
||||
this.adLinkUrl = adLinkUrl;
|
||||
}
|
||||
|
||||
public String getAdLinkUrl()
|
||||
{
|
||||
return adLinkUrl;
|
||||
}
|
||||
public void setAdTitle(String adTitle)
|
||||
{
|
||||
this.adTitle = adTitle;
|
||||
}
|
||||
|
||||
public String getAdTitle()
|
||||
{
|
||||
return adTitle;
|
||||
}
|
||||
public void setAdName(String adName)
|
||||
{
|
||||
this.adName = adName;
|
||||
}
|
||||
|
||||
public String getAdName()
|
||||
{
|
||||
return adName;
|
||||
}
|
||||
public void setAdSummary(String adSummary)
|
||||
{
|
||||
this.adSummary = adSummary;
|
||||
}
|
||||
|
||||
public String getAdSummary()
|
||||
{
|
||||
return adSummary;
|
||||
}
|
||||
public void setAdColorType(String adColorType)
|
||||
{
|
||||
this.adColorType = adColorType;
|
||||
}
|
||||
|
||||
public String getAdColorType()
|
||||
{
|
||||
return adColorType;
|
||||
}
|
||||
public void setAdImageUrl(String adImageUrl)
|
||||
{
|
||||
this.adImageUrl = adImageUrl;
|
||||
}
|
||||
|
||||
public String getAdImageUrl()
|
||||
{
|
||||
return adImageUrl;
|
||||
}
|
||||
public void setAdState(String adState)
|
||||
{
|
||||
this.adState = adState;
|
||||
}
|
||||
|
||||
public String getAdState()
|
||||
{
|
||||
return adState;
|
||||
}
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
public void setCreateUser(String createUser)
|
||||
{
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public String getCreateUser()
|
||||
{
|
||||
return createUser;
|
||||
}
|
||||
public void setUpdateUser(String updateUser)
|
||||
{
|
||||
this.updateUser = updateUser;
|
||||
}
|
||||
|
||||
public String getUpdateUser()
|
||||
{
|
||||
return updateUser;
|
||||
}
|
||||
public void setUpdateDate(String updateDate)
|
||||
{
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getUpdateDate()
|
||||
{
|
||||
return updateDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("adId", getAdId())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("adType", getAdType())
|
||||
.append("adTypeName", getAdTypeName())
|
||||
.append("adLinkUrl", getAdLinkUrl())
|
||||
.append("adTitle", getAdTitle())
|
||||
.append("adName", getAdName())
|
||||
.append("adSummary", getAdSummary())
|
||||
.append("adColorType", getAdColorType())
|
||||
.append("adImageUrl", getAdImageUrl())
|
||||
.append("adState", getAdState())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createUser", getCreateUser())
|
||||
.append("updateUser", getUpdateUser())
|
||||
.append("updateDate", getUpdateDate())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.content.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.content.domain.CmsArticleAdInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章广告Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-03-23
|
||||
*/
|
||||
public interface CmsArticleAdInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询文章广告
|
||||
*
|
||||
* @param adId 文章广告ID
|
||||
* @return 文章广告
|
||||
*/
|
||||
public CmsArticleAdInfo selectCmsArticleAdInfoById(Long adId);
|
||||
|
||||
/**
|
||||
* 查询文章广告列表
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 文章广告集合
|
||||
*/
|
||||
public List<CmsArticleAdInfo> selectCmsArticleAdInfoList(CmsArticleAdInfo cmsArticleAdInfo);
|
||||
|
||||
/**
|
||||
* 新增文章广告
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCmsArticleAdInfo(CmsArticleAdInfo cmsArticleAdInfo);
|
||||
|
||||
/**
|
||||
* 修改文章广告
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCmsArticleAdInfo(CmsArticleAdInfo cmsArticleAdInfo);
|
||||
|
||||
/**
|
||||
* 删除文章广告
|
||||
*
|
||||
* @param adId 文章广告ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCmsArticleAdInfoById(Long adId);
|
||||
|
||||
/**
|
||||
* 批量删除文章广告
|
||||
*
|
||||
* @param adIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCmsArticleAdInfoByIds(String[] adIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.content.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.content.domain.CmsArticleAdInfo;
|
||||
|
||||
/**
|
||||
* 文章广告Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-03-23
|
||||
*/
|
||||
public interface ICmsArticleAdInfoService
|
||||
{
|
||||
/**
|
||||
* 查询文章广告
|
||||
*
|
||||
* @param adId 文章广告ID
|
||||
* @return 文章广告
|
||||
*/
|
||||
public CmsArticleAdInfo selectCmsArticleAdInfoById(Long adId);
|
||||
|
||||
/**
|
||||
* 查询文章广告列表
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 文章广告集合
|
||||
*/
|
||||
public List<CmsArticleAdInfo> selectCmsArticleAdInfoList(CmsArticleAdInfo cmsArticleAdInfo);
|
||||
|
||||
/**
|
||||
* 新增文章广告
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCmsArticleAdInfo(CmsArticleAdInfo cmsArticleAdInfo);
|
||||
|
||||
/**
|
||||
* 修改文章广告
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCmsArticleAdInfo(CmsArticleAdInfo cmsArticleAdInfo);
|
||||
|
||||
/**
|
||||
* 批量删除文章广告
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCmsArticleAdInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除文章广告信息
|
||||
*
|
||||
* @param adId 文章广告ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCmsArticleAdInfoById(Long adId);
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.content.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.content.mapper.CmsArticleAdInfoMapper;
|
||||
import com.ruoyi.content.domain.CmsArticleAdInfo;
|
||||
import com.ruoyi.content.service.ICmsArticleAdInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 文章广告Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-03-23
|
||||
*/
|
||||
@Service
|
||||
public class CmsArticleAdInfoServiceImpl implements ICmsArticleAdInfoService
|
||||
{
|
||||
@Autowired
|
||||
private CmsArticleAdInfoMapper cmsArticleAdInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询文章广告
|
||||
*
|
||||
* @param adId 文章广告ID
|
||||
* @return 文章广告
|
||||
*/
|
||||
@Override
|
||||
public CmsArticleAdInfo selectCmsArticleAdInfoById(Long adId)
|
||||
{
|
||||
return cmsArticleAdInfoMapper.selectCmsArticleAdInfoById(adId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章广告列表
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 文章广告
|
||||
*/
|
||||
@Override
|
||||
public List<CmsArticleAdInfo> selectCmsArticleAdInfoList(CmsArticleAdInfo cmsArticleAdInfo)
|
||||
{
|
||||
return cmsArticleAdInfoMapper.selectCmsArticleAdInfoList(cmsArticleAdInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文章广告
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCmsArticleAdInfo(CmsArticleAdInfo cmsArticleAdInfo)
|
||||
{
|
||||
cmsArticleAdInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return cmsArticleAdInfoMapper.insertCmsArticleAdInfo(cmsArticleAdInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章广告
|
||||
*
|
||||
* @param cmsArticleAdInfo 文章广告
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCmsArticleAdInfo(CmsArticleAdInfo cmsArticleAdInfo)
|
||||
{
|
||||
cmsArticleAdInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return cmsArticleAdInfoMapper.updateCmsArticleAdInfo(cmsArticleAdInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章广告对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCmsArticleAdInfoByIds(String ids)
|
||||
{
|
||||
return cmsArticleAdInfoMapper.deleteCmsArticleAdInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章广告信息
|
||||
*
|
||||
* @param adId 文章广告ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCmsArticleAdInfoById(Long adId)
|
||||
{
|
||||
return cmsArticleAdInfoMapper.deleteCmsArticleAdInfoById(adId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<?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.ruoyi.content.mapper.CmsArticleAdInfoMapper">
|
||||
|
||||
<resultMap type="CmsArticleAdInfo" id="CmsArticleAdInfoResult">
|
||||
<result property="adId" column="AD_ID" />
|
||||
<result property="companyId" column="COMPANY_ID" />
|
||||
<result property="adType" column="AD_TYPE" />
|
||||
<result property="adTypeName" column="AD_TYPE_NAME" />
|
||||
<result property="adLinkUrl" column="AD_LINK_URL" />
|
||||
<result property="adTitle" column="AD_TITLE" />
|
||||
<result property="adName" column="AD_NAME" />
|
||||
<result property="adSummary" column="AD_SUMMARY" />
|
||||
<result property="adColorType" column="AD_COLOR_TYPE" />
|
||||
<result property="adImageUrl" column="AD_IMAGE_URL" />
|
||||
<result property="adState" column="AD_STATE" />
|
||||
<result property="createDate" column="CREATE_DATE" />
|
||||
<result property="createTime" column="CREATE_TIME" />
|
||||
<result property="createUser" column="CREATE_USER" />
|
||||
<result property="updateUser" column="UPDATE_USER" />
|
||||
<result property="updateDate" column="UPDATE_DATE" />
|
||||
<result property="updateTime" column="UPDATE_TIME" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCmsArticleAdInfoVo">
|
||||
select AD_ID, COMPANY_ID, AD_TYPE, AD_TYPE_NAME, AD_LINK_URL, AD_TITLE, AD_NAME, AD_SUMMARY, AD_COLOR_TYPE, AD_IMAGE_URL, AD_STATE, CREATE_DATE, CREATE_TIME, CREATE_USER, UPDATE_USER, UPDATE_DATE, UPDATE_TIME from cms_article_ad_info
|
||||
</sql>
|
||||
|
||||
<select id="selectCmsArticleAdInfoList" parameterType="CmsArticleAdInfo" resultMap="CmsArticleAdInfoResult">
|
||||
<include refid="selectCmsArticleAdInfoVo"/>
|
||||
<where>
|
||||
<if test="companyId != null and companyId != ''"> and COMPANY_ID = #{companyId}</if>
|
||||
<if test="adType != null and adType != ''"> and AD_TYPE = #{adType}</if>
|
||||
<if test="adTypeName != null and adTypeName != ''"> and AD_TYPE_NAME like concat('%', #{adTypeName}, '%')</if>
|
||||
<if test="adLinkUrl != null and adLinkUrl != ''"> and AD_LINK_URL = #{adLinkUrl}</if>
|
||||
<if test="adTitle != null and adTitle != ''"> and AD_TITLE = #{adTitle}</if>
|
||||
<if test="adName != null and adName != ''"> and AD_NAME like concat('%', #{adName}, '%')</if>
|
||||
<if test="adSummary != null and adSummary != ''"> and AD_SUMMARY = #{adSummary}</if>
|
||||
<if test="adColorType != null and adColorType != ''"> and AD_COLOR_TYPE = #{adColorType}</if>
|
||||
<if test="adImageUrl != null and adImageUrl != ''"> and AD_IMAGE_URL = #{adImageUrl}</if>
|
||||
<if test="adState != null and adState != ''"> and AD_STATE = #{adState}</if>
|
||||
<if test="createDate != null and createDate != ''"> and CREATE_DATE = #{createDate}</if>
|
||||
<if test="createTime != null and createTime != ''"> and CREATE_TIME = #{createTime}</if>
|
||||
<if test="createUser != null and createUser != ''"> and CREATE_USER = #{createUser}</if>
|
||||
<if test="updateUser != null and updateUser != ''"> and UPDATE_USER = #{updateUser}</if>
|
||||
<if test="updateDate != null and updateDate != ''"> and UPDATE_DATE = #{updateDate}</if>
|
||||
<if test="updateTime != null and updateTime != ''"> and UPDATE_TIME = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCmsArticleAdInfoById" parameterType="Long" resultMap="CmsArticleAdInfoResult">
|
||||
<include refid="selectCmsArticleAdInfoVo"/>
|
||||
where AD_ID = #{adId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCmsArticleAdInfo" parameterType="CmsArticleAdInfo" useGeneratedKeys="true" keyProperty="adId">
|
||||
insert into cms_article_ad_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="companyId != null">COMPANY_ID,</if>
|
||||
<if test="adType != null">AD_TYPE,</if>
|
||||
<if test="adTypeName != null">AD_TYPE_NAME,</if>
|
||||
<if test="adLinkUrl != null">AD_LINK_URL,</if>
|
||||
<if test="adTitle != null">AD_TITLE,</if>
|
||||
<if test="adName != null">AD_NAME,</if>
|
||||
<if test="adSummary != null">AD_SUMMARY,</if>
|
||||
<if test="adColorType != null">AD_COLOR_TYPE,</if>
|
||||
<if test="adImageUrl != null">AD_IMAGE_URL,</if>
|
||||
<if test="adState != null">AD_STATE,</if>
|
||||
<if test="createDate != null">CREATE_DATE,</if>
|
||||
<if test="createTime != null">CREATE_TIME,</if>
|
||||
<if test="createUser != null">CREATE_USER,</if>
|
||||
<if test="updateUser != null">UPDATE_USER,</if>
|
||||
<if test="updateDate != null">UPDATE_DATE,</if>
|
||||
<if test="updateTime != null">UPDATE_TIME,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="adType != null">#{adType},</if>
|
||||
<if test="adTypeName != null">#{adTypeName},</if>
|
||||
<if test="adLinkUrl != null">#{adLinkUrl},</if>
|
||||
<if test="adTitle != null">#{adTitle},</if>
|
||||
<if test="adName != null">#{adName},</if>
|
||||
<if test="adSummary != null">#{adSummary},</if>
|
||||
<if test="adColorType != null">#{adColorType},</if>
|
||||
<if test="adImageUrl != null">#{adImageUrl},</if>
|
||||
<if test="adState != null">#{adState},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createUser != null">#{createUser},</if>
|
||||
<if test="updateUser != null">#{updateUser},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCmsArticleAdInfo" parameterType="CmsArticleAdInfo">
|
||||
update cms_article_ad_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="companyId != null">COMPANY_ID = #{companyId},</if>
|
||||
<if test="adType != null">AD_TYPE = #{adType},</if>
|
||||
<if test="adTypeName != null">AD_TYPE_NAME = #{adTypeName},</if>
|
||||
<if test="adLinkUrl != null">AD_LINK_URL = #{adLinkUrl},</if>
|
||||
<if test="adTitle != null">AD_TITLE = #{adTitle},</if>
|
||||
<if test="adName != null">AD_NAME = #{adName},</if>
|
||||
<if test="adSummary != null">AD_SUMMARY = #{adSummary},</if>
|
||||
<if test="adColorType != null">AD_COLOR_TYPE = #{adColorType},</if>
|
||||
<if test="adImageUrl != null">AD_IMAGE_URL = #{adImageUrl},</if>
|
||||
<if test="adState != null">AD_STATE = #{adState},</if>
|
||||
<if test="createDate != null">CREATE_DATE = #{createDate},</if>
|
||||
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
||||
<if test="createUser != null">CREATE_USER = #{createUser},</if>
|
||||
<if test="updateUser != null">UPDATE_USER = #{updateUser},</if>
|
||||
<if test="updateDate != null">UPDATE_DATE = #{updateDate},</if>
|
||||
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||
</trim>
|
||||
where AD_ID = #{adId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCmsArticleAdInfoById" parameterType="Long">
|
||||
delete from cms_article_ad_info where AD_ID = #{adId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCmsArticleAdInfoByIds" parameterType="String">
|
||||
delete from cms_article_ad_info where AD_ID in
|
||||
<foreach item="adId" collection="array" open="(" separator="," close=")">
|
||||
#{adId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增文章广告')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-adverts-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="companyId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="adType" class="form-control m-b">
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告类型名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adTypeName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告跳转地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adLinkUrl" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adTitle" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adSummary" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告背景颜色:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="adColorType" class="form-control m-b">
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告图片地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adImageUrl" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告状态 0:展示 1:不可用:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adState" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="createDate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="createUser" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="updateUser" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="updateDate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "content/adverts"
|
||||
$("#form-adverts-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-adverts-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('文章广告列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>公司id:</label>
|
||||
<input type="text" name="companyId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告类型:</label>
|
||||
<select name="adType">
|
||||
<option value="">所有</option>
|
||||
<option value="-1">代码生成请选择字典属性</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告类型名:</label>
|
||||
<input type="text" name="adTypeName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告跳转地址:</label>
|
||||
<input type="text" name="adLinkUrl"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告标题:</label>
|
||||
<input type="text" name="adTitle"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告名称:</label>
|
||||
<input type="text" name="adName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告简介:</label>
|
||||
<input type="text" name="adSummary"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告背景颜色:</label>
|
||||
<select name="adColorType">
|
||||
<option value="">所有</option>
|
||||
<option value="-1">代码生成请选择字典属性</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告图片地址:</label>
|
||||
<input type="text" name="adImageUrl"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告状态 0:展示 1:不可用:</label>
|
||||
<input type="text" name="adState"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>:</label>
|
||||
<input type="text" name="createDate"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>:</label>
|
||||
<input type="text" name="createTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>广告创建者:</label>
|
||||
<input type="text" name="createUser"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>:</label>
|
||||
<input type="text" name="updateUser"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>:</label>
|
||||
<input type="text" name="updateDate"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>:</label>
|
||||
<input type="text" name="updateTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="content:adverts:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="content:adverts:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="content:adverts:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="content:adverts:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('content:adverts:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('content:adverts:remove')}]];
|
||||
var prefix = ctx + "content/adverts";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "文章广告",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'adId',
|
||||
title: '',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'companyId',
|
||||
title: '公司id'
|
||||
},
|
||||
{
|
||||
field: 'adType',
|
||||
title: '广告类型'
|
||||
},
|
||||
{
|
||||
field: 'adTypeName',
|
||||
title: '广告类型名'
|
||||
},
|
||||
{
|
||||
field: 'adLinkUrl',
|
||||
title: '广告跳转地址'
|
||||
},
|
||||
{
|
||||
field: 'adTitle',
|
||||
title: '广告标题'
|
||||
},
|
||||
{
|
||||
field: 'adName',
|
||||
title: '广告名称'
|
||||
},
|
||||
{
|
||||
field: 'adSummary',
|
||||
title: '广告简介'
|
||||
},
|
||||
{
|
||||
field: 'adColorType',
|
||||
title: '广告背景颜色'
|
||||
},
|
||||
{
|
||||
field: 'adImageUrl',
|
||||
title: '广告图片地址'
|
||||
},
|
||||
{
|
||||
field: 'adState',
|
||||
title: '广告状态 0:展示 1:不可用'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
title: ''
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: ''
|
||||
},
|
||||
{
|
||||
field: 'createUser',
|
||||
title: '广告创建者'
|
||||
},
|
||||
{
|
||||
field: 'updateUser',
|
||||
title: ''
|
||||
},
|
||||
{
|
||||
field: 'updateDate',
|
||||
title: ''
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: ''
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.adId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.adId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改文章广告')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-adverts-edit" th:object="${cmsArticleAdInfo}">
|
||||
<input name="adId" th:field="*{adId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="companyId" th:field="*{companyId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="adType" class="form-control m-b">
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告类型名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adTypeName" th:field="*{adTypeName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告跳转地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adLinkUrl" th:field="*{adLinkUrl}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adTitle" th:field="*{adTitle}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adName" th:field="*{adName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adSummary" th:field="*{adSummary}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告背景颜色:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="adColorType" class="form-control m-b">
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告图片地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adImageUrl" th:field="*{adImageUrl}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告状态 0:展示 1:不可用:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="adState" th:field="*{adState}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="createDate" th:field="*{createDate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">广告创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="createUser" th:field="*{createUser}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="updateUser" th:field="*{updateUser}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "content/adverts";
|
||||
$("#form-adverts-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-adverts-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue