Commit c5f1163f by Java-张振楠

①增加快捷支付接口

parent b0559b26
......@@ -25,7 +25,7 @@ public class ComCode {
public static final String RATE_UPDATE_URL = "/api/quick/merchant/update/rate"; // 修改商户费率
public static final String QUICK_PAY_URL = "/api/quick/pre/pay"; // 快捷支付
public static final String EXTRA_RATE = "200";
public static final String EXTRA_RATE = "200"; // 附加手续费(单位:分)
/**
* 时间相关参数
*/
......
package com.thinkgem.jeesite.modules.pay.api;
import com.thinkgem.jeesite.common.baseBean.Response;
import com.thinkgem.jeesite.common.constant.ComCode;
import com.thinkgem.jeesite.modules.pay.service.PayApiService;
import com.thinkgem.jeesite.modules.user.bean.JuHeZhongPayRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 支付相关
*/
@RestController
@RequestMapping("/api/pay")
public class PayApiController {
@Autowired
private PayApiService payService;
/**
* 快捷支付
*
* @param request
* @return
*/
@PostMapping("/quick")
public Response checkValidation(JuHeZhongPayRequest request) {
Response resp = new Response();
try {
resp.setStatus(ComCode.STATUS_CODE_2000);
resp.setMessage(ComCode.STATUS_CODE_2000_DESC);
} catch (Exception e) {
resp.setStatus(ComCode.STATUS_CODE_9998);
resp.setMessage(ComCode.STATUS_CODE_9998_DESC);
resp.setError(e.getMessage());
}
return resp;
}
}
package com.thinkgem.jeesite.modules.pay.dao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
@MyBatisDao
public interface PayApiDao {
}
package com.thinkgem.jeesite.modules.pay.service;
import com.thinkgem.jeesite.modules.pay.dao.PayApiDao;
import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 前端用户相关
*/
@Service
@Transactional(readOnly = true)
public class PayApiService {
@Autowired
private PayApiDao payDao;
@Autowired
private JuHeZhongPayService juHeZhongPayService;
}
package com.thinkgem.jeesite.modules.user.bean;
import com.thinkgem.jeesite.common.baseBean.Request;
public class JuHeZhongPayRequest extends Request {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment