设备在线状态逻辑调整,支付下发指令参数调整等

This commit is contained in:
蒾酒
2024-12-28 18:17:30 +08:00
parent 6ed87aa6e6
commit 250530570a
11 changed files with 81 additions and 30 deletions

View File

@ -62,7 +62,7 @@ private static final long serialVersionUID = 1L;
/** 微信支付公钥id */
@Excel(name = "微信支付公钥id")
@ApiModelProperty("微信支付公钥id")
private Long wechatPublicKeyId;
private String wechatPublicKeyId;
/** 平台证书序列号 */
@Excel(name = "平台证书序列号")

View File

@ -25,7 +25,7 @@ public class NgMerchantsDto {
private String deptName;
private Long wechatPublicKeyId;
private String wechatPublicKeyId;
private String platformCertificateSerialNumber;
}

View File

@ -155,7 +155,9 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
userConsumptionDetails.setPaymentStatus(2);//账单状态更改为已支付*/
String areaCode=ngUserRechargeRecords.getAreaCode();
if(ngUserRechargeRecords.getSerialNumber()==null){
throw new ServiceException("充值机编码为空!!!");
}
//构建主题
String topic ="hzlink/147/"+ngUserRechargeRecords.getSerialNumber()+"/cmd/down";
//构建消息
@ -163,18 +165,18 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
//远程阀控
param.put("cmd",1000);
Map<String,Object> data = new HashMap<>();
data.put("orderNum", rechargeCode);//订单号
data.put("cardNum",cardNumber);//卡号
data.put("areaCode",areaCode);//区域号
data.put("investBalance",balance);//充值的金额
data.put("investWater",100);//充值的水量
data.put("orderNum", ngUserRechargeRecords.getId());//订单号
data.put("cardNum",Integer.parseInt(cardNumber));//卡号
data.put("areaCode",Integer.parseInt(areaCode));//区域号
data.put("investBalance",balance.doubleValue()*100);//充值的金额
data.put("investWater",100*100);//充值的水量
param.put("data",data);
try{
pubMqttClient.publish(1,true,topic, JSONUtil.toJsonStr(param));
}catch (Exception e)
{
throw new Exception("消息发布失败");
throw new ServiceException("消息发布失败");
}
// int i = userRechargeCardsMapper.updateUserRechargeCards(info);

View File

@ -63,9 +63,9 @@ public class UserWechatPayServiceImpl implements IUserWechatPayService {
//平台证书地址
public static String platformCertificatePath="fastbee-common/src/main/java/com/fastbee/common/utils/pay/damogang_platformCertificate.pem";
//支付结果回调地址
public static String notify_url="https://3ffb1c5f.r3.cpolar.cn/pay/getresult";//https://3ffb1c5f.r3.cpolar.cn
// public static String notify_url="https://3ffb1c5f.r3.cpolar.cn/pay/getresult";//https://3ffb1c5f.r3.cpolar.cn
//TODO 生产环境支付结果异步通知地址
//public static String notify_url="https://farmh5.hze2.com/prod-api/pay/getresult";
public static String notify_url="https://farmh5.hze2.com/prod-api/pay/getresult";
//https://5f655ed0.r3.cpolar.cn
@Override
/**