Merge remote-tracking branch 'origin/hph' into zs
This commit is contained in:
@@ -130,19 +130,19 @@ public class OrderService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<TbProskuCon> proskuConList= tbProskuConMapper.selectByShopIdAndSkuIdAndProductId(skuId,shopInfo.getId(),product.getId());
|
// List<TbProskuCon> proskuConList= tbProskuConMapper.selectByShopIdAndSkuIdAndProductId(skuId,shopInfo.getId(),product.getId());
|
||||||
if(Objects.nonNull(proskuConList)&&proskuConList.size()>0){
|
// if(Objects.nonNull(proskuConList)&&proskuConList.size()>0){
|
||||||
for (TbProskuCon proskuCon : proskuConList) {
|
// for (TbProskuCon proskuCon : proskuConList) {
|
||||||
if("1".equals(proskuCon.getStatus())){
|
// if("1".equals(proskuCon.getStatus())){
|
||||||
TbConsInfo consInfo= tbConsInfoMapper.selectByPrimaryKey(proskuCon.getConInfoId());
|
// TbConsInfo consInfo= tbConsInfoMapper.selectByPrimaryKey(proskuCon.getConInfoId());
|
||||||
if("1".equals(consInfo.getIsCheck())){
|
// if("1".equals(consInfo.getIsCheck())){
|
||||||
if(N.egt(proskuCon.getSurplusStock(),consInfo.getStockNumber().abs().subtract(consInfo.getStockConsume().abs()))){
|
// if(N.gt(proskuCon.getSurplusStock(),consInfo.getStockNumber().abs().subtract(consInfo.getStockConsume().abs()))){
|
||||||
return Result.fail("商品:".concat(product.getName()).concat("对应的:").concat(consInfo.getConName()).concat("耗材不足"));
|
// return Result.fail("商品:".concat(product.getName()).concat("对应的:").concat(consInfo.getConName()).concat("耗材不足"));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.thirdpay.req;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class MainScanReq implements Serializable {
|
public class MainScanReq implements Serializable {
|
||||||
@@ -25,7 +26,13 @@ public class MainScanReq implements Serializable {
|
|||||||
|
|
||||||
private String notifyUrl;
|
private String notifyUrl;
|
||||||
|
|
||||||
public MainScanReq(String subject, String body, Long amount, String subAppid, String currency, String authCode, String mchOrderNo, String storeId, String notifyUrl) {
|
private int divisionMode;
|
||||||
|
|
||||||
|
private ArrayList divList;
|
||||||
|
|
||||||
|
private String divTemplateNo;
|
||||||
|
|
||||||
|
public MainScanReq(String subject, String body, Long amount, String subAppid, String currency, String authCode, String mchOrderNo, String storeId, String notifyUrl,int divisionMode,String divTemplateNo,ArrayList divList) {
|
||||||
this.subject = subject;
|
this.subject = subject;
|
||||||
this.body = body;
|
this.body = body;
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
@@ -35,6 +42,9 @@ public class MainScanReq implements Serializable {
|
|||||||
this.mchOrderNo = mchOrderNo;
|
this.mchOrderNo = mchOrderNo;
|
||||||
this.storeId = storeId;
|
this.storeId = storeId;
|
||||||
this.notifyUrl = notifyUrl;
|
this.notifyUrl = notifyUrl;
|
||||||
|
this.divisionMode=divisionMode;
|
||||||
|
this.divList=divList;
|
||||||
|
this.divTemplateNo=divTemplateNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.thirdpay.req;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class WxScanPayReq implements Serializable {
|
public class WxScanPayReq implements Serializable {
|
||||||
@@ -28,11 +29,20 @@ public class WxScanPayReq implements Serializable {
|
|||||||
|
|
||||||
private String storeId;
|
private String storeId;
|
||||||
|
|
||||||
|
private int divisionMode;
|
||||||
|
|
||||||
|
private ArrayList divList;
|
||||||
|
|
||||||
|
private String divTemplateNo;
|
||||||
|
|
||||||
private String notifyUrl;
|
private String notifyUrl;
|
||||||
|
|
||||||
private String returnUrl;
|
private String returnUrl;
|
||||||
|
|
||||||
public WxScanPayReq(String subject, String body, Long amount, String currency, String payType, String subAppid, String userId, String clientIp, String mchOrderNo, String storeId, String notifyUrl, String returnUrl) {
|
public WxScanPayReq(String subject, String body, Long amount, String currency, String payType, String subAppid, String userId, String clientIp, String mchOrderNo, String storeId,
|
||||||
|
int divisionMode,ArrayList divList,String divTemplateNo,
|
||||||
|
|
||||||
|
String notifyUrl, String returnUrl) {
|
||||||
this.subject = subject;
|
this.subject = subject;
|
||||||
this.body = body;
|
this.body = body;
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
@@ -45,5 +55,8 @@ public class WxScanPayReq implements Serializable {
|
|||||||
this.storeId = storeId;
|
this.storeId = storeId;
|
||||||
this.notifyUrl = notifyUrl;
|
this.notifyUrl = notifyUrl;
|
||||||
this.returnUrl = returnUrl;
|
this.returnUrl = returnUrl;
|
||||||
|
this.divisionMode=divisionMode;
|
||||||
|
this.divList=divList;
|
||||||
|
this.divTemplateNo=divTemplateNo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,8 +47,17 @@ public class ThirdPayService {
|
|||||||
public PublicResp<MainScanResp> mainScan(String url,String appId, String subject, String body, Long amount, String subAppId, String authCode, String orderNo, String storeId, String notifyUrl,
|
public PublicResp<MainScanResp> mainScan(String url,String appId, String subject, String body, Long amount, String subAppId, String authCode, String orderNo, String storeId, String notifyUrl,
|
||||||
String key
|
String key
|
||||||
) {
|
) {
|
||||||
|
MainScanReq mainScanReq=null;
|
||||||
|
if("66bab943ae82f63b50ae3cff".equals(appId)){
|
||||||
|
|
||||||
|
mainScanReq = new MainScanReq(subject, body, amount, subAppId, "cny", authCode, orderNo, storeId, notifyUrl,1,"TA1824003985261588482",null);
|
||||||
|
url="https://paymentweb.sxczgkj.cn";
|
||||||
|
}else {
|
||||||
|
mainScanReq = new MainScanReq(subject, body, amount, subAppId, "cny", authCode, orderNo, storeId, notifyUrl,0,null,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MainScanReq mainScanReq = new MainScanReq(subject, body, amount, subAppId, "cny", authCode, orderNo, storeId, notifyUrl);
|
|
||||||
PublicParam param = new PublicParam(appId, "", SignTypeEnum.MD5.getValue(), null, DateUtils.getSdfTimes(), "1.0", String.valueOf(System.currentTimeMillis()));
|
PublicParam param = new PublicParam(appId, "", SignTypeEnum.MD5.getValue(), null, DateUtils.getSdfTimes(), "1.0", String.valueOf(System.currentTimeMillis()));
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +108,14 @@ public class ThirdPayService {
|
|||||||
|
|
||||||
String clinetIp,String orderNo, String storeId, String notifyUrl,String returnUrl,
|
String clinetIp,String orderNo, String storeId, String notifyUrl,String returnUrl,
|
||||||
String key){
|
String key){
|
||||||
WxScanPayReq scanPayReq=new WxScanPayReq(subject,body,amount,"cny",payType,subAppId,userId,clinetIp,orderNo,storeId,notifyUrl,returnUrl);
|
WxScanPayReq scanPayReq=null;
|
||||||
|
if("66bab943ae82f63b50ae3cff".equals(appId)){
|
||||||
|
scanPayReq=new WxScanPayReq(subject,body,amount,"cny",payType,subAppId,userId,clinetIp,orderNo,storeId,1,null,"TA1824003985261588482",notifyUrl,returnUrl);
|
||||||
|
url="https://paymentweb.sxczgkj.cn";
|
||||||
|
}else {
|
||||||
|
scanPayReq=new WxScanPayReq(subject,body,amount,"cny",payType,subAppId,userId,clinetIp,orderNo,storeId,0,null,null,notifyUrl,returnUrl);
|
||||||
|
}
|
||||||
|
|
||||||
PublicParam param=new PublicParam(appId,null,SignTypeEnum.MD5.getValue(),null,DateUtils.getSdfTimes(), "1.0", String.valueOf(System.currentTimeMillis()));
|
PublicParam param=new PublicParam(appId,null,SignTypeEnum.MD5.getValue(),null,DateUtils.getSdfTimes(), "1.0", String.valueOf(System.currentTimeMillis()));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user