|
@@ -31,6 +31,7 @@ import com.startup.minpay.frame.session.MINSession;
|
|
|
import com.startup.minpay.frame.target.MINAction;
|
|
|
import com.startup.minpay.frame.target.MINComponent;
|
|
|
import com.startup.minpay.frame.target.MINParam;
|
|
|
+import io.netty.util.internal.StringUtil;
|
|
|
import net.sf.json.JSONObject;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
@@ -185,26 +186,20 @@ public class ShouhuoPay implements IMINAction{
|
|
|
if(equipmentInf == null) {
|
|
|
throw new MINBusinessException("没有找到此售货机");
|
|
|
}
|
|
|
- String branchid = equipmentInf.getBranchid();
|
|
|
- //查询商户开通了那个支付渠道
|
|
|
- String pay_channel = Service.lookup(IPublicService.class).getSysParValue( "PAY_CHANNEL");
|
|
|
- //查询机器所属机构
|
|
|
- VmAccountExample accExp = new VmAccountExample();
|
|
|
- accExp.createCriteria().andChannelEqualTo(user.getChannel()).andUsridEqualTo(branchid).andTypeEqualTo(pay_channel);
|
|
|
- List<VmAccount> accList = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmAccountMapper.class).selectByExample(accExp);
|
|
|
- if(accList.size() != 1 ){
|
|
|
+ String payeeNo = equipmentInf.getPayeeNo();//收款账号
|
|
|
+ VmHlAccount vmHlAccount = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmHlAccountMapper.class).selectByPrimaryKey(payeeNo);
|
|
|
+ if(vmHlAccount == null || StringUtil.isNullOrEmpty(vmHlAccount.getNumber())){
|
|
|
throw new MINBusinessException("商户收款账户异常");
|
|
|
}
|
|
|
- String accNo = accList.get(0).getNumber();
|
|
|
+ //查询商户开通了那个支付渠道
|
|
|
+ String pay_channel = vmHlAccount.getType();
|
|
|
+ String accNo = vmHlAccount.getNumber();
|
|
|
|
|
|
//支付后台回调地址
|
|
|
String notify_url = Service.lookup(IPublicService.class).getSysParValue(user.getChannel() + "_SHOUHUO_NOTIFY_URL");
|
|
|
//notify_url = "http://xubing2.minpay.cc/services";
|
|
|
|
|
|
notify_url = notify_url + "/ShouhuoPay/personalPayCallBack";
|
|
|
- if("05".equals(pay_channel)){
|
|
|
- pay_channel = "09";
|
|
|
- }
|
|
|
String turntablePage = Service.lookup(IPublicService.class).getSysParValue(user.getChannel() + "_SHOUHUO_TURNTABLE_PAGE");
|
|
|
turntablePage = turntablePage.concat("orderId="+orderId);
|
|
|
Huilianpay prePay = new Huilianpay();
|
|
@@ -215,6 +210,7 @@ public class ShouhuoPay implements IMINAction{
|
|
|
if("92".equals(payType)){
|
|
|
payType = "ALI";
|
|
|
}
|
|
|
+
|
|
|
prePay.setChannel(payType);
|
|
|
prePay.setNotifyUrl(notify_url);
|
|
|
prePay.setOpenId(user.getOpenid());
|