Merge remote-tracking branch 'origin/feature-20240104' into feature-20240104

master
382696293@qq.com 2 years ago
commit 4aa737d1a8

@ -0,0 +1,601 @@
package com.flossom.common.core.domain.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flossom.common.core.annotation.Excel;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;
/**
* site_info
*
* @author flossom
* @date 2023-12-20
*/
public class SiteInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 站点管理ID */
private Long id;
/** 站点名称 */
@Excel(name = "站点名称")
private String siteName;
/** 文件路径 */
@Excel(name = "文件路径")
private String fileUrl;
/** 开启开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@Excel(name = "开启开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date siteStartTime;
private List<String> startTime = new ArrayList<String>();
/** 开启结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@Excel(name = "开启结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date siteEndTime;
private List<String> registerTime = new ArrayList<String>();
/** 用户注册开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@Excel(name = "用户注册开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date userRegisterStartTime;
/** 用户注册结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@Excel(name = "用户注册结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date userRegisterEndTime;
/** 1-首页 2-发现模块 3-活动模块 */
@Excel(name = "1-首页 2-发现模块 3-活动模块")
private Integer openType;
/** 推送批次 1-永久一次 2-每次进入 3-自定义频次 */
@Excel(name = "推送批次 1-永久一次 2-每次进入 3-自定义频次")
private Integer pushType;
/** 推送次数(自定义批次) */
@Excel(name = "推送次数(自定义批次)")
private Integer pushNumber;
/** 推送时间 */
@Excel(name = "推送时间")
private String pushTimer;
// 推送时间数组
private List<Long> pushTimerArray = new ArrayList<Long>();
/** 可见小程序标签 */
@Excel(name = "可见小程序标签")
private String showWechatTag;
private List<Long> showWechatTagArray = new ArrayList<Long>();
/** 可见小程序标签ID */
@Excel(name = "可见小程序标签ID")
private String showWechatTagId;
/** 可见企微标签 */
@Excel(name = "可见企微标签")
private String showCompanyTag;
private List<Long> showCompanyTagArray = new ArrayList<Long>();
/** 可见企微标签ID */
@Excel(name = "可见企微标签ID")
private String showCompanyTagId;
/** 禁止小程序标签 */
@Excel(name = "禁止小程序标签")
private String forbidWechatTag;
private List<Long> forbidWechatTagArray = new ArrayList<Long>();
/** 禁止小程序标签ID */
@Excel(name = "禁止小程序标签ID")
private String forbidWechatTagId;
/** 禁止企微标签 */
@Excel(name = "禁止企微标签")
private String forbidCompanyTag;
private List<Long> forbidCompanyTagArray = new ArrayList<Long>();
/** 禁止企微标签ID */
@Excel(name = "禁止企微标签ID")
private String forbidCompanyTagId;
/** 渠道名称 */
@Excel(name = "渠道名称")
private String channelName;
private List<Long> channelArray = new ArrayList<Long>();
/** 渠道ID */
@Excel(name = "渠道ID")
private String channelId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String machineName;
/** 仪器ID */
@Excel(name = "仪器ID")
private String machineId;
private List<Long> machineArray = new ArrayList<Long>();
/** 用户类型 0-全部 1-游客 2-会员 */
@Excel(name = "用户类型 0-全部 1-游客 2-会员")
private Integer userType;
/** 1-开启 2-关闭 弹窗 */
@Excel(name = "1-开启 2-关闭 弹窗")
private Integer operate;
/** 打卡多少次显示活动 */
@Excel(name = "打卡多少次显示活动 ")
private Long signNumber;
/** 排序 */
@Excel(name = "排序")
private Long orderNumber;
/** 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间 */
@Excel(name = "跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间")
private Integer type;
/** 跳转链接(跳转外部链接、跳转内部链接) */
@Excel(name = "跳转链接", readConverterExp = "跳=转外部链接、跳转内部链接")
private String link;
/** 跳转链接参数(跳转内部链接) */
@Excel(name = "跳转链接参数", readConverterExp = "跳=转内部链接")
private String linkParams;
/** 外链小程序appid跳转小程序 */
@Excel(name = "外链小程序appid", readConverterExp = "跳=转小程序")
private String redirectAppid;
/** 外链小程序url跳转小程序 */
@Excel(name = "外链小程序url", readConverterExp = "跳=转小程序")
private String redirectUrl;
/** 视频号(导向视频号、导向视频号直播间) */
@Excel(name = "视频号", readConverterExp = "导=向视频号、导向视频号直播间")
private String videoNo;
/** 视频号feedId导向视频号 */
@Excel(name = "视频号feedId", readConverterExp = "导=向视频号")
private String feedId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSiteName(String siteName)
{
this.siteName = siteName;
}
public String getSiteName()
{
return siteName;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public void setSiteStartTime(Date siteStartTime)
{
this.siteStartTime = siteStartTime;
}
public Date getSiteStartTime()
{
return siteStartTime;
}
public void setSiteEndTime(Date siteEndTime)
{
this.siteEndTime = siteEndTime;
}
public Date getSiteEndTime()
{
return siteEndTime;
}
public void setUserRegisterStartTime(Date userRegisterStartTime)
{
this.userRegisterStartTime = userRegisterStartTime;
}
public Date getUserRegisterStartTime()
{
return userRegisterStartTime;
}
public void setUserRegisterEndTime(Date userRegisterEndTime)
{
this.userRegisterEndTime = userRegisterEndTime;
}
public Date getUserRegisterEndTime()
{
return userRegisterEndTime;
}
public void setOpenType(Integer openType)
{
this.openType = openType;
}
public Integer getOpenType()
{
return openType;
}
public void setPushType(Integer pushType)
{
this.pushType = pushType;
}
public Integer getPushType()
{
return pushType;
}
public void setPushNumber(Integer pushNumber)
{
this.pushNumber = pushNumber;
}
public Integer getPushNumber()
{
return pushNumber;
}
public void setPushTimer(String pushTimer)
{
this.pushTimer = pushTimer;
}
public String getPushTimer()
{
return pushTimer;
}
public void setShowWechatTag(String showWechatTag)
{
this.showWechatTag = showWechatTag;
}
public String getShowWechatTag()
{
return showWechatTag;
}
public void setShowWechatTagId(String showWechatTagId)
{
this.showWechatTagId = showWechatTagId;
}
public String getShowWechatTagId()
{
return showWechatTagId;
}
public void setShowCompanyTag(String showCompanyTag)
{
this.showCompanyTag = showCompanyTag;
}
public String getShowCompanyTag()
{
return showCompanyTag;
}
public void setShowCompanyTagId(String showCompanyTagId)
{
this.showCompanyTagId = showCompanyTagId;
}
public String getShowCompanyTagId()
{
return showCompanyTagId;
}
public void setForbidWechatTag(String forbidWechatTag)
{
this.forbidWechatTag = forbidWechatTag;
}
public String getForbidWechatTag()
{
return forbidWechatTag;
}
public void setForbidWechatTagId(String forbidWechatTagId)
{
this.forbidWechatTagId = forbidWechatTagId;
}
public String getForbidWechatTagId()
{
return forbidWechatTagId;
}
public void setForbidCompanyTag(String forbidCompanyTag)
{
this.forbidCompanyTag = forbidCompanyTag;
}
public String getForbidCompanyTag()
{
return forbidCompanyTag;
}
public void setForbidCompanyTagId(String forbidCompanyTagId)
{
this.forbidCompanyTagId = forbidCompanyTagId;
}
public String getForbidCompanyTagId()
{
return forbidCompanyTagId;
}
public void setChannelName(String channelName)
{
this.channelName = channelName;
}
public String getChannelName()
{
return channelName;
}
public void setChannelId(String channelId)
{
this.channelId = channelId;
}
public String getChannelId()
{
return channelId;
}
public void setMachineName(String machineName)
{
this.machineName = machineName;
}
public String getMachineName()
{
return machineName;
}
public void setMachineId(String machineId)
{
this.machineId = machineId;
}
public String getMachineId()
{
return machineId;
}
public void setUserType(Integer userType)
{
this.userType = userType;
}
public Integer getUserType()
{
return userType;
}
public void setOperate(Integer operate)
{
this.operate = operate;
}
public Integer getOperate()
{
return operate;
}
public void setSignNumber(Long signNumber)
{
this.signNumber = signNumber;
}
public Long getSignNumber()
{
return signNumber;
}
public void setOrderNumber(Long orderNumber)
{
this.orderNumber = orderNumber;
}
public Long getOrderNumber()
{
return orderNumber;
}
public void setType(Integer type)
{
this.type = type;
}
public Integer getType()
{
return type;
}
public void setLink(String link)
{
this.link = link;
}
public String getLink()
{
return link;
}
public void setLinkParams(String linkParams)
{
this.linkParams = linkParams;
}
public String getLinkParams()
{
return linkParams;
}
public void setRedirectAppid(String redirectAppid)
{
this.redirectAppid = redirectAppid;
}
public String getRedirectAppid()
{
return redirectAppid;
}
public void setRedirectUrl(String redirectUrl)
{
this.redirectUrl = redirectUrl;
}
public String getRedirectUrl()
{
return redirectUrl;
}
public void setVideoNo(String videoNo)
{
this.videoNo = videoNo;
}
public String getVideoNo()
{
return videoNo;
}
public void setFeedId(String feedId)
{
this.feedId = feedId;
}
public String getFeedId()
{
return feedId;
}
public List<Long> getPushTimerArray() {
return pushTimerArray;
}
public void setPushTimerArray(List<Long> pushTimerArray) {
this.pushTimerArray = pushTimerArray;
}
public List<Long> getShowWechatTagArray() {
return showWechatTagArray;
}
public void setShowWechatTagArray(List<Long> showWechatTagArray) {
this.showWechatTagArray = showWechatTagArray;
}
public List<Long> getShowCompanyTagArray() {
return showCompanyTagArray;
}
public void setShowCompanyTagArray(List<Long> showCompanyTagArray) {
this.showCompanyTagArray = showCompanyTagArray;
}
public List<Long> getForbidWechatTagArray() {
return forbidWechatTagArray;
}
public void setForbidWechatTagArray(List<Long> forbidWechatTagArray) {
this.forbidWechatTagArray = forbidWechatTagArray;
}
public List<Long> getForbidCompanyTagArray() {
return forbidCompanyTagArray;
}
public void setForbidCompanyTagArray(List<Long> forbidCompanyTagArray) {
this.forbidCompanyTagArray = forbidCompanyTagArray;
}
public List<String> getStartTime() {
return startTime;
}
public void setStartTime(List<String> startTime) {
this.startTime = startTime;
}
public List<String> getRegisterTime() {
return registerTime;
}
public void setRegisterTime(List<String> registerTime) {
this.registerTime = registerTime;
}
public List<Long> getChannelArray() {
return channelArray;
}
public void setChannelArray(List<Long> channelArray) {
this.channelArray = channelArray;
}
public List<Long> getMachineArray() {
return machineArray;
}
public void setMachineArray(List<Long> machineArray) {
this.machineArray = machineArray;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("siteName", getSiteName())
.append("siteStartTime", getSiteStartTime())
.append("siteEndTime", getSiteEndTime())
.append("userRegisterStartTime", getUserRegisterStartTime())
.append("userRegisterEndTime", getUserRegisterEndTime())
.append("openType", getOpenType())
.append("pushType", getPushType())
.append("pushNumber", getPushNumber())
.append("pushTimer", getPushTimer())
.append("showWechatTag", getShowWechatTag())
.append("showWechatTagId", getShowWechatTagId())
.append("showCompanyTag", getShowCompanyTag())
.append("showCompanyTagId", getShowCompanyTagId())
.append("forbidWechatTag", getForbidWechatTag())
.append("forbidWechatTagId", getForbidWechatTagId())
.append("forbidCompanyTag", getForbidCompanyTag())
.append("forbidCompanyTagId", getForbidCompanyTagId())
.append("channelName", getChannelName())
.append("channelId", getChannelId())
.append("machineName", getMachineName())
.append("machineId", getMachineId())
.append("userType", getUserType())
.append("operate", getOperate())
.append("signNumber", getSignNumber())
.append("orderNumber", getOrderNumber())
.append("type", getType())
.append("link", getLink())
.append("linkParams", getLinkParams())
.append("redirectAppid", getRedirectAppid())
.append("redirectUrl", getRedirectUrl())
.append("videoNo", getVideoNo())
.append("feedId", getFeedId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,84 @@
package com.flossom.common.core.domain.entity;
import com.flossom.common.core.annotation.Excel;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* site_info_channel
*
* @author flossom
* @date 2023-12-21
*/
public class SiteInfoChannel extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 话术主键 */
@Excel(name = "话术主键")
private Long siteId;
/** 渠道主键 */
@Excel(name = "渠道主键")
private Long channelId;
/** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private Long status;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSiteId(Long siteId)
{
this.siteId = siteId;
}
public Long getSiteId()
{
return siteId;
}
public void setChannelId(Long channelId)
{
this.channelId = channelId;
}
public Long getChannelId()
{
return channelId;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("siteId", getSiteId())
.append("channelId", getChannelId())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,84 @@
package com.flossom.common.core.domain.entity;
import com.flossom.common.core.annotation.Excel;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* site_info_tag
*
* @author flossom
* @date 2023-12-21
*/
public class SiteInfoTag extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 话术主键 */
@Excel(name = "话术主键")
private Long siteId;
/** 标签主键 */
@Excel(name = "标签主键")
private Long tagId;
/** 状态0正常 1禁用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=禁用")
private Long status;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSiteId(Long siteId)
{
this.siteId = siteId;
}
public Long getSiteId()
{
return siteId;
}
public void setTagId(Long tagId)
{
this.tagId = tagId;
}
public Long getTagId()
{
return tagId;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("siteId", getSiteId())
.append("tagId", getTagId())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,62 @@
package com.flossom.common.core.mapper;
import com.flossom.common.core.domain.entity.SiteInfoChannel;
import java.util.List;
/**
* Mapper
*
* @author flossom
* @date 2023-12-21
*/
public interface SiteInfoChannelMapper
{
/**
*
*
* @param id
* @return
*/
public SiteInfoChannel selectSiteInfoChannelById(Long id);
/**
*
*
* @param siteInfoChannel
* @return
*/
public List<SiteInfoChannel> selectSiteInfoChannelList(SiteInfoChannel siteInfoChannel);
/**
*
*
* @param siteInfoChannel
* @return
*/
public int insertSiteInfoChannel(SiteInfoChannel siteInfoChannel);
/**
*
*
* @param siteInfoChannel
* @return
*/
public int updateSiteInfoChannel(SiteInfoChannel siteInfoChannel);
/**
*
*
* @param id
* @return
*/
public int deleteSiteInfoChannelById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteSiteInfoChannelByIds(Long[] ids);
}

@ -0,0 +1,62 @@
package com.flossom.common.core.mapper;
import com.flossom.common.core.domain.entity.SiteInfo;
import java.util.List;
/**
* Mapper
*
* @author flossom
* @date 2023-12-20
*/
public interface SiteInfoMapper
{
/**
*
*
* @param id
* @return
*/
public SiteInfo selectSiteInfoById(Long id);
/**
*
*
* @param siteInfo
* @return
*/
public List<SiteInfo> selectSiteInfoList(SiteInfo siteInfo);
/**
*
*
* @param siteInfo
* @return
*/
public int insertSiteInfo(SiteInfo siteInfo);
/**
*
*
* @param siteInfo
* @return
*/
public int updateSiteInfo(SiteInfo siteInfo);
/**
*
*
* @param id
* @return
*/
public int deleteSiteInfoById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteSiteInfoByIds(Long[] ids);
}

@ -0,0 +1,72 @@
package com.flossom.common.core.mapper;
import java.util.List;
import com.flossom.common.core.domain.entity.SiteInfoTag;
/**
* Mapper
*
* @author flossom
* @date 2023-12-21
*/
public interface SiteInfoTagMapper
{
/**
*
*
* @param id
* @return
*/
public SiteInfoTag selectSiteInfoTagById(Long id);
/**
*
*
* @param siteInfoTag
* @return
*/
public List<SiteInfoTag> selectSiteInfoTagList(SiteInfoTag siteInfoTag);
/**
*
*
* @param siteInfoTag
* @return
*/
public int insertSiteInfoTag(SiteInfoTag siteInfoTag);
/**
*
*
* @param siteInfoTag
* @return
*/
public int updateSiteInfoTag(SiteInfoTag siteInfoTag);
/**
*
*
* @param id
* @return
*/
public int deleteSiteInfoTagById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteSiteInfoTagByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteSiteInfoTagBySiteId(Long id);
}

@ -0,0 +1,86 @@
<?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.flossom.common.core.mapper.SiteInfoChannelMapper">
<resultMap type="SiteInfoChannel" id="SiteInfoChannelResult">
<result property="id" column="id" />
<result property="siteId" column="site_id" />
<result property="channelId" column="channel_id" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSiteInfoChannelVo">
select id, site_id, channel_id, status, create_by, create_time, update_by, update_time, remark from site_info_channel
</sql>
<select id="selectSiteInfoChannelList" parameterType="SiteInfoChannel" resultMap="SiteInfoChannelResult">
<include refid="selectSiteInfoChannelVo"/>
<where>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="channelId != null "> and channel_id = #{channelId}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectSiteInfoChannelById" parameterType="Long" resultMap="SiteInfoChannelResult">
<include refid="selectSiteInfoChannelVo"/>
where id = #{id}
</select>
<insert id="insertSiteInfoChannel" parameterType="SiteInfoChannel" useGeneratedKeys="true" keyProperty="id">
insert into site_info_channel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="siteId != null">site_id,</if>
<if test="channelId != null">channel_id,</if>
<if test="status != null">status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="siteId != null">#{siteId},</if>
<if test="channelId != null">#{channelId},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSiteInfoChannel" parameterType="SiteInfoChannel">
update site_info_channel
<trim prefix="SET" suffixOverrides=",">
<if test="siteId != null">site_id = #{siteId},</if>
<if test="channelId != null">channel_id = #{channelId},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSiteInfoChannelById" parameterType="Long">
delete from site_info_channel where id = #{id}
</delete>
<delete id="deleteSiteInfoChannelByIds" parameterType="String">
delete from site_info_channel where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,235 @@
<?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.flossom.common.core.mapper.SiteInfoMapper">
<resultMap type="SiteInfo" id="SiteInfoResult">
<result property="id" column="id" />
<result property="siteName" column="site_name" />
<result property="fileUrl" column="file_url" />
<result property="siteStartTime" column="site_start_time" />
<result property="siteEndTime" column="site_end_time" />
<result property="userRegisterStartTime" column="user_register_start_time" />
<result property="userRegisterEndTime" column="user_register_end_time" />
<result property="openType" column="open_type" />
<result property="pushType" column="push_type" />
<result property="pushNumber" column="push_number" />
<result property="pushTimer" column="push_timer" />
<result property="showWechatTag" column="show_wechat_tag" />
<result property="showWechatTagId" column="show_wechat_tag_id" />
<result property="showCompanyTag" column="show_company_tag" />
<result property="showCompanyTagId" column="show_company_tag_id" />
<result property="forbidWechatTag" column="forbid_wechat_tag" />
<result property="forbidWechatTagId" column="forbid_wechat_tag_id" />
<result property="forbidCompanyTag" column="forbid_company_tag" />
<result property="forbidCompanyTagId" column="forbid_company_tag_id" />
<result property="channelName" column="channel_name" />
<result property="channelId" column="channel_id" />
<result property="machineName" column="machine_name" />
<result property="machineId" column="machine_id" />
<result property="userType" column="user_type" />
<result property="operate" column="operate" />
<result property="signNumber" column="sign_number" />
<result property="orderNumber" column="order_number" />
<result property="type" column="type" />
<result property="link" column="link" />
<result property="linkParams" column="link_params" />
<result property="redirectAppid" column="redirect_appid" />
<result property="redirectUrl" column="redirect_url" />
<result property="videoNo" column="video_no" />
<result property="feedId" column="feed_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSiteInfoVo">
select id, site_name, file_url, site_start_time, site_end_time, user_register_start_time, user_register_end_time, open_type, push_type, push_number, push_timer, show_wechat_tag, show_wechat_tag_id, show_company_tag, show_company_tag_id, forbid_wechat_tag, forbid_wechat_tag_id, forbid_company_tag, forbid_company_tag_id, channel_name, channel_id, machine_name, machine_id, user_type, operate, sign_number, order_number, type, link, link_params, redirect_appid, redirect_url, video_no, feed_id, create_by, create_time, update_by, update_time from site_info
</sql>
<select id="selectSiteInfoList" parameterType="SiteInfo" resultMap="SiteInfoResult">
<include refid="selectSiteInfoVo"/>
<where>
<if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if>
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
<if test="siteStartTime != null "> and site_start_time = #{siteStartTime}</if>
<if test="siteEndTime != null "> and site_end_time = #{siteEndTime}</if>
<if test="userRegisterStartTime != null "> and user_register_start_time = #{userRegisterStartTime}</if>
<if test="userRegisterEndTime != null "> and user_register_end_time = #{userRegisterEndTime}</if>
<if test="openType != null "> and open_type = #{openType}</if>
<if test="pushType != null "> and push_type = #{pushType}</if>
<if test="pushNumber != null "> and push_number = #{pushNumber}</if>
<if test="pushTimer != null and pushTimer != ''"> and push_timer = #{pushTimer}</if>
<if test="showWechatTag != null and showWechatTag != ''"> and show_wechat_tag = #{showWechatTag}</if>
<if test="showWechatTagId != null and showWechatTagId != ''"> and show_wechat_tag_id = #{showWechatTagId}</if>
<if test="showCompanyTag != null and showCompanyTag != ''"> and show_company_tag = #{showCompanyTag}</if>
<if test="showCompanyTagId != null and showCompanyTagId != ''"> and show_company_tag_id = #{showCompanyTagId}</if>
<if test="forbidWechatTag != null and forbidWechatTag != ''"> and forbid_wechat_tag = #{forbidWechatTag}</if>
<if test="forbidWechatTagId != null and forbidWechatTagId != ''"> and forbid_wechat_tag_id = #{forbidWechatTagId}</if>
<if test="forbidCompanyTag != null and forbidCompanyTag != ''"> and forbid_company_tag = #{forbidCompanyTag}</if>
<if test="forbidCompanyTagId != null and forbidCompanyTagId != ''"> and forbid_company_tag_id = #{forbidCompanyTagId}</if>
<if test="channelName != null and channelName != ''"> and channel_name like concat('%', #{channelName}, '%')</if>
<if test="channelId != null and channelId != ''"> and channel_id = #{channelId}</if>
<if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if>
<if test="machineId != null and machineId != ''"> and machine_id = #{machineId}</if>
<if test="userType != null "> and user_type = #{userType}</if>
<if test="operate != null "> and operate = #{operate}</if>
<if test="signNumber != null "> and sign_number = #{signNumber}</if>
<if test="orderNumber != null "> and order_number = #{orderNumber}</if>
<if test="type != null "> and type = #{type}</if>
<if test="link != null and link != ''"> and link = #{link}</if>
<if test="linkParams != null and linkParams != ''"> and link_params = #{linkParams}</if>
<if test="redirectAppid != null and redirectAppid != ''"> and redirect_appid = #{redirectAppid}</if>
<if test="redirectUrl != null and redirectUrl != ''"> and redirect_url = #{redirectUrl}</if>
<if test="videoNo != null and videoNo != ''"> and video_no = #{videoNo}</if>
<if test="feedId != null and feedId != ''"> and feed_id = #{feedId}</if>
</where>
order by order_number desc ,create_time desc
</select>
<select id="selectSiteInfoById" parameterType="Long" resultMap="SiteInfoResult">
<include refid="selectSiteInfoVo"/>
where id = #{id}
</select>
<insert id="insertSiteInfo" parameterType="SiteInfo">
insert into site_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="siteName != null">site_name,</if>
<if test="fileUrl != null">file_url,</if>
<if test="siteStartTime != null">site_start_time,</if>
<if test="siteEndTime != null">site_end_time,</if>
<if test="userRegisterStartTime != null">user_register_start_time,</if>
<if test="userRegisterEndTime != null">user_register_end_time,</if>
<if test="openType != null">open_type,</if>
<if test="pushType != null">push_type,</if>
<if test="pushNumber != null">push_number,</if>
<if test="pushTimer != null">push_timer,</if>
<if test="showWechatTag != null">show_wechat_tag,</if>
<if test="showWechatTagId != null">show_wechat_tag_id,</if>
<if test="showCompanyTag != null">show_company_tag,</if>
<if test="showCompanyTagId != null">show_company_tag_id,</if>
<if test="forbidWechatTag != null">forbid_wechat_tag,</if>
<if test="forbidWechatTagId != null">forbid_wechat_tag_id,</if>
<if test="forbidCompanyTag != null">forbid_company_tag,</if>
<if test="forbidCompanyTagId != null">forbid_company_tag_id,</if>
<if test="channelName != null">channel_name,</if>
<if test="channelId != null">channel_id,</if>
<if test="machineName != null">machine_name,</if>
<if test="machineId != null">machine_id,</if>
<if test="userType != null">user_type,</if>
<if test="operate != null">operate,</if>
<if test="signNumber != null">sign_number,</if>
<if test="orderNumber != null">order_number,</if>
<if test="type != null">type,</if>
<if test="link != null">link,</if>
<if test="linkParams != null">link_params,</if>
<if test="redirectAppid != null">redirect_appid,</if>
<if test="redirectUrl != null">redirect_url,</if>
<if test="videoNo != null">video_no,</if>
<if test="feedId != null">feed_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="siteName != null">#{siteName},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="siteStartTime != null">#{siteStartTime},</if>
<if test="siteEndTime != null">#{siteEndTime},</if>
<if test="userRegisterStartTime != null">#{userRegisterStartTime},</if>
<if test="userRegisterEndTime != null">#{userRegisterEndTime},</if>
<if test="openType != null">#{openType},</if>
<if test="pushType != null">#{pushType},</if>
<if test="pushNumber != null">#{pushNumber},</if>
<if test="pushTimer != null">#{pushTimer},</if>
<if test="showWechatTag != null">#{showWechatTag},</if>
<if test="showWechatTagId != null">#{showWechatTagId},</if>
<if test="showCompanyTag != null">#{showCompanyTag},</if>
<if test="showCompanyTagId != null">#{showCompanyTagId},</if>
<if test="forbidWechatTag != null">#{forbidWechatTag},</if>
<if test="forbidWechatTagId != null">#{forbidWechatTagId},</if>
<if test="forbidCompanyTag != null">#{forbidCompanyTag},</if>
<if test="forbidCompanyTagId != null">#{forbidCompanyTagId},</if>
<if test="channelName != null">#{channelName},</if>
<if test="channelId != null">#{channelId},</if>
<if test="machineName != null">#{machineName},</if>
<if test="machineId != null">#{machineId},</if>
<if test="userType != null">#{userType},</if>
<if test="operate != null">#{operate},</if>
<if test="signNumber != null">#{signNumber},</if>
<if test="orderNumber != null">#{orderNumber},</if>
<if test="type != null">#{type},</if>
<if test="link != null">#{link},</if>
<if test="linkParams != null">#{linkParams},</if>
<if test="redirectAppid != null">#{redirectAppid},</if>
<if test="redirectUrl != null">#{redirectUrl},</if>
<if test="videoNo != null">#{videoNo},</if>
<if test="feedId != null">#{feedId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSiteInfo" parameterType="SiteInfo">
update site_info
<trim prefix="SET" suffixOverrides=",">
<if test="siteName != null">site_name = #{siteName},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="siteStartTime != null">site_start_time = #{siteStartTime},</if>
<if test="siteEndTime != null">site_end_time = #{siteEndTime},</if>
<if test="userRegisterStartTime != null">user_register_start_time = #{userRegisterStartTime},</if>
<if test="userRegisterEndTime != null">user_register_end_time = #{userRegisterEndTime},</if>
<if test="openType != null">open_type = #{openType},</if>
<if test="pushType != null">push_type = #{pushType},</if>
<if test="pushNumber != null">push_number = #{pushNumber},</if>
<if test="pushTimer != null">push_timer = #{pushTimer},</if>
<if test="showWechatTag != null">show_wechat_tag = #{showWechatTag},</if>
<if test="showWechatTagId != null">show_wechat_tag_id = #{showWechatTagId},</if>
<if test="showCompanyTag != null">show_company_tag = #{showCompanyTag},</if>
<if test="showCompanyTagId != null">show_company_tag_id = #{showCompanyTagId},</if>
<if test="forbidWechatTag != null">forbid_wechat_tag = #{forbidWechatTag},</if>
<if test="forbidWechatTagId != null">forbid_wechat_tag_id = #{forbidWechatTagId},</if>
<if test="forbidCompanyTag != null">forbid_company_tag = #{forbidCompanyTag},</if>
<if test="forbidCompanyTagId != null">forbid_company_tag_id = #{forbidCompanyTagId},</if>
<if test="channelName != null">channel_name = #{channelName},</if>
<if test="channelId != null">channel_id = #{channelId},</if>
<if test="machineName != null">machine_name = #{machineName},</if>
<if test="machineId != null">machine_id = #{machineId},</if>
<if test="userType != null">user_type = #{userType},</if>
<if test="operate != null">operate = #{operate},</if>
<if test="signNumber != null">sign_number = #{signNumber},</if>
<if test="orderNumber != null">order_number = #{orderNumber},</if>
<if test="type != null">type = #{type},</if>
<if test="link != null">link = #{link},</if>
<if test="linkParams != null">link_params = #{linkParams},</if>
<if test="redirectAppid != null">redirect_appid = #{redirectAppid},</if>
<if test="redirectUrl != null">redirect_url = #{redirectUrl},</if>
<if test="videoNo != null">video_no = #{videoNo},</if>
<if test="feedId != null">feed_id = #{feedId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSiteInfoById" parameterType="Long">
delete from site_info where id = #{id}
</delete>
<delete id="deleteSiteInfoByIds" parameterType="String">
delete from site_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,91 @@
<?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.flossom.common.core.mapper.SiteInfoTagMapper">
<resultMap type="SiteInfoTag" id="SiteInfoTagResult">
<result property="id" column="id" />
<result property="siteId" column="site_id" />
<result property="tagId" column="tag_id" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSiteInfoTagVo">
select id, site_id, tag_id, status, create_by, create_time, update_by, update_time, remark from site_info_tag
</sql>
<select id="selectSiteInfoTagList" parameterType="SiteInfoTag" resultMap="SiteInfoTagResult">
<include refid="selectSiteInfoTagVo"/>
<where>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="tagId != null "> and tag_id = #{tagId}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectSiteInfoTagById" parameterType="Long" resultMap="SiteInfoTagResult">
<include refid="selectSiteInfoTagVo"/>
where id = #{id}
</select>
<insert id="insertSiteInfoTag" parameterType="SiteInfoTag" useGeneratedKeys="true" keyProperty="id">
insert into site_info_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="siteId != null">site_id,</if>
<if test="tagId != null">tag_id,</if>
<if test="status != null">status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="siteId != null">#{siteId},</if>
<if test="tagId != null">#{tagId},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSiteInfoTag" parameterType="SiteInfoTag">
update site_info_tag
<trim prefix="SET" suffixOverrides=",">
<if test="siteId != null">site_id = #{siteId},</if>
<if test="tagId != null">tag_id = #{tagId},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSiteInfoTagById" parameterType="Long">
delete from site_info_tag where id = #{id}
</delete>
<delete id="deleteSiteInfoTagByIds" parameterType="String">
delete from site_info_tag where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteSiteInfoTagBySiteId" parameterType="Long">
delete from site_info_tag where site_id = #{id}
</delete>
</mapper>

@ -0,0 +1,106 @@
package com.flossom.system.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.flossom.common.core.domain.entity.SiteInfo;
import com.flossom.common.core.utils.poi.ExcelUtil;
import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.domain.AjaxResult;
import com.flossom.common.core.web.page.TableDataInfo;
import com.flossom.common.log.annotation.Log;
import com.flossom.common.log.enums.BusinessType;
import com.flossom.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.flossom.system.service.ISiteInfoService;
/**
* Controller
*
* @author flossom
* @date 2023-12-20
*/
@RestController
@RequestMapping("/siteInfo")
public class SiteInfoController extends BaseController
{
@Autowired
private ISiteInfoService siteInfoService;
/**
*
*/
@RequiresPermissions("system:siteInfo:list")
@GetMapping("/list")
public TableDataInfo list(SiteInfo siteInfo)
{
startPage();
List<SiteInfo> list = siteInfoService.selectSiteInfoList(siteInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:siteInfo:export")
@Log(title = "站点管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SiteInfo siteInfo)
{
List<SiteInfo> list = siteInfoService.selectSiteInfoList(siteInfo);
ExcelUtil<SiteInfo> util = new ExcelUtil<SiteInfo>(SiteInfo.class);
util.exportExcel(response, list, "站点管理数据");
}
/**
*
*/
@RequiresPermissions("system:siteInfo:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(siteInfoService.selectSiteInfoById(id));
}
/**
*
*/
@RequiresPermissions("system:siteInfo:add")
@Log(title = "站点管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SiteInfo siteInfo)
{
return toAjax(siteInfoService.insertSiteInfo(siteInfo));
}
/**
*
*/
@RequiresPermissions("system:siteInfo:edit")
@Log(title = "站点管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SiteInfo siteInfo)
{
return toAjax(siteInfoService.updateSiteInfo(siteInfo));
}
/**
*
*/
@RequiresPermissions("system:siteInfo:remove")
@Log(title = "站点管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(siteInfoService.deleteSiteInfoByIds(ids));
}
}

@ -0,0 +1,62 @@
package com.flossom.system.service;
import com.flossom.common.core.domain.entity.SiteInfo;
import java.util.List;
/**
* Service
*
* @author flossom
* @date 2023-12-20
*/
public interface ISiteInfoService
{
/**
*
*
* @param id
* @return
*/
public SiteInfo selectSiteInfoById(Long id);
/**
*
*
* @param siteInfo
* @return
*/
public List<SiteInfo> selectSiteInfoList(SiteInfo siteInfo);
/**
*
*
* @param siteInfo
* @return
*/
public int insertSiteInfo(SiteInfo siteInfo);
/**
*
*
* @param siteInfo
* @return
*/
public int updateSiteInfo(SiteInfo siteInfo);
/**
*
*
* @param ids
* @return
*/
public int deleteSiteInfoByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteSiteInfoById(Long id);
}

@ -0,0 +1,340 @@
package com.flossom.system.service.impl;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import com.flossom.common.core.domain.entity.*;
import com.flossom.common.core.mapper.*;
import com.flossom.common.core.utils.DateUtils;
import com.flossom.common.core.utils.StringUtils;
import com.flossom.common.security.utils.SecurityUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.ISiteInfoService;
import org.springframework.util.CollectionUtils;
/**
* Service
*
* @author flossom
* @date 2023-12-20
*/
@Service
public class SiteInfoServiceImpl implements ISiteInfoService
{
@Autowired
private SiteInfoMapper siteInfoMapper;
@Autowired
private SysTagMapper sysTagMapper;
@Autowired
private ActivityChannelInfoMapper activityChannelInfoMapper;
@Autowired
private SiteInfoTagMapper siteInfoTagMapper;
@Autowired
private SiteInfoChannelMapper siteInfoChannelMapper;
/**
*
*
* @param id
* @return
*/
@Override
public SiteInfo selectSiteInfoById(Long id)
{
// 开始处理回显
SiteInfo siteInfo = siteInfoMapper.selectSiteInfoById(id);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm");
if(Objects.nonNull(siteInfo.getSiteStartTime())) {
siteInfo.getStartTime().add(sd.format(siteInfo.getSiteStartTime()));
}
if(Objects.nonNull(siteInfo.getSiteEndTime())) {
siteInfo.getStartTime().add(sd.format(siteInfo.getSiteEndTime()));
}
if(Objects.nonNull(siteInfo.getUserRegisterStartTime())) {
siteInfo.getRegisterTime().add(sd.format(siteInfo.getUserRegisterStartTime()));
}
if(Objects.nonNull(siteInfo.getUserRegisterEndTime())) {
siteInfo.getRegisterTime().add(sd.format(siteInfo.getUserRegisterEndTime()));
}
// 处理推送时间
if (StringUtils.isNotEmpty(siteInfo.getPushTimer())) {
List<Long> pushTimerList = Arrays.asList(siteInfo.getPushTimer().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
siteInfo.setPushTimerArray(pushTimerList);
}
// 处理禁用企微标签数组
if (StringUtils.isNotEmpty(siteInfo.getForbidCompanyTagId())) {
List<Long> forbidCompanyList = Arrays.asList(siteInfo.getForbidCompanyTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
siteInfo.setForbidCompanyTagArray(forbidCompanyList);
}
// 处理禁用小程序标签数组
if (StringUtils.isNotEmpty(siteInfo.getForbidWechatTagId())) {
List<Long> forbidWechatList = Arrays.asList(siteInfo.getForbidWechatTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
siteInfo.setForbidWechatTagArray(forbidWechatList);
}
// 处理可见小程序标签数组
if (StringUtils.isNotEmpty(siteInfo.getShowWechatTagId())) {
List<Long> showWechatList = Arrays.asList(siteInfo.getShowWechatTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
siteInfo.setShowWechatTagArray(showWechatList);
}
// 处理可见企微标签数组
if (StringUtils.isNotEmpty(siteInfo.getShowCompanyTagId())) {
List<Long> showCompanyList = Arrays.asList(siteInfo.getShowCompanyTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
siteInfo.setShowCompanyTagArray(showCompanyList);
}
// 处理渠道展示
if (StringUtils.isNotEmpty(siteInfo.getChannelId())) {
List<Long> channelLisn = Arrays.asList(siteInfo.getChannelId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
siteInfo.setChannelArray(channelLisn);
}
return siteInfo;
}
/**
*
*
* @param siteInfo
* @return
*/
@Override
public List<SiteInfo> selectSiteInfoList(SiteInfo siteInfo)
{
return siteInfoMapper.selectSiteInfoList(siteInfo);
}
/**
*
*
* @param siteInfo
* @return
*/
@Override
public int insertSiteInfo(SiteInfo siteInfo)
{
siteInfo.setCreateTime(DateUtils.getNowDate());
siteInfo.setCreateBy(SecurityUtils.getUsername());
List<SysTag> showWechatTagNew = Lists.newArrayList();
List<SysTag> showCompanyTagNew = Lists.newArrayList();
List<SysTag> forbidWechatTagNew = Lists.newArrayList();
List<SysTag> forbidCompanyTagNew = Lists.newArrayList();
List<ActivityChannelInfo> channelListNew = Lists.newArrayList();
this.commonHandler(siteInfo,showWechatTagNew,showCompanyTagNew,forbidWechatTagNew,forbidCompanyTagNew,channelListNew);
// 开始保存关联关系
int i = siteInfoMapper.insertSiteInfo(siteInfo);
this.commonHandlerRelation(siteInfo,showWechatTagNew,showCompanyTagNew,forbidWechatTagNew,forbidCompanyTagNew,channelListNew);
return i;
}
// 新增、更新统一处理关联关系
private void commonHandlerRelation(SiteInfo siteInfo,List<SysTag> showWechatTagNew,List<SysTag> showCompanyTagNew,List<SysTag> forbidWechatTagNew,List<SysTag> forbidCompanyTagNew,List<ActivityChannelInfo> channelListNew){
// 保存可见小程序标签关联关系
for (SysTag tag: showWechatTagNew) {
SiteInfoTag infoTag = new SiteInfoTag();
infoTag.setSiteId(siteInfo.getId());
infoTag.setTagId(tag.getId());
infoTag.setStatus(0l);
infoTag.setCreateBy(SecurityUtils.getUsername());
infoTag.setCreateTime(DateUtils.getNowDate());
siteInfoTagMapper.insertSiteInfoTag(infoTag);
}
// 保存可见企微标签关联关系
for (SysTag tag: showCompanyTagNew) {
SiteInfoTag infoTag = new SiteInfoTag();
infoTag.setSiteId(siteInfo.getId());
infoTag.setTagId(tag.getId());
infoTag.setStatus(0l);
infoTag.setCreateBy(SecurityUtils.getUsername());
infoTag.setCreateTime(DateUtils.getNowDate());
siteInfoTagMapper.insertSiteInfoTag(infoTag);
}
// 保存禁用小程序关联关系
for (SysTag tag: forbidWechatTagNew) {
SiteInfoTag infoTag = new SiteInfoTag();
infoTag.setSiteId(siteInfo.getId());
infoTag.setTagId(tag.getId());
infoTag.setStatus(1l);
infoTag.setCreateBy(SecurityUtils.getUsername());
infoTag.setCreateTime(DateUtils.getNowDate());
siteInfoTagMapper.insertSiteInfoTag(infoTag);
}
// 保存禁用企微标签关联关系
for (SysTag tag: forbidCompanyTagNew) {
SiteInfoTag infoTag = new SiteInfoTag();
infoTag.setSiteId(siteInfo.getId());
infoTag.setTagId(tag.getId());
infoTag.setStatus(1l);
infoTag.setCreateBy(SecurityUtils.getUsername());
infoTag.setCreateTime(DateUtils.getNowDate());
siteInfoTagMapper.insertSiteInfoTag(infoTag);
}
// 保存渠道关联关系
for (ActivityChannelInfo channel: channelListNew) {
SiteInfoChannel channelInfo = new SiteInfoChannel();
channelInfo.setSiteId(siteInfo.getId());
channelInfo.setChannelId(channel.getId());
channelInfo.setStatus(0l);
channelInfo.setCreateBy(SecurityUtils.getUsername());
channelInfo.setCreateTime(DateUtils.getNowDate());
siteInfoChannelMapper.insertSiteInfoChannel(channelInfo);
}
}
// 新增、更新统一调用汇总
private void commonHandler(SiteInfo siteInfo,List<SysTag> showWechatTagNew,List<SysTag> showCompanyTagNew,List<SysTag> forbidWechatTagNew,List<SysTag> forbidCompanyTagNew,List<ActivityChannelInfo> channelListNew){
// 如果是自定义频次,则需要保存推送时间 周一到周日
if (!CollectionUtils.isEmpty(siteInfo.getPushTimerArray())) {
siteInfo.setPushTimer(StringUtils.join(siteInfo.getPushTimerArray(),","));
}
// 保存可见小程序标签
if (!CollectionUtils.isEmpty(siteInfo.getShowWechatTagArray())) {
List<Long> showWechatTagArray = siteInfo.getShowWechatTagArray();
for(long tagId : showWechatTagArray) {
SysTag sysTag = sysTagMapper.selectDeptById(tagId);
if (Objects.nonNull(sysTag)) {
showWechatTagNew.add(sysTag);
}
}
}
if (!CollectionUtils.isEmpty(showWechatTagNew)) {
String tagNames = showWechatTagNew.stream().map(SysTag::getTagName).collect(Collectors.joining(","));
siteInfo.setShowWechatTag(tagNames);
List<Long> resultList = showWechatTagNew.stream().map(SysTag::getId).collect(Collectors.toList());
String ids = StringUtils.join(resultList, ",");
siteInfo.setShowWechatTagId(ids);
}
// 保存可见企微标签
if (!CollectionUtils.isEmpty(siteInfo.getShowCompanyTagArray())) {
List<Long> showCompanyTagArray = siteInfo.getShowCompanyTagArray();
for(long tagId : showCompanyTagArray) {
SysTag sysTag = sysTagMapper.selectDeptById(tagId);
if (Objects.nonNull(sysTag)) {
showCompanyTagNew.add(sysTag);
}
}
}
if (!CollectionUtils.isEmpty(showCompanyTagNew)) {
String tagNames = showCompanyTagNew.stream().map(SysTag::getTagName).collect(Collectors.joining(","));
siteInfo.setShowCompanyTag(tagNames);
List<Long> resultList = showCompanyTagNew.stream().map(SysTag::getId).collect(Collectors.toList());
String ids = StringUtils.join(resultList, ",");
siteInfo.setShowCompanyTagId(ids);
}
// 保存禁用小程序标签
if (!CollectionUtils.isEmpty(siteInfo.getForbidWechatTagArray())) {
List<Long> forbidWechatTagArray = siteInfo.getForbidWechatTagArray();
for(long tagId : forbidWechatTagArray) {
SysTag sysTag = sysTagMapper.selectDeptById(tagId);
if (Objects.nonNull(sysTag)) {
forbidWechatTagNew.add(sysTag);
}
}
}
if (!CollectionUtils.isEmpty(forbidWechatTagNew)) {
String tagNames = forbidWechatTagNew.stream().map(SysTag::getTagName).collect(Collectors.joining(","));
siteInfo.setForbidWechatTag(tagNames);
List<Long> resultList = forbidWechatTagNew.stream().map(SysTag::getId).collect(Collectors.toList());
String ids = StringUtils.join(resultList, ",");
siteInfo.setForbidWechatTagId(ids);
}
// 保存禁用企微标签
if (!CollectionUtils.isEmpty(siteInfo.getForbidCompanyTagArray())) {
List<Long> forbidCompanyTagArray = siteInfo.getForbidCompanyTagArray();
for(long tagId : forbidCompanyTagArray) {
SysTag sysTag = sysTagMapper.selectDeptById(tagId);
if (Objects.nonNull(sysTag)) {
forbidCompanyTagNew.add(sysTag);
}
}
}
if (!CollectionUtils.isEmpty(forbidCompanyTagNew)) {
String tagNames = forbidCompanyTagNew.stream().map(SysTag::getTagName).collect(Collectors.joining(","));
siteInfo.setForbidCompanyTag(tagNames);
List<Long> resultList = forbidCompanyTagNew.stream().map(SysTag::getId).collect(Collectors.toList());
String ids = StringUtils.join(resultList, ",");
siteInfo.setForbidCompanyTagId(ids);
}
// 保存渠道信息
if (!CollectionUtils.isEmpty(siteInfo.getChannelArray())) {
List<Long> channelArray = siteInfo.getChannelArray();
for(long channelId : channelArray) {
ActivityChannelInfo channelInfo = activityChannelInfoMapper.selectActivityChannelInfoById(channelId);
if (Objects.nonNull(channelInfo)) {
channelListNew.add(channelInfo);
}
}
}
if (!CollectionUtils.isEmpty(channelListNew)) {
String channelNames = channelListNew.stream().map(ActivityChannelInfo::getChannelName).collect(Collectors.joining(","));
siteInfo.setChannelName(channelNames);
List<Long> resultList = channelListNew.stream().map(ActivityChannelInfo::getId).collect(Collectors.toList());
String ids = StringUtils.join(resultList, ",");
siteInfo.setChannelId(ids);
}
}
/**
*
*
* @param siteInfo
* @return
*/
@Override
public int updateSiteInfo(SiteInfo siteInfo)
{
siteInfo.setUpdateTime(DateUtils.getNowDate());
siteInfo.setUpdateBy(SecurityUtils.getUsername());
siteInfo.setForbidCompanyTag("");
siteInfo.setForbidCompanyTagId("");
siteInfo.setForbidWechatTag("");
siteInfo.setForbidWechatTagId("");
siteInfo.setChannelId("");
siteInfo.setChannelName("");
siteInfo.setShowWechatTagId("");
siteInfo.setShowWechatTag("");
siteInfo.setShowCompanyTagId("");
siteInfo.setShowCompanyTag("");
List<SysTag> showWechatTagNew = Lists.newArrayList();
List<SysTag> showCompanyTagNew = Lists.newArrayList();
List<SysTag> forbidWechatTagNew = Lists.newArrayList();
List<SysTag> forbidCompanyTagNew = Lists.newArrayList();
List<ActivityChannelInfo> channelListNew = Lists.newArrayList();
this.commonHandler(siteInfo,showWechatTagNew,showCompanyTagNew,forbidWechatTagNew,forbidCompanyTagNew,channelListNew);
// 删除关联关系
siteInfoTagMapper.deleteSiteInfoTagBySiteId(siteInfo.getId());
// 保存新的关联关系
this.commonHandlerRelation(siteInfo,showWechatTagNew,showCompanyTagNew,forbidWechatTagNew,forbidCompanyTagNew,channelListNew);
return siteInfoMapper.updateSiteInfo(siteInfo);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteSiteInfoByIds(Long[] ids)
{
return siteInfoMapper.deleteSiteInfoByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteSiteInfoById(Long id)
{
return siteInfoMapper.deleteSiteInfoById(id);
}
}

@ -8,7 +8,13 @@ export function listInfo(query) {
params: query
})
}
export function listChannelInfo(query) {
return request({
url: '/system/channelInfo/list',
method: 'get',
params: query
})
}
// 查询【请填写功能名称】详细
export function getInfo(id) {
return request({

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询站点管理列表
export function listInfo(query) {
return request({
url: '/system/siteInfo/list',
method: 'get',
params: query
})
}
// 查询站点管理详细
export function getInfo(id) {
return request({
url: '/system/siteInfo/' + id,
method: 'get'
})
}
// 新增站点管理
export function addInfo(data) {
return request({
url: '/system/siteInfo',
method: 'post',
data: data
})
}
// 修改站点管理
export function updateInfo(data) {
return request({
url: '/system/siteInfo',
method: 'put',
data: data
})
}
// 删除站点管理
export function delInfo(id) {
return request({
url: '/system/siteInfo/' + id,
method: 'delete'
})
}

@ -0,0 +1,682 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="弹窗状态" prop="operate">
<el-select
v-model="queryParams.operate"
placeholder="请选择弹窗状态"
:style="{ width: '100%' }"
clearable
>
<el-option label="全部" value="" />
<el-option label="开启" value="1" />
<el-option label="关闭" value="2" />
</el-select>
</el-form-item>
<el-form-item label="弹窗类型" prop="openType">
<el-select
v-model="queryParams.openType"
placeholder="请选择弹窗类型"
:style="{ width: '100%' }"
clearable
>
<el-option label="全部" value="" />
<el-option label="首页" value="1" />
<el-option label="发现模块" value="2" />
<el-option label="我的模块" value="3" />
</el-select>
</el-form-item>
<el-form-item label="开启时间" prop="siteStartTime">
<el-date-picker clearable
v-model="queryParams.siteStartTime"
type="date"
value-format="yyyy-MM-dd HH:mm"
placeholder="请选择开启开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="" prop="siteEndTime">
<el-date-picker clearable
v-model="queryParams.siteEndTime"
type="date"
value-format="yyyy-MM-dd HH:mm"
placeholder="请选择开启结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:siteInfo:add']"
>新增</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:siteInfo:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:siteInfo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:siteInfo:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="升序排序" align="center" prop="orderNumber" >
<template slot-scope="scope">
<el-input v-model="scope.row.orderNumber" @blur="updateOrderNumber($event,scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="弹窗封面" align="center" prop="fileUrl" >
<template slot-scope="scope">
<el-image :src="scope.row.fileUrl" style="width: 60px;height: 80px">
<div slot="placeholder" class="image-slot"><span class="dot"></span>
</div>
</el-image>
</template>
</el-table-column>
<el-table-column label="标题" align="center" prop="siteName" />
<el-table-column label="开启时间" align="center" prop="siteStartTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.siteStartTime, '{y}-{m}-{d} {h}:{i}') }}</span>
~
<span>{{ parseTime(scope.row.siteEndTime, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="用户注册时间" align="center" prop="userRegisterStartTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.userRegisterStartTime, '{y}-{m}-{d} {h}:{i}') }}</span>
~
<span>{{ parseTime(scope.row.userRegisterEndTime, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="弹窗状态" align="center" prop="operate" >
<template slot-scope="scope">
<span v-show="scope.row.operate == 1"></span>
<span v-show="scope.row.operate == 2"></span>
</template>
</el-table-column>
<el-table-column label="推送频次" align="center" prop="pushType" >
<template slot-scope="scope">
<span v-show="scope.row.pushType == 1"></span>
<span v-show="scope.row.pushType == 2"></span>
<span v-show="scope.row.pushType == 3"></span>
</template>
</el-table-column>
<el-table-column label="每天" align="center" prop="pushNumber" />
<el-table-column label="星期" align="center" prop="pushTimer" />
<el-table-column label="打卡显示活动" align="center" prop="signNumber" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:siteInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:siteInfo:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-tools"
@click="closeWindow(scope.row, 1)"
v-if="scope.row.operate==2"
v-hasPermi="['system:siteInfo:edit']"
>开启弹窗</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-tools"
v-if="scope.row.operate==1"
@click="closeWindow(scope.row, 2)"
v-hasPermi="['system:siteInfo:edit']"
>关闭弹窗</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改站点管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-image :src="form.fileUrl" style="width: 300px;height: 400px;margin-left: 20%">
<div slot="placeholder" class="image-slot"><span class="dot"></span>
</div>
</el-image>
<el-form-item label="弹窗封面" prop="fileUrl">
<el-upload
ref="upload"
:limit="1"
accept=".jpg, .png, .jpeg"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">请上传启动页介绍图片建议尺寸为330px*460p</div>
</el-upload>
</el-form-item>
<el-form-item label="标题" prop="siteName">
<el-input v-model="form.siteName" placeholder="请输入标题" style="width: 80%" />
</el-form-item>
<el-form-item label="开启时间" prop="siteStartTime">
<el-date-picker
v-model="form.startTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="用户注册时间" prop="userRegisterStartTime" label-width="100px">
<el-date-picker
v-model="form.registerTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="弹窗类型" prop="openType">
<el-select v-model="form.openType">
<el-option label="首页" :value="1" :key="1"></el-option>
<el-option label="发现模块" :value="2" :key="2"></el-option>
<el-option label="活动模块" :value="3" :key="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="推送次数" prop="pushNumber">
<el-radio-group v-model="form.pushType">
<el-radio :label="1">永久一次</el-radio>
<el-radio :label="2">每次进入</el-radio>
<el-radio :label="3">自定义频次</el-radio>
</el-radio-group>
</el-form-item>
<el-row>
<el-col :span = "12">
<el-form-item label="每天" prop="pushNumber" v-if="form.pushType==3">
<el-input-number v-model="form.pushNumber" :min="1" :max="10" label="请选择多少次"></el-input-number>
</el-form-item>
</el-col>
<el-col :span = "12">
<el-form-item label="推送时间" prop="pushTimer" v-if="form.pushType==3">
<el-select v-model="form.pushTimerArray" multiple placeholder="请选择" size="small">
<el-option label="星期一" :value="1" :key="1"></el-option>
<el-option label="星期二" :value="2" :key="2"></el-option>
<el-option label="星期三" :value="3" :key="3"></el-option>
<el-option label="星期四" :value="4" :key="4"></el-option>
<el-option label="星期五" :value="5" :key="5"></el-option>
<el-option label="星期六" :value="6" :key="6"></el-option>
<el-option label="星期日" :value="7" :key="7"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="可见小程序标签" prop="showWechatTagId" label-width="120px">
<treeselect v-model="form.showWechatTagArray" :options="chatTagOptions" :multiple="true" :show-count="true" placeholder="请选择小程序标签" :disable-branch-nodes="true" />
</el-form-item>
<el-form-item label="可见企微标签" prop="showCompanyTagId" label-width="120px">
<treeselect v-model="form.showCompanyTagArray" :options="tagOptions" :multiple="true" :show-count="true" placeholder="请选择企微标签" :disable-branch-nodes="true" />
</el-form-item>
<el-form-item label="禁止小程序标签" prop="forbidWechatTagId" label-width="120px">
<treeselect v-model="form.forbidWechatTagArray" :options="chatTagOptions" :multiple="true" :show-count="true" placeholder="请选择小程序标签" :disable-branch-nodes="true" />
</el-form-item>
<el-form-item label="禁止企微标签" prop="forbidCompanyTagId" label-width="120px">
<treeselect v-model="form.forbidCompanyTagArray" :options="tagOptions" :multiple="true" :show-count="true" placeholder="请选择企微标签" :disable-branch-nodes="true" />
</el-form-item>
<el-row>
<el-col :span = "12">
<el-form-item label="所属渠道" prop="channelId">
<el-select v-model="form.channelArray" multiple placeholder="请选择">
<el-option
v-for="item in channelList"
:key="item.id"
:label="item.channelName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span = "12">
<el-form-item label="仪器" prop="channelId">
<el-select v-model="form.machineArray" multiple placeholder="请选择">
<el-option
v-for="item in channelList"
:key="item.id"
:label="item.channelName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span = "12">
<el-form-item label="用户类型" prop="userType">
<el-select v-model="form.userType">
<el-option label="全部" :value="0" :key="0"></el-option>
<el-option label="游客" :value="1" :key="1"></el-option>
<el-option label="会员" :value="2" :key="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span = "12">
<el-form-item label="是否开启弹窗" prop="userType" label-width="120px">
<el-switch
v-model="form.operate"
>
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="打卡显示活动 " prop="signNumber" label-width="120px">
<el-input v-model="form.signNumber" placeholder="请输入打卡多少次显示活动 " />
</el-form-item>
<el-form-item label="排序" prop="orderNumber">
<el-input v-model="form.orderNumber" placeholder="请输入排序" />
</el-form-item>
<el-row>
<el-col :span="24">
<el-form-item label="跳转类型" prop="type">
<el-select v-model="form.type">
<el-option label="无跳转" :value="0" :key="0"></el-option>
<el-option label="跳转内部链接" :value="1" :key="1"></el-option>
<el-option label="跳转小程序" :value="4" :key="4"></el-option>
<el-option label="跳转外部链接" :value="3" :key="3"></el-option>
<el-option label="导向视频号" :value="5" :key="5"></el-option>
<el-option label="导向视频号直播间" :value="6" :key="6"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 1">
<el-form-item label="内部链接" prop="link">
<el-input v-model="form.link" placeholder="请输入内部链接" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 1">
<el-form-item label="跳转参数" prop="linkParams">
<el-input v-model="form.linkParams" placeholder="请输入跳转参数" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 3">
<el-form-item label="外部链接" prop="link">
<el-input v-model="form.link" placeholder="请输入外部链接" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 4">
<el-form-item label="APPID" prop="redirectAppid">
<el-input v-model="form.redirectAppid" placeholder="请输入小程序APPID" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 4" label-width="90px">
<el-form-item label="页面链接" prop="redirectUrl">
<el-input v-model="form.redirectUrl" placeholder="请输入页面链接" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 5 || form.type == 6">
<el-form-item label="视频号ID" prop="videoNo">
<el-input v-model="form.videoNo" placeholder="请输入视频号ID" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 5" label-width="90px">
<el-form-item label="feedId" prop="feedId">
<el-input v-model="form.feedId" placeholder="请输入视频号feedId" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/system/siteInfo";
import { listChannelInfo} from "@/api/system/channelInfo";
import {getToken} from "@/utils/auth";
import { tagTreeSelect } from "@/api/system/wechatTab";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Info",
components: { Treeselect },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
channelList:[],
//
title: "",
tagOptions: [],
chatTagOptions: [],
//
open: false,
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/file/upload"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
siteName: null,
fileUrl: null,
siteStartTime: null,
siteEndTime: null,
userRegisterStartTime: null,
userRegisterEndTime: null,
openType: null,
pushType: null,
pushNumber: null,
pushTimer: null,
showWechatTag: null,
showWechatTagId: null,
showCompanyTag: null,
showCompanyTagId: null,
forbidWechatTag: null,
forbidWechatTagId: null,
forbidCompanyTag: null,
forbidCompanyTagId: null,
channelName: null,
channelId: null,
machineName: null,
machineId: null,
userType: null,
operate: null,
signNumber: null,
orderNumber: null,
type: null,
link: null,
linkParams: null,
redirectAppid: null,
redirectUrl: null,
videoNo: null,
feedId: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
this.getDeptTree();
},
methods: {
/** 查询站点管理列表 */
getList() {
this.form.fileUrl = 'http://127.0.0.1:9300/statics/2023/12/16/0c49191de1ed8f91b28d9c2b12556154_20231216154804A002.mp4'
this.loading = true;
listInfo(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
listChannelInfo(this.queryParams).then(response => {
this.channelList = response.rows;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
siteName: null,
fileUrl: null,
siteStartTime: null,
siteEndTime: null,
userRegisterStartTime: null,
userRegisterEndTime: null,
openType: null,
pushType: null,
pushNumber: null,
pushTimer: null,
showWechatTag: null,
showWechatTagId: null,
showCompanyTag: null,
showCompanyTagId: null,
forbidWechatTag: null,
forbidWechatTagId: null,
forbidCompanyTag: null,
forbidCompanyTagId: null,
channelName: null,
channelId: null,
machineName: null,
machineId: null,
userType: null,
operate: null,
signNumber: null,
orderNumber: null,
type: null,
link: null,
linkParams: null,
redirectAppid: null,
redirectUrl: null,
videoNo: null,
feedId: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加站点管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
if(this.form.operate == 1) {
this.form.operate = true;
} else {
this.form.operate = false;
}
this.open = true;
this.title = "修改站点管理";
});
},
//
updateOrderNumber(event,row){
updateInfo(row).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
},
//
closeWindow(row, operate){
row.operate = operate;
updateInfo(row).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
//
if(this.form.startTime.length > 0) {
this.form.siteStartTime = this.form.startTime[0];
this.form.siteEndTime = this.form.startTime[1];
}
if(this.form.registerTime.length > 0) {
this.form.userRegisterStartTime = this.form.registerTime[0];
this.form.userRegisterEndTime = this.form.registerTime[1];
}
if(this.form.operate) {
this.form.operate = 1;
} else {
this.form.operate = 2;
}
this.form.startTime = [];
this.form.registerTime = [];
if (this.form.id != null) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
//
handleFileUploadProgress(event, file, fileList) {
console.log('上传处理中==>file',JSON.stringify(file))
},
//
handleFileSuccess(response, file, fileList, item) {
console.log('上传后的结果==>',JSON.stringify(response))
if(response.code == '200') {
this.form.fileUrl = response.data.url;
}
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除站点管理编号为"' + ids + '"的数据项?').then(function() {
return delInfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 查询部门下拉树结构 */
getDeptTree() {
tagTreeSelect({type: 2}).then(response => {
this.tagOptions = response.data;
});
tagTreeSelect({type: 1}).then(response => {
this.chatTagOptions = response.data;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/info/export', {
...this.queryParams
}, `info_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save