活动管理-抽奖活动管理
This commit is contained in:
parent
b0da0a51ca
commit
a1e0730a57
|
|
@ -7,10 +7,7 @@ import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.sinosoft.activity.domain.ActConfig;
|
import com.sinosoft.activity.domain.*;
|
||||||
import com.sinosoft.activity.domain.DrawInfo;
|
|
||||||
import com.sinosoft.activity.domain.DrawPrizeInfo;
|
|
||||||
import com.sinosoft.activity.domain.DrawRule;
|
|
||||||
import com.sinosoft.activity.service.*;
|
import com.sinosoft.activity.service.*;
|
||||||
import com.sinosoft.activity.vo.ActVO;
|
import com.sinosoft.activity.vo.ActVO;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -161,8 +158,26 @@ public class DrawInfoController extends BaseController
|
||||||
@GetMapping("/edit/{DRAWID}")
|
@GetMapping("/edit/{DRAWID}")
|
||||||
public String edit(@PathVariable("DRAWID") String DRAWID, ModelMap mmap)
|
public String edit(@PathVariable("DRAWID") String DRAWID, ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
ActVO vo = new ActVO();
|
||||||
|
//查询基本信息
|
||||||
DrawInfo drawInfo = drawInfoService.selectDrawInfoById(DRAWID);
|
DrawInfo drawInfo = drawInfoService.selectDrawInfoById(DRAWID);
|
||||||
mmap.put("drawInfo", drawInfo);
|
vo.setDrawInfo(drawInfo);
|
||||||
|
//查询展示内容
|
||||||
|
ActPageConfigGuide actPageConfigGuide = iActPageConfigGuideService.selectActPageConfigGuideByCode(drawInfo.getDRAWCODE());
|
||||||
|
vo.setActPageConfigGuide(actPageConfigGuide);
|
||||||
|
//查询选择玩法
|
||||||
|
DrawRule drawRule = iDrawRuleService.selectDrawRuleByCode(drawInfo.getDRAWCODE());
|
||||||
|
vo.setDrawRule(drawRule);
|
||||||
|
//查询收集信息
|
||||||
|
ActPageConfigUserinfo actPageConfigUserinfo= iActPageConfigUserinfoService.selectActPageConfigUserinfoByCode(drawInfo.getDRAWCODE());
|
||||||
|
vo.setActPageConfigUserinfo(actPageConfigUserinfo);
|
||||||
|
//查询分享信息
|
||||||
|
ActConfig actConfig = iActConfigService.selectActConfigByCode(drawInfo.getDRAWCODE());
|
||||||
|
vo.setActConfig(actConfig);
|
||||||
|
//查询二维码信息
|
||||||
|
ActPageConfigSubscribe actPageConfigSubscribe= iActPageConfigSubscribeService.selectActPageConfigSubscribeByCode(drawInfo.getDRAWCODE());
|
||||||
|
vo.setActPageConfigSubscribe(actPageConfigSubscribe);
|
||||||
|
mmap.put("vo",vo);
|
||||||
return prefix + "/edit";
|
return prefix + "/edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,10 @@ public interface ActConfigMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActConfigByIds(String[] ids);
|
public int deleteActConfigByIds(String[] ids);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActConfig selectActConfigByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,10 @@ public interface ActPageConfigGuideMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActPageConfigGuideByIds(String[] ids);
|
public int deleteActPageConfigGuideByIds(String[] ids);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActPageConfigGuide selectActPageConfigGuideByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,10 @@ public interface ActPageConfigSubscribeMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActPageConfigSubscribeByIds(String[] ids);
|
public int deleteActPageConfigSubscribeByIds(String[] ids);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActPageConfigSubscribe selectActPageConfigSubscribeByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,10 @@ public interface ActPageConfigUserinfoMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActPageConfigUserinfoByIds(String[] ids);
|
public int deleteActPageConfigUserinfoByIds(String[] ids);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActPageConfigUserinfo selectActPageConfigUserinfoByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,10 @@ public interface DrawRuleMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDrawRuleByIds(String[] DRAWRULEIDs);
|
public int deleteDrawRuleByIds(String[] DRAWRULEIDs);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DrawRule selectDrawRuleByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,10 @@ public interface IActConfigService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActConfigById(Integer id);
|
public int deleteActConfigById(Integer id);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActConfig selectActConfigByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,11 @@ public interface IActPageConfigGuideService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActPageConfigGuideById(Integer id);
|
public int deleteActPageConfigGuideById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActPageConfigGuide selectActPageConfigGuideByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,10 @@ public interface IActPageConfigSubscribeService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActPageConfigSubscribeById(Integer id);
|
public int deleteActPageConfigSubscribeById(Integer id);
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActPageConfigSubscribe selectActPageConfigSubscribeByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,11 @@ public interface IActPageConfigUserinfoService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteActPageConfigUserinfoById(Integer id);
|
public int deleteActPageConfigUserinfoById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActPageConfigUserinfo selectActPageConfigUserinfoByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,4 +66,6 @@ public interface IDrawInfoService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDrawInfoById(String DRAWID);
|
public int deleteDrawInfoById(String DRAWID);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,11 @@ public interface IDrawRuleService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDrawRuleById(String DRAWRULEID);
|
public int deleteDrawRuleById(String DRAWRULEID);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DrawRule selectDrawRuleByCode(String drawCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,13 @@ public class ActConfigServiceImpl implements IActConfigService
|
||||||
{
|
{
|
||||||
return actConfigMapper.deleteActConfigById(id);
|
return actConfigMapper.deleteActConfigById(id);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ActConfig selectActConfigByCode(String drawCode) {
|
||||||
|
return actConfigMapper.selectActConfigByCode(drawCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,14 @@ public class ActPageConfigGuideServiceImpl implements IActPageConfigGuideService
|
||||||
{
|
{
|
||||||
return actPageConfigGuideMapper.deleteActPageConfigGuideById(id);
|
return actPageConfigGuideMapper.deleteActPageConfigGuideById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根活动代码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ActPageConfigGuide selectActPageConfigGuideByCode(String drawCode) {
|
||||||
|
return actPageConfigGuideMapper.selectActPageConfigGuideByCode(drawCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,13 @@ public class ActPageConfigSubscribeServiceImpl implements IActPageConfigSubscrib
|
||||||
{
|
{
|
||||||
return actPageConfigSubscribeMapper.deleteActPageConfigSubscribeById(id);
|
return actPageConfigSubscribeMapper.deleteActPageConfigSubscribeById(id);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ActPageConfigSubscribe selectActPageConfigSubscribeByCode(String drawCode) {
|
||||||
|
return actPageConfigSubscribeMapper.selectActPageConfigSubscribeByCode(drawCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,13 @@ public class ActPageConfigUserinfoServiceImpl implements IActPageConfigUserinfoS
|
||||||
{
|
{
|
||||||
return actPageConfigUserinfoMapper.deleteActPageConfigUserinfoById(id);
|
return actPageConfigUserinfoMapper.deleteActPageConfigUserinfoById(id);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ActPageConfigUserinfo selectActPageConfigUserinfoByCode(String drawCode) {
|
||||||
|
return actPageConfigUserinfoMapper.selectActPageConfigUserinfoByCode(drawCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,14 @@ public class DrawRuleServiceImpl implements IDrawRuleService
|
||||||
{
|
{
|
||||||
return drawRuleMapper.deleteDrawRuleById(DRAWRULEID);
|
return drawRuleMapper.deleteDrawRuleById(DRAWRULEID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动编码查询
|
||||||
|
* @param drawCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DrawRule selectDrawRuleByCode(String drawCode) {
|
||||||
|
return drawRuleMapper.selectDrawRuleByCode(drawCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectActConfigVo"/>
|
<include refid="selectActConfigVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectActConfigByCode" resultType="com.sinosoft.activity.domain.ActConfig">
|
||||||
|
<include refid="selectActConfigVo"/>
|
||||||
|
where actCode = #{drawCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertActConfig" parameterType="ActConfig" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertActConfig" parameterType="ActConfig" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into act_config
|
insert into act_config
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectActPageConfigGuideVo"/>
|
<include refid="selectActPageConfigGuideVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectActPageConfigGuideByCode" resultType="ActPageConfigGuide">
|
||||||
|
<include refid="selectActPageConfigGuideVo"/>
|
||||||
|
where actCode = #{drawCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertActPageConfigGuide" parameterType="ActPageConfigGuide" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertActPageConfigGuide" parameterType="ActPageConfigGuide" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into act_page_config_guide
|
insert into act_page_config_guide
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectActPageConfigSubscribeVo"/>
|
<include refid="selectActPageConfigSubscribeVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectActPageConfigSubscribeByCode" resultType="ActPageConfigSubscribe">
|
||||||
|
<include refid="selectActPageConfigSubscribeVo"/>
|
||||||
|
where actCode = #{drawCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertActPageConfigSubscribe" parameterType="ActPageConfigSubscribe" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertActPageConfigSubscribe" parameterType="ActPageConfigSubscribe" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into act_page_config_subscribe
|
insert into act_page_config_subscribe
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectActPageConfigUserinfoVo"/>
|
<include refid="selectActPageConfigUserinfoVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectActPageConfigUserinfoByCode" resultType="ActPageConfigUserinfo">
|
||||||
|
<include refid="selectActPageConfigUserinfoVo"/>
|
||||||
|
where actCode = #{drawCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertActPageConfigUserinfo" parameterType="ActPageConfigUserinfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertActPageConfigUserinfo" parameterType="ActPageConfigUserinfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into act_page_config_userinfo
|
insert into act_page_config_userinfo
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="UPDATEFLAG" column="UPDATEFLAG" />
|
<result property="UPDATEFLAG" column="UPDATEFLAG" />
|
||||||
<result property="RULEDESCRIPTION" column="RULEDESCRIPTION" />
|
<result property="RULEDESCRIPTION" column="RULEDESCRIPTION" />
|
||||||
<result property="VALIDATETYPE" column="VALIDATETYPE" />
|
<result property="VALIDATETYPE" column="VALIDATETYPE" />
|
||||||
|
|
||||||
<result property="DRAWRULEID" column="DRAWRULEID" />
|
|
||||||
<result property="FIRSTFLAG" column="FIRSTFLAG" />
|
|
||||||
<result property="FIRSTAWARDPRIZE" column="FIRSTAWARDPRIZE" />
|
|
||||||
<result property="DAILYFLAG" column="DAILYFLAG" />
|
|
||||||
<result property="DAILYSTARTTIME" column="DAILYSTARTTIME" />
|
|
||||||
<result property="DAILYENDTIME" column="DAILYENDTIME" />
|
|
||||||
<result property="DAILYNUMBER" column="DAILYNUMBER" />
|
|
||||||
<result property="WILLDRAWFLAG" column="WILLDRAWFLAG" />
|
|
||||||
<result property="WILLDRAWAWARDPRIZE" column="WILLDRAWAWARDPRIZE" />
|
|
||||||
<result property="WILLDRAWAWARDNUMBER" column="WILLDRAWAWARDNUMBER" />
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDrawInfoVo">
|
<sql id="selectDrawInfoVo">
|
||||||
|
|
@ -62,27 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDrawInfoById" parameterType="String" resultMap="DrawInfoResult">
|
<select id="selectDrawInfoById" parameterType="String" resultMap="DrawInfoResult">
|
||||||
SELECT
|
<include refid="selectDrawInfoVo"/>
|
||||||
i.DRAWID,
|
|
||||||
i.DRAWNAME,
|
|
||||||
i.STATUS,
|
|
||||||
i.EXPENO,
|
|
||||||
i.EXPENOVALUE,
|
|
||||||
i.STARTTIME,
|
|
||||||
i.ENDTIME,
|
|
||||||
r.FIRSTFLAG,
|
|
||||||
r.FIRSTAWARDPRIZE,
|
|
||||||
r.DAILYFLAG,
|
|
||||||
r.DAILYNUMBER,
|
|
||||||
r.DAILYSTARTTIME,
|
|
||||||
r.DAILYENDTIME,
|
|
||||||
r.WILLDRAWFLAG,
|
|
||||||
r.WILLDRAWAWARDNUMBER,
|
|
||||||
r.WILLDRAWAWARDPRIZE,
|
|
||||||
r.DRAWRULEID
|
|
||||||
FROM
|
|
||||||
draw_info i
|
|
||||||
LEFT JOIN draw_rule r ON i.DRAWCODE = r.DRAWCODE
|
|
||||||
WHERE
|
WHERE
|
||||||
DRAWID = #{DRAWID}
|
DRAWID = #{DRAWID}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectDrawRuleVo"/>
|
<include refid="selectDrawRuleVo"/>
|
||||||
where DRAWRULEID = #{DRAWRULEID}
|
where DRAWRULEID = #{DRAWRULEID}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectDrawRuleByCode" resultType="com.sinosoft.activity.domain.DrawRule">
|
||||||
|
<include refid="selectDrawRuleVo"/>
|
||||||
|
where DRAWCODE = #{drawCode}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertDrawRule" parameterType="DrawRule">
|
<insert id="insertDrawRule" parameterType="DrawRule">
|
||||||
insert into draw_rule
|
insert into draw_rule
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.saveModal(prefix + "/edit", $('#form-info-edit').serialize());
|
$.operate.saveTab(prefix + "/edit", $('#form-info-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**获取奖品及信息列表*/
|
/**获取奖品及信息列表*/
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="activity:info:add">
|
<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="activity:info:add">
|
||||||
<i class="fa fa-plus"></i> 添加
|
<i class="fa fa-plus"></i> 添加
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="activity:info:edit">
|
<a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="activity:info:edit">
|
||||||
<i class="fa fa-edit"></i> 修改
|
<i class="fa fa-edit"></i> 修改
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="activity:info:remove">
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="activity:info:remove">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue