|
@@ -39,7 +39,7 @@ public class ApiService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public ApiPayWxAppResponseVo wxAppDongke(String appid, int money, String title) throws Exception {
|
|
|
- Pay pay = this.add(money, title);
|
|
|
+ Pay pay = this.add(money, title, Constant.TYPE_WX);
|
|
|
logger.debug("添加支付记录:{}", JsonUtil.toJson(pay));
|
|
|
return payWxV3Service.appDongke(appid, pay.getPid(), money, title);
|
|
|
}
|
|
@@ -50,7 +50,7 @@ public class ApiService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public ApiPayWxAppResponseVo wxAppQinggu(String appid, int money, String title) throws Exception {
|
|
|
- Pay pay = this.add(money, title);
|
|
|
+ Pay pay = this.add(money, title, Constant.TYPE_WX);
|
|
|
logger.debug("添加支付记录:{}", JsonUtil.toJson(pay));
|
|
|
return payWxV3Service.appQinggu(appid, pay.getPid(), money, title);
|
|
|
}
|
|
@@ -123,7 +123,7 @@ public class ApiService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public ApiPayAliAppResponseVo aliAppDongke(int money, String title) throws Exception {
|
|
|
- Pay pay = this.add(money, title);
|
|
|
+ Pay pay = this.add(money, title, Constant.TYPE_ALI);
|
|
|
logger.debug("添加支付记录:{}", JsonUtil.toJson(pay));
|
|
|
String text = payAliNewService.appDongke(pay.getPid(), money, title);
|
|
|
ApiPayAliAppResponseVo responseVo = new ApiPayAliAppResponseVo();
|
|
@@ -138,7 +138,7 @@ public class ApiService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public ApiPayAliAppResponseVo aliAppQinggu(int money, String title) throws Exception {
|
|
|
- Pay pay = this.add(money, title);
|
|
|
+ Pay pay = this.add(money, title, Constant.TYPE_ALI);
|
|
|
logger.debug("添加支付记录:{}", JsonUtil.toJson(pay));
|
|
|
String text = payAliNewService.appQinggu( pay.getPid(), money, title);
|
|
|
ApiPayAliAppResponseVo responseVo = new ApiPayAliAppResponseVo();
|
|
@@ -200,12 +200,12 @@ public class ApiService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- private Pay add(int money, String title) throws Exception {
|
|
|
+ private Pay add(int money, String title, int type) throws Exception {
|
|
|
Pay pay = new Pay();
|
|
|
pay.setMoney(money);
|
|
|
pay.setTitle(title);
|
|
|
+ pay.setType(type);
|
|
|
pay.setPid(CodeUtil.time());
|
|
|
- pay.setType(Constant.TYPE_WX);
|
|
|
pay.setStatus(Constant.STATUS_WAIT);
|
|
|
payDao.insert(pay);
|
|
|
logger.debug("添加支付记录:{}", JsonUtil.toJson(pay));
|