活动管理-奖品管理修改
This commit is contained in:
parent
0ca8dfadca
commit
228acefd80
|
|
@ -18,7 +18,7 @@ public class DrawPrizeInfo extends BaseEntity
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 业务主键 */
|
/** 业务主键 */
|
||||||
private String PRIZEID;
|
private int PRIZEID;
|
||||||
|
|
||||||
/** 奖品代码 */
|
/** 奖品代码 */
|
||||||
@Excel(name = "奖品代码")
|
@Excel(name = "奖品代码")
|
||||||
|
|
@ -58,12 +58,12 @@ public class DrawPrizeInfo extends BaseEntity
|
||||||
@Excel(name = "积分项目编码")
|
@Excel(name = "积分项目编码")
|
||||||
private String INTEGRALPROJECTCODE;
|
private String INTEGRALPROJECTCODE;
|
||||||
|
|
||||||
public void setPRIZEID(String PRIZEID)
|
public void setPRIZEID(int PRIZEID)
|
||||||
{
|
{
|
||||||
this.PRIZEID = PRIZEID;
|
this.PRIZEID = PRIZEID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPRIZEID()
|
public int getPRIZEID()
|
||||||
{
|
{
|
||||||
return PRIZEID;
|
return PRIZEID;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,12 @@ public interface DrawPrizeInfoMapper
|
||||||
*/
|
*/
|
||||||
public DrawPrizeInfo selectDrawPrizeInfoById(String PRIZEID);
|
public DrawPrizeInfo selectDrawPrizeInfoById(String PRIZEID);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最大的奖品代码
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String findMaxPrizeCode();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询存储奖品的基础信息列表
|
* 查询存储奖品的基础信息列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.sinosoft.activity.service.impl;
|
package com.sinosoft.activity.service.impl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -53,6 +54,12 @@ public class DrawPrizeInfoServiceImpl implements IDrawPrizeInfoService
|
||||||
@Override
|
@Override
|
||||||
public int insertDrawPrizeInfo(DrawPrizeInfo drawPrizeInfo)
|
public int insertDrawPrizeInfo(DrawPrizeInfo drawPrizeInfo)
|
||||||
{
|
{
|
||||||
|
//填充时间字段
|
||||||
|
drawPrizeInfo.setCREATETIMESTAMP(new Date());
|
||||||
|
drawPrizeInfo.setLASTUPDATETIMESTAMP(new Date());
|
||||||
|
//code设置
|
||||||
|
String maxPrizeCode = drawPrizeInfoMapper.findMaxPrizeCode();
|
||||||
|
drawPrizeInfo.setPRIZECODE(String.format("%0"+maxPrizeCode.length()+"d",Integer.parseInt(maxPrizeCode)+1));
|
||||||
return drawPrizeInfoMapper.insertDrawPrizeInfo(drawPrizeInfo);
|
return drawPrizeInfoMapper.insertDrawPrizeInfo(drawPrizeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,6 +72,7 @@ public class DrawPrizeInfoServiceImpl implements IDrawPrizeInfoService
|
||||||
@Override
|
@Override
|
||||||
public int updateDrawPrizeInfo(DrawPrizeInfo drawPrizeInfo)
|
public int updateDrawPrizeInfo(DrawPrizeInfo drawPrizeInfo)
|
||||||
{
|
{
|
||||||
|
drawPrizeInfo.setLASTUPDATETIMESTAMP(new Date());
|
||||||
return drawPrizeInfoMapper.updateDrawPrizeInfo(drawPrizeInfo);
|
return drawPrizeInfoMapper.updateDrawPrizeInfo(drawPrizeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectDrawPrizeInfoVo"/>
|
<include refid="selectDrawPrizeInfoVo"/>
|
||||||
where PRIZEID = #{PRIZEID}
|
where PRIZEID = #{PRIZEID}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findMaxPrizeCode" resultType="java.lang.String">
|
||||||
|
SELECT PRIZECODE FROM draw_prize_info order By PRIZECODE desc LIMIT 1
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertDrawPrizeInfo" parameterType="com.sinosoft.activity.domain.DrawPrizeInfo">
|
<insert id="insertDrawPrizeInfo" parameterType="com.sinosoft.activity.domain.DrawPrizeInfo">
|
||||||
insert into draw_prize_info
|
insert into draw_prize_info
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-info-add">
|
<form class="form-horizontal m" id="form-info-add">
|
||||||
<div class="form-group">
|
<!-- <div class="form-group"> -->
|
||||||
<label class="col-sm-3 control-label">奖品代码:</label>
|
<!-- <label class="col-sm-3 control-label">奖品代码:</label>-->
|
||||||
<div class="col-sm-8">
|
<!-- <div class="col-sm-8">-->
|
||||||
<input name="PRIZECODE" class="form-control" type="text">
|
<!-- <input name="PRIZECODE" class="form-control" type="text">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">奖品名称:</label>
|
<label class="col-sm-3 control-label">奖品名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -22,10 +22,10 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">奖品类型:</label>
|
<label class="col-sm-3 control-label">奖品类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="PRIZETYPE" class="form-control m-b">
|
<select name="PRIZETYPE" class="form-control m-b" th:with="type=${@dict.getType('prizeType')}">
|
||||||
<option value="">所有</option>
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -40,34 +40,37 @@
|
||||||
<textarea name="COMMENTS" class="form-control"></textarea>
|
<textarea name="COMMENTS" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">创建时间:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <div class="input-group date">-->
|
||||||
|
<!-- <input name="CREATETIMESTAMP" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
|
||||||
|
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">最后修改时间:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <div class="input-group date">-->
|
||||||
|
<!-- <input name="LASTUPDATETIMESTAMP" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
|
||||||
|
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">创建时间:</label>
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<!-- <div class="radio-box">-->
|
||||||
<input name="CREATETIMESTAMP" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<!-- <input type="radio" name="STATUS" value="">-->
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<!-- <label th:for="STATUS" th:text="未知"></label>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('status')}">
|
||||||
|
<input type="radio" th:id="${dict.dictCode}" name="STATUS" th:value="${dict.dictValue}">
|
||||||
|
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">最后修改时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="LASTUPDATETIMESTAMP" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">状态 0 未启用,1 启用:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="radio-box">
|
|
||||||
<input type="radio" name="STATUS" value="">
|
|
||||||
<label th:for="STATUS" th:text="未知"></label>
|
|
||||||
</div>
|
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">积分项目编码:</label>
|
<label class="col-sm-3 control-label">积分项目编码:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-info-edit" th:object="${drawPrizeInfo}">
|
<form class="form-horizontal m" id="form-info-edit" th:object="${drawPrizeInfo}">
|
||||||
<input name="PRIZEID" th:field="*{PRIZEID}" type="hidden">
|
<input name="PRIZEID" th:field="*{PRIZEID}" type="hidden">
|
||||||
<div class="form-group">
|
<!-- <div class="form-group"> -->
|
||||||
<label class="col-sm-3 control-label">奖品代码:</label>
|
<!-- <label class="col-sm-3 control-label">奖品代码:</label>-->
|
||||||
<div class="col-sm-8">
|
<!-- <div class="col-sm-8">-->
|
||||||
<input name="PRIZECODE" th:field="*{PRIZECODE}" class="form-control" type="text">
|
<!-- <input name="PRIZECODE" th:field="*{PRIZECODE}" class="form-control" type="text">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">奖品名称:</label>
|
<label class="col-sm-3 control-label">奖品名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -23,10 +23,12 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">奖品类型:</label>
|
<label class="col-sm-3 control-label">奖品类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="PRIZETYPE" class="form-control m-b">
|
<select name="PRIZETYPE" class="form-control m-b" th:with="type=${@dict.getType('prizeType')}">
|
||||||
<option value="">所有</option>
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{PRIZETYPE}"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
<!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -41,34 +43,37 @@
|
||||||
<textarea name="COMMENTS" class="form-control">[[*{COMMENTS}]]</textarea>
|
<textarea name="COMMENTS" class="form-control">[[*{COMMENTS}]]</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">创建时间:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <div class="input-group date">-->
|
||||||
|
<!-- <input name="CREATETIMESTAMP" th:value="${#dates.format(drawPrizeInfo.CREATETIMESTAMP, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
|
||||||
|
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">最后修改时间:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <div class="input-group date">-->
|
||||||
|
<!-- <input name="LASTUPDATETIMESTAMP" th:value="${#dates.format(drawPrizeInfo.LASTUPDATETIMESTAMP, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
|
||||||
|
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">创建时间:</label>
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<!-- <div class="radio-box">-->
|
||||||
<input name="CREATETIMESTAMP" th:value="${#dates.format(drawPrizeInfo.CREATETIMESTAMP, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<!-- <input type="radio" name="STATUS" value="">-->
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<!-- <label th:for="STATUS" th:text="未知"></label>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('status')}">
|
||||||
|
<input type="radio" th:id="${dict.dictCode}" name="STATUS" th:value="${dict.dictValue}" th:field="*{STATUS}">
|
||||||
|
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">最后修改时间:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="input-group date">
|
|
||||||
<input name="LASTUPDATETIMESTAMP" th:value="${#dates.format(drawPrizeInfo.LASTUPDATETIMESTAMP, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">状态 0 未启用,1 启用:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div class="radio-box">
|
|
||||||
<input type="radio" name="STATUS" value="">
|
|
||||||
<label th:for="STATUS" th:text="未知"></label>
|
|
||||||
</div>
|
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">积分项目编码:</label>
|
<label class="col-sm-3 control-label">积分项目编码:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,10 @@
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!-- <li>-->
|
||||||
<label>积分项目编码:</label>
|
<!-- <label>积分项目编码:</label>-->
|
||||||
<input type="text" name="INTEGRALPROJECTCODE"/>
|
<!-- <input type="text" name="INTEGRALPROJECTCODE"/>-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue