diff --git a/ruoyi-admin/src/main/resources/static/img/1.jpg b/ruoyi-admin/src/main/resources/static/img/1.jpg new file mode 100644 index 000000000..c8dd13732 Binary files /dev/null and b/ruoyi-admin/src/main/resources/static/img/1.jpg differ diff --git a/sino-activity/src/main/java/com/sinosoft/activity/controller/ActPageConfigGuideController.java b/sino-activity/src/main/java/com/sinosoft/activity/controller/ActPageConfigGuideController.java new file mode 100644 index 000000000..591c59ab4 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/controller/ActPageConfigGuideController.java @@ -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 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 list = actPageConfigGuideService.selectActPageConfigGuideList(actPageConfigGuide); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/domain/ActPageConfigGuide.java b/sino-activity/src/main/java/com/sinosoft/activity/domain/ActPageConfigGuide.java new file mode 100644 index 000000000..71b1ea660 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/domain/ActPageConfigGuide.java @@ -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(); + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/mapper/ActPageConfigGuideMapper.java b/sino-activity/src/main/java/com/sinosoft/activity/mapper/ActPageConfigGuideMapper.java new file mode 100644 index 000000000..d49aded4a --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/mapper/ActPageConfigGuideMapper.java @@ -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 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); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/IActPageConfigGuideService.java b/sino-activity/src/main/java/com/sinosoft/activity/service/IActPageConfigGuideService.java new file mode 100644 index 000000000..d810e84c6 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/IActPageConfigGuideService.java @@ -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 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); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/impl/ActPageConfigGuideServiceImpl.java b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/ActPageConfigGuideServiceImpl.java new file mode 100644 index 000000000..7dcbe6624 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/ActPageConfigGuideServiceImpl.java @@ -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 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); + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/vo/ActVO.java b/sino-activity/src/main/java/com/sinosoft/activity/vo/ActVO.java new file mode 100644 index 000000000..3f39ece50 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/vo/ActVO.java @@ -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; + + + +} diff --git a/sino-activity/src/main/resources/mapper/activity/ActPageConfigGuideMapper.xml b/sino-activity/src/main/resources/mapper/activity/ActPageConfigGuideMapper.xml new file mode 100644 index 000000000..e15bdb05f --- /dev/null +++ b/sino-activity/src/main/resources/mapper/activity/ActPageConfigGuideMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + select id, act_code, act_title, act_desc, bg_img, btn_text, btn_link, create_time, update_time from act_page_config_guide + + + + + + + + insert into act_page_config_guide + + act_code, + act_title, + act_desc, + bg_img, + btn_text, + btn_link, + create_time, + update_time, + + + #{actCode}, + #{actTitle}, + #{actDesc}, + #{bgImg}, + #{btnText}, + #{btnLink}, + #{createTime}, + #{updateTime}, + + + + + update act_page_config_guide + + act_code = #{actCode}, + act_title = #{actTitle}, + act_desc = #{actDesc}, + bg_img = #{bgImg}, + btn_text = #{btnText}, + btn_link = #{btnLink}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from act_page_config_guide where id = #{id} + + + + delete from act_page_config_guide where id in + + #{id} + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/templates/activity/info/add.html b/sino-activity/src/main/resources/templates/activity/info/add.html index 5f5a3686d..363e7107a 100644 --- a/sino-activity/src/main/resources/templates/activity/info/add.html +++ b/sino-activity/src/main/resources/templates/activity/info/add.html @@ -25,7 +25,7 @@ } .col-sm-6 { - width: 70%; + width: 50%; } .drawNamePic { @@ -67,6 +67,13 @@ left: 0px; width: 100%; } + .btnSelect{ + cursor: pointer; + background-color: #4CAF50; + color: white;padding: 15px 32px; + display: inline-block; + font-size: 15px; + } @@ -107,8 +114,7 @@
- +
@@ -116,10 +122,8 @@
- +
@@ -130,10 +134,8 @@
- +
@@ -142,8 +144,7 @@
- +
@@ -154,8 +155,7 @@
- +
@@ -166,8 +166,7 @@
- +
@@ -181,7 +180,9 @@

第2步-选择UI模板

- 分格查询字典表 单选按钮 +
+ +

字典表显示字段

@@ -303,7 +304,11 @@
- +

第4步-选择玩法

+
+ +
+

活动规则

@@ -655,6 +660,10 @@ function updatePic(val) { var id = val.id; var value = val.value; + if (value == null || value == ""&& id.indexOf("btn") != -1){ + //默认值 + value = "自定义按钮"+id.charAt(id.length -1); + } $("#" + id + "Pic").text(value); } @@ -696,6 +705,11 @@ } } + function activityTemplate(val){ + $(val).addClass('btn-success').siblings().removeClass('btn-success'); + //todo 添加逻辑 + } + \ No newline at end of file