|
|
@@ -364,4 +364,24 @@ public class CouponFontServiceImpl implements CouponFontService {
|
|
|
public CouponUserView getNewUserWelfareCoupons(long userId, DateTime now) {
|
|
|
return couponUserMapper.getNewUserWelfareCouponsByUserId(userId, CouponUser.Channel.new_welfare, now);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CouponUserView getCouponDetailById(long userId, Long couponId) {
|
|
|
+ CouponUserView couponUserView = couponUserMapper.getCouponDetailById(userId, couponId);
|
|
|
+ if (couponUserView != null) {
|
|
|
+ String str = couponSkuMapper.selectGoodsSkuStr(couponUserView.getCouponId());
|
|
|
+ couponUserView.setGoodsSkuStr(str.replaceAll(",", "/").replaceAll(";", ""));
|
|
|
+ }
|
|
|
+ return couponUserView;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CouponUserView receiveCoupon(long userId, Long couponId) {
|
|
|
+ try {
|
|
|
+ receiveCouponUser(couponId, userId, CouponUser.Channel.manual);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return getCouponDetailById(userId, couponId);
|
|
|
+ }
|
|
|
}
|