|
|
|
@@ -225,6 +225,36 @@ public class DmVisitorInnerApiController extends BaseApiController { |
|
|
|
return outputSuccess(json).toJSON(); |
|
|
|
} |
|
|
|
|
|
|
|
@InnerAuth |
|
|
|
@GetMapping(value = "list-all") |
|
|
|
public com.alibaba.fastjson2.JSONObject visitListAll(){ |
|
|
|
List<DmVisitRecordsPo> v = dmVisitRecordsMapper.findList(); |
|
|
|
|
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
List<DmVisitRecordsDto> dtos = new ArrayList<>(); |
|
|
|
|
|
|
|
v.forEach(item->{ |
|
|
|
DmStaffPo e = dmStaffMapper.selectById(item.getUserId()); |
|
|
|
DmVisitRecordsDto d = recordsConverter.mapperDto(item); |
|
|
|
if (null != e) { |
|
|
|
d.setUserPhone(e.getPhone()); |
|
|
|
d.setUserName(e.getUserName()); |
|
|
|
} |
|
|
|
|
|
|
|
DmVisitorsPo visitorsPo = dmVisitorsMapper.selectById(item.getVisitorId()); |
|
|
|
if (null != visitorsPo) { |
|
|
|
d.setVisitorName(visitorsPo.getName()); |
|
|
|
} |
|
|
|
if (null != item.getVisitDate()) { |
|
|
|
d.setVisitDateStr(DateUtils.formatDate(item.getVisitDate(), "yyyy-MM-dd")); |
|
|
|
} |
|
|
|
dtos.add(d); |
|
|
|
}); |
|
|
|
json.put("data", dtos); |
|
|
|
|
|
|
|
return outputSuccess(json).toJSON(); |
|
|
|
} |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DmTenantReceiverMapper receiverMapper; |
|
|
|
|
|
|
|
|