设备激活二维码生成逻辑修改,设备上报基本信息新增接口添加设备编码查重逻辑。
This commit is contained in:
parent
a96497c954
commit
ffbb8bcfe4
@ -6,5 +6,4 @@ public class DeviceActivationDto {
|
|||||||
public double longitude;
|
public double longitude;
|
||||||
public double latitude;
|
public double latitude;
|
||||||
public String imgUrl;
|
public String imgUrl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public class PrinterController extends BaseController {
|
|||||||
@PostMapping("/image/msg/generate")
|
@PostMapping("/image/msg/generate")
|
||||||
public AjaxResult generateImage(@RequestBody DeviceReportInfo deviceReportInfo ){
|
public AjaxResult generateImage(@RequestBody DeviceReportInfo deviceReportInfo ){
|
||||||
System.err.println(deviceReportInfo);
|
System.err.println(deviceReportInfo);
|
||||||
String qrCodeUrl = GenerateQRCodeImage.generateQRCodeUrl(deviceReportInfo.getName(), deviceReportInfo.getSerialNumber(), "山东翰臻物联公司");
|
String qrCodeUrl = GenerateQRCodeImage.generateQRCodeUrl(deviceReportInfo);
|
||||||
return AjaxResult.success("操作成功",qrCodeUrl);
|
return AjaxResult.success("操作成功",qrCodeUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import cn.hutool.http.HttpRequest;
|
|||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||||
import com.google.zxing.BarcodeFormat;
|
import com.google.zxing.BarcodeFormat;
|
||||||
import com.google.zxing.EncodeHintType;
|
import com.google.zxing.EncodeHintType;
|
||||||
import com.google.zxing.MultiFormatWriter;
|
import com.google.zxing.MultiFormatWriter;
|
||||||
@ -28,16 +29,16 @@ public class GenerateQRCodeImage {
|
|||||||
//设备激活接口地址
|
//设备激活接口地址
|
||||||
private static final String ACTIVATE_URL = "https://open.10ss.net:8443/api/activate";
|
private static final String ACTIVATE_URL = "https://open.10ss.net:8443/api/activate";
|
||||||
|
|
||||||
public static String generateQRCodeUrl(String deviceName, String deviceCode, String companyName){
|
public static String generateQRCodeUrl(DeviceReportInfo deviceReportInfo){
|
||||||
try {
|
try {
|
||||||
// 二维码内容
|
// 二维码内容
|
||||||
Map<String,Object> qrCodeContent=new HashMap<>();
|
Map<String,Object> qrCodeContent=new HashMap<>();
|
||||||
qrCodeContent.put("deviceName",deviceName);
|
qrCodeContent.put("deviceName",deviceReportInfo.getName());
|
||||||
qrCodeContent.put("deviceCode",deviceCode);
|
qrCodeContent.put("deviceCode",deviceReportInfo.getSerialNumber());
|
||||||
String qrCodeContentStr=JSONUtil.toJsonStr(qrCodeContent);
|
String qrCodeContentStr=JSONUtil.toJsonStr(qrCodeContent);
|
||||||
|
|
||||||
// 生成二维码
|
// 生成二维码
|
||||||
BitMatrix bitMatrix = generateQRCode(qrCodeContentStr, 220, 220);
|
BitMatrix bitMatrix = generateQRCode(qrCodeContentStr, 200, 200);
|
||||||
|
|
||||||
// 将二维码转换为BufferedImage
|
// 将二维码转换为BufferedImage
|
||||||
BufferedImage qrCodeImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
BufferedImage qrCodeImage = MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||||
@ -57,55 +58,84 @@ public class GenerateQRCodeImage {
|
|||||||
g2d.fillRect(0, 0, imageWidth, imageHeight);
|
g2d.fillRect(0, 0, imageWidth, imageHeight);
|
||||||
|
|
||||||
// 绘制二维码
|
// 绘制二维码
|
||||||
g2d.drawImage(qrCodeImage, 40, 0, qrCodeWidth, qrCodeHeight, null);
|
g2d.drawImage(qrCodeImage, 20, 10, qrCodeWidth, qrCodeHeight, null);
|
||||||
//绘制虚线矩形
|
//绘制虚线矩形
|
||||||
Stroke dashed = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, new float[]{10}, 0);
|
Stroke dashed = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, new float[]{10}, 0);
|
||||||
g2d.setStroke(dashed);
|
g2d.setStroke(dashed);
|
||||||
// 设置颜色
|
// 设置颜色
|
||||||
g2d.setColor(Color.BLACK);
|
g2d.setColor(Color.BLACK);
|
||||||
// 绘制虚线矩形
|
// 绘制虚线矩形
|
||||||
g2d.drawRect(70, 31, qrCodeImage.getWidth()-62, qrCodeImage.getHeight()-62);
|
g2d.drawRect(50, 41, qrCodeImage.getWidth()-62, qrCodeImage.getHeight()-62);
|
||||||
// 绘制文字
|
// 绘制文字
|
||||||
g2d.setColor(Color.BLACK);
|
g2d.setColor(Color.BLACK);
|
||||||
g2d.setFont(new Font("黑体", Font.BOLD, 20));
|
g2d.setFont(new Font("黑体", Font.BOLD, 20));
|
||||||
String text1 = deviceName;
|
// 绘制第一段文字
|
||||||
|
String text1 = deviceReportInfo.getName();
|
||||||
FontMetrics fontMetrics = g2d.getFontMetrics();
|
FontMetrics fontMetrics = g2d.getFontMetrics();
|
||||||
int textX = qrCodeWidth+15; // 间距20像素
|
|
||||||
int textY1 = (imageHeight - fontMetrics.getHeight()) / 2 + fontMetrics.getAscent()-65;
|
|
||||||
|
|
||||||
|
int textX = qrCodeWidth-5; // 问文本与二维码的水平间距
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int textY1 = (imageHeight - fontMetrics.getHeight()) / 2 + fontMetrics.getAscent()-55;
|
||||||
|
|
||||||
|
|
||||||
g2d.drawString(text1, textX, textY1);
|
g2d.drawString(text1, textX, textY1);
|
||||||
|
|
||||||
// 绘制第二段文字
|
// 绘制第二段文字
|
||||||
String text2 = "◉ 系列:"+"RF500780E";
|
String text2 = "◉ 系列:"+deviceReportInfo.getMcuFw();
|
||||||
g2d.setFont(new Font("Dialog", Font.BOLD, 18));
|
g2d.setFont(new Font("Dialog", Font.BOLD, 18));
|
||||||
|
|
||||||
|
|
||||||
int textY2 = textY1 + fontMetrics.getHeight() + 10; // 在第一段文字下方添加一些间距
|
int textY2 = textY1 + fontMetrics.getHeight() + 10; // 在第一段文字下方添加一些间距
|
||||||
|
|
||||||
|
|
||||||
g2d.drawString(text2, textX, textY2);
|
g2d.drawString(text2, textX, textY2);
|
||||||
// 绘制第三段文字
|
// 绘制第三段文字
|
||||||
String text3 = "◉ 型号:" + "RF500 780E";
|
String text3 = "◉ 型号:" + deviceReportInfo.getBspType()+deviceReportInfo.getLteType()+"";
|
||||||
|
|
||||||
|
|
||||||
int textY3 = textY2 + fontMetrics.getHeight() + 10; // 在第一段文字下方添加一些间距
|
int textY3 = textY2 + fontMetrics.getHeight() + 10; // 在第一段文字下方添加一些间距
|
||||||
|
|
||||||
|
|
||||||
g2d.drawString(text3, textX, textY3);
|
g2d.drawString(text3, textX, textY3);
|
||||||
//绘制第三段文字
|
//绘制第三段文字
|
||||||
String text4 = "◉ 批次:" + "RF500C齐测780";
|
String text4 = "◉ 批次:" + deviceReportInfo.getBatchNumber();
|
||||||
|
|
||||||
|
|
||||||
int textY4 = textY3 + fontMetrics.getHeight() + 10; // 在第一段文字下方添加一些间距
|
int textY4 = textY3 + fontMetrics.getHeight() + 10; // 在第一段文字下方添加一些间距
|
||||||
|
|
||||||
|
|
||||||
g2d.drawString(text4, textX, textY4);
|
g2d.drawString(text4, textX, textY4);
|
||||||
//绘制第五段文字
|
//绘制第五段文字
|
||||||
// 确保Graphics2D对象的当前颜色是黑色(如果不是的话)
|
// 确保Graphics2D对象的当前颜色是黑色(如果不是的话)
|
||||||
g2d.setColor(Color.BLACK);
|
g2d.setColor(Color.BLACK);
|
||||||
// 计算文本宽度和高度
|
// 计算文本宽度和高度
|
||||||
String text5 =" SN:"+deviceCode+" ";
|
String text5 =" SN:"+deviceReportInfo.getSerialNumber()+" ";
|
||||||
|
|
||||||
textWidth = fontMetrics.stringWidth(text5);
|
textWidth = fontMetrics.stringWidth(text5);
|
||||||
int textHeight = fontMetrics.getHeight();
|
int textHeight = fontMetrics.getHeight();
|
||||||
// 计算矩形区域的X和Y坐标(留出内边距)
|
// 计算矩形区域的X和Y坐标(留出内边距)
|
||||||
int rectX = textX; // 左内边距
|
int rectX = textX; // 左内边距
|
||||||
|
|
||||||
|
|
||||||
int rectY = textY4+10; // 上内边距,确保文本顶部与矩形内部有一定的空间
|
int rectY = textY4+10; // 上内边距,确保文本顶部与矩形内部有一定的空间
|
||||||
|
|
||||||
|
|
||||||
// 为了确保文本完全在矩形内,我们可以稍微调整rectHeight
|
// 为了确保文本完全在矩形内,我们可以稍微调整rectHeight
|
||||||
int rectHeight = textHeight + 10; // 文本高度加上上下内边距
|
int rectHeight = textHeight + 10; // 文本高度加上上下内边距
|
||||||
// 绘制黑色背景矩形
|
// 绘制黑色背景矩形
|
||||||
g2d.fillRect(rectX, rectY, textWidth + 10, rectHeight);
|
g2d.fillRect(rectX, rectY, textWidth + 10, rectHeight);
|
||||||
// 设置Graphics2D对象的当前颜色为白色
|
// 设置Graphics2D对象的当前颜色为白色
|
||||||
g2d.setColor(Color.WHITE);
|
g2d.setColor(Color.WHITE);
|
||||||
|
|
||||||
|
|
||||||
// 绘制第四段文字
|
// 绘制第四段文字
|
||||||
int textY5 = textY4 + fontMetrics.getHeight() + 10; // 在前一段文字下方添加间距
|
int textY5 = textY4 + fontMetrics.getHeight() + 10; // 在前一段文字下方添加间距
|
||||||
|
|
||||||
|
|
||||||
g2d.drawString(text5, textX, textY5); // 绘制白色文本
|
g2d.drawString(text5, textX, textY5); // 绘制白色文本
|
||||||
// 释放Graphics2D资源
|
// 释放Graphics2D资源
|
||||||
g2d.dispose();
|
g2d.dispose();
|
||||||
@ -161,7 +191,34 @@ public class GenerateQRCodeImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String url = GenerateQRCodeImage.generateQRCodeUrl("测试水电双计设备001","FD78944554","山东翰臻物联公司");
|
// 创建DeviceReportInfo对象实例
|
||||||
|
DeviceReportInfo deviceReportInfo = new DeviceReportInfo();
|
||||||
|
|
||||||
|
// 依次设置各个属性值
|
||||||
|
deviceReportInfo.setImei("1231212");
|
||||||
|
deviceReportInfo.setIccid("121212122");
|
||||||
|
deviceReportInfo.setMcuId("MCU0023");
|
||||||
|
deviceReportInfo.setBspType("RF500A");
|
||||||
|
deviceReportInfo.setLteType("780E");
|
||||||
|
deviceReportInfo.setMcuType("MCU型号Z");
|
||||||
|
deviceReportInfo.setMcuFw("RF345X");
|
||||||
|
deviceReportInfo.setLteFw("模组固件V2.1");
|
||||||
|
deviceReportInfo.setLcdManufacturer(2L);
|
||||||
|
deviceReportInfo.setVoiceManufacturer(5L);
|
||||||
|
deviceReportInfo.setFramModel("FRAM-200");
|
||||||
|
deviceReportInfo.setReplaceManufacturer(9L);
|
||||||
|
deviceReportInfo.setTestRecord("测试脉冲次数为3次,第一次上电时间是2024-12-09");
|
||||||
|
deviceReportInfo.setBatchNumber("RF500 齐河 780E");
|
||||||
|
|
||||||
|
// 对于示例JSON数据中未包含但类中定义了的属性,这里可以按需设置默认值(此处仅为示例,可按实际需求调整)
|
||||||
|
deviceReportInfo.setSerialNumber("默认设备编号");
|
||||||
|
deviceReportInfo.setQrCode("默认二维码");
|
||||||
|
deviceReportInfo.setName("默认设备名称");
|
||||||
|
deviceReportInfo.setLcdManufacturerName("默认LCD厂家名称");
|
||||||
|
deviceReportInfo.setVoiceManufacturerName("默认语音厂家名称");
|
||||||
|
deviceReportInfo.setReplaceManufacturerName("默认代工厂家名称");
|
||||||
|
deviceReportInfo.setDeviceId(0L);
|
||||||
|
String url = GenerateQRCodeImage.generateQRCodeUrl(deviceReportInfo);
|
||||||
System.err.println(url);
|
System.err.println(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.fastbee.iot.domain;
|
package com.fastbee.iot.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -18,6 +19,7 @@ import com.fastbee.common.core.domain.BaseEntity;
|
|||||||
@ApiModel(value = "DeviceReportInfo",description = "设备上电审核前上报的基础信息 iot_device_report_info")
|
@ApiModel(value = "DeviceReportInfo",description = "设备上电审核前上报的基础信息 iot_device_report_info")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("iot_device_report_info")
|
||||||
public class DeviceReportInfo extends BaseEntity
|
public class DeviceReportInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -93,7 +95,7 @@ public class DeviceReportInfo extends BaseEntity
|
|||||||
/** 批号 */
|
/** 批号 */
|
||||||
@Excel(name = "批号")
|
@Excel(name = "批号")
|
||||||
@ApiModelProperty("批号")
|
@ApiModelProperty("批号")
|
||||||
private Long batchNumber;
|
private String batchNumber;
|
||||||
|
|
||||||
/** 设备编号 */
|
/** 设备编号 */
|
||||||
@Excel(name = "设备编号")
|
@Excel(name = "设备编号")
|
||||||
@ -125,4 +127,9 @@ public class DeviceReportInfo extends BaseEntity
|
|||||||
@ApiModelProperty("代工厂家名称")
|
@ApiModelProperty("代工厂家名称")
|
||||||
private String replaceManufacturerName;
|
private String replaceManufacturerName;
|
||||||
|
|
||||||
|
/** 对应设备id */
|
||||||
|
@Excel(name = "对应设备id")
|
||||||
|
@ApiModelProperty("对应设备id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.fastbee.iot.mapper;
|
package com.fastbee.iot.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.fastbee.iot.domain.DeviceReportInfo;
|
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@ -12,7 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
* @date 2024-12-05
|
* @date 2024-12-05
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface DeviceReportInfoMapper
|
public interface DeviceReportInfoMapper extends BaseMapper<DeviceReportInfo>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询设备上电审核前上报的基础信息
|
* 查询设备上电审核前上报的基础信息
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.fastbee.iot.service.impl;
|
package com.fastbee.iot.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
|
import com.fastbee.common.exception.ServiceException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.fastbee.iot.mapper.DeviceReportInfoMapper;
|
import com.fastbee.iot.mapper.DeviceReportInfoMapper;
|
||||||
@ -56,6 +59,15 @@ public class DeviceReportInfoServiceImpl implements IDeviceReportInfoService
|
|||||||
@Override
|
@Override
|
||||||
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo)
|
public int insertDeviceReportInfo(DeviceReportInfo deviceReportInfo)
|
||||||
{
|
{
|
||||||
|
//查重
|
||||||
|
List<DeviceReportInfo> list = new LambdaQueryChainWrapper<>(deviceReportInfoMapper)
|
||||||
|
.select(DeviceReportInfo::getSerialNumber)
|
||||||
|
.eq(DeviceReportInfo::getSerialNumber, deviceReportInfo.getSerialNumber())
|
||||||
|
.list();
|
||||||
|
System.err.println("查重:"+list);
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
throw new ServiceException("设备编号重复!");
|
||||||
|
}
|
||||||
return deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
return deviceReportInfoMapper.insertDeviceReportInfo(deviceReportInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,10 +26,11 @@
|
|||||||
<result property="lcdManufacturerName" column="lcd_manufacturer_name" />
|
<result property="lcdManufacturerName" column="lcd_manufacturer_name" />
|
||||||
<result property="voiceManufacturerName" column="voice_manufacturer_name" />
|
<result property="voiceManufacturerName" column="voice_manufacturer_name" />
|
||||||
<result property="replaceManufacturerName" column="replace_manufacturer_name" />
|
<result property="replaceManufacturerName" column="replace_manufacturer_name" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeviceReportInfoVo">
|
<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 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 from iot_device_report_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
||||||
@ -55,6 +56,7 @@
|
|||||||
<if test="lcdManufacturerName != null and lcdManufacturerName != ''"> and lcd_manufacturer_name like concat('%', #{lcdManufacturerName}, '%')</if>
|
<if test="lcdManufacturerName != null and lcdManufacturerName != ''"> and lcd_manufacturer_name like concat('%', #{lcdManufacturerName}, '%')</if>
|
||||||
<if test="voiceManufacturerName != null and voiceManufacturerName != ''"> and voice_manufacturer_name like concat('%', #{voiceManufacturerName}, '%')</if>
|
<if test="voiceManufacturerName != null and voiceManufacturerName != ''"> and voice_manufacturer_name like concat('%', #{voiceManufacturerName}, '%')</if>
|
||||||
<if test="replaceManufacturerName != null and replaceManufacturerName != ''"> and replace_manufacturer_name like concat('%', #{replaceManufacturerName}, '%')</if>
|
<if test="replaceManufacturerName != null and replaceManufacturerName != ''"> and replace_manufacturer_name like concat('%', #{replaceManufacturerName}, '%')</if>
|
||||||
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -86,6 +88,7 @@
|
|||||||
<if test="lcdManufacturerName != null">lcd_manufacturer_name,</if>
|
<if test="lcdManufacturerName != null">lcd_manufacturer_name,</if>
|
||||||
<if test="voiceManufacturerName != null">voice_manufacturer_name,</if>
|
<if test="voiceManufacturerName != null">voice_manufacturer_name,</if>
|
||||||
<if test="replaceManufacturerName != null">replace_manufacturer_name,</if>
|
<if test="replaceManufacturerName != null">replace_manufacturer_name,</if>
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="imei != null and imei != ''">#{imei},</if>
|
<if test="imei != null and imei != ''">#{imei},</if>
|
||||||
@ -108,6 +111,7 @@
|
|||||||
<if test="lcdManufacturerName != null">#{lcdManufacturerName},</if>
|
<if test="lcdManufacturerName != null">#{lcdManufacturerName},</if>
|
||||||
<if test="voiceManufacturerName != null">#{voiceManufacturerName},</if>
|
<if test="voiceManufacturerName != null">#{voiceManufacturerName},</if>
|
||||||
<if test="replaceManufacturerName != null">#{replaceManufacturerName},</if>
|
<if test="replaceManufacturerName != null">#{replaceManufacturerName},</if>
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -134,6 +138,7 @@
|
|||||||
<if test="lcdManufacturerName != null">lcd_manufacturer_name = #{lcdManufacturerName},</if>
|
<if test="lcdManufacturerName != null">lcd_manufacturer_name = #{lcdManufacturerName},</if>
|
||||||
<if test="voiceManufacturerName != null">voice_manufacturer_name = #{voiceManufacturerName},</if>
|
<if test="voiceManufacturerName != null">voice_manufacturer_name = #{voiceManufacturerName},</if>
|
||||||
<if test="replaceManufacturerName != null">replace_manufacturer_name = #{replaceManufacturerName},</if>
|
<if test="replaceManufacturerName != null">replace_manufacturer_name = #{replaceManufacturerName},</if>
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user