Merge remote-tracking branch 'origin/activity' into activity
# Conflicts: # sino-activity/src/main/resources/templates/activity/info/add.html
This commit is contained in:
commit
1974070a0a
|
|
@ -8,7 +8,7 @@ spring:
|
|||
master:
|
||||
url: jdbc:mysql://localhost:3306/intermarketing?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password:
|
||||
password: root
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ ruoyi:
|
|||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为80
|
||||
port: 80
|
||||
port: 8088
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -203,7 +203,7 @@
|
|||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>复选框&
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form method="get" class="form-horizontal">
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
|
||||
|
||||
<style type="text/css">label.error { position:inherit; }</style>
|
||||
<script>
|
||||
if(window.top!==window.self){alert('未登录或登录超时。请重新登录');window.top.location=window.location};
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ import com.sinosoft.activity.domain.ActConfig;
|
|||
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 com.sinosoft.activity.service.*;
|
||||
import com.sinosoft.activity.vo.ActVO;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
|
@ -56,6 +54,62 @@ public class DrawInfoController extends BaseController
|
|||
|
||||
@Autowired
|
||||
private IDrawRuleService iDrawRuleService;
|
||||
|
||||
@Autowired
|
||||
private IActConfigService iActConfigService;
|
||||
|
||||
@Autowired
|
||||
private IActPageConfigGuideService iActPageConfigGuideService;
|
||||
|
||||
@Autowired
|
||||
private IActPageConfigUserinfoService iActPageConfigUserinfoService;
|
||||
|
||||
@Autowired
|
||||
private IActPageConfigSubscribeService iActPageConfigSubscribeService;
|
||||
|
||||
/**
|
||||
* 新增保存抽奖活动管理
|
||||
*/
|
||||
@RequiresPermissions("activity:info:add")
|
||||
@Log(title = "抽奖活动管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(@RequestBody ActVO vo)
|
||||
{
|
||||
logger.info("前台传参"+ JSON.toJSONString(vo));
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
Date date = new Date();
|
||||
//新增基本信息
|
||||
vo.getDrawInfo().setCREATETIMESTAMP(date);
|
||||
String code = format.format(date);
|
||||
vo.getDrawInfo().setDRAWCODE(code);
|
||||
drawInfoService.insertDrawInfo(vo.getDrawInfo());
|
||||
|
||||
//新增展示内容
|
||||
vo.getActPageConfigGuide().setCreateTime(date);
|
||||
vo.getActPageConfigGuide().setActCode(code);
|
||||
iActPageConfigGuideService.insertActPageConfigGuide(vo.getActPageConfigGuide());
|
||||
|
||||
//新增选择玩法
|
||||
vo.getDrawRule().setCREATETIMESTAMP(date);
|
||||
vo.getDrawRule().setDRAWCODE(code);
|
||||
iDrawRuleService.insertDrawRule(vo.getDrawRule());
|
||||
|
||||
//新增收集信息
|
||||
vo.getActPageConfigUserinfo().setCreateTime(date);
|
||||
vo.getActPageConfigUserinfo().setActCode(code);
|
||||
iActPageConfigUserinfoService.insertActPageConfigUserinfo(vo.getActPageConfigUserinfo());
|
||||
|
||||
//新增分享信息
|
||||
vo.getActConfig().setCreateTime(date);
|
||||
vo.getActConfig().setActCode(code);
|
||||
iActConfigService.insertActConfig(vo.getActConfig());
|
||||
//新增二维码信息
|
||||
vo.getActPageConfigSubscribe().setCreateTime(date);
|
||||
vo.getActPageConfigSubscribe().setActCode(code);
|
||||
int i = iActPageConfigSubscribeService.insertActPageConfigSubscribe(vo.getActPageConfigSubscribe());
|
||||
return toAjax(i);
|
||||
}
|
||||
/**
|
||||
* 查询抽奖活动管理列表
|
||||
*/
|
||||
|
|
@ -92,35 +146,6 @@ public class DrawInfoController extends BaseController
|
|||
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);
|
||||
}
|
||||
|
||||
@PostMapping("/add/test")
|
||||
@ResponseBody
|
||||
public AjaxResult addtest(@RequestBody ActVO vo){
|
||||
ActConfig actConfig = vo.getActConfig();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,15 +2,17 @@ package com.sinosoft.activity.domain;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抽奖活动管理对象 draw_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author xlh
|
||||
* @date 2021-03-25
|
||||
*/
|
||||
public class DrawInfo extends DrawRule
|
||||
public class DrawInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ public class ActConfigServiceImpl implements IActConfigService
|
|||
@Override
|
||||
public int insertActConfig(ActConfig actConfig)
|
||||
{
|
||||
actConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return actConfigMapper.insertActConfig(actConfig);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ public class ActPageConfigGuideServiceImpl implements IActPageConfigGuideService
|
|||
@Override
|
||||
public int insertActPageConfigGuide(ActPageConfigGuide actPageConfigGuide)
|
||||
{
|
||||
actPageConfigGuide.setCreateTime(DateUtils.getNowDate());
|
||||
return actPageConfigGuideMapper.insertActPageConfigGuide(actPageConfigGuide);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ public class ActPageConfigSubscribeServiceImpl implements IActPageConfigSubscrib
|
|||
@Override
|
||||
public int insertActPageConfigSubscribe(ActPageConfigSubscribe actPageConfigSubscribe)
|
||||
{
|
||||
actPageConfigSubscribe.setCreateTime(DateUtils.getNowDate());
|
||||
return actPageConfigSubscribeMapper.insertActPageConfigSubscribe(actPageConfigSubscribe);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ public class ActPageConfigUserinfoServiceImpl implements IActPageConfigUserinfoS
|
|||
@Override
|
||||
public int insertActPageConfigUserinfo(ActPageConfigUserinfo actPageConfigUserinfo)
|
||||
{
|
||||
actPageConfigUserinfo.setCreateTime(DateUtils.getNowDate());
|
||||
return actPageConfigUserinfoMapper.insertActPageConfigUserinfo(actPageConfigUserinfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
|
@ -363,12 +364,12 @@
|
|||
<div>
|
||||
<span class="btn btn-white btn-file"><span
|
||||
class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span>
|
||||
<input type="file" id="pic" name="actPageConfigGuide-bgImg" onchange="syncPic(this)" ></span>
|
||||
<input type="file" id="pic" name="actPageConfigGuide-bgImg"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists"
|
||||
data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
</div>
|
||||
<input id="picval" type="hidden" name="actPageConfigGuide-bgImg" value="">
|
||||
<input id="picval" type="hidden" name = "actPageConfigGuide-bgImg" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
@ -376,8 +377,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">自定义按钮1:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="btn1" name="actPageConfigGuide-btnText" placeholder="自定义按钮1"
|
||||
class="form-control"
|
||||
<input id="btn1" name="actPageConfigGuide-btnText" placeholder="自定义按钮1" class="form-control"
|
||||
type="text"
|
||||
maxlength="30" onkeyup="updatePic(this)">
|
||||
</div>
|
||||
|
|
@ -389,8 +389,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">按钮1跳转链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="actPageConfigGuide-btnLink" placeholder="按钮1跳转链接"
|
||||
class="form-control"
|
||||
<input name="actPageConfigGuide-btnLink" placeholder="按钮1跳转链接" class="form-control"
|
||||
type="text"
|
||||
maxlength="30">
|
||||
</div>
|
||||
|
|
@ -402,8 +401,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">自定义按钮2:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="btn2" name="actPageConfigGuide-btnText2" placeholder="自定义按钮2"
|
||||
class="form-control" type="text"
|
||||
<input id="btn2" name="actPageConfigGuide-btnText2" placeholder="自定义按钮2" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePic(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -414,8 +412,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">按钮2跳转链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="actPageConfigGuide-btnLink2" placeholder="按钮2跳转链接"
|
||||
class="form-control"
|
||||
<input name="actPageConfigGuide-btnLink2" placeholder="按钮2跳转链接" class="form-control"
|
||||
type="text"
|
||||
maxlength="30">
|
||||
</div>
|
||||
|
|
@ -427,7 +424,7 @@
|
|||
<div class="rightarea">
|
||||
<h4 class="form-header h4">效果图</h4>
|
||||
<div style="position: relative;text-align:center">
|
||||
<img id="picimg" src="../../img/1.jpg" width="380" height="500">
|
||||
<img id="imgPic" src="../../img/1.jpg" width="380" height="500">
|
||||
<span class="drawNamePic" id="actTitlePic">活动标题</span>
|
||||
<span class="drawDescribePic" id="actDescPic">活动描述</span>
|
||||
<span class="drawbtnPic">
|
||||
|
|
@ -445,6 +442,7 @@
|
|||
<div th:with="type=${@dict.getType('activityPlay')}">
|
||||
<a id="activityPlay" class="btn btn-rounded" href="#" th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}" onclick="activityTemplate(this)"></a>
|
||||
<a class="btn btn-rounded" href="#" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" onclick="activityTemplate(this)"></a>
|
||||
</div>
|
||||
<input type="hidden" name="actConfig-actType" id="activityPlayval" value="">
|
||||
<img src="../../img/1.jpg" width="104" height="142">
|
||||
|
|
@ -982,7 +980,7 @@
|
|||
|
||||
}
|
||||
|
||||
$("input[name='STARTTIME']").datetimepicker({
|
||||
$("input[name='drawInfo-starttime']").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
|
|
@ -993,7 +991,7 @@
|
|||
format: 'yyyy-mm-dd hh:ii:ss'
|
||||
});
|
||||
|
||||
$("input[name='ENDTIME']").datetimepicker({
|
||||
$("input[name='drawInfo-endtime']").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
|
|
@ -1004,7 +1002,7 @@
|
|||
format: 'yyyy-mm-dd hh:ii:ss'
|
||||
});
|
||||
|
||||
$("input[name='DAILYSTARTTIME']").datetimepicker({
|
||||
$("input[name='drawRule-dailystarttime']").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
|
|
@ -1015,7 +1013,7 @@
|
|||
format: 'hh:ii:ss'
|
||||
});
|
||||
|
||||
$("input[name='DAILYENDTIME']").datetimepicker({
|
||||
$("input[name='drawRule-dailyendtime']").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
|
|
@ -1036,7 +1034,7 @@
|
|||
var data = customSerialize("form-info-add", true);
|
||||
alert(data);
|
||||
$.ajax({
|
||||
url: prefix + "/add/test",
|
||||
url: prefix + "/add",
|
||||
data: data,
|
||||
type: "post",
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
|
|
|
|||
Loading…
Reference in New Issue