From 4fb3f5e033c38afda6e7db013c53389732591efd Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 20 八月 2019 17:19:33 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java | 25 +++++++++---------------- 1 files changed, 9 insertions(+), 16 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java index ce6ae73..15abadd 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java @@ -536,17 +536,13 @@ Long giveId = null; Date nowDate = new Date(); try { - String endDay = DateUtil.plusDay(Constant.GIVE_DAYS - 1, nowDate); - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); - Date endTime = format.parse(endDay); - // 璧犻�佽褰� UserTaoLiJinGiveRecord giveRecord = new UserTaoLiJinGiveRecord(); giveRecord.setAmount(amount); giveRecord.setGiveUid(uid); giveRecord.setState(UserTaoLiJinGiveRecord.STATE_INIT); giveRecord.setGiveTime(nowDate); - giveRecord.setEndTime(endTime); + giveRecord.setEndTime(DateUtil.plusDayDate(Constant.GIVE_DAYS, new Date())); userTaoLiJinGiveRecordService.insertSelective(giveRecord); giveId = giveRecord.getId(); @@ -562,16 +558,12 @@ long num = 10000 + (long) (Math.random() * 10000); token = UserUtil.getInviteCode(num); - String endDay = DateUtil.plusDay(Constant.TOKEN_DAYS - 1,nowDate); - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); - Date endTime = format.parse(endDay); - TokenRecord tokenRecord = new TokenRecord(); tokenRecord.setUid(uid); tokenRecord.setIdentify(giveId + ""); // 璁板綍id tokenRecord.setType(TokenTypeEnum.taoLiJin); tokenRecord.setStartTime(nowDate); - tokenRecord.setEndTime(endTime); + tokenRecord.setEndTime(DateUtil.plusDayDate(Constant.TOKEN_DAYS, new Date())); tokenRecord.setToken(token); tokenRecord.setState(0); tokenRecordService.insertSelective(tokenRecord); @@ -594,12 +586,13 @@ updateExtra.setUpdateTime(new Date()); userMoneyExtraService.updateByPrimaryKeySelective(updateExtra); - String tips = "閫佺粰浣燵%s]鍏冩帹骞跨孩鍖呭揩鍘婚鍙栧惂锛屽鍒舵湰鏉℃秷鎭痆&%s&]锛屾墦寮�[杩斿埄鍒竇App棰嗗彇锛岀敤鎺ㄥ箍鍒嗕韩鐖嗘鍟嗗搧锛屾垚鍗曠巼鏇撮珮鍝︺�俓r\n" - + "----------------------------\r\n" - + "涓嬭浇[杩斿埄鍒竇App閾炬帴:%s\r\n" - + "PS锛氬彛浠ゅ皢浼�24灏忔椂鍐呭け鏁堬紝璇峰強鏃堕鍙栥��"; - - tips = String.format(tips, amount, token, configService.get("app_down_link")); + String tips = configTaoLiJinService.getValueByKey("give_taolijin_tips"); + String projectChineseName = Constant.systemCommonConfig.getProjectChineseName(); + while(tips.contains("{APP鍚嶇О}")) { + tips = tips.replace("{APP鍚嶇О}", projectChineseName); + } + tips = tips.replace("{鍙d护}", token).replace("{涓嬭浇閾炬帴}", configService.get("app_down_link")) + .replace("{闈㈤}", amount.setScale(0).toString()); executor.execute(new Runnable() { @Override -- Gitblit v1.8.0