Commit abbb1747 authored by AfirSraftGarrier's avatar AfirSraftGarrier

发送成功消息

parent 59bdef0e
......@@ -14,7 +14,7 @@ public interface PmsUseService {
void createFailUseLog(String sn, String message);
void success(int useLogId);
void success(ReportErrorMsgDTO reportErrorMsgDTO);
PageInfoModel<PmsUseLog> getPmsUseLogList(int pageNo, int pageSize, String sn, Integer status, String startTime, String endTime);
......
......@@ -41,10 +41,11 @@ public class PmsUseServiceImpl implements PmsUseService {
}
@Override
public void success(int useLogId) {
public void success(ReportErrorMsgDTO reportErrorMsgDTO) {
PmsUseLog pmsUseLog = new PmsUseLog();
pmsUseLog.setId(useLogId);
pmsUseLog.setId(reportErrorMsgDTO.getId());
pmsUseLog.setStatus(1);
pmsUseLog.setMessage(reportErrorMsgDTO.getErrorMsg());
pmsUseLogMapper.updateById(pmsUseLog);
}
......
......@@ -7,7 +7,11 @@ import iot.sixiang.license.jwt.JwtUtil;
import iot.sixiang.license.jwt.LoginUser;
import iot.sixiang.license.model.BaseResult;
import iot.sixiang.license.model.ResResult;
import iot.sixiang.license.model.dto.*;
import iot.sixiang.license.model.dto.GetTerminalDeviceTokenDTO;
import iot.sixiang.license.model.dto.PlatFormBindDTO;
import iot.sixiang.license.model.dto.ReportErrorMsgDTO;
import iot.sixiang.license.model.dto.TerminalDevieBindDTO;
import iot.sixiang.license.model.dto.TerminalDevieUnBindDTO;
import iot.sixiang.license.service.DeviceService;
import iot.sixiang.license.service.PmsUseService;
import iot.sixiang.license.service.TerminalDeviceService;
......@@ -17,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List;
@Slf4j
......@@ -69,7 +72,7 @@ public class TerminalDeviceServiceImpl implements TerminalDeviceService {
return BaseResult.validate_failed();
}
if ("0".equals(reportErrorMsgDTO.getErrorCode())) {
pmsUseService.success(reportErrorMsgDTO.getId());
pmsUseService.success(reportErrorMsgDTO);
} else if ("-1".equals(reportErrorMsgDTO.getErrorCode())) {
pmsUseService.deletePmsUseLogById(id);
} else {
......
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