From be525b2d397c6cc5171d4186822145a87fb8d809 Mon Sep 17 00:00:00 2001
From: zhibing.pu <393733352@qq.com>
Date: 星期二, 27 八月 2024 20:34:17 +0800
Subject: [PATCH] 修改邮件发送
---
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java | 67 +++++++++++----------------------
1 files changed, 23 insertions(+), 44 deletions(-)
diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java
index a1a5b4d..d788977 100644
--- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java
+++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java
@@ -40,7 +40,7 @@
* @Date 2020-06-09 09:30:59
*/
@Controller
-@RequestMapping("/tPubWithdrawal")
+@RequestMapping("")
public class TPubWithdrawalController extends BaseController {
private String PREFIX = "/system/tPubWithdrawal/";
@@ -70,7 +70,7 @@
/**
* 跳转到提现列表首页
*/
- @RequestMapping("")
+ @RequestMapping("/tPubWithdrawal")
public String index() {
return PREFIX + "tPubWithdrawal.html";
}
@@ -78,7 +78,7 @@
/**
* 跳转到查看详情
*/
- @RequestMapping("/lookDetail/{id}/{type}")
+ @RequestMapping("/tPubWithdrawal/lookDetail/{id}/{type}")
public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) {
TPubWithdrawal tPubWithdrawal = tPubWithdrawalService.selectById(id);
String str = "";
@@ -93,7 +93,7 @@
* 跳转到立即处理页面
* ----------改为批量
*/
- @RequestMapping("/tPubWithdrawal_immediately/{tPubWithdrawalIds}")
+ @RequestMapping("/tPubWithdrawal/tPubWithdrawal_immediately/{tPubWithdrawalIds}")
public String tPubWithdrawalUpdate(@PathVariable String tPubWithdrawalIds, Model model) {
model.addAttribute("tPubWithdrawalIds",tPubWithdrawalIds);
return PREFIX + "tPubWithdrawal_immediately.html";
@@ -102,7 +102,7 @@
/**
* 获取提现列表列表
*/
- @RequestMapping(value = "/list")
+ @RequestMapping(value = "/tPubWithdrawal/list")
@ResponseBody
public Object list(String insertTime,
String name,
@@ -129,7 +129,7 @@
/**
* 新增提现列表
*/
- @RequestMapping(value = "/add")
+ @RequestMapping(value = "/tPubWithdrawal/add")
@ResponseBody
public Object add(TPubWithdrawal tPubWithdrawal) {
tPubWithdrawalService.insert(tPubWithdrawal);
@@ -139,11 +139,13 @@
/**
* 立即处理操作
*/
- @RequestMapping(value = "/immediately")
+ @RequestMapping(value = "/tPubWithdrawal/immediately")
@ResponseBody
public Object immediately(@RequestParam Integer id,@RequestParam Integer state,@RequestParam String remark) {
TPubWithdrawal tPubWithdrawal = tPubWithdrawalService.selectById(id);
if (SinataUtil.isNotEmpty(tPubWithdrawal)){
+ TDriver tDriver = driverService.selectById(tPubWithdrawal.getUserId());
+ Integer language = tDriver.getLanguage();
tPubWithdrawal.setRemark(remark);
String serviceCode = "";
@@ -153,14 +155,13 @@
serviceCode = tUser.getPhoneOperator();
phone = tUser.getPhone();
}else{
- TDriver tDriver = driverService.selectById(tPubWithdrawal.getUserId());
serviceCode = tDriver.getPhoneOperator();
phone = tDriver.getPhone();
}
if(2 == state){
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String payerTransactionID = sdf.format(new Date()) + tPubWithdrawal.getId();
- PayoutResponse payoutResponse = tinggPayoutUtil.sendPayout(serviceCode, "+" + phone, payerTransactionID, tPubWithdrawal.getMoney().doubleValue(), callbackPath + "/tPubWithdrawal/base/withdrawalCallback", "用户提现");
+ PayoutResponse payoutResponse = tinggPayoutUtil.sendPayout(serviceCode, phone, payerTransactionID, tPubWithdrawal.getMoney().doubleValue(), callbackPath + "/base/withdrawalCallback", remark);
AuthStatus authStatus = payoutResponse.getAuthStatus();
Results results = payoutResponse.getResults().get(0);
String statusCode = results.getStatusCode();
@@ -171,6 +172,7 @@
return ResultUtil.error(results.getStatusDescription());
}
tPubWithdrawal.setSerialNo(results.getBeepTransactionID());
+ tPubWithdrawal.setState(4);
}else{//回退金额
tPubWithdrawal.setHandleTime(new Date());
tPubWithdrawal.setState(state);
@@ -179,7 +181,6 @@
tUser.setBalance(tUser.getBalance().add(tPubWithdrawal.getMoney()));
userService.updateById(tUser);
}else{
- TDriver tDriver = driverService.selectById(tPubWithdrawal.getUserId());
tDriver.setBalance(tDriver.getBalance().add(tPubWithdrawal.getMoney()));
if(tPubWithdrawal.getType() == 1){//活动提现
tDriver.setLaveActivityMoney(new BigDecimal(tDriver.getLaveActivityMoney()).add(tPubWithdrawal.getMoney()).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
@@ -196,7 +197,7 @@
TSystemNotice notice = new TSystemNotice();
notice.setType(2);
notice.setUserType(tPubWithdrawal.getUserType());
- notice.setContent("提现处理结果:【"+remark+"】。");
+ notice.setContent((language == 1 ? "提现申请反馈" : language == 2 ? "Feedback on withdrawal requests" : "Réponse à la demande de retrait") + ":【" +remark +"】。");
notice.setUserId(tPubWithdrawal.getUserId());
notice.setInsertTime(new Date());
notice.setRead(1);
@@ -242,7 +243,7 @@
/**
* 修改提现列表
*/
- @RequestMapping(value = "/update")
+ @RequestMapping(value = "/tPubWithdrawal/update")
@ResponseBody
public Object update(TPubWithdrawal tPubWithdrawal) {
tPubWithdrawalService.updateById(tPubWithdrawal);
@@ -252,7 +253,7 @@
/**
* 提现列表详情
*/
- @RequestMapping(value = "/detail/{tPubWithdrawalId}")
+ @RequestMapping(value = "/tPubWithdrawal/detail/{tPubWithdrawalId}")
@ResponseBody
public Object detail(@PathVariable("tPubWithdrawalId") Integer tPubWithdrawalId) {
return tPubWithdrawalService.selectById(tPubWithdrawalId);
@@ -269,7 +270,7 @@
* @param type
* @param state
*/
- @RequestMapping(value = "/downloadList",method = RequestMethod.GET)
+ @RequestMapping(value = "/tPubWithdrawal/downloadList",method = RequestMethod.GET)
public void downloadList(String insertTime, String name, Integer withdrawalType, Integer userType, Integer type, Integer state,
HttpServletRequest request, HttpServletResponse response){
String start = null;
@@ -285,13 +286,11 @@
List<String> shellList = new ArrayList<String>();
shellList.add("申请时间");
shellList.add("提现人");
- shellList.add("银行卡号");
- shellList.add("开户行");
- shellList.add("提现方式");
+ shellList.add("提现手机号");
shellList.add("账户类型");
+ shellList.add("提现金额");
shellList.add("提现类型");
shellList.add("账户余额");
- shellList.add("提现金额");
shellList.add("联系人");
shellList.add("联系电话");
shellList.add("备注");
@@ -315,26 +314,6 @@
}else{
shellList.add("-");
}
- if(SinataUtil.isNotEmpty(map.get("bankName"))){
- shellList.add(map.get("bankName").toString());
- }else{
- shellList.add("-");
- }
- //withdrawalType
- if(SinataUtil.isNotEmpty(map.get("withdrawalType"))){
- switch (map.get("withdrawalType").toString()){
- case "1":
- shellList.add("银行卡");
- break;
- case "2":
- shellList.add("线下");
- break;
- default:
- shellList.add("-");
- }
- }else{
- shellList.add("-");
- }
//userType
if(SinataUtil.isNotEmpty(map.get("userType"))){
switch (map.get("userType").toString()){
@@ -347,6 +326,12 @@
default:
shellList.add("-");
}
+ }else{
+ shellList.add("-");
+ }
+ //money
+ if(SinataUtil.isNotEmpty(map.get("money"))){
+ shellList.add(map.get("money").toString());
}else{
shellList.add("-");
}
@@ -368,12 +353,6 @@
//balance
if(SinataUtil.isNotEmpty(map.get("balance"))){
shellList.add(map.get("balance").toString());
- }else{
- shellList.add("-");
- }
- //money
- if(SinataUtil.isNotEmpty(map.get("money"))){
- shellList.add(map.get("money").toString());
}else{
shellList.add("-");
}
--
Gitblit v1.7.1