|
|
|
@@ -1,6 +1,7 @@ |
|
|
|
package com.xueyi.system.staff.controller.api; |
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.xueyi.common.cache.utils.SourceUtil; |
|
|
|
import com.xueyi.common.core.constant.basic.SecurityConstants; |
|
|
|
import com.xueyi.common.core.context.SecurityContextHolder; |
|
|
|
@@ -9,8 +10,10 @@ import com.xueyi.common.redis.utils.RedisUtil; |
|
|
|
import com.xueyi.common.web.annotation.TenantIgnore; |
|
|
|
import com.xueyi.system.api.device.domain.vo.DeviceTenantSourceMergeVo; |
|
|
|
import com.xueyi.system.api.model.Source; |
|
|
|
import com.xueyi.system.api.pass.domain.po.DmRecognizedRecordsPo; |
|
|
|
import com.xueyi.system.api.staff.domain.dto.DmStaffCommonDto; |
|
|
|
import com.xueyi.system.api.staff.feign.RemoteStaffService; |
|
|
|
import com.xueyi.system.pass.mapper.DmRecognizedRecordsMapper; |
|
|
|
import com.xueyi.system.resource.controller.api.BaseApiController; |
|
|
|
import com.xueyi.system.staff.service.impl.DmStaffServiceImpl; |
|
|
|
import com.xueyi.tenant.api.tenant.domain.dto.TeTenantDto; |
|
|
|
@@ -26,6 +29,7 @@ import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
@@ -98,4 +102,33 @@ public class DmStaffApiController extends BaseApiController { |
|
|
|
|
|
|
|
return outputSuccess().toJSON(); |
|
|
|
} |
|
|
|
|
|
|
|
@Autowired |
|
|
|
DmRecognizedRecordsMapper recognizedRecordsMapper; |
|
|
|
|
|
|
|
@GetMapping(value = "inner-recognized-records") |
|
|
|
@ResponseBody |
|
|
|
@TenantIgnore(tenantLine = true) |
|
|
|
public R<List<DmRecognizedRecordsPo>> queryRecords(){ |
|
|
|
List<DmRecognizedRecordsPo> lists = recognizedRecordsMapper.selectList(new LambdaQueryWrapper<DmRecognizedRecordsPo>().between(DmRecognizedRecordsPo::getRecognizedTime, LocalDateTime.now().minusDays(30), LocalDateTime.now())); |
|
|
|
return R.ok(lists); |
|
|
|
} |
|
|
|
@GetMapping(value = "recognized-records") |
|
|
|
@ResponseBody |
|
|
|
public R<List<DmRecognizedRecordsPo>> recognizedRecords(){ |
|
|
|
R<List<TeTenantDto>> listR = tenantService.tenantList(); |
|
|
|
if (listR.isFail()) { |
|
|
|
System.out.println("租户列表获取失败"); |
|
|
|
return null; |
|
|
|
} |
|
|
|
List<TeTenantDto> res = listR.getData(); |
|
|
|
TeTenantDto teTenantDto = res.get(0); |
|
|
|
if (teTenantDto != null) { |
|
|
|
Source source = SourceUtil.getSourceCache(teTenantDto.getStrategyId()); |
|
|
|
// return countJson; |
|
|
|
return staffService._recognizedRecords(teTenantDto.getId(), source.getMaster(), SecurityConstants.INNER); |
|
|
|
} |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |