Commit 4ae5db56 by chongli

Merge branch 'miniAppPay' into f-6.6.9

parents d709aaa4 98e14718
......@@ -43,6 +43,32 @@ public class NotifyController {
return notifyResponseBean;
}
/**
* 微信支付通知
*/
@RequestMapping(value = "/{orderType}/notifyForWeiXinPay", produces = "application/json;charset=UTF-8")
@ResponseBody
public String notifyForWeiXinPay(HttpServletRequest request,HttpServletResponse response,@PathVariable String orderType) throws Exception{
BufferedReader reader = null;
reader = request.getReader();
String line = "";
String xmlString = null;
StringBuffer inputString = new StringBuffer();
while ((line = reader.readLine()) != null) {
inputString.append(line);
}
xmlString = inputString.toString();
request.getReader().close();
System.out.println("----接收到的数据如下:---" + xmlString);
this.notifyService.notifyForWeiXinPay(orderType,xmlString);
response.getWriter().write("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>");
return null;
}
/**
* 微信支付通知
*/
......@@ -66,6 +92,29 @@ public class NotifyController {
return null;
}
/**
* 微信支付通知
*/
@RequestMapping(value = "/notifyForVoucherMiniApp", produces = "application/json;charset=UTF-8")
@ResponseBody
public String notifyForVoucherMiniApp(HttpServletRequest request,HttpServletResponse response) throws Exception{
BufferedReader reader = null;
reader = request.getReader();
String line = "";
String xmlString = null;
StringBuffer inputString = new StringBuffer();
while ((line = reader.readLine()) != null) {
inputString.append(line);
}
xmlString = inputString.toString();
request.getReader().close();
System.out.println("----接收到的数据如下:---" + xmlString);
this.notifyService.notifyForVoucherMiniApp(xmlString);
response.getWriter().write("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>");
return null;
}
public NotifyService getNotifyService() {
return notifyService;
......
......@@ -42,12 +42,35 @@ public class NotifyService {
* @param paymentResponse
* @return
*/
public String notifyForWeiXinPay(String orderType,String xml) {
HttpEntity<String> entity = new HttpEntity<String>(xml);
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/"+orderType+"/notifyForWeiXinPay", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
}).getBody();
return null;
}
/**
* @param paymentResponse
* @return
*/
public String notifyForMiniApp(String xml) {
HttpEntity<String> entity = new HttpEntity<String>(xml);
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/communeOrder/notifyForMiniApp", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
}).getBody();
return response;
}
/**
* @param paymentResponse
* @return
*/
public String notifyForVoucherMiniApp(String xml) {
HttpEntity<String> entity = new HttpEntity<String>(xml);
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/communeOrder/notifyForVoucherMiniApp", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
}).getBody();
return response;
}
public RestTemplate getRestTemplate() {
return restTemplate;
......
......@@ -45,6 +45,7 @@ public class VoucherItemDTO implements Serializable {
private String multiAmount;
private Integer onlyMe;//是否本人使用1是本人使用;0是非本人使用
private Integer isShare;//是否正在分享中
private Integer userLimit;//领券人限制
private String alreadyShared;//是否被抢走
private String qiangQuanUid;//抢券人UID
......@@ -282,6 +283,16 @@ public class VoucherItemDTO implements Serializable {
public void setIsShare(Integer isShare) {
this.isShare = isShare;
}
public Integer getUserLimit() {
return userLimit;
}
public void setUserLimit(Integer userLimit) {
this.userLimit = userLimit;
}
public String getAlreadyShared() {
......
......@@ -106,6 +106,11 @@ public abstract class AbstractOrderBean<T> extends AbstractBean {
private BigDecimal discountAfterOrderAmount;
/**一种折扣*/
private BigDecimal discountRate;
/**
* 推荐人uid
*/
private String recommendUid;
// ------------------
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
......@@ -600,5 +605,12 @@ public abstract class AbstractOrderBean<T> extends AbstractBean {
public void setDiscountRate(BigDecimal discountRate) {
this.discountRate = discountRate;
}
public String getRecommendUid() {
return recommendUid;
}
public void setRecommendUid(String recommendUid) {
this.recommendUid = recommendUid;
}
}
......@@ -23,6 +23,8 @@ public enum OrderCategoryEnum {
MALL_AFTER_SALES(12, "商城售后订单"),
COMMUNE(13, "公社订单"),
VOUCHER(16, "优惠券订单"),
GAME_ACTIVITY(14, "赛事活动订单"),
......
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 sign in to comment