奖品管理-添加图片
This commit is contained in:
parent
a309927ac0
commit
d18e5b08dc
|
|
@ -57,6 +57,18 @@ public class DrawPrizeInfo extends BaseEntity
|
||||||
/** 积分项目编码 */
|
/** 积分项目编码 */
|
||||||
@Excel(name = "积分项目编码")
|
@Excel(name = "积分项目编码")
|
||||||
private String INTEGRALPROJECTCODE;
|
private String INTEGRALPROJECTCODE;
|
||||||
|
/**
|
||||||
|
* 奖品图片
|
||||||
|
*/
|
||||||
|
private String PRIZEIMG;
|
||||||
|
|
||||||
|
public String getPRIZEIMG() {
|
||||||
|
return PRIZEIMG;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPRIZEIMG(String PRIZEIMG) {
|
||||||
|
this.PRIZEIMG = PRIZEIMG;
|
||||||
|
}
|
||||||
|
|
||||||
public void setPRIZEID(int PRIZEID)
|
public void setPRIZEID(int PRIZEID)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="LASTUPDATETIMESTAMP" column="LASTUPDATETIMESTAMP" />
|
<result property="LASTUPDATETIMESTAMP" column="LASTUPDATETIMESTAMP" />
|
||||||
<result property="STATUS" column="STATUS" />
|
<result property="STATUS" column="STATUS" />
|
||||||
<result property="INTEGRALPROJECTCODE" column="INTEGRALPROJECTCODE" />
|
<result property="INTEGRALPROJECTCODE" column="INTEGRALPROJECTCODE" />
|
||||||
|
<result property="PRIZEIMG" column="PRIZEIMG" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDrawPrizeInfoVo">
|
<sql id="selectDrawPrizeInfoVo">
|
||||||
select PRIZEID, PRIZECODE, PRIZENAME, PRIZETYPE, PRIZEVALUE, COMMENTS, CREATETIMESTAMP, LASTUPDATETIMESTAMP, STATUS, INTEGRALPROJECTCODE from draw_prize_info
|
select PRIZEID, PRIZECODE, PRIZENAME, PRIZETYPE, PRIZEVALUE, COMMENTS, CREATETIMESTAMP, LASTUPDATETIMESTAMP, STATUS, INTEGRALPROJECTCODE, PRIZEIMG from draw_prize_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDrawPrizeInfoList" parameterType="com.sinosoft.activity.domain.DrawPrizeInfo" resultMap="DrawPrizeInfoResult">
|
<select id="selectDrawPrizeInfoList" parameterType="com.sinosoft.activity.domain.DrawPrizeInfo" resultMap="DrawPrizeInfoResult">
|
||||||
|
|
@ -61,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="LASTUPDATETIMESTAMP != null">LASTUPDATETIMESTAMP,</if>
|
<if test="LASTUPDATETIMESTAMP != null">LASTUPDATETIMESTAMP,</if>
|
||||||
<if test="STATUS != null">STATUS,</if>
|
<if test="STATUS != null">STATUS,</if>
|
||||||
<if test="INTEGRALPROJECTCODE != null">INTEGRALPROJECTCODE,</if>
|
<if test="INTEGRALPROJECTCODE != null">INTEGRALPROJECTCODE,</if>
|
||||||
|
<if test="PRIZEIMG != null">PRIZEIMG,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="PRIZEID != null">#{PRIZEID},</if>
|
<if test="PRIZEID != null">#{PRIZEID},</if>
|
||||||
|
|
@ -73,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="LASTUPDATETIMESTAMP != null">#{LASTUPDATETIMESTAMP},</if>
|
<if test="LASTUPDATETIMESTAMP != null">#{LASTUPDATETIMESTAMP},</if>
|
||||||
<if test="STATUS != null">#{STATUS},</if>
|
<if test="STATUS != null">#{STATUS},</if>
|
||||||
<if test="INTEGRALPROJECTCODE != null">#{INTEGRALPROJECTCODE},</if>
|
<if test="INTEGRALPROJECTCODE != null">#{INTEGRALPROJECTCODE},</if>
|
||||||
|
<if test="PRIZEIMG != null">#{PRIZEIMG},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -88,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="LASTUPDATETIMESTAMP != null">LASTUPDATETIMESTAMP = #{LASTUPDATETIMESTAMP},</if>
|
<if test="LASTUPDATETIMESTAMP != null">LASTUPDATETIMESTAMP = #{LASTUPDATETIMESTAMP},</if>
|
||||||
<if test="STATUS != null">STATUS = #{STATUS},</if>
|
<if test="STATUS != null">STATUS = #{STATUS},</if>
|
||||||
<if test="INTEGRALPROJECTCODE != null">INTEGRALPROJECTCODE = #{INTEGRALPROJECTCODE},</if>
|
<if test="INTEGRALPROJECTCODE != null">INTEGRALPROJECTCODE = #{INTEGRALPROJECTCODE},</if>
|
||||||
|
<if test="PRIZEIMG != null">PRIZEIMG = #{PRIZEIMG},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where PRIZEID = #{PRIZEID}
|
where PRIZEID = #{PRIZEID}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('新增存储奖品的基础信息')" />
|
<th:block th:include="include :: header('新增存储奖品的基础信息')" />
|
||||||
<th:block th:include="include :: datetimepicker-css" />
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
<th:block th:include="include :: jasny-bootstrap-css"/>
|
||||||
</head>
|
</head>
|
||||||
<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">
|
||||||
|
|
@ -34,6 +35,24 @@
|
||||||
<input name="PRIZEVALUE" class="form-control" type="text">
|
<input name="PRIZEVALUE" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">背景图片:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="fileinput fileinput-new" data-provides="fileinput">
|
||||||
|
<div class="fileinput-preview thumbnail" data-trigger="fileinput"
|
||||||
|
style="width: 200px; height: 150px;"></div>
|
||||||
|
<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>
|
||||||
|
<a href="#" class="btn btn-white fileinput-exists"
|
||||||
|
data-dismiss="fileinput">清除</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input id="picval" type="hidden" name="PRIZEIMG" value="">
|
||||||
|
</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">
|
||||||
|
|
@ -81,6 +100,7 @@
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
<th:block th:include="include :: datetimepicker-js" />
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: jasny-bootstrap-js"/>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "activity/prize"
|
var prefix = ctx + "activity/prize"
|
||||||
$("#form-info-add").validate({
|
$("#form-info-add").validate({
|
||||||
|
|
@ -104,6 +124,15 @@
|
||||||
minView: "month",
|
minView: "month",
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
|
function syncPic(val){
|
||||||
|
//传递值
|
||||||
|
var id = val.id;
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function (e) {
|
||||||
|
$("#"+id+"val").val(e.target.result);
|
||||||
|
}
|
||||||
|
reader.readAsDataURL(val.files[0]);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue