liujie
2026-09-11 4d15e6b553c448e2e07527e9c06aa4b5f9b099cf
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/EmployeeVerifyController.java
@@ -16,6 +16,7 @@
import com.ruoyi.system.mapper.SysVisitorMachineMapper;
import com.ruoyi.system.service.EmployeeVerifyService;
import com.ruoyi.system.service.ISysVisitorMachineService;
import com.ruoyi.system.utils.EmployeePhoneCrypto;
import com.ruoyi.system.vo.SysVisitorMachineVO;
import com.ruoyi.web.controller.tool.ImageUtil;
import io.swagger.annotations.Api;
@@ -62,12 +63,12 @@
     * 刷卡验证:现场读卡器读取卡号后调用本接口,与接待人绑定的卡号比对。
     */
    @PostMapping("/allEmployee")
    @ApiOperation(value = "查询所有员工接口", notes = "必传设备ID")
    public AjaxResult getAllEmployee(@RequestBody @Valid ApiVisitorMachineRequest request) {
        SysVisitorMachine detail = visitorMachineMapper.checkDeviceIdUnique(request.getMachineId(),null);
        if (detail == null || !detail.getEnabled()) {
            throw new ServiceException("未找到有效设备");
        }
    @ApiOperation(value = "查询所有员工接口")
    public AjaxResult getAllEmployee() {
//        SysVisitorMachine detail = visitorMachineMapper.checkDeviceIdUnique(request.getMachineId(),null);
//        if (detail == null || !detail.getEnabled()) {
//            throw new ServiceException("未找到有效设备");
//        }
        List<Employee> employees = employeeMapper.selectAllEnabled();
        if (employees == null || employees.isEmpty()) {
@@ -85,6 +86,12 @@
                        dto.setFaceImage(base64);
                    }
                    if (StringUtils.isNotEmpty(employee.getContactPhoneCipher())) {
                        String phone = EmployeePhoneCrypto.decrypt(employee.getContactPhoneCipher());
                        dto.setPhone(phone);
                    }
                    dto.setContactPhoneCipher(null);
                    return dto;
                })
                .collect(Collectors.toList());