| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetFrequencyLimit;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
| | | * 邀请嘛
|
| | | * @param out
|
| | | */
|
| | | @RequestSerializableByKey(key ="'activationInvite-'+#uid")
|
| | | @RequestMapping(value = "activationInvite")
|
| | | public void activationInvite(AcceptData acceptData, String callback, Long uid, String inviteCode, PrintWriter out) {
|
| | | try {
|
| | |
| | | * 邀请嘛
|
| | | * @param out
|
| | | */
|
| | | @RequestSerializableByKey(key ="'activationInviteWX-'+#uid")
|
| | | @RequestMapping(value = "activationInviteWX")
|
| | | public void activationInviteWX(AcceptData acceptData, Long uid, String code, PrintWriter out) {
|
| | | try {
|
| | |
| | | public void updateRecord(AcceptData acceptData, String shareId, String type, PrintWriter out) {
|
| | | if (StringUtil.isNullOrEmpty(shareId)) {
|
| | | out.print(JsonUtil.loadFalseResult("参数不正确"));
|
| | | return;
|
| | | }
|
| | |
|
| | | // 更新分享生效
|
| | |
| | | // 二级分享赚分销红包
|
| | | public final static int TYPE_SHARE_ERJI = 22;
|
| | |
|
| | | // 使用券红包
|
| | | // 金币兑换红包
|
| | | public final static int TYPE_EXCHANGE = 30;
|
| | |
|
| | | @Column(name = "hb_id")
|
| | |
| | | if (exchange == null)
|
| | | throw new IntegralExchangeException(1, "兑换方式不存在");
|
| | |
|
| | | Integer state = exchange.getState();
|
| | | if (state == null || state != 1)
|
| | | throw new IntegralExchangeException(1, "兑换活动未开启");
|
| | | |
| | | |
| | | Integer goldCoin = exchange.getGoldCoin();
|
| | |
|
| | | ExchangeTipVO exchangeTip = new ExchangeTipVO();
|
| | |
| | | if (exchange == null)
|
| | | throw new IntegralExchangeException(1, "兑换方式不存在");
|
| | |
|
| | | ExchangeTypeEnum type = exchange.getType();
|
| | | Integer state = exchange.getState();
|
| | | if (state == null || state != 1)
|
| | | throw new IntegralExchangeException(1, "兑换活动未开启");
|
| | |
|
| | | long exchangeCount = 0;
|
| | | ExchangeTypeEnum type = exchange.getType();
|
| | | if (ExchangeTypeEnum.freeCouponBuy == type) {
|
| | | exchangeCount = integralExchangeRecordService.countRecordByUid(id, uid, null);
|
| | | if (exchangeCount >= 1) {
|