|
|
|
@ -29,6 +29,7 @@ import com.thing.sys.security.context.UserContext; |
|
|
|
import com.thing.thing.api.controller.IotThingApiController; |
|
|
|
import com.thing.thing.api.dto.*; |
|
|
|
import com.thing.thing.api.entity.IotThingApiEntity; |
|
|
|
import com.thing.thing.api.entity.IotThingApiLogEntity; |
|
|
|
import com.thing.thing.api.excel.IotThingApiExcel; |
|
|
|
import com.thing.thing.api.mapper.IotThingApiMapper; |
|
|
|
import com.thing.thing.api.service.IotThingApiLogService; |
|
|
|
@ -823,7 +824,7 @@ public class IotThingApiServiceImpl extends BaseServiceImpl<IotThingApiMapper, I |
|
|
|
|
|
|
|
private void apiLog(IotThingApiEntity apiEntity, String caller) { |
|
|
|
try { |
|
|
|
IotThingApiLogDTO apiLogDTO = new IotThingApiLogDTO(); |
|
|
|
IotThingApiLogEntity apiLogDTO = new IotThingApiLogEntity(); |
|
|
|
apiLogDTO.setApiId(apiEntity.getId()); |
|
|
|
apiLogDTO.setCaller(caller); |
|
|
|
apiLogDTO.setApiName(apiEntity.getName()); |
|
|
|
@ -842,7 +843,7 @@ public class IotThingApiServiceImpl extends BaseServiceImpl<IotThingApiMapper, I |
|
|
|
//调用IP |
|
|
|
HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); |
|
|
|
apiLogDTO.setIp(IpUtils.getIpAddr(request)); |
|
|
|
apiLogService.saveDto(apiLogDTO); |
|
|
|
apiLogService.saveOrUpdate(apiLogDTO); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(e.getMessage()); |
|
|
|
} |
|
|
|
|