| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.exception.tlj.UserTaoLiJinOriginException;
|
| | | import com.yeshi.fanli.exception.tlj.UserTaoLiJinRecordException;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
|
| | |
| | | BigDecimal lastMonthUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 4);
|
| | | if (lastMonthUse == null || lastMonthUse.compareTo(zero) > 0) {
|
| | | lastMonthUse = zero;
|
| | | }
|
| | | } |
| | | |
| | | String giveMin = configTaoLiJinService.getValueByKey("give_min_amount"); |
| | |
|
| | | // 问号链接
|
| | | String helpLink = configTaoLiJinService.getValueByKey("hongbao_help_link", null);
|
| | |
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("tlj", tlj.setScale(2).toString());
|
| | | data.put("helpLink", helpLink);
|
| | | data.put("giveMin", giveMin);
|
| | | data.put("giveTip", "注:赠送推广红包金额至少"+ giveMin +"元");
|
| | | data.put("helpLink", configTaoLiJinService.getValueByKey("hongbao_help_link"));
|
| | | data.put("countShare", countShare);
|
| | | data.put("todayWin", todayWin.setScale(2).toString());
|
| | | data.put("yesterdayWin", yesterdayWin.setScale(2).toString());
|
| | |
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 赠送淘礼金
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param amount
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "giveTLJ", method = RequestMethod.POST)
|
| | | public void giveTLJ(AcceptData acceptData, Long uid, BigDecimal amount, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | String tips = userTaoLiJinRecordService.giveTaolijin(uid, amount);
|
| | | out.print(JsonUtil.loadTrueResult(tips));
|
| | | } catch (UserTaoLiJinRecordException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|