From 40a9e7c1fb8f6ff0a23430f1d5bc834379e0df2b Mon Sep 17 00:00:00 2001 From: xu0625 <1212> Date: Tue, 30 Mar 2021 09:45:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86-=E6=8A=BD?= =?UTF-8?q?=E5=A5=96=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/js/ry-ui.js | 45 +++ .../controller/DrawConfigController.java | 150 ++++++++++ .../controller/DrawInfoController.java | 180 +++++++++++ .../sinosoft/activity/domain/DrawConfig.java | 281 ++++++++++++++++++ .../sinosoft/activity/domain/DrawInfo.java | 217 ++++++++++++++ .../sinosoft/activity/domain/DrawRule.java | 199 +++++++++++++ .../activity/mapper/DrawConfigMapper.java | 62 ++++ .../activity/mapper/DrawInfoMapper.java | 63 ++++ .../activity/mapper/DrawRuleMapper.java | 62 ++++ .../activity/service/IDrawConfigService.java | 62 ++++ .../activity/service/IDrawInfoService.java | 63 ++++ .../activity/service/IDrawRuleService.java | 63 ++++ .../service/impl/DrawConfigServiceImpl.java | 96 ++++++ .../service/impl/DrawInfoServiceImpl.java | 96 ++++++ .../service/impl/DrawRuleServiceImpl.java | 96 ++++++ .../mapper/activity/DrawConfigMapper.xml | 157 ++++++++++ .../mapper/activity/DrawInfoMapper.xml | 156 ++++++++++ .../mapper/activity/DrawRuleMapper.xml | 114 +++++++ .../templates/activity/info/add.html | 243 +++++++++++++++ .../templates/activity/info/configAdd.html | 174 +++++++++++ .../templates/activity/info/configEdit.html | 181 +++++++++++ .../templates/activity/info/configList.html | 146 +++++++++ .../templates/activity/info/edit.html | 258 ++++++++++++++++ .../templates/activity/info/info.html | 173 +++++++++++ 24 files changed, 3337 insertions(+) create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/controller/DrawConfigController.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/controller/DrawInfoController.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/domain/DrawConfig.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/domain/DrawInfo.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawConfigMapper.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawInfoMapper.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawRuleMapper.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/service/IDrawConfigService.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/service/IDrawInfoService.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/service/IDrawRuleService.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawConfigServiceImpl.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawInfoServiceImpl.java create mode 100644 sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawRuleServiceImpl.java create mode 100644 sino-activity/src/main/resources/mapper/activity/DrawConfigMapper.xml create mode 100644 sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml create mode 100644 sino-activity/src/main/resources/mapper/activity/DrawRuleMapper.xml create mode 100644 sino-activity/src/main/resources/templates/activity/info/add.html create mode 100644 sino-activity/src/main/resources/templates/activity/info/configAdd.html create mode 100644 sino-activity/src/main/resources/templates/activity/info/configEdit.html create mode 100644 sino-activity/src/main/resources/templates/activity/info/configList.html create mode 100644 sino-activity/src/main/resources/templates/activity/info/edit.html create mode 100644 sino-activity/src/main/resources/templates/activity/info/info.html diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index f5c0d8544..9de3eba0a 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -900,6 +900,50 @@ var table = { }); layer.full(index); }, + + + // 弹出层全屏 + openInFoFull: function (title, url, width, height) { + // 如果是移动端,就使用自适应大小弹窗 + if ($.common.isMobile()) { + width = 'auto'; + height = 'auto'; + } + if ($.common.isEmpty(title)) { + title = false; + } + if ($.common.isEmpty(url)) { + url = "/404.html"; + } + if ($.common.isEmpty(width)) { + width = 800; + } + if ($.common.isEmpty(height)) { + height = ($(window).height() - 50); + } + var index = layer.open({ + type: 2, + area: [width + 'px', height + 'px'], + fix: false, + //不固定 + maxmin: true, + shade: 0.3, + title: title, + content: url, + btn: ['关闭'], + // 弹层外区域关闭 + shadeClose: true, + yes: function (index, layero) { + layer.close(index); + } + }); + layer.full(index); + }, + + + + + // 选卡页方式打开 openTab: function (title, url, isRefresh) { createMenuItem(url, title, isRefresh); @@ -1153,6 +1197,7 @@ var table = { $.modal.alertError(result.msg); } $.modal.closeLoading(); + $.modal.reload(); } }; $.ajax(config) diff --git a/sino-activity/src/main/java/com/sinosoft/activity/controller/DrawConfigController.java b/sino-activity/src/main/java/com/sinosoft/activity/controller/DrawConfigController.java new file mode 100644 index 000000000..2c81d162e --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/controller/DrawConfigController.java @@ -0,0 +1,150 @@ +package com.sinosoft.activity.controller; + + +import java.util.Date; +import java.util.List; + +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.sinosoft.activity.domain.DrawConfig; +import com.sinosoft.activity.domain.DrawPrizeInfo; +import com.sinosoft.activity.service.IDrawConfigService; +import com.sinosoft.activity.service.IDrawPrizeInfoService; +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.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 存储奖项配置信息Controller + * + * @author ruoyi + * @date 2021-03-26 + */ +@Controller +@RequestMapping("/activity/config") +public class DrawConfigController extends BaseController +{ + private String prefix = "activity/info"; + + @Autowired + private IDrawConfigService drawConfigService; + + @Autowired + private IDrawPrizeInfoService iDrawPrizeInfoService; + @RequiresPermissions("activity:config:view") + @GetMapping() + public String config() + { + return prefix + "/configList"; + } + + /** + * 查询存储奖项配置信息列表 + */ + @RequiresPermissions("activity:config:list") + @PostMapping("/{DRAWCODE}/list") + @ResponseBody + public TableDataInfo list(DrawConfig drawConfig) + { + startPage(); + List list = drawConfigService.selectDrawConfigList(drawConfig); + return getDataTable(list); + } + + /** + * 导出存储奖项配置信息列表 + */ + @RequiresPermissions("activity:config:export") + @Log(title = "存储奖项配置信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(DrawConfig drawConfig) + { + List list = drawConfigService.selectDrawConfigList(drawConfig); + ExcelUtil util = new ExcelUtil(DrawConfig.class); + return util.exportExcel(list, "config"); + } + + /** + * 新增存储奖项配置信息 + */ + @GetMapping("/add/{id}") + public String add(@PathVariable("id")String DRAWCODE ,ModelMap mapp) + { + mapp.put("DRAWCODE",DRAWCODE); + return prefix + "/configAdd"; + } + + /** + * 新增保存存储奖项配置信息 + */ + @RequiresPermissions("activity:config:add") + @Log(title = "存储奖项配置信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(DrawConfig drawConfig) + { + drawConfig.setCREATETIMESTAMP(new Date()); + return toAjax(drawConfigService.insertDrawConfig(drawConfig)); + } + + /** + * 修改存储奖项配置信息 + */ + @GetMapping("/edit/{DRAWCONFIGID}") + public String edit(@PathVariable("DRAWCONFIGID") String DRAWCONFIGID, ModelMap mmap) + { + DrawConfig drawConfig = drawConfigService.selectDrawConfigById(DRAWCONFIGID); + mmap.put("drawConfig", drawConfig); + return prefix + "/configEdit"; + } + + /** + * 修改保存存储奖项配置信息 + */ + @RequiresPermissions("activity:config:edit") + @Log(title = "存储奖项配置信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(DrawConfig drawConfig) + { + drawConfig.setLASTUPDATETIMESTAMP(new Date()); + return toAjax(drawConfigService.updateDrawConfig(drawConfig)); + } + + /** + * 删除存储奖项配置信息 + */ + @RequiresPermissions("activity:config:remove") + @Log(title = "存储奖项配置信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(drawConfigService.deleteDrawConfigByIds(ids)); + } + + + /** + * 获取存储奖品的基础信息对象 + * + * @return + */ + @GetMapping("/prizeInfo") + @ResponseBody + public List selectDrawPrizeInfoList(DrawPrizeInfo drawPrizeInfo) { + + return iDrawPrizeInfoService.selectDrawPrizeInfoList(drawPrizeInfo); + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/controller/DrawInfoController.java b/sino-activity/src/main/java/com/sinosoft/activity/controller/DrawInfoController.java new file mode 100644 index 000000000..6ca42a447 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/controller/DrawInfoController.java @@ -0,0 +1,180 @@ +package com.sinosoft.activity.controller; + +import java.net.URLDecoder; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + + +import com.alibaba.fastjson.JSON; +import com.sinosoft.activity.domain.DrawInfo; +import com.sinosoft.activity.domain.DrawPrizeInfo; +import com.sinosoft.activity.domain.DrawRule; +import com.sinosoft.activity.service.IDrawInfoService; +import com.sinosoft.activity.service.IDrawPrizeInfoService; +import com.sinosoft.activity.service.IDrawRuleService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.BeanUtils; +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.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 xlh + * @date 2021-03-25 + */ +@Controller +@RequestMapping("/activity/info") +public class DrawInfoController extends BaseController +{ + private String prefix = "activity/info"; + + @Autowired + private IDrawInfoService drawInfoService; + + @RequiresPermissions("activity:info:view") + @GetMapping() + public String info() + { + return prefix + "/info"; + } + + @Autowired + private IDrawPrizeInfoService iDrawPrizeInfoService; + + @Autowired + private IDrawRuleService iDrawRuleService; + /** + * 查询抽奖活动管理列表 + */ + @RequiresPermissions("activity:info:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(DrawInfo drawInfo) + { + startPage(); + List list = drawInfoService.selectDrawInfoList(drawInfo); + return getDataTable(list); + } + + /** + * 导出抽奖活动管理列表 + */ + @RequiresPermissions("activity:info:export") + @Log(title = "抽奖活动管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(DrawInfo drawInfo) + { + List list = drawInfoService.selectDrawInfoList(drawInfo); + ExcelUtil util = new ExcelUtil(DrawInfo.class); + return util.exportExcel(list, "info"); + } + + /** + * 新增抽奖活动管理 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存抽奖活动管理 + */ + @RequiresPermissions("activity:info:add") + @Log(title = "抽奖活动管理", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(DrawInfo drawInfo) + { + logger.info("前台传参"+ JSON.toJSONString(drawInfo)); + SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + Date date = new Date(); + drawInfo.setCREATETIMESTAMP(date); + String format1 = format.format(date); + drawInfo.setDRAWCODE(format1); + drawInfoService.insertDrawInfo(drawInfo); + DrawRule drawRule = new DrawRule(); + BeanUtils.copyProperties(drawInfo,drawRule); + logger.info("接口新增"+ JSON.toJSONString(drawRule)); + int i = iDrawRuleService.insertDrawRule(drawRule); + return toAjax(i); + } + + /** + * 修改抽奖活动管理 + */ + @GetMapping("/edit/{DRAWID}") + public String edit(@PathVariable("DRAWID") String DRAWID, ModelMap mmap) + { + DrawInfo drawInfo = drawInfoService.selectDrawInfoById(DRAWID); + mmap.put("drawInfo", drawInfo); + return prefix + "/edit"; + } + + /** + * 修改保存抽奖活动管理 + */ + @RequiresPermissions("activity:info:edit") + @Log(title = "抽奖活动管理", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(DrawInfo drawInfo) + { + logger.info("修改存储抽奖特殊规则对象传参:"+JSON.toJSONString(drawInfo)); + drawInfo.setLASTUPDATETIMESTAMP(new Date()); + drawInfoService.updateDrawInfo(drawInfo); + DrawRule drawRule = new DrawRule(); + BeanUtils.copyProperties(drawInfo,drawRule); + logger.info("修改存储抽奖特殊规则对象入参:"+JSON.toJSONString(drawRule)); + int i = iDrawRuleService.updateDrawRule(drawRule); + return toAjax(i); + } + + /** + * 删除抽奖活动管理 + */ + @RequiresPermissions("activity:info:remove") + @Log(title = "抽奖活动管理", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(drawInfoService.deleteDrawInfoByIds(ids)); + } + + /** + * 获取存储奖品的基础信息对象 + * + * @return + */ + @GetMapping("/prizeInfo") + @ResponseBody + public List selectDrawPrizeInfoList(DrawPrizeInfo drawPrizeInfo) { + + return iDrawPrizeInfoService.selectDrawPrizeInfoList(drawPrizeInfo); + } + + @RequestMapping("/prizeDetail/{DRAWCODE}/{DRAWNAME}") + public String prizeDetail(@PathVariable("DRAWCODE") String DRAWCODE ,@PathVariable("DRAWNAME") String DRAWNAME , ModelMap mapp){ + mapp.put("DRAWCODE",DRAWCODE); + mapp.put("DRAWNAME", URLDecoder.decode(DRAWNAME)); + return prefix + "/configList"; + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawConfig.java b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawConfig.java new file mode 100644 index 000000000..3bf55369c --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawConfig.java @@ -0,0 +1,281 @@ +package com.sinosoft.activity.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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; + +/** + * 存储奖项配置信息对象 draw_config + * + * @author xlh + * @date 2021-03-26 + */ +public class DrawConfig extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 业务主键 */ + private String DRAWCONFIGID; + + /** 奖品代码 */ + @Excel(name = "奖品代码") + private String PRIZECODE; + + /** 抽奖活动代码 */ + @Excel(name = "抽奖活动代码") + private String DRAWCODE; + + /** 概率 */ + @Excel(name = "概率") + private String PROBABILITY; + + /** 显示序号 */ + @Excel(name = "显示序号") + private String DISPLAYORDER; + + /** 奖品等级 */ + @Excel(name = "奖品等级", readConverterExp="blank=空奖品,prizeLevel1=一等奖,prizeLevel2=二等奖,prizeLevel3=三等奖,prizeLevel4=四等奖,prizeLevel5=五等奖,prizeLevel6=六等奖,prizeLevel7=七等奖") + private String PRIZELEVEL; + + /** 提示信息 */ + @Excel(name = "提示信息") + private String CUE; + + /** 奖品总数量 */ + @Excel(name = "奖品总数量") + private Long TOTALNUMBER; + + /** 奖品剩余数量 */ + @Excel(name = "奖品剩余数量") + private Long AVAILABLENUMBER; + + /** 状态 */ + @Excel(name = "状态" ,readConverterExp="1=启用,2=禁用") + private String STATUS; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date CREATETIMESTAMP; + + /** 最后修改时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date LASTUPDATETIMESTAMP; + + /** 中奖次数限制 */ + @Excel(name = "中奖次数限制",readConverterExp="none=无限制,distinction=当个活动限制,nodistinction=不区分活动限制") + private String AWARDTYPE; + + /** 中奖次数限制值 */ + @Excel(name = "中奖次数限制值" ) + private Long AWARDTYPEVALUE; + + /** 领取方式 */ + @Excel(name = "领取方式" ,readConverterExp = "0=手动领取,1=自动领取") + private String AWARDMETHOD; + + /** */ + private String SENDMSGFLAG; + + /** */ + private String MSGTEMPLETEID; + + private String PRIZENAME; + + public String getPRIZENAME() { + return PRIZENAME; + } + + public void setPRIZENAME(String PRIZENAME) { + this.PRIZENAME = PRIZENAME; + } + + public void setDRAWCONFIGID(String DRAWCONFIGID) + { + this.DRAWCONFIGID = DRAWCONFIGID; + } + + public String getDRAWCONFIGID() + { + return DRAWCONFIGID; + } + public void setPRIZECODE(String PRIZECODE) + { + this.PRIZECODE = PRIZECODE; + } + + public String getPRIZECODE() + { + return PRIZECODE; + } + public void setDRAWCODE(String DRAWCODE) + { + this.DRAWCODE = DRAWCODE; + } + + public String getDRAWCODE() + { + return DRAWCODE; + } + public void setPROBABILITY(String PROBABILITY) + { + this.PROBABILITY = PROBABILITY; + } + + public String getPROBABILITY() + { + return PROBABILITY; + } + public void setDISPLAYORDER(String DISPLAYORDER) + { + this.DISPLAYORDER = DISPLAYORDER; + } + + public String getDISPLAYORDER() + { + return DISPLAYORDER; + } + public void setPRIZELEVEL(String PRIZELEVEL) + { + this.PRIZELEVEL = PRIZELEVEL; + } + + public String getPRIZELEVEL() + { + return PRIZELEVEL; + } + public void setCUE(String CUE) + { + this.CUE = CUE; + } + + public String getCUE() + { + return CUE; + } + public void setTOTALNUMBER(Long TOTALNUMBER) + { + this.TOTALNUMBER = TOTALNUMBER; + } + + public Long getTOTALNUMBER() + { + return TOTALNUMBER; + } + public void setAVAILABLENUMBER(Long AVAILABLENUMBER) + { + this.AVAILABLENUMBER = AVAILABLENUMBER; + } + + public Long getAVAILABLENUMBER() + { + return AVAILABLENUMBER; + } + public void setSTATUS(String STATUS) + { + this.STATUS = STATUS; + } + + public String getSTATUS() + { + return STATUS; + } + public void setCREATETIMESTAMP(Date CREATETIMESTAMP) + { + this.CREATETIMESTAMP = CREATETIMESTAMP; + } + + public Date getCREATETIMESTAMP() + { + return CREATETIMESTAMP; + } + public void setLASTUPDATETIMESTAMP(Date LASTUPDATETIMESTAMP) + { + this.LASTUPDATETIMESTAMP = LASTUPDATETIMESTAMP; + } + + public Date getLASTUPDATETIMESTAMP() + { + return LASTUPDATETIMESTAMP; + } + public void setAWARDTYPE(String AWARDTYPE) + { + this.AWARDTYPE = AWARDTYPE; + } + + public String getAWARDTYPE() + { + return AWARDTYPE; + } + public void setAWARDTYPEVALUE(Long AWARDTYPEVALUE) + { + this.AWARDTYPEVALUE = AWARDTYPEVALUE; + } + + public Long getAWARDTYPEVALUE() + { + return AWARDTYPEVALUE; + } + public void setAWARDMETHOD(String AWARDMETHOD) + { + this.AWARDMETHOD = AWARDMETHOD; + } + + public String getAWARDMETHOD() + { + return AWARDMETHOD; + } + public void setSENDMSGFLAG(String SENDMSGFLAG) + { + this.SENDMSGFLAG = SENDMSGFLAG; + } + + public String getSENDMSGFLAG() + { + return SENDMSGFLAG; + } + public void setMSGTEMPLETEID(String MSGTEMPLETEID) + { + this.MSGTEMPLETEID = MSGTEMPLETEID; + } + + public String getMSGTEMPLETEID() + { + return MSGTEMPLETEID; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("DRAWCONFIGID", getDRAWCONFIGID()) + .append("PRIZECODE", getPRIZECODE()) + .append("DRAWCODE", getDRAWCODE()) + .append("PROBABILITY", getPROBABILITY()) + .append("DISPLAYORDER", getDISPLAYORDER()) + .append("PRIZELEVEL", getPRIZELEVEL()) + .append("CUE", getCUE()) + .append("TOTALNUMBER", getTOTALNUMBER()) + .append("AVAILABLENUMBER", getAVAILABLENUMBER()) + .append("STATUS", getSTATUS()) + .append("CREATETIMESTAMP", getCREATETIMESTAMP()) + .append("LASTUPDATETIMESTAMP", getLASTUPDATETIMESTAMP()) + .append("AWARDTYPE", getAWARDTYPE()) + .append("AWARDTYPEVALUE", getAWARDTYPEVALUE()) + .append("AWARDMETHOD", getAWARDMETHOD()) + .append("SENDMSGFLAG", getSENDMSGFLAG()) + .append("MSGTEMPLETEID", getMSGTEMPLETEID()) + .toString(); + } +} + diff --git a/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawInfo.java b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawInfo.java new file mode 100644 index 000000000..8dab0e21a --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawInfo.java @@ -0,0 +1,217 @@ +package com.sinosoft.activity.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import java.util.Date; + +/** + * 抽奖活动管理对象 draw_info + * + * @author ruoyi + * @date 2021-03-25 + */ +public class DrawInfo extends DrawRule +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String DRAWID; + + /** 抽奖活动代码 */ + @Excel(name = "抽奖活动代码") + private String DRAWCODE; + + /** 抽奖活动类型 */ + @Excel(name = "抽奖活动类型") + private String DRAWTYPE; + + /** 抽奖活动名称 */ + @Excel(name = "抽奖活动名称") + private String DRAWNAME; + + /** 开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date STARTTIME; + + /** 结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date ENDTIME; + + /** 消耗对象 */ + @Excel(name = "消耗对象",readConverterExp ="integral=积分,task=抽奖次数") + private String EXPENO; + + /** 消耗价值 */ + @Excel(name = "消耗价值") + private Long EXPENOVALUE; + + /** 备注 */ + @Excel(name = "备注") + private String COMMENTS; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date CREATETIMESTAMP; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date LASTUPDATETIMESTAMP; + + /** 状态 */ + @Excel(name = "状态" ,readConverterExp="1=启用,2=禁用") + private String STATUS; + + /** 是否需要更新缓存 */ + @Excel(name = "是否需要更新缓存") + private String UPDATEFLAG; + + /** 规则描述 */ + @Excel(name = "规则描述") + private String RULEDESCRIPTION; + + /** */ + private String VALIDATETYPE; + + + public void setDRAWID(String DRAWID) + { + this.DRAWID = DRAWID; + } + + public String getDRAWID() + { + return DRAWID; + } + public void setDRAWCODE(String DRAWCODE) + { + this.DRAWCODE = DRAWCODE; + } + + public String getDRAWCODE() + { + return DRAWCODE; + } + public void setDRAWTYPE(String DRAWTYPE) + { + this.DRAWTYPE = DRAWTYPE; + } + + public String getDRAWTYPE() + { + return DRAWTYPE; + } + public void setDRAWNAME(String DRAWNAME) + { + this.DRAWNAME = DRAWNAME; + } + + public String getDRAWNAME() + { + return DRAWNAME; + } + public void setSTARTTIME(Date STARTTIME) + { + this.STARTTIME = STARTTIME; + } + + public Date getSTARTTIME() + { + return STARTTIME; + } + public void setENDTIME(Date ENDTIME) + { + this.ENDTIME = ENDTIME; + } + + public Date getENDTIME() + { + return ENDTIME; + } + public void setEXPENO(String EXPENO) + { + this.EXPENO = EXPENO; + } + + public String getEXPENO() + { + return EXPENO; + } + public void setEXPENOVALUE(Long EXPENOVALUE) + { + this.EXPENOVALUE = EXPENOVALUE; + } + + public Long getEXPENOVALUE() + { + return EXPENOVALUE; + } + public void setCOMMENTS(String COMMENTS) + { + this.COMMENTS = COMMENTS; + } + + public String getCOMMENTS() + { + return COMMENTS; + } + public void setCREATETIMESTAMP(Date CREATETIMESTAMP) + { + this.CREATETIMESTAMP = CREATETIMESTAMP; + } + + public Date getCREATETIMESTAMP() + { + return CREATETIMESTAMP; + } + public void setLASTUPDATETIMESTAMP(Date LASTUPDATETIMESTAMP) + { + this.LASTUPDATETIMESTAMP = LASTUPDATETIMESTAMP; + } + + public Date getLASTUPDATETIMESTAMP() + { + return LASTUPDATETIMESTAMP; + } + public void setSTATUS(String STATUS) + { + this.STATUS = STATUS; + } + + public String getSTATUS() + { + return STATUS; + } + public void setUPDATEFLAG(String UPDATEFLAG) + { + this.UPDATEFLAG = UPDATEFLAG; + } + + public String getUPDATEFLAG() + { + return UPDATEFLAG; + } + public void setRULEDESCRIPTION(String RULEDESCRIPTION) + { + this.RULEDESCRIPTION = RULEDESCRIPTION; + } + + public String getRULEDESCRIPTION() + { + return RULEDESCRIPTION; + } + public void setVALIDATETYPE(String VALIDATETYPE) + { + this.VALIDATETYPE = VALIDATETYPE; + } + + public String getVALIDATETYPE() + { + return VALIDATETYPE; + } + + +} \ No newline at end of file diff --git a/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java new file mode 100644 index 000000000..466c45693 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java @@ -0,0 +1,199 @@ +package com.sinosoft.activity.domain; +import java.util.List; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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; + + +/** + * 存储抽奖特殊规则对象 draw_rule + * + * @author ruoyi + * @date 2021-03-25 + */ +public class DrawRule extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 业务主键 */ + private String DRAWRULEID; + + /** 抽奖活动代码 */ + private String DRAWCODE; + + /** 首次抽奖配置标志 */ + private String FIRSTFLAG; + + /** 首次抽奖必中奖品编码 */ + private String FIRSTAWARDPRIZE; + + /** 日抽奖次数限制标志 */ + private String DAILYFLAG; + + /** 日抽奖限制开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date DAILYSTARTTIME; + + /** 日抽奖限制结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date DAILYENDTIME; + + /** 日抽奖限制次数 */ + private Long DAILYNUMBER; + + /** N次抽奖必中标志 */ + private String WILLDRAWFLAG; + + /** N次抽奖必中奖品 */ + private String WILLDRAWAWARDPRIZE; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date CREATETIMESTAMP; + + /** 最后修改时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date LASTUPDATETIMESTAMP; + + /** N次抽奖必中基数 */ + private Long WILLDRAWAWARDNUMBER; + + public String getDRAWCODE() { + return DRAWCODE; + } + + public void setDRAWCODE(String DRAWCODE) { + this.DRAWCODE = DRAWCODE; + } + + public Date getCREATETIMESTAMP() { + return CREATETIMESTAMP; + } + + public void setCREATETIMESTAMP(Date CREATETIMESTAMP) { + this.CREATETIMESTAMP = CREATETIMESTAMP; + } + + public Date getLASTUPDATETIMESTAMP() { + return LASTUPDATETIMESTAMP; + } + + public void setLASTUPDATETIMESTAMP(Date LASTUPDATETIMESTAMP) { + this.LASTUPDATETIMESTAMP = LASTUPDATETIMESTAMP; + } + + public void setDRAWRULEID(String DRAWRULEID) + { + this.DRAWRULEID = DRAWRULEID; + } + + public Date getDAILYSTARTTIME() { + return DAILYSTARTTIME; + } + + public void setDAILYSTARTTIME(Date DAILYSTARTTIME) { + this.DAILYSTARTTIME = DAILYSTARTTIME; + } + + public Date getDAILYENDTIME() { + return DAILYENDTIME; + } + + public void setDAILYENDTIME(Date DAILYENDTIME) { + this.DAILYENDTIME = DAILYENDTIME; + } + + public String getDRAWRULEID() + { + return DRAWRULEID; + } + + + public void setFIRSTFLAG(String FIRSTFLAG) + { + this.FIRSTFLAG = FIRSTFLAG; + } + + public String getFIRSTFLAG() + { + return FIRSTFLAG; + } + public void setFIRSTAWARDPRIZE(String FIRSTAWARDPRIZE) + { + this.FIRSTAWARDPRIZE = FIRSTAWARDPRIZE; + } + + public String getFIRSTAWARDPRIZE() + { + return FIRSTAWARDPRIZE; + } + public void setDAILYFLAG(String DAILYFLAG) + { + this.DAILYFLAG = DAILYFLAG; + } + + public String getDAILYFLAG() + { + return DAILYFLAG; + } + + + public void setDAILYNUMBER(Long DAILYNUMBER) + { + this.DAILYNUMBER = DAILYNUMBER; + } + + public Long getDAILYNUMBER() + { + return DAILYNUMBER; + } + public void setWILLDRAWFLAG(String WILLDRAWFLAG) + { + this.WILLDRAWFLAG = WILLDRAWFLAG; + } + + public String getWILLDRAWFLAG() + { + return WILLDRAWFLAG; + } + public void setWILLDRAWAWARDPRIZE(String WILLDRAWAWARDPRIZE) + { + this.WILLDRAWAWARDPRIZE = WILLDRAWAWARDPRIZE; + } + + public String getWILLDRAWAWARDPRIZE() + { + return WILLDRAWAWARDPRIZE; + } + + + public void setWILLDRAWAWARDNUMBER(Long WILLDRAWAWARDNUMBER) + { + this.WILLDRAWAWARDNUMBER = WILLDRAWAWARDNUMBER; + } + + public Long getWILLDRAWAWARDNUMBER() + { + return WILLDRAWAWARDNUMBER; + } + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("DRAWRULEID", getDRAWRULEID()) + .append("FIRSTFLAG", getFIRSTFLAG()) + .append("FIRSTAWARDPRIZE", getFIRSTAWARDPRIZE()) + .append("DAILYFLAG", getDAILYFLAG()) + .append("DAILYSTARTTIME", getDAILYSTARTTIME()) + .append("DAILYENDTIME", getDAILYENDTIME()) + .append("DAILYNUMBER", getDAILYNUMBER()) + .append("WILLDRAWFLAG", getWILLDRAWFLAG()) + .append("WILLDRAWAWARDPRIZE", getWILLDRAWAWARDPRIZE()) + .append("WILLDRAWAWARDNUMBER", getWILLDRAWAWARDNUMBER()) + .toString(); + } +} \ No newline at end of file diff --git a/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawConfigMapper.java b/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawConfigMapper.java new file mode 100644 index 000000000..2b93a3e07 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawConfigMapper.java @@ -0,0 +1,62 @@ +package com.sinosoft.activity.mapper; + +import com.sinosoft.activity.domain.DrawConfig; + +import java.util.List; + +/** + * 存储奖项配置信息对象Mapper接口 + * + * @author ruoyi + * @date 2021-03-25 + */ +public interface DrawConfigMapper +{ + /** + * 查询存储奖项配置信息对象 + * + * @param DRAWCONFIGID 存储奖项配置信息对象ID + * @return 存储奖项配置信息对象 + */ + public DrawConfig selectDrawConfigById(String DRAWCONFIGID); + + /** + * 查询存储奖项配置信息对象列表 + * + * @param drawConfig 存储奖项配置信息对象 + * @return 存储奖项配置信息对象集合 + */ + public List selectDrawConfigList(DrawConfig drawConfig); + + /** + * 新增存储奖项配置信息对象 + * + * @param drawConfig 存储奖项配置信息对象 + * @return 结果 + */ + public int insertDrawConfig(DrawConfig drawConfig); + + /** + * 修改存储奖项配置信息对象 + * + * @param drawConfig 存储奖项配置信息对象 + * @return 结果 + */ + public int updateDrawConfig(DrawConfig drawConfig); + + /** + * 删除存储奖项配置信息对象 + * + * @param DRAWCONFIGID 存储奖项配置信息对象ID + * @return 结果 + */ + public int deleteDrawConfigById(String DRAWCONFIGID); + + /** + * 批量删除存储奖项配置信息对象 + * + * @param DRAWCONFIGIDs 需要删除的数据ID + * @return 结果 + */ + public int deleteDrawConfigByIds(String[] DRAWCONFIGIDs); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawInfoMapper.java b/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawInfoMapper.java new file mode 100644 index 000000000..3962dd31a --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawInfoMapper.java @@ -0,0 +1,63 @@ +package com.sinosoft.activity.mapper; + + +import com.sinosoft.activity.domain.DrawInfo; + +import java.util.List; + +/** + * 抽奖活动管理对象Mapper接口 + * + * @author ruoyi + * @date 2021-03-25 + */ +public interface DrawInfoMapper +{ + /** + * 查询抽奖活动管理对象 + * + * @param DRAWID 抽奖活动管理对象ID + * @return 抽奖活动管理对象 + */ + public DrawInfo selectDrawInfoById(String DRAWID); + + /** + * 查询抽奖活动管理对象列表 + * + * @param drawInfo 抽奖活动管理对象 + * @return 抽奖活动管理对象集合 + */ + public List selectDrawInfoList(DrawInfo drawInfo); + + /** + * 新增抽奖活动管理对象 + * + * @param drawInfo 抽奖活动管理对象 + * @return 结果 + */ + public int insertDrawInfo(DrawInfo drawInfo); + + /** + * 修改抽奖活动管理对象 + * + * @param drawInfo 抽奖活动管理对象 + * @return 结果 + */ + public int updateDrawInfo(DrawInfo drawInfo); + + /** + * 删除抽奖活动管理对象 + * + * @param DRAWID 抽奖活动管理对象ID + * @return 结果 + */ + public int deleteDrawInfoById(String DRAWID); + + /** + * 批量删除抽奖活动管理对象 + * + * @param DRAWIDs 需要删除的数据ID + * @return 结果 + */ + public int deleteDrawInfoByIds(String[] DRAWIDs); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawRuleMapper.java b/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawRuleMapper.java new file mode 100644 index 000000000..00aedc5d5 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/mapper/DrawRuleMapper.java @@ -0,0 +1,62 @@ +package com.sinosoft.activity.mapper; + +import java.util.List; + +import com.sinosoft.activity.domain.DrawRule; + +/** + * 查询抽奖活动管理对象Mapper接口 + * + * @author ruoyi + * @date 2021-03-25 + */ +public interface DrawRuleMapper +{ + /** + * 查询查询抽奖活动管理对象 + * + * @param DRAWRULEID 查询抽奖活动管理对象ID + * @return 查询抽奖活动管理对象 + */ + public DrawRule selectDrawRuleById(String DRAWRULEID); + + /** + * 查询查询抽奖活动管理对象列表 + * + * @param drawRule 查询抽奖活动管理对象 + * @return 查询抽奖活动管理对象集合 + */ + public List selectDrawRuleList(DrawRule drawRule); + + /** + * 新增查询抽奖活动管理对象 + * + * @param drawRule 查询抽奖活动管理对象 + * @return 结果 + */ + public int insertDrawRule(DrawRule drawRule); + + /** + * 修改查询抽奖活动管理对象 + * + * @param drawRule 查询抽奖活动管理对象 + * @return 结果 + */ + public int updateDrawRule(DrawRule drawRule); + + /** + * 删除查询抽奖活动管理对象 + * + * @param DRAWRULEID 查询抽奖活动管理对象ID + * @return 结果 + */ + public int deleteDrawRuleById(String DRAWRULEID); + + /** + * 批量删除查询抽奖活动管理对象 + * + * @param DRAWRULEIDs 需要删除的数据ID + * @return 结果 + */ + public int deleteDrawRuleByIds(String[] DRAWRULEIDs); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawConfigService.java b/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawConfigService.java new file mode 100644 index 000000000..92ff87575 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawConfigService.java @@ -0,0 +1,62 @@ +package com.sinosoft.activity.service; + +import java.util.List; + +import com.sinosoft.activity.domain.DrawConfig; + +/** + * 存储奖项配置信息列表Service接口 + * + * @author ruoyi + * @date 2021-03-25 + */ +public interface IDrawConfigService +{ + /** + * 查询存储奖项配置信息列表 + * + * @param DRAWCONFIGID 存储奖项配置信息列表ID + * @return 存储奖项配置信息列表 + */ + public DrawConfig selectDrawConfigById(String DRAWCONFIGID); + + /** + * 查询存储奖项配置信息列表列表 + * + * @param drawConfig 存储奖项配置信息列表 + * @return 存储奖项配置信息列表集合 + */ + public List selectDrawConfigList(DrawConfig drawConfig); + + /** + * 新增存储奖项配置信息列表 + * + * @param drawConfig 存储奖项配置信息列表 + * @return 结果 + */ + public int insertDrawConfig(DrawConfig drawConfig); + + /** + * 修改存储奖项配置信息列表 + * + * @param drawConfig 存储奖项配置信息列表 + * @return 结果 + */ + public int updateDrawConfig(DrawConfig drawConfig); + + /** + * 批量删除存储奖项配置信息列表 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteDrawConfigByIds(String ids); + + /** + * 删除存储奖项配置信息列表信息 + * + * @param DRAWCONFIGID 存储奖项配置信息列表ID + * @return 结果 + */ + public int deleteDrawConfigById(String DRAWCONFIGID); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawInfoService.java b/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawInfoService.java new file mode 100644 index 000000000..51e61d5c8 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawInfoService.java @@ -0,0 +1,63 @@ +package com.sinosoft.activity.service; + + +import com.sinosoft.activity.domain.DrawInfo; + +import java.util.List; + +/** + * 抽奖活动管理对象Service接口 + * + * @author ruoyi + * @date 2021-03-25 + */ +public interface IDrawInfoService +{ + /** + * 查询抽奖活动管理对象 + * + * @param DRAWID 抽奖活动管理对象ID + * @return 抽奖活动管理对象 + */ + public DrawInfo selectDrawInfoById(String DRAWID); + + /** + * 查询抽奖活动管理对象列表 + * + * @param drawInfo 抽奖活动管理对象 + * @return 抽奖活动管理对象集合 + */ + public List selectDrawInfoList(DrawInfo drawInfo); + + /** + * 新增抽奖活动管理对象 + * + * @param drawInfo 抽奖活动管理对象 + * @return 结果 + */ + public int insertDrawInfo(DrawInfo drawInfo); + + /** + * 修改抽奖活动管理对象 + * + * @param drawInfo 抽奖活动管理对象 + * @return 结果 + */ + public int updateDrawInfo(DrawInfo drawInfo); + + /** + * 批量删除抽奖活动管理对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteDrawInfoByIds(String ids); + + /** + * 删除抽奖活动管理对象信息 + * + * @param DRAWID 抽奖活动管理对象ID + * @return 结果 + */ + public int deleteDrawInfoById(String DRAWID); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawRuleService.java b/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawRuleService.java new file mode 100644 index 000000000..b11dbfd57 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/IDrawRuleService.java @@ -0,0 +1,63 @@ +package com.sinosoft.activity.service; + + +import com.sinosoft.activity.domain.DrawRule; + +import java.util.List; + +/** + * 存储抽奖特殊规则对象Service接口 + * + * @author ruoyi + * @date 2021-03-25 + */ +public interface IDrawRuleService +{ + /** + * 查询存储抽奖特殊规则对象 + * + * @param DRAWRULEID 存储抽奖特殊规则对象ID + * @return 存储抽奖特殊规则对象 + */ + public DrawRule selectDrawRuleById(String DRAWRULEID); + + /** + * 查询存储抽奖特殊规则对象列表 + * + * @param drawRule 存储抽奖特殊规则对象 + * @return 存储抽奖特殊规则对象集合 + */ + public List selectDrawRuleList(DrawRule drawRule); + + /** + * 新增存储抽奖特殊规则对象 + * + * @param drawRule 存储抽奖特殊规则对象 + * @return 结果 + */ + public int insertDrawRule(DrawRule drawRule); + + /** + * 修改存储抽奖特殊规则对象 + * + * @param drawRule 存储抽奖特殊规则对象 + * @return 结果 + */ + public int updateDrawRule(DrawRule drawRule); + + /** + * 批量删除存储抽奖特殊规则对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteDrawRuleByIds(String ids); + + /** + * 删除存储抽奖特殊规则对象信息 + * + * @param DRAWRULEID 存储抽奖特殊规则对象ID + * @return 结果 + */ + public int deleteDrawRuleById(String DRAWRULEID); +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawConfigServiceImpl.java b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawConfigServiceImpl.java new file mode 100644 index 000000000..68d27bb9c --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawConfigServiceImpl.java @@ -0,0 +1,96 @@ +package com.sinosoft.activity.service.impl; + +import java.util.List; + +import com.sinosoft.activity.domain.DrawConfig; +import com.sinosoft.activity.mapper.DrawConfigMapper; +import com.sinosoft.activity.service.IDrawConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.ruoyi.common.core.text.Convert; + +/** + * 存储奖项配置信息列表Service业务层处理 + * + * @author ruoyi + * @date 2021-03-25 + */ +@Service +public class DrawConfigServiceImpl implements IDrawConfigService +{ + @Autowired + private DrawConfigMapper drawConfigMapper; + + /** + * 查询存储奖项配置信息列表 + * + * @param DRAWCONFIGID 存储奖项配置信息列表ID + * @return 存储奖项配置信息列表 + */ + @Override + public DrawConfig selectDrawConfigById(String DRAWCONFIGID) + { + return drawConfigMapper.selectDrawConfigById(DRAWCONFIGID); + } + + /** + * 查询存储奖项配置信息列表列表 + * + * @param drawConfig 存储奖项配置信息列表 + * @return 存储奖项配置信息列表 + */ + @Override + public List selectDrawConfigList(DrawConfig drawConfig) + { + return drawConfigMapper.selectDrawConfigList(drawConfig); + } + + /** + * 新增存储奖项配置信息列表 + * + * @param drawConfig 存储奖项配置信息列表 + * @return 结果 + */ + @Override + public int insertDrawConfig(DrawConfig drawConfig) + { + return drawConfigMapper.insertDrawConfig(drawConfig); + } + + /** + * 修改存储奖项配置信息列表 + * + * @param drawConfig 存储奖项配置信息列表 + * @return 结果 + */ + @Override + public int updateDrawConfig(DrawConfig drawConfig) + { + return drawConfigMapper.updateDrawConfig(drawConfig); + } + + /** + * 删除存储奖项配置信息列表对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteDrawConfigByIds(String ids) + { + return drawConfigMapper.deleteDrawConfigByIds(Convert.toStrArray(ids)); + } + + /** + * 删除存储奖项配置信息列表信息 + * + * @param DRAWCONFIGID 存储奖项配置信息列表ID + * @return 结果 + */ + @Override + public int deleteDrawConfigById(String DRAWCONFIGID) + { + return drawConfigMapper.deleteDrawConfigById(DRAWCONFIGID); + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawInfoServiceImpl.java b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawInfoServiceImpl.java new file mode 100644 index 000000000..b258db019 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.sinosoft.activity.service.impl; + +import java.util.List; + +import com.sinosoft.activity.domain.DrawInfo; +import com.sinosoft.activity.mapper.DrawInfoMapper; +import com.sinosoft.activity.service.IDrawInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.ruoyi.common.core.text.Convert; + +/** + * 抽奖活动管理对象Service业务层处理 + * + * @author ruoyi + * @date 2021-03-25 + */ +@Service +public class DrawInfoServiceImpl implements IDrawInfoService +{ + @Autowired + private DrawInfoMapper drawInfoMapper; + + /** + * 查询抽奖活动管理对象 + * + * @param DRAWID 抽奖活动管理对象ID + * @return 抽奖活动管理对象 + */ + @Override + public DrawInfo selectDrawInfoById(String DRAWID) + { + return drawInfoMapper.selectDrawInfoById(DRAWID); + } + + /** + * 查询抽奖活动管理对象列表 + * + * @param drawInfo 抽奖活动管理对象 + * @return 抽奖活动管理对象 + */ + @Override + public List selectDrawInfoList(DrawInfo drawInfo) + { + return drawInfoMapper.selectDrawInfoList(drawInfo); + } + + /** + * 新增抽奖活动管理对象 + * + * @param drawInfo 抽奖活动管理对象 + * @return 结果 + */ + @Override + public int insertDrawInfo(DrawInfo drawInfo) + { + return drawInfoMapper.insertDrawInfo(drawInfo); + } + + /** + * 修改抽奖活动管理对象 + * + * @param drawInfo 抽奖活动管理对象 + * @return 结果 + */ + @Override + public int updateDrawInfo(DrawInfo drawInfo) + { + return drawInfoMapper.updateDrawInfo(drawInfo); + } + + /** + * 删除抽奖活动管理对象对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteDrawInfoByIds(String ids) + { + return drawInfoMapper.deleteDrawInfoByIds(Convert.toStrArray(ids)); + } + + /** + * 删除抽奖活动管理对象信息 + * + * @param DRAWID 抽奖活动管理对象ID + * @return 结果 + */ + @Override + public int deleteDrawInfoById(String DRAWID) + { + return drawInfoMapper.deleteDrawInfoById(DRAWID); + } +} diff --git a/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawRuleServiceImpl.java b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawRuleServiceImpl.java new file mode 100644 index 000000000..b612191a0 --- /dev/null +++ b/sino-activity/src/main/java/com/sinosoft/activity/service/impl/DrawRuleServiceImpl.java @@ -0,0 +1,96 @@ +package com.sinosoft.activity.service.impl; + +import java.util.List; + +import com.sinosoft.activity.domain.DrawRule; +import com.sinosoft.activity.mapper.DrawRuleMapper; +import com.sinosoft.activity.service.IDrawRuleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.ruoyi.common.core.text.Convert; + +/** + * 抽奖活动管理对象Service业务层处理 + * + * @author ruoyi + * @date 2021-03-25 + */ +@Service +public class DrawRuleServiceImpl implements IDrawRuleService +{ + @Autowired + private DrawRuleMapper drawRuleMapper; + + /** + * 查询抽奖活动管理对象 + * + * @param DRAWRULEID 抽奖活动管理对象ID + * @return 抽奖活动管理对象 + */ + @Override + public DrawRule selectDrawRuleById(String DRAWRULEID) + { + return drawRuleMapper.selectDrawRuleById(DRAWRULEID); + } + + /** + * 查询抽奖活动管理对象列表 + * + * @param drawRule 抽奖活动管理对象 + * @return 抽奖活动管理对象 + */ + @Override + public List selectDrawRuleList(DrawRule drawRule) + { + return drawRuleMapper.selectDrawRuleList(drawRule); + } + + /** + * 新增抽奖活动管理对象 + * + * @param drawRule 抽奖活动管理对象 + * @return 结果 + */ + @Override + public int insertDrawRule(DrawRule drawRule) + { + return drawRuleMapper.insertDrawRule(drawRule); + } + + /** + * 修改抽奖活动管理对象 + * + * @param drawRule 抽奖活动管理对象 + * @return 结果 + */ + @Override + public int updateDrawRule(DrawRule drawRule) + { + return drawRuleMapper.updateDrawRule(drawRule); + } + + /** + * 删除抽奖活动管理对象对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteDrawRuleByIds(String ids) + { + return drawRuleMapper.deleteDrawRuleByIds(Convert.toStrArray(ids)); + } + + /** + * 删除抽奖活动管理对象信息 + * + * @param DRAWRULEID 抽奖活动管理对象ID + * @return 结果 + */ + @Override + public int deleteDrawRuleById(String DRAWRULEID) + { + return drawRuleMapper.deleteDrawRuleById(DRAWRULEID); + } +} diff --git a/sino-activity/src/main/resources/mapper/activity/DrawConfigMapper.xml b/sino-activity/src/main/resources/mapper/activity/DrawConfigMapper.xml new file mode 100644 index 000000000..1a9744495 --- /dev/null +++ b/sino-activity/src/main/resources/mapper/activity/DrawConfigMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select DRAWCONFIGID, PRIZECODE, DRAWCODE, PROBABILITY, DISPLAYORDER, PRIZELEVEL, CUE, TOTALNUMBER, AVAILABLENUMBER, STATUS, CREATETIMESTAMP, LASTUPDATETIMESTAMP, AWARDTYPE, AWARDTYPEVALUE, AWARDMETHOD, SENDMSGFLAG, MSGTEMPLETEID from draw_config + + + + + + + + insert into draw_config + + DRAWCONFIGID, + PRIZECODE, + DRAWCODE, + PROBABILITY, + DISPLAYORDER, + PRIZELEVEL, + CUE, + TOTALNUMBER, + AVAILABLENUMBER, + STATUS, + CREATETIMESTAMP, + LASTUPDATETIMESTAMP, + AWARDTYPE, + AWARDTYPEVALUE, + AWARDMETHOD, + SENDMSGFLAG, + MSGTEMPLETEID, + + + #{DRAWCONFIGID}, + #{PRIZECODE}, + #{DRAWCODE}, + #{PROBABILITY}, + #{DISPLAYORDER}, + #{PRIZELEVEL}, + #{CUE}, + #{TOTALNUMBER}, + #{AVAILABLENUMBER}, + #{STATUS}, + #{CREATETIMESTAMP}, + #{LASTUPDATETIMESTAMP}, + #{AWARDTYPE}, + #{AWARDTYPEVALUE}, + #{AWARDMETHOD}, + #{SENDMSGFLAG}, + #{MSGTEMPLETEID}, + + + + + update draw_config + + PRIZECODE = #{PRIZECODE}, + DRAWCODE = #{DRAWCODE}, + PROBABILITY = #{PROBABILITY}, + DISPLAYORDER = #{DISPLAYORDER}, + PRIZELEVEL = #{PRIZELEVEL}, + CUE = #{CUE}, + TOTALNUMBER = #{TOTALNUMBER}, + AVAILABLENUMBER = #{AVAILABLENUMBER}, + STATUS = #{STATUS}, + CREATETIMESTAMP = #{CREATETIMESTAMP}, + LASTUPDATETIMESTAMP = #{LASTUPDATETIMESTAMP}, + AWARDTYPE = #{AWARDTYPE}, + AWARDTYPEVALUE = #{AWARDTYPEVALUE}, + AWARDMETHOD = #{AWARDMETHOD}, + SENDMSGFLAG = #{SENDMSGFLAG}, + MSGTEMPLETEID = #{MSGTEMPLETEID}, + + where DRAWCONFIGID = #{DRAWCONFIGID} + + + + delete from draw_config where DRAWCONFIGID = #{DRAWCONFIGID} + + + + delete from draw_config where DRAWCONFIGID in + + #{DRAWCONFIGID} + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml b/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml new file mode 100644 index 000000000..d67c7da8f --- /dev/null +++ b/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select DRAWID, DRAWCODE, DRAWTYPE, DRAWNAME, STARTTIME, ENDTIME, EXPENO, EXPENOVALUE, COMMENTS, CREATETIMESTAMP, LASTUPDATETIMESTAMP, STATUS, UPDATEFLAG, RULEDESCRIPTION, VALIDATETYPE from draw_info + + + + + + + + insert into draw_info + + DRAWID, + DRAWCODE, + DRAWTYPE, + DRAWNAME, + STARTTIME, + ENDTIME, + EXPENO, + EXPENOVALUE, + COMMENTS, + CREATETIMESTAMP, + LASTUPDATETIMESTAMP, + STATUS, + UPDATEFLAG, + RULEDESCRIPTION, + VALIDATETYPE, + + + #{DRAWID}, + #{DRAWCODE}, + #{DRAWTYPE}, + #{DRAWNAME}, + #{STARTTIME}, + #{ENDTIME}, + #{EXPENO}, + #{EXPENOVALUE}, + #{COMMENTS}, + #{CREATETIMESTAMP}, + #{LASTUPDATETIMESTAMP}, + #{STATUS}, + #{UPDATEFLAG}, + #{RULEDESCRIPTION}, + #{VALIDATETYPE}, + + + + + update draw_info + + DRAWCODE = #{DRAWCODE}, + DRAWTYPE = #{DRAWTYPE}, + DRAWNAME = #{DRAWNAME}, + STARTTIME = #{STARTTIME}, + ENDTIME = #{ENDTIME}, + EXPENO = #{EXPENO}, + EXPENOVALUE = #{EXPENOVALUE}, + COMMENTS = #{COMMENTS}, + CREATETIMESTAMP = #{CREATETIMESTAMP}, + LASTUPDATETIMESTAMP = #{LASTUPDATETIMESTAMP}, + STATUS = #{STATUS}, + UPDATEFLAG = #{UPDATEFLAG}, + RULEDESCRIPTION = #{RULEDESCRIPTION}, + VALIDATETYPE = #{VALIDATETYPE}, + + where DRAWID = #{DRAWID} + + + + delete from draw_info where DRAWID = #{DRAWID} + + + + delete from draw_info where DRAWID in + + #{DRAWID} + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/mapper/activity/DrawRuleMapper.xml b/sino-activity/src/main/resources/mapper/activity/DrawRuleMapper.xml new file mode 100644 index 000000000..91fc9def8 --- /dev/null +++ b/sino-activity/src/main/resources/mapper/activity/DrawRuleMapper.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + select DRAWRULEID, DRAWCODE, FIRSTFLAG, FIRSTAWARDPRIZE, DAILYFLAG, DAILYSTARTTIME, DAILYENDTIME, DAILYNUMBER, WILLDRAWFLAG, WILLDRAWAWARDPRIZE, CREATETIMESTAMP, LASTUPDATETIMESTAMP, WILLDRAWAWARDNUMBER from draw_rule + + + + + + + + insert into draw_rule + + DRAWRULEID, + DRAWCODE, + FIRSTFLAG, + FIRSTAWARDPRIZE, + DAILYFLAG, + DAILYSTARTTIME, + DAILYENDTIME, + DAILYNUMBER, + WILLDRAWFLAG, + WILLDRAWAWARDPRIZE, + CREATETIMESTAMP, + LASTUPDATETIMESTAMP, + WILLDRAWAWARDNUMBER, + + + #{DRAWRULEID}, + #{DRAWCODE}, + #{FIRSTFLAG}, + #{FIRSTAWARDPRIZE}, + #{DAILYFLAG}, + #{DAILYSTARTTIME}, + #{DAILYENDTIME}, + #{DAILYNUMBER}, + #{WILLDRAWFLAG}, + #{WILLDRAWAWARDPRIZE}, + #{CREATETIMESTAMP}, + #{LASTUPDATETIMESTAMP}, + #{WILLDRAWAWARDNUMBER}, + + + + + update draw_rule + + DRAWCODE = #{DRAWCODE}, + FIRSTFLAG = #{FIRSTFLAG}, + FIRSTAWARDPRIZE = #{FIRSTAWARDPRIZE}, + DAILYFLAG = #{DAILYFLAG}, + DAILYSTARTTIME = #{DAILYSTARTTIME}, + DAILYENDTIME = #{DAILYENDTIME}, + DAILYNUMBER = #{DAILYNUMBER}, + WILLDRAWFLAG = #{WILLDRAWFLAG}, + WILLDRAWAWARDPRIZE = #{WILLDRAWAWARDPRIZE}, + CREATETIMESTAMP = #{CREATETIMESTAMP}, + LASTUPDATETIMESTAMP = #{LASTUPDATETIMESTAMP}, + WILLDRAWAWARDNUMBER = #{WILLDRAWAWARDNUMBER}, + + where DRAWRULEID = #{DRAWRULEID} + + + + delete from draw_rule where DRAWRULEID = #{DRAWRULEID} + + + + delete from draw_rule where DRAWRULEID in + + #{DRAWRULEID} + + + + \ 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 new file mode 100644 index 000000000..bb2402dd9 --- /dev/null +++ b/sino-activity/src/main/resources/templates/activity/info/add.html @@ -0,0 +1,243 @@ + + + + + + + +
+
+

活动管理

+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+

活动规则

+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+ + + +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/templates/activity/info/configAdd.html b/sino-activity/src/main/resources/templates/activity/info/configAdd.html new file mode 100644 index 000000000..7b1597330 --- /dev/null +++ b/sino-activity/src/main/resources/templates/activity/info/configAdd.html @@ -0,0 +1,174 @@ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/templates/activity/info/configEdit.html b/sino-activity/src/main/resources/templates/activity/info/configEdit.html new file mode 100644 index 000000000..17a454502 --- /dev/null +++ b/sino-activity/src/main/resources/templates/activity/info/configEdit.html @@ -0,0 +1,181 @@ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/templates/activity/info/configList.html b/sino-activity/src/main/resources/templates/activity/info/configList.html new file mode 100644 index 000000000..beb8a410c --- /dev/null +++ b/sino-activity/src/main/resources/templates/activity/info/configList.html @@ -0,0 +1,146 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/templates/activity/info/edit.html b/sino-activity/src/main/resources/templates/activity/info/edit.html new file mode 100644 index 000000000..64f4dece1 --- /dev/null +++ b/sino-activity/src/main/resources/templates/activity/info/edit.html @@ -0,0 +1,258 @@ + + + + + + + +
+
+ + +

活动管理

+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+

活动规则

+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+ + + +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/sino-activity/src/main/resources/templates/activity/info/info.html b/sino-activity/src/main/resources/templates/activity/info/info.html new file mode 100644 index 000000000..e810fb908 --- /dev/null +++ b/sino-activity/src/main/resources/templates/activity/info/info.html @@ -0,0 +1,173 @@ + + + + + + +
+
+
+
+
+
    +
  • +

    活动代码:

    + +
  • +
  • +

    活动名称:

    + +
  • +
  • +

    状态:

    + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file