| | |
| | | @Override |
| | | public ResultUtil delMyCoupon(Integer id, Integer uid, Integer language) throws Exception { |
| | | UserCouponRecord userCouponRecord = userCouponRecordMapper.selectById(id); |
| | | if(userCouponRecord.getUserId() != uid){ |
| | | if(userCouponRecord.getUserId().compareTo(uid) != 0){ |
| | | language = userInfoService.queryLanguage(uid, language); |
| | | return ResultUtil.error(language == 1 ? "您不能删除此优惠券" : language == 2 ? "You cannot delete this coupon" : "Vous ne pouvez pas supprimer ce coupon"); |
| | | } |
| | |
| | | public ResultUtil handselCoupon(Integer id, Integer uid, Integer userId, Integer language) throws Exception { |
| | | UserCouponRecord userCouponRecord = userCouponRecordMapper.selectById(id); |
| | | language = userInfoService.queryLanguage(uid, language); |
| | | if(userCouponRecord.getUserId() != uid){ |
| | | if(userCouponRecord.getUserId().compareTo(uid) != 0){ |
| | | return ResultUtil.error(language == 1 ? "您不能赠送此优惠券" : language == 2 ? "You cannot gift this coupon" : "Vous ne pouvez pas offrir ce coupon"); |
| | | } |
| | | if(userCouponRecord.getState() != 1){ |