2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-06 a4a5e8e957ee9e390b53c876c9c996aa892a6375
Changes
已修改3个文件
13 ■■■■■ 文件已修改
dao/src/main/java/com/sandu/ximon/dao/domain/Light.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/resources/mapper/LightMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/java/com/sandu/ximon/dao/domain/Light.java
@@ -4,11 +4,12 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
/**
 * 路灯表
@@ -16,6 +17,8 @@
 */
@TableName(value ="light")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Light implements Serializable {
    /**
     *
dao/src/main/resources/mapper/LightMapper.xml
@@ -8,7 +8,7 @@
        <id property="lightId" column="light_id" jdbcType="BIGINT"/>
        <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <result property="lighCount" column="light_count" jdbcType="INTEGER"/>
        <result property="lightCount" column="light_count" jdbcType="INTEGER"/>
        <result property="lightPercent" column="light_percent" jdbcType="INTEGER"/>
        <result property="light2Percent" column="light2_percent" jdbcType="INTEGER"/>
        <result property="power1" column="power1" jdbcType="INTEGER"/>
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/LightController.java
@@ -139,7 +139,7 @@
    /**
     * 设置功率
     */
    @PostMapping("/setPower/{power1}/{power2}")
    @PostMapping("/setPower")
    public ResponseVO<Object> setPower(@RequestBody LightPowerSettingParam lightPowerSettingParam) {
        boolean resule= lightService.setPower(lightPowerSettingParam);
        return ResponseUtil.success(resule);