yangxiaokun 2 سال پیش
والد
کامیت
4c00390f3f

+ 1 - 1
src/main/java/com/zy/omp/config/mqtt/MqttCallbackHandler.java

@@ -126,7 +126,7 @@ public class MqttCallbackHandler {
             // 逆地理位置解析
             state.setSite(GaoDeApiUtil.regeo(state.getLonGcj(), state.getLatGcj()));
             // 保存设备
-            deviceInfoStateService.save(state);
+            deviceInfoStateService.saveOrUpdate(state);
             DeviceInfoRecord record = BeanUtil.cast(state, DeviceInfoRecord.class);
             deviceInfoRecordService.save(record);
         } catch (Exception e) {

+ 0 - 19
src/main/java/com/zy/omp/mapper/IdiomsMapper.java

@@ -1,19 +0,0 @@
-package com.zy.omp.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.zy.omp.model.UserIdioms;
-import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * 常用语 Mapper
- *
- * @author chenyi
- * Create on 2020/4/10
- */
-@Mapper
-@Repository
-@Deprecated
-public interface IdiomsMapper extends BaseMapper<UserIdioms> {
-
-}

+ 0 - 29
src/main/java/com/zy/omp/model/UserIdioms.java

@@ -1,29 +0,0 @@
-package com.zy.omp.model;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * 常用语
- */
-@Data
-@Deprecated
-public class UserIdioms {
-    @TableId
-    private Integer id;
-    /**
-     * 用户ID
-     */
-    private String userId;
-    /**
-     * 内容
-     */
-    private String content;
-    /**
-     * 创建时间
-     */
-    private LocalDateTime createTime;
-}

+ 0 - 101
src/main/java/com/zy/omp/pojo/io/wechat/SetIO.java

@@ -1,101 +0,0 @@
-package com.zy.omp.pojo.io.wechat;
-
-import com.zy.omp.common.Constant;
-import lombok.Data;
-
-/**
- * 设置入参
- *
- * @author chen_yi
- * Create on 2021/5/27
- */
-@Data
-public class SetIO {
-    /**
-     * 设备名
-     */
-    private String deviceId;
-
-    /**
-     * 用户ID
-     */
-    private String userId;
-
-    /**
-     * 1:代表打开连续定位 0:代表关闭连续定位
-     * 设备在做后一次收到开启连续定位起计时5分钟后自动关闭连续定位。
-     * 如果希望持续开启连续定位,需要间隔小于5分钟重复发送开 启。收到关闭连续定位后设备会马上关闭连续定位
-     */
-    private Integer highFreq;
-
-    /**
-     * 自动接听
-     * 0关闭,1打开
-     */
-    private Integer autoAnswer;
-
-    /**
-     * 定位频率
-     * 单位 小时
-     */
-    private Integer gpsRate;
-
-    /**
-     * 铃声音量
-     */
-    private Integer ringVol;
-
-    /**
-     * 系统音量
-     */
-    private Integer msgVol;
-
-    /**
-     * 通话音量
-     */
-    private Integer phoneVol;
-
-    /**
-     * 姓名
-     */
-    private String key0Name;
-    /**
-     * 电话号码
-     */
-    private String key0Phone;
-
-    /**
-     * 姓名
-     */
-    private String key1Name;
-    /**
-     * 电话号码
-     */
-    private String key1Phone;
-
-    /**
-     * 姓名
-     */
-    private String key2Name;
-    /**
-     * 电话号码
-     */
-    private String key2Phone;
-
-    /**
-     * 星期几的几点几分播报,星期之间逗号间隔,星期与时间空格间隔
-     * 1,2,3,4,5 13:13
-     */
-    private String newsTime;
-
-    /**
-     * 播报类型,1:实时播报,0:固定时间播报
-     */
-    private Integer newsType;
-
-    /**
-     * 服务器下发文字
-     */
-    private String news;
-
-}

+ 0 - 47
src/main/java/com/zy/omp/pojo/vo/AdminListVo.java

@@ -1,47 +0,0 @@
-package com.zy.omp.pojo.vo;
-
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * PC用户列表查询 视图
- *
- * @author yang xiao kun
- * create on 2021/5/19
- */
-@Data
-public class AdminListVo {
-
-    private Integer id;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-    /**
-     * 昵称
-     */
-    private String nickname;
-
-    /**
-     * 手机号
-     */
-    private String phone;
-
-    /**
-     * 角色
-     */
-    private String role;
-
-    /**
-     * 状态 0停用 1启用
-     */
-    private Integer status;
-
-    /**
-     * 创建时间
-     */
-    private LocalDateTime createTime;
-}

+ 0 - 69
src/main/java/com/zy/omp/service/IdiomsService.java

@@ -1,69 +0,0 @@
-package com.zy.omp.service;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zy.omp.mapper.IdiomsMapper;
-import com.zy.omp.model.UserIdioms;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 常用语 Service
- *
- * @author chenyi
- * Create on 2020/4/10
- */
-@Service
-@Deprecated
-public class IdiomsService extends ServiceImpl<IdiomsMapper, UserIdioms> {
-
-    /**
-     * 添加常用语
-     *
-     * @param userId  用户Id
-     * @param content 常用语内容
-     */
-    public void saveEntity(String userId, String content) {
-        UserIdioms entity = new UserIdioms();
-        entity.setUserId(userId);
-        entity.setContent(content);
-        baseMapper.insert(entity);
-    }
-
-    /**
-     * 通过用户ID 查询用户常用语
-     *
-     * @param userId 用户ID
-     */
-    public List<UserIdioms> getListByUserId(String userId) {
-        QueryWrapper<UserIdioms> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("userId", userId);
-        queryWrapper.orderByDesc("createTime");
-        return baseMapper.selectList(queryWrapper);
-    }
-
-    /**
-     * 查询用户常用语数量
-     *
-     * @param userId 用户ID
-     */
-    public int countByUserId(String userId) {
-        QueryWrapper<UserIdioms> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("userId", userId);
-        return baseMapper.selectCount(queryWrapper);
-    }
-
-    /**
-     * 删除常用语
-     *
-     * @param id     常用语主键ID
-     * @param userId 用户ID
-     */
-    public int delById(Integer id, String userId) {
-        QueryWrapper<UserIdioms> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("id", id);
-        queryWrapper.eq("userId", userId);
-        return baseMapper.delete(queryWrapper);
-    }
-}