活动管理
This commit is contained in:
parent
1096001bdb
commit
ae4cda9581
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.sinosoft.activity.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.sinosoft.activity.domain.ActPageConfigGuide;
|
||||||
|
import com.sinosoft.activity.service.IActPageConfigGuideService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动展示内容配置Controller
|
||||||
|
*
|
||||||
|
* @author dy
|
||||||
|
* @date 2021-04-08
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/guide")
|
||||||
|
public class ActPageConfigGuideController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/guide";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IActPageConfigGuideService actPageConfigGuideService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:guide:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String guide()
|
||||||
|
{
|
||||||
|
return prefix + "/guide";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:guide:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ActPageConfigGuide> list = actPageConfigGuideService.selectActPageConfigGuideList(actPageConfigGuide);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出活动展示内容配置列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:guide:export")
|
||||||
|
@Log(title = "活动展示内容配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
List<ActPageConfigGuide> list = actPageConfigGuideService.selectActPageConfigGuideList(actPageConfigGuide);
|
||||||
|
ExcelUtil<ActPageConfigGuide> util = new ExcelUtil<ActPageConfigGuide>(ActPageConfigGuide.class);
|
||||||
|
return util.exportExcel(list, "guide");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增活动展示内容配置
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存活动展示内容配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:guide:add")
|
||||||
|
@Log(title = "活动展示内容配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
return toAjax(actPageConfigGuideService.insertActPageConfigGuide(actPageConfigGuide));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改活动展示内容配置
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
ActPageConfigGuide actPageConfigGuide = actPageConfigGuideService.selectActPageConfigGuideById(id);
|
||||||
|
mmap.put("actPageConfigGuide", actPageConfigGuide);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存活动展示内容配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:guide:edit")
|
||||||
|
@Log(title = "活动展示内容配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
return toAjax(actPageConfigGuideService.updateActPageConfigGuide(actPageConfigGuide));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动展示内容配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:guide:remove")
|
||||||
|
@Log(title = "活动展示内容配置", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(actPageConfigGuideService.deleteActPageConfigGuideByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
package com.sinosoft.activity.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动展示内容配置对象 act_page_config_guide
|
||||||
|
*
|
||||||
|
* @author dy
|
||||||
|
* @date 2021-04-08
|
||||||
|
*/
|
||||||
|
public class ActPageConfigGuide extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/** 活动编码 */
|
||||||
|
@Excel(name = "活动编码")
|
||||||
|
private String actCode;
|
||||||
|
|
||||||
|
/** 活动标题 */
|
||||||
|
@Excel(name = "活动标题")
|
||||||
|
private String actTitle;
|
||||||
|
|
||||||
|
/** 活动描述 */
|
||||||
|
@Excel(name = "活动描述")
|
||||||
|
private String actDesc;
|
||||||
|
|
||||||
|
/** 背景图片 */
|
||||||
|
@Excel(name = "背景图片")
|
||||||
|
private String bgImg;
|
||||||
|
|
||||||
|
/** 按钮文本 */
|
||||||
|
@Excel(name = "按钮文本")
|
||||||
|
private String btnText;
|
||||||
|
|
||||||
|
/** 按钮链接 */
|
||||||
|
@Excel(name = "按钮链接")
|
||||||
|
private String btnLink;
|
||||||
|
|
||||||
|
public void setId(Integer id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setActCode(String actCode)
|
||||||
|
{
|
||||||
|
this.actCode = actCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActCode()
|
||||||
|
{
|
||||||
|
return actCode;
|
||||||
|
}
|
||||||
|
public void setActTitle(String actTitle)
|
||||||
|
{
|
||||||
|
this.actTitle = actTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActTitle()
|
||||||
|
{
|
||||||
|
return actTitle;
|
||||||
|
}
|
||||||
|
public void setActDesc(String actDesc)
|
||||||
|
{
|
||||||
|
this.actDesc = actDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActDesc()
|
||||||
|
{
|
||||||
|
return actDesc;
|
||||||
|
}
|
||||||
|
public void setBgImg(String bgImg)
|
||||||
|
{
|
||||||
|
this.bgImg = bgImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBgImg()
|
||||||
|
{
|
||||||
|
return bgImg;
|
||||||
|
}
|
||||||
|
public void setBtnText(String btnText)
|
||||||
|
{
|
||||||
|
this.btnText = btnText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBtnText()
|
||||||
|
{
|
||||||
|
return btnText;
|
||||||
|
}
|
||||||
|
public void setBtnLink(String btnLink)
|
||||||
|
{
|
||||||
|
this.btnLink = btnLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBtnLink()
|
||||||
|
{
|
||||||
|
return btnLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("actCode", getActCode())
|
||||||
|
.append("actTitle", getActTitle())
|
||||||
|
.append("actDesc", getActDesc())
|
||||||
|
.append("bgImg", getBgImg())
|
||||||
|
.append("btnText", getBtnText())
|
||||||
|
.append("btnLink", getBtnLink())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.sinosoft.activity.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.sinosoft.activity.domain.ActPageConfigGuide;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动展示内容配置Mapper接口
|
||||||
|
*
|
||||||
|
* @author dy
|
||||||
|
* @date 2021-04-08
|
||||||
|
*/
|
||||||
|
public interface ActPageConfigGuideMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param id 活动展示内容配置ID
|
||||||
|
* @return 活动展示内容配置
|
||||||
|
*/
|
||||||
|
public ActPageConfigGuide selectActPageConfigGuideById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置列表
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 活动展示内容配置集合
|
||||||
|
*/
|
||||||
|
public List<ActPageConfigGuide> selectActPageConfigGuideList(ActPageConfigGuide actPageConfigGuide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertActPageConfigGuide(ActPageConfigGuide actPageConfigGuide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateActPageConfigGuide(ActPageConfigGuide actPageConfigGuide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param id 活动展示内容配置ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteActPageConfigGuideById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteActPageConfigGuideByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.sinosoft.activity.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.sinosoft.activity.domain.ActPageConfigGuide;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动展示内容配置Service接口
|
||||||
|
*
|
||||||
|
* @author dy
|
||||||
|
* @date 2021-04-08
|
||||||
|
*/
|
||||||
|
public interface IActPageConfigGuideService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param id 活动展示内容配置ID
|
||||||
|
* @return 活动展示内容配置
|
||||||
|
*/
|
||||||
|
public ActPageConfigGuide selectActPageConfigGuideById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置列表
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 活动展示内容配置集合
|
||||||
|
*/
|
||||||
|
public List<ActPageConfigGuide> selectActPageConfigGuideList(ActPageConfigGuide actPageConfigGuide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertActPageConfigGuide(ActPageConfigGuide actPageConfigGuide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateActPageConfigGuide(ActPageConfigGuide actPageConfigGuide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteActPageConfigGuideByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动展示内容配置信息
|
||||||
|
*
|
||||||
|
* @param id 活动展示内容配置ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteActPageConfigGuideById(Integer id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.sinosoft.activity.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.sinosoft.activity.mapper.ActPageConfigGuideMapper;
|
||||||
|
import com.sinosoft.activity.domain.ActPageConfigGuide;
|
||||||
|
import com.sinosoft.activity.service.IActPageConfigGuideService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动展示内容配置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author dy
|
||||||
|
* @date 2021-04-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ActPageConfigGuideServiceImpl implements IActPageConfigGuideService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ActPageConfigGuideMapper actPageConfigGuideMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param id 活动展示内容配置ID
|
||||||
|
* @return 活动展示内容配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ActPageConfigGuide selectActPageConfigGuideById(Integer id)
|
||||||
|
{
|
||||||
|
return actPageConfigGuideMapper.selectActPageConfigGuideById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动展示内容配置列表
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 活动展示内容配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ActPageConfigGuide> selectActPageConfigGuideList(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
return actPageConfigGuideMapper.selectActPageConfigGuideList(actPageConfigGuide);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertActPageConfigGuide(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
actPageConfigGuide.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return actPageConfigGuideMapper.insertActPageConfigGuide(actPageConfigGuide);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改活动展示内容配置
|
||||||
|
*
|
||||||
|
* @param actPageConfigGuide 活动展示内容配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateActPageConfigGuide(ActPageConfigGuide actPageConfigGuide)
|
||||||
|
{
|
||||||
|
actPageConfigGuide.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return actPageConfigGuideMapper.updateActPageConfigGuide(actPageConfigGuide);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动展示内容配置对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteActPageConfigGuideByIds(String ids)
|
||||||
|
{
|
||||||
|
return actPageConfigGuideMapper.deleteActPageConfigGuideByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动展示内容配置信息
|
||||||
|
*
|
||||||
|
* @param id 活动展示内容配置ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteActPageConfigGuideById(Integer id)
|
||||||
|
{
|
||||||
|
return actPageConfigGuideMapper.deleteActPageConfigGuideById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.sinosoft.activity.vo;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.sinosoft.activity.domain.ActPageConfigGuide;
|
||||||
|
import com.sinosoft.activity.domain.DrawInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动主类
|
||||||
|
*
|
||||||
|
* @author dy
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2021/4/8 10:15
|
||||||
|
*/
|
||||||
|
public class ActVO extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三步--活动展示内容配置
|
||||||
|
*/
|
||||||
|
ActPageConfigGuide actPageConfigGuide;
|
||||||
|
/**
|
||||||
|
* 第一步 第四步
|
||||||
|
*/
|
||||||
|
DrawInfo drawInfo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?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.sinosoft.activity.mapper.ActPageConfigGuideMapper">
|
||||||
|
|
||||||
|
<resultMap type="ActPageConfigGuide" id="ActPageConfigGuideResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="actCode" column="act_code" />
|
||||||
|
<result property="actTitle" column="act_title" />
|
||||||
|
<result property="actDesc" column="act_desc" />
|
||||||
|
<result property="bgImg" column="bg_img" />
|
||||||
|
<result property="btnText" column="btn_text" />
|
||||||
|
<result property="btnLink" column="btn_link" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectActPageConfigGuideVo">
|
||||||
|
select id, act_code, act_title, act_desc, bg_img, btn_text, btn_link, create_time, update_time from act_page_config_guide
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectActPageConfigGuideList" parameterType="ActPageConfigGuide" resultMap="ActPageConfigGuideResult">
|
||||||
|
<include refid="selectActPageConfigGuideVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="actCode != null and actCode != ''"> and act_code = #{actCode}</if>
|
||||||
|
<if test="actTitle != null and actTitle != ''"> and act_title = #{actTitle}</if>
|
||||||
|
<if test="actDesc != null and actDesc != ''"> and act_desc = #{actDesc}</if>
|
||||||
|
<if test="bgImg != null and bgImg != ''"> and bg_img = #{bgImg}</if>
|
||||||
|
<if test="btnText != null and btnText != ''"> and btn_text = #{btnText}</if>
|
||||||
|
<if test="btnLink != null and btnLink != ''"> and btn_link = #{btnLink}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectActPageConfigGuideById" parameterType="Integer" resultMap="ActPageConfigGuideResult">
|
||||||
|
<include refid="selectActPageConfigGuideVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertActPageConfigGuide" parameterType="ActPageConfigGuide" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into act_page_config_guide
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="actCode != null and actCode != ''">act_code,</if>
|
||||||
|
<if test="actTitle != null">act_title,</if>
|
||||||
|
<if test="actDesc != null">act_desc,</if>
|
||||||
|
<if test="bgImg != null">bg_img,</if>
|
||||||
|
<if test="btnText != null">btn_text,</if>
|
||||||
|
<if test="btnLink != null">btn_link,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="actCode != null and actCode != ''">#{actCode},</if>
|
||||||
|
<if test="actTitle != null">#{actTitle},</if>
|
||||||
|
<if test="actDesc != null">#{actDesc},</if>
|
||||||
|
<if test="bgImg != null">#{bgImg},</if>
|
||||||
|
<if test="btnText != null">#{btnText},</if>
|
||||||
|
<if test="btnLink != null">#{btnLink},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateActPageConfigGuide" parameterType="ActPageConfigGuide">
|
||||||
|
update act_page_config_guide
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="actCode != null and actCode != ''">act_code = #{actCode},</if>
|
||||||
|
<if test="actTitle != null">act_title = #{actTitle},</if>
|
||||||
|
<if test="actDesc != null">act_desc = #{actDesc},</if>
|
||||||
|
<if test="bgImg != null">bg_img = #{bgImg},</if>
|
||||||
|
<if test="btnText != null">btn_text = #{btnText},</if>
|
||||||
|
<if test="btnLink != null">btn_link = #{btnLink},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteActPageConfigGuideById" parameterType="Integer">
|
||||||
|
delete from act_page_config_guide where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteActPageConfigGuideByIds" parameterType="String">
|
||||||
|
delete from act_page_config_guide where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-sm-6 {
|
.col-sm-6 {
|
||||||
width: 70%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawNamePic {
|
.drawNamePic {
|
||||||
|
|
@ -67,6 +67,13 @@
|
||||||
left: 0px;
|
left: 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.btnSelect{
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;padding: 15px 32px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
|
|
@ -107,8 +114,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">活动名称:</label>
|
<label class="col-sm-4 control-label is-required">活动名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="DRAWNAME" placeholder="活动名称" class="form-control" type="text"
|
<input name="DRAWNAME" placeholder="活动名称" class="form-control" type="text" maxlength="30">
|
||||||
maxlength="30">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -116,10 +122,8 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">状态:</label>
|
<label class="col-sm-4 control-label is-required">状态:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="STATUS" class="form-control"
|
<select name="STATUS" class="form-control" th:with="type=${@dict.getType('start_stop')}">
|
||||||
th:with="type=${@dict.getType('start_stop')}">
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
||||||
th:value="${dict.dictValue}"></option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -130,10 +134,8 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">消耗对象:</label>
|
<label class="col-sm-4 control-label is-required">消耗对象:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="EXPENO" class="form-control"
|
<select name="EXPENO" class="form-control" th:with="type=${@dict.getType('expeType')}">
|
||||||
th:with="type=${@dict.getType('expeType')}">
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
||||||
th:value="${dict.dictValue}"></option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -142,8 +144,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">消耗价值:</label>
|
<label class="col-sm-4 control-label is-required">消耗价值:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="EXPENOVALUE" placeholder="消耗价值" class="form-control"
|
<input name="EXPENOVALUE" placeholder="消耗价值" class="form-control" type="text" maxlength="30">
|
||||||
type="text" maxlength="30">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -154,8 +155,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="STARTTIME" class="form-control"
|
<input name="STARTTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -166,8 +166,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="ENDTIME" class="form-control"
|
<input name="ENDTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -181,7 +180,9 @@
|
||||||
<div>
|
<div>
|
||||||
<form class="form form-horizontal m-t">
|
<form class="form form-horizontal m-t">
|
||||||
<h4 class="form-header h4">第2步-选择UI模板</h4>
|
<h4 class="form-header h4">第2步-选择UI模板</h4>
|
||||||
分格查询字典表 单选按钮
|
<div th:with="type=${@dict.getType('activityTemplate')}">
|
||||||
|
<a class="btn btn-rounded" href="#" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" onclick="activityTemplate(this)"></a>
|
||||||
|
</div>
|
||||||
<h4 class="form-header h4">字典表显示字段</h4>
|
<h4 class="form-header h4">字典表显示字段</h4>
|
||||||
<img src="../../img/1.jpg" width="104" height="142">
|
<img src="../../img/1.jpg" width="104" height="142">
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -303,7 +304,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
|
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
|
||||||
|
<h4 class="form-header h4">第4步-选择玩法</h4>
|
||||||
|
<div th:with="type=${@dict.getType('activityPlay')}">
|
||||||
|
<a class="btn btn-rounded" href="#" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" onclick="activityTemplate(this)"></a>
|
||||||
|
</div>
|
||||||
|
<img src="../../img/1.jpg" width="104" height="142">
|
||||||
<h4 class="form-header h4">活动规则</h4>
|
<h4 class="form-header h4">活动规则</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
|
@ -655,6 +660,10 @@
|
||||||
function updatePic(val) {
|
function updatePic(val) {
|
||||||
var id = val.id;
|
var id = val.id;
|
||||||
var value = val.value;
|
var value = val.value;
|
||||||
|
if (value == null || value == ""&& id.indexOf("btn") != -1){
|
||||||
|
//默认值
|
||||||
|
value = "自定义按钮"+id.charAt(id.length -1);
|
||||||
|
}
|
||||||
$("#" + id + "Pic").text(value);
|
$("#" + id + "Pic").text(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -696,6 +705,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function activityTemplate(val){
|
||||||
|
$(val).addClass('btn-success').siblings().removeClass('btn-success');
|
||||||
|
//todo 添加逻辑
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue