提交 76340e84 authored 作者: 张光耀's avatar 张光耀

修改了优惠券

上级 c349e29a
...@@ -99,6 +99,16 @@ public class TbCfCouponEntity implements Serializable { ...@@ -99,6 +99,16 @@ public class TbCfCouponEntity implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
private Integer couponVaild;
public void setCouponVaild(Integer couponVaild){
this.couponVaild = couponVaild;
}
public Integer getCouponVaild(){
return couponVaild;
}
/** /**
* 设置:优惠券id * 设置:优惠券id
*/ */
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="updateUserId" column="update_user_id"/> <result property="updateUserId" column="update_user_id"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="couponVaild" column="coupon_vaild"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfCouponEntity"> <select id="queryObject" resultType="com.platform.entity.TbCfCouponEntity">
...@@ -48,7 +49,8 @@ ...@@ -48,7 +49,8 @@
`create_user_id`, `create_user_id`,
`create_time`, `create_time`,
`update_user_id`, `update_user_id`,
`update_time` `update_time`,
`coupon_vaild`
from tb_cf_coupon from tb_cf_coupon
where coupon_id = #{id} where coupon_id = #{id}
</select> </select>
...@@ -74,7 +76,8 @@ ...@@ -74,7 +76,8 @@
a.create_user_id, a.create_user_id,
a.create_time, a.create_time,
a.update_user_id, a.update_user_id,
a.update_time a.update_time,
a.coupon_vaild
from tb_cf_coupon a LEFT JOIN tb_cf_coupon_category b on a.coupon_category_id =b.coupon_category_id from tb_cf_coupon a LEFT JOIN tb_cf_coupon_category b on a.coupon_category_id =b.coupon_category_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
...@@ -121,7 +124,8 @@ ...@@ -121,7 +124,8 @@
`create_user_id`, `create_user_id`,
`create_time`, `create_time`,
`update_user_id`, `update_user_id`,
`update_time`) `update_time`,
`coupon_vaild`)
values( values(
#{couponId}, #{couponId},
#{couponCategoryId}, #{couponCategoryId},
...@@ -142,7 +146,8 @@ ...@@ -142,7 +146,8 @@
#{createUserId}, #{createUserId},
#{createTime}, #{createTime},
#{updateUserId}, #{updateUserId},
#{updateTime}) #{updateTime},
#{coupon_vaild})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfCouponEntity"> <update id="update" parameterType="com.platform.entity.TbCfCouponEntity">
...@@ -167,6 +172,7 @@ ...@@ -167,6 +172,7 @@
<if test="createTime != null">`create_time` = #{createTime}, </if> <if test="createTime != null">`create_time` = #{createTime}, </if>
<if test="updateUserId != null">`update_user_id` = #{updateUserId}, </if> <if test="updateUserId != null">`update_user_id` = #{updateUserId}, </if>
<if test="updateTime != null">`update_time` = #{updateTime}</if> <if test="updateTime != null">`update_time` = #{updateTime}</if>
<if test="couponVaild != null">`update_time` = #{couponVaild}</if>
</set> </set>
where coupon_id = #{couponId} where coupon_id = #{couponId}
</update> </update>
......
...@@ -51,13 +51,19 @@ ...@@ -51,13 +51,19 @@
<Card v-show="!showList"> <Card v-show="!showList">
<p slot="title">{{title}}</p> <p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfCoupon" :rules="ruleValidate" :label-width="80"> <i-form ref="formValidate" :model="tbCfCoupon" :rules="ruleValidate" :label-width="80">
<Form-item label="优惠券类型" prop="couponCategoryId"> <Form-item label="优惠券类型" prop="couponVaild">
<i-select placeholder="请选择" v-model="tbCfCoupon.couponCategoryId" @on-change="changeCouponCategory"> <i-select placeholder="请选择" v-model="tbCfCoupon.couponCategoryId" @on-change="changeCouponCategory">
<i-option <i-option
v-for="(el,i) in CouponCategory" :key = 'i' v-for="(el,i) in CouponCategory" :key = 'i'
:value="el.couponCategoryId">{{el.couponCategoryName}}</i-option> :value="el.couponCategoryId">{{el.couponCategoryName}}</i-option>
</i-select> </i-select>
</Form-item> </Form-item>
<Form-item label="设置是否为注册就送该优惠券" prop="couponCategoryId">
<i-select placeholder="请选择" v-model="tbCfCoupon.couponVaild">
<i-option value="0">0</i-option>
<i-option value="1">1</i-option>
</i-select>
</Form-item>
<!--<Form-item label="可用于类目" prop="couponUse"> <!--<Form-item label="可用于类目" prop="couponUse">
<i-input v-model="tbCfCoupon.couponUse" placeholder="可用于类目"/> <i-input v-model="tbCfCoupon.couponUse" placeholder="可用于类目"/>
</Form-item>--> </Form-item>-->
......
...@@ -22,7 +22,8 @@ $(function () { ...@@ -22,7 +22,8 @@ $(function () {
{label: '创建人', name: 'createUserId', index: 'create_user_id', width: 80, hidden: true}, {label: '创建人', name: 'createUserId', index: 'create_user_id', width: 80, hidden: true},
{label: '创建时间', name: 'createTime', index: 'create_time', width: 80}, {label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
{label: '修改人', name: 'updateUserId', index: 'update_user_id', width: 80, hidden: true}, {label: '修改人', name: 'updateUserId', index: 'update_user_id', width: 80, hidden: true},
{label: '修改时间', name: 'updateTime', index: 'update_time', width: 80, hidden: true}] {label: '修改时间', name: 'updateTime', index: 'update_time', width: 80, hidden: true},
{label: '修改时间', name: 'coupon_vaild', index: 'update_time', width: 80, hidden: true}]
}); });
}); });
$(function () { $(function () {
......
...@@ -212,7 +212,7 @@ let vm = new Vue({ ...@@ -212,7 +212,7 @@ let vm = new Vue({
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
let filereader = new FileReader(); let filereader = new FileReader();
filereader.onload = e => { filereader.onload = e => {
console.log("2222");
let src = e.target.result; let src = e.target.result;
const image = new Image(); const image = new Image();
image.onload = function () { image.onload = function () {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论