2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-10 c1daa359ac79f4673463b7662b794b8da4c86e11
ximon-admin/src/main/java/com/sandu/ximon/admin/service/InterphoneHostService.java
@@ -12,27 +12,26 @@
@Service
@AllArgsConstructor
public class InterphoneHostService extends BaseServiceImpl <InterphoneHostMapper, InterphoneHost>{
public class InterphoneHostService extends BaseServiceImpl<InterphoneHostMapper, InterphoneHost> {
    private final InterphoneHostMapper interphoneHostMapper;
    /**
     * 添加主机
     *
     */
    public boolean addHost(InterphoneHostParam interphoneHostParam) {
        InterphoneHost interphoneHost = new InterphoneHost();
        BeanUtils.copyProperties(interphoneHostParam, interphoneHost);
       return save(interphoneHost);
        return save(interphoneHost);
    }
    /**
     * 修改主机
     */
    public boolean updateHost(Integer id,InterphoneHostParam interphoneHostParam) {
    public boolean updateHost(Integer id, InterphoneHostParam interphoneHostParam) {
        InterphoneHost byId = getById(id);
        if(byId == null){
        if (byId == null) {
            return false;
        }
        InterphoneHost interphoneHost = new InterphoneHost();
@@ -43,13 +42,13 @@
    /**
     * 删除主机
     *
     * @param id
     * @return
     *
      */
     */
    public boolean deleteHost(Integer id) {
        InterphoneHost byId = getById(id);
        if(byId == null){
        if (byId == null) {
            return false;
        }
        return removeById(id);
@@ -57,12 +56,13 @@
    /**
     * 查询主机
     *
     * @param id
     * @return
     */
    public InterphoneHost getHost(Integer id) {
        InterphoneHost byId = getById(id);
        if(byId == null){
        if (byId == null) {
            return null;
        }
        return byId;