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