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

Commit f7ecd0d8 authored by jiangxiulong's avatar jiangxiulong

领券

parent 7d0ea47e
...@@ -28,4 +28,6 @@ public interface ISweetIntegralActivityDrawService extends IService<SweetIntegra ...@@ -28,4 +28,6 @@ public interface ISweetIntegralActivityDrawService extends IService<SweetIntegra
ResponseDto perfectAddress(String drawId, String receivingAddressesId); ResponseDto perfectAddress(String drawId, String receivingAddressesId);
ResponseDto<IntegralActivityDrawVo> detail(String drawId); ResponseDto<IntegralActivityDrawVo> detail(String drawId);
ResponseDto collectCoupon(String couponId);
} }
...@@ -112,6 +112,7 @@ global-auth: ...@@ -112,6 +112,7 @@ global-auth:
- ${liquidnet.info.context}/integralActivityDraw/detail/* - ${liquidnet.info.context}/integralActivityDraw/detail/*
- ${liquidnet.info.context}/integralActivityDraw/drawList - ${liquidnet.info.context}/integralActivityDraw/drawList
- ${liquidnet.info.context}/integralActivityDraw/perfectAddress - ${liquidnet.info.context}/integralActivityDraw/perfectAddress
- ${liquidnet.info.context}/integralActivityDraw/collectCoupon
# 手机号获取是否关注 # 手机号获取是否关注
- ${liquidnet.info.context}/wechatTemplate/followStatusPhone - ${liquidnet.info.context}/wechatTemplate/followStatusPhone
# 做积分任务 # 做积分任务
......
...@@ -91,4 +91,15 @@ public class SweetIntegralActivityDrawController { ...@@ -91,4 +91,15 @@ public class SweetIntegralActivityDrawController {
return activityDrawService.perfectAddress(drawId, receivingAddressesId); return activityDrawService.perfectAddress(drawId, receivingAddressesId);
} }
@PostMapping("collectCoupon")
@ApiOperation("领取券")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "couponId", value = "券id", required = true)
})
public ResponseDto collectCoupon(
@RequestParam("couponId") String couponId
) {
return activityDrawService.collectCoupon(couponId);
}
} }
...@@ -362,6 +362,24 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg ...@@ -362,6 +362,24 @@ public class SweetIntegralActivityDrawServiceImpl extends ServiceImpl<SweetInteg
return ResponseDto.success(drawVo); return ResponseDto.success(drawVo);
} }
@Override
public ResponseDto collectCoupon(String couponId) {
// TODO: 2021/12/6 看看是否需要判断中奖状态再发
Map tokenClaims = CurrentUtil.getTokenClaims();
String mobile = StringUtils.defaultString((String.valueOf(tokenClaims.get(CurrentUtil.TOKEN_MOBILE))), "");
LocalDateTime nowTime = LocalDateTime.now();
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlsDataA = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("stone_candy_mgt_coupon.add_for_member"));
sqlsDataA.add(new Object[]{
IDGenerator.nextTimeId2(), couponId,
1, mobile, nowTime, "INTEGRAL_ACTIVITY_DRAW_COUPON", nowTime
});
queueUtils.sendMsgByRedis(MQConst.StoneQueue.STONE_ORDER_COUPON.getKey(),
SqlMapping.gets(sqls, sqlsDataA));
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