From 39c683421f75449c7a85280fa499bae3a2f5241b Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 26 八月 2019 09:27:49 +0800 Subject: [PATCH] 金币领取 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java index cbb1b62..a4d2178 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java @@ -39,6 +39,7 @@ 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; @@ -252,14 +253,17 @@ 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()); @@ -839,5 +843,28 @@ } 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())); + } + } } -- Gitblit v1.8.0