|
@@ -2,6 +2,7 @@ package com.chelvc.cloud.maintain.controller;
|
|
|
|
|
|
import com.chelvc.cloud.vehicle.client.AssetClient;
|
|
|
import com.chelvc.cloud.vehicle.client.dto.MerchantAssetDTO;
|
|
|
+import com.chelvc.cloud.vehicle.client.param.SxyNotifyParam;
|
|
|
import com.chelvc.cloud.vehicle.client.param.TransferNotifyParam;
|
|
|
import com.chelvc.cloud.vehicle.client.param.WithdrawNotifyParam;
|
|
|
import com.chelvc.cloud.vehicle.client.param.WithdrawParam;
|
|
@@ -13,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
/**
|
|
|
* 资产管理
|
|
|
*
|
|
@@ -43,8 +46,8 @@ public class AssetController {
|
|
|
* @param param
|
|
|
*/
|
|
|
@PutMapping("/asset/withdraw")
|
|
|
- public void withdraw(@RequestBody WithdrawParam param) {
|
|
|
- this.assetClient.withdraw(param);
|
|
|
+ public void withdrawApply(@RequestBody WithdrawParam param) {
|
|
|
+ this.assetClient.withdrawApply(param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -53,7 +56,11 @@ public class AssetController {
|
|
|
*/
|
|
|
@PostMapping("/asset/withdraw/notify")
|
|
|
@Authorize(enabled = false)
|
|
|
- public void withdrawNotify(@RequestBody WithdrawNotifyParam param) {
|
|
|
+ public void withdrawNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
|
|
|
+ String merchantId = request.getHeader("merchantId");
|
|
|
+ String encryptKey = request.getHeader("encryptKey");
|
|
|
+ param.setMerchantId(merchantId);
|
|
|
+ param.setEncryptKey(encryptKey);
|
|
|
this.assetClient.withdrawNotify(param);
|
|
|
}
|
|
|
|
|
@@ -63,7 +70,11 @@ public class AssetController {
|
|
|
*/
|
|
|
@PostMapping("/asset/transfer/notify")
|
|
|
@Authorize(enabled = false)
|
|
|
- public void transferNotify(@RequestBody TransferNotifyParam param) {
|
|
|
+ public void transferNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
|
|
|
+ String merchantId = request.getHeader("merchantId");
|
|
|
+ String encryptKey = request.getHeader("encryptKey");
|
|
|
+ param.setMerchantId(merchantId);
|
|
|
+ param.setEncryptKey(encryptKey);
|
|
|
this.assetClient.transferNotify(param);
|
|
|
}
|
|
|
}
|