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

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

@ -1,5 +1,6 @@
package com.fastbee.iot.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@ -155,15 +156,19 @@ public class DeviceReportInfo extends BaseEntity
@ApiModelProperty("纬度")
private String latitude;
//----------------------------------------------------------业务字段-----------------------------------------------------------
/** 是否自动审核 */
private Boolean autoReview ;
/** 设备类型1.水电双计 2.流量计 */
@Excel(name = "设备类型1.水电双计 2.流量计")
@ApiModelProperty("设备类型1.水电双计 2.流量计")
private Integer type;
//----------------------------------------------------------业务字段-----------------------------------------------------------
/** 是否自动审核 */
@TableField(exist = false)
private Boolean autoReview ;
/** 设备类型1.水电双计 2.流量计 */
private String searchValue;
// @TableField(exist = false)
private Integer onLine;//0离线1在线

View File

@ -32,16 +32,17 @@
<result property="type" column="type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="onLine" column="on_line" />
</resultMap>
<sql id="selectDeviceReportInfoVo">
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code, name, lcd_manufacturer_name, voice_manufacturer_name, replace_manufacturer_name, device_id, status, powers_time, type, longitude, latitude from iot_device_report_info
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code, name, lcd_manufacturer_name, voice_manufacturer_name, replace_manufacturer_name, device_id, status, powers_time, type, longitude, latitude,on_line from iot_device_report_info
</sql>
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
<include refid="selectDeviceReportInfoVo"/>
<where>
<if test="imei != null and imei != ''"> and imei = #{imei}</if>
<if test="imei != null and imei != ''"> and imei like concat('%', #{imei}, '%')</if>
<if test="iccid != null and iccid != ''"> and iccid = #{iccid}</if>
<if test="mcuId != null and mcuId != ''"> and mcu_id = #{mcuId}</if>
<if test="bspType != null and bspType != ''"> and bsp_type = #{bspType}</if>
@ -55,7 +56,7 @@
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number like concat('%', #{serialNumber}, '%') </if>
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="lcdManufacturerName != null and lcdManufacturerName != ''"> and lcd_manufacturer_name like concat('%', #{lcdManufacturerName}, '%')</if>
@ -67,6 +68,7 @@
<if test="type != null "> and type = #{type}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="onLine != null "> and on_line = #{onLine}</if>
</where>
</select>

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
/**

View File

@ -161,7 +161,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @param userId 用户ID
* @return 权限列表
*/
@Cacheable(value = "role", key = "#root.methodName + '_' + #userId", unless = "#result == null or #result.size() == 0")
// @Cacheable(value = "role", key = "#root.methodName + '_' + #userId", unless = "#result == null or #result.size() == 0")
@Override
public Set<String> selectRolePermissionByUserId(Long userId)
{