Commit 55603ab5 authored by KeYong's avatar KeYong

更新

parent 40aacfd6
package com.yeejoin.amos.boot.module.common.biz.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.module.common.api.dto.*;
......@@ -37,10 +38,6 @@ import java.util.Map;
public class OrgPersonController {
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
EmqKeeper emqKeeper;
@Value("${jcs.company.topic.delete}")
private String airportDeleteTopic;
/**
* 新增人员信息
......@@ -69,11 +66,6 @@ public class OrgPersonController {
// 删除时,只作逻辑删除
iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete",
CommonConstant.IS_DELETE_01));
try {
emqKeeper.getMqttClient().publish(airportDeleteTopic, String.valueOf(id).getBytes(), 2, true);
} catch (Exception e) {
e.getMessage();
}
return ResponseHelper.buildResponse(null);
}
......
package com.yeejoin.amos.boot.module.common.biz.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -17,7 +18,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -44,6 +47,10 @@ public class OrgUsrController extends BaseController {
OrgUsrServiceImpl iOrgUsrService;
@Autowired
ESOrgUsrService eSOrgUsrService;
@Autowired
EmqKeeper emqKeeper;
@Value("${jcs.company.topic.delete}")
private String airportDeleteTopic;
/**
......@@ -74,12 +81,11 @@ public class OrgUsrController extends BaseController {
iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01));
try {
eSOrgUsrService.deleteById(id);
emqKeeper.getMqttClient().publish(airportDeleteTopic, JSON.toJSONString(id).getBytes(), 2, false);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException();
}
return ResponseHelper.buildResponse(null);
}
......
......@@ -39,7 +39,7 @@ public interface IPointDao extends BaseDao<Point, Long> {
@Modifying
@Transactional
@Query(value = "UPDATE p_point SET is_delete = 1 WHERE point_no IN (?1)", nativeQuery = true)
@Query(value = "UPDATE p_point SET is_delete = 1 WHERE point_no = (?1)", nativeQuery = true)
void delPointByPointNo(Long id);
@Query(value = "SELECT id FROM p_point p WHERE is_delete = 0 AND p.point_no = (?1)", nativeQuery = true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment