保誠-保戶業務員媒合平台
Tomas
2023-09-14 e828225de7636d0195db2c3c9b1701a5b2f12049
pamapi/src/main/java/com/pollex/pam/web/rest/ConsultantResource.java
@@ -1,7 +1,6 @@
package com.pollex.pam.web.rest;
import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject;
import com.pollex.pam.business.domain.Appointment;
import com.pollex.pam.business.domain.Consultant;
import com.pollex.pam.business.security.SecurityUtils;
import com.pollex.pam.business.service.AppointmentService;
@@ -18,7 +17,6 @@
import java.io.InputStream;
import java.util.List;
import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CONSULTANT_SEND_FILL_SATISFACTION_NOTICE;
import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.EDIT_CONSULTANT_DATA;
@RestController
@@ -118,16 +116,5 @@
       }
       Consultant editResult = consultantService.editConsultant(editDTO);
        return new ResponseEntity<>(editResult, HttpStatus.OK);
    }
    @AuditLoggingInject(type = CONSULTANT_SEND_FILL_SATISFACTION_NOTICE)
    @PostMapping("/sendSatisfactionToClient/{appointmentId}")
    public ResponseEntity<Void> sendSatisfactionToClient(@PathVariable Long appointmentId) {
       Appointment appointment = appointmentService.findById(appointmentId);
       if(!appointment.getAgentNo().equals(SecurityUtils.getAgentNo())) {
          throw new IllegalAccessError();
       }
       consultantService.sendSatisfactionToClient(appointment);
       return ResponseEntity.noContent().build();
    }
}