记得上下班打卡 | git大法好,push需谨慎

Commit 4af599b9 authored by Administrator's avatar Administrator 🎨

Merge branch 'pre' into 'master'

Pre

See merge request !142
parents 51359b3c 3eebe087
...@@ -29,7 +29,7 @@ public class IntegralActivityDrawVo implements Serializable, Cloneable { ...@@ -29,7 +29,7 @@ public class IntegralActivityDrawVo implements Serializable, Cloneable {
@ApiModelProperty(value = "奖品名称") @ApiModelProperty(value = "奖品名称")
private String prizeTitle; private String prizeTitle;
@ApiModelProperty(value = "奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券惠顾 2积分 3代金券 4满减券 5优先购买券 6实物") @ApiModelProperty(value = "奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券")
private Integer prizeType; private Integer prizeType;
@ApiModelProperty(value = "关联id 如商品id 券id") @ApiModelProperty(value = "关联id 如商品id 券id")
...@@ -65,7 +65,7 @@ public class IntegralActivityDrawVo implements Serializable, Cloneable { ...@@ -65,7 +65,7 @@ public class IntegralActivityDrawVo implements Serializable, Cloneable {
@ApiModelProperty(value = "adam收货人详细地址") @ApiModelProperty(value = "adam收货人详细地址")
private String receivingAddress; private String receivingAddress;
@ApiModelProperty(value = "发放状态 1未发放 2已发放") @ApiModelProperty(value = "发放状态 1未发放 2已发放 3未领取")
private Integer receivingStatus; private Integer receivingStatus;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
......
...@@ -485,6 +485,7 @@ ...@@ -485,6 +485,7 @@
}); });
function create() { function create() {
if (!$('#valFace').val() || !$('#title').val() || !$('#num').val() || !$('#ticketTime').val() || !$('#describeTxt').val()) { if (!$('#valFace').val() || !$('#title').val() || !$('#num').val() || !$('#ticketTime').val() || !$('#describeTxt').val()) {
return layer.msg('请将必填项输入完整~!'); return layer.msg('请将必填项输入完整~!');
if (typeTwo == 0) { if (typeTwo == 0) {
...@@ -493,6 +494,9 @@ ...@@ -493,6 +494,9 @@
} }
} }
} }
if ($("#describeTxt").val().match(/^\s+$/)) {
return layer.msg('描述说明不可全为空格!');
}
let useScope = 100; let useScope = 100;
let busiName = $('#searchIpt').val(); let busiName = $('#searchIpt').val();
let busiId = ''; let busiId = '';
...@@ -518,7 +522,10 @@ ...@@ -518,7 +522,10 @@
useScope = 80; useScope = 80;
busiId = showId; busiId = showId;
} }
busiName = $("#searchIpt").val(); busiName = $("#searchIpt").val() || '全部商品';
}
if (typeOne == 0) {
busiName = $("#searchIpt").val() || '全场适用';
} }
if (typeOne == 3) { if (typeOne == 3) {
if (showId) { if (showId) {
......
...@@ -425,6 +425,9 @@ ...@@ -425,6 +425,9 @@
} }
} }
} }
if ($("#describeTxt").val().match(/^\s+$/)) {
return layer.msg('描述说明不可全为空格!');
}
let useScope = 100; let useScope = 100;
let busiName = $('#searchIpt').val(); let busiName = $('#searchIpt').val();
let busiId = ''; let busiId = '';
......
...@@ -495,6 +495,9 @@ ...@@ -495,6 +495,9 @@
} }
} }
} }
if ($("#describeTxt").val().match(/^\s+$/)) {
return layer.msg('描述说明不可全为空格!');
}
let useScope = 100; let useScope = 100;
let busiName = $('#searchIpt').val(); let busiName = $('#searchIpt').val();
let busiId = ''; let busiId = '';
...@@ -520,7 +523,10 @@ ...@@ -520,7 +523,10 @@
useScope = 80; useScope = 80;
busiId = showId; busiId = showId;
} }
busiName = $("#searchIpt").val(); busiName = $("#searchIpt").val() || '全部商品';
}
if (typeOne == 0) {
busiName = $("#searchIpt").val() || '全场适用';
} }
if (typeOne == 3) { if (typeOne == 3) {
if (showId) { if (showId) {
......
...@@ -296,6 +296,9 @@ ...@@ -296,6 +296,9 @@
if (!$('#title').val() || !$('#num').val() || !$('#ticketTime').val() || !$('#describeTxt').val()) { if (!$('#title').val() || !$('#num').val() || !$('#ticketTime').val() || !$('#describeTxt').val()) {
return layer.msg('请将必填项输入完整~!'); return layer.msg('请将必填项输入完整~!');
} }
if ($("#describeTxt").val().match(/^\s+$/)) {
return layer.msg('描述说明不可全为空格!');
}
let useScope = 100; let useScope = 100;
let busiName = $("#searchIpt").val(); let busiName = $("#searchIpt").val();
let busiId = ''; let busiId = '';
......
...@@ -322,6 +322,9 @@ ...@@ -322,6 +322,9 @@
}; };
} }
} }
if ($("#describeTxt").val().match(/^\s+$/)) {
return layer.msg('描述说明不可全为空格!');
}
let useScope = 100; let useScope = 100;
let busiName = ''; let busiName = '';
let busiId = ''; let busiId = '';
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<li> <li>
<input type="text" name="title" placeholder="请输入商品名称"/> <input type="text" name="title" placeholder="请输入商品名称"/>
</li> </li>
<li> <!--<li>
状态: 状态:
<select name="state" id=""> <select name="state" id="">
<option value="">全部</option> <option value="">全部</option>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<option value="">券</option> <option value="">券</option>
<option value="">商品</option> <option value="">商品</option>
</select> </select>
</li> </li>-->
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<option value="">全部</option> <option value="">全部</option>
<option value="1">未发放</option> <option value="1">未发放</option>
<option value="2">已发放</option> <option value="2">已发放</option>
<option value="3">未领取</option>
</select> </select>
</li> </li>
<li> <li>
...@@ -78,7 +79,12 @@ ...@@ -78,7 +79,12 @@
field: 'prizeType', field: 'prizeType',
title: '奖品类型', title: '奖品类型',
formatter: function (value, row) { formatter: function (value, row) {
return $.table.selectDictLabel(prizeType, value); let dictLabel = $.table.selectDictLabel(prizeType, value);
if (row.relationId) {
return dictLabel + "(" + row.relationId + ")";
} else {
return dictLabel;
}
} }
}, },
{ {
...@@ -112,16 +118,21 @@ ...@@ -112,16 +118,21 @@
field: 'receivingStatus', field: 'receivingStatus',
title: '发放状态', title: '发放状态',
formatter: function (value, row) { formatter: function (value, row) {
var receivingStatus = row.receivingStatus; var receivingStatusName = "";
switch (receivingStatus) { var prizeType = row.prizeType;
var relationId = row.relationId;
switch (value) {
case 1: case 1:
receivingStatus = "未发放"; receivingStatusName = "未发放";
break; break;
case 2: case 2:
receivingStatus = "已发放"; receivingStatusName = "已发放";
break;
case 3:
receivingStatusName = "未领取";
break; break;
} }
return receivingStatus; return receivingStatusName;
} }
}, },
{ {
......
...@@ -58,13 +58,16 @@ public class SweetActivityDrawExcelListDao implements Serializable, Cloneable { ...@@ -58,13 +58,16 @@ public class SweetActivityDrawExcelListDao implements Serializable, Cloneable {
this.setPrizeName(DictUtils.getDictLabel("zhengzai_sweet_draw_prize_type", String.valueOf(source.getPrizeType()))); this.setPrizeName(DictUtils.getDictLabel("zhengzai_sweet_draw_prize_type", String.valueOf(source.getPrizeType())));
this.setPrizeTypeNum(source.getPrizeTypeNum()); this.setPrizeTypeNum(source.getPrizeTypeNum());
this.setNickname(source.getNickname()); this.setNickname(source.getNickname());
this.setMobile(source.getMobile());
this.setReceivingName(source.getReceivingName()); this.setReceivingName(source.getReceivingName());
this.setReceivingPhone(source.getReceivingPhone()); this.setReceivingPhone(source.getReceivingPhone());
this.setReceivingAddressAll(source.getReceivingAddressAll()); this.setReceivingAddressAll(source.getReceivingAddressAll());
if (source.getReceivingStatus() == 2) { if (source.getReceivingStatus() == 2) {
this.setReceivingStatusName("已发放"); this.setReceivingStatusName("已发放");
} else { } else if (source.getReceivingStatus() == 1) {
this.setReceivingStatusName("未发放"); this.setReceivingStatusName("未发放");
} else {
this.setReceivingStatusName("未领取");
} }
this.setCreatedAt(source.getCreatedAt()); this.setCreatedAt(source.getCreatedAt());
return this; return this;
......
...@@ -103,7 +103,7 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg ...@@ -103,7 +103,7 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg
); );
// 更新缓存 // 更新缓存
sweetRedisAdminUtils.delIntegralActivityDrawList(sweetIntegralActivityDrawNew.getIntegralActivityId(), sweetIntegralActivityDrawNew.getUserId()); sweetRedisAdminUtils.delIntegralActivityDrawList(sweetIntegralActivityDrawNew.getUserId(), sweetIntegralActivityDrawNew.getIntegralActivityId());
sweetRedisAdminUtils.setIntegralActivityDrawInfo(drawId); sweetRedisAdminUtils.setIntegralActivityDrawInfo(drawId);
......
...@@ -38,7 +38,7 @@ public class SweetActivityDrawListDao implements Serializable { ...@@ -38,7 +38,7 @@ public class SweetActivityDrawListDao implements Serializable {
private String prizeTitle; private String prizeTitle;
/** /**
* 奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券惠顾 2积分 3代金券 4满减券 5优先购买券 6实物 * 奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券
*/ */
private Integer prizeType; private Integer prizeType;
...@@ -104,7 +104,7 @@ public class SweetActivityDrawListDao implements Serializable { ...@@ -104,7 +104,7 @@ public class SweetActivityDrawListDao implements Serializable {
private String receivingAddressAll; private String receivingAddressAll;
/** /**
* 发放状态 1未发放 2已发放 * 发放状态 1未发放 2已发放 3未领取
*/ */
private Integer receivingStatus; private Integer receivingStatus;
......
...@@ -54,7 +54,7 @@ public class SweetIntegralActivityDraw implements Serializable, Cloneable { ...@@ -54,7 +54,7 @@ public class SweetIntegralActivityDraw implements Serializable, Cloneable {
private String prizeTitle; private String prizeTitle;
/** /**
* 奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券惠顾 2积分 3代金券 4满减券 5优先购买券 6实物 * 奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券
*/ */
private Integer prizeType; private Integer prizeType;
...@@ -114,7 +114,7 @@ public class SweetIntegralActivityDraw implements Serializable, Cloneable { ...@@ -114,7 +114,7 @@ public class SweetIntegralActivityDraw implements Serializable, Cloneable {
private String receivingAddress; private String receivingAddress;
/** /**
* 发放状态 1未发放 2已发放 * 发放状态 1未发放 2已发放 3未领取
*/ */
private Integer receivingStatus; private Integer receivingStatus;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetIntegralActivityDrawMapper"> <mapper namespace="com.liquidnet.service.sweet.mapper.SweetIntegralActivityDrawMapper">
<select id="selectExcelList" resultType="com.liquidnet.service.sweet.dto.SweetActivityDrawListDao"> <select id="selectExcelList" resultType="com.liquidnet.service.sweet.dto.SweetActivityDrawListDao">
select a.*, CONCAT(a.receiving_province,a.receiving_city,a.receiving_county,a.receiving_address) as select a.prize_title,a.prize_type,a.prize_type_num,a.nickname,a.receiving_status,a.created_at,
receiving_address_all, CONCAT(a.receiving_province,a.receiving_city,a.receiving_county,a.receiving_address) as receiving_address_all,
u.mobile u.mobile
from sweet_integral_activity_draw as a from sweet_integral_activity_draw as a
left join sweet_integral_activity_prize as b on b.prize_id = a.prize_id left join sweet_integral_activity_prize as b on b.prize_id = a.prize_id
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
and a.prize_type = #{prizeType} and a.prize_type = #{prizeType}
</if> </if>
<if test="receivingStatus != null and receivingStatus != ''"> <if test="receivingStatus != null and receivingStatus != ''">
and a.receiving_status = #{prizeTyreceivingStatuspe} and a.receiving_status = #{receivingStatus}
</if> </if>
</where> </where>
ORDER BY a.mid DESC ORDER BY a.mid DESC
......
...@@ -81,7 +81,7 @@ CREATE TABLE `sweet_integral_activity_draw` ...@@ -81,7 +81,7 @@ CREATE TABLE `sweet_integral_activity_draw`
`activity_num` int NOT NULL DEFAULT 0 COMMENT '活动玩一次所需积分', `activity_num` int NOT NULL DEFAULT 0 COMMENT '活动玩一次所需积分',
`prize_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联奖品id', `prize_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联奖品id',
`prize_title` varchar(255) NOT NULL DEFAULT '' COMMENT '奖品名称', `prize_title` varchar(255) NOT NULL DEFAULT '' COMMENT '奖品名称',
`prize_type` tinyint NOT NULL DEFAULT 0 COMMENT '奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券惠顾 2积分 3代金券 4满减券 5优先购买券 6实物', `prize_type` tinyint NOT NULL DEFAULT 0 COMMENT '奖品类型 1积分 2优惠券 3实物 4登登登VIP 5优先购买券',
`prize_type_num` int NOT NULL DEFAULT 0 COMMENT '单次奖励数量如积分 中奖给多少', `prize_type_num` int NOT NULL DEFAULT 0 COMMENT '单次奖励数量如积分 中奖给多少',
`relation_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联id 如商品id 券id', `relation_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联id 如商品id 券id',
`user_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联用户id', `user_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联用户id',
...@@ -93,7 +93,7 @@ CREATE TABLE `sweet_integral_activity_draw` ...@@ -93,7 +93,7 @@ CREATE TABLE `sweet_integral_activity_draw`
`receiving_city` varchar(255) NOT NULL DEFAULT '' COMMENT 'adam收货人城市', `receiving_city` varchar(255) NOT NULL DEFAULT '' COMMENT 'adam收货人城市',
`receiving_county` varchar(255) NOT NULL DEFAULT '' COMMENT 'adam收货人区县', `receiving_county` varchar(255) NOT NULL DEFAULT '' COMMENT 'adam收货人区县',
`receiving_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'adam收货人详细地址', `receiving_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'adam收货人详细地址',
`receiving_status` smallint NOT NULL DEFAULT 1 COMMENT '发放状态 1未发放 2已发放', `receiving_status` smallint NOT NULL DEFAULT 1 COMMENT '发放状态 1未发放 2已发放 3未领取',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', `updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`), PRIMARY KEY (`mid`),
......
...@@ -197,6 +197,9 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg ...@@ -197,6 +197,9 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg
JsonUtils.toJson(integralParamIn)); JsonUtils.toJson(integralParamIn));
receivingStatus = 2; receivingStatus = 2;
} }
if (prizeType == StatusConst.PRIZE_TYPE2) {// 中奖券 优惠券默认未领取状态
receivingStatus = 3;
}
integralActivityDrawVo.setReceivingStatus(receivingStatus); integralActivityDrawVo.setReceivingStatus(receivingStatus);
// redis // redis
redisDataUtils.setIntegralActivityDraw(integralActivityDrawVo); redisDataUtils.setIntegralActivityDraw(integralActivityDrawVo);
...@@ -339,7 +342,7 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg ...@@ -339,7 +342,7 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg
Map tokenClaims = CurrentUtil.getTokenClaims(); Map tokenClaims = CurrentUtil.getTokenClaims();
String mobile = StringUtils.defaultString((String.valueOf(tokenClaims.get(CurrentUtil.TOKEN_MOBILE))), ""); String mobile = StringUtils.defaultString((String.valueOf(tokenClaims.get(CurrentUtil.TOKEN_MOBILE))), "");
String uid = StringUtils.defaultString((String.valueOf(tokenClaims.get(CurrentUtil.TOKEN_SUB))), ""); String uid = StringUtils.defaultString((String.valueOf(tokenClaims.get(CurrentUtil.TOKEN_SUB))), "");
if (null != drawVo && drawVo.getReceivingStatus() == 1 && drawVo.getUserId().equals(uid)) { if (null != drawVo && (drawVo.getReceivingStatus() == 1 || drawVo.getReceivingStatus() == 3) && drawVo.getUserId().equals(uid)) {
// 发放券 // 发放券
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
LinkedList<String> sqls = CollectionUtil.linkedListString(); LinkedList<String> sqls = CollectionUtil.linkedListString();
...@@ -371,7 +374,7 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg ...@@ -371,7 +374,7 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg
) )
); );
redisDataUtils.delIntegralActivityDrawList(drawVo.getIntegralActivityId(), uid); redisDataUtils.delIntegralActivityDrawList(uid, drawVo.getIntegralActivityId());
} }
return ResponseDto.success(); return ResponseDto.success();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment