yz
2021-01-31 b55c9f4ddf68de8bade1f4bf627609fb36828ba5
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpLeaveInfoController.java
@@ -22,13 +22,13 @@
* description:员工请假记录控制器
*
* @author luoyibo
* @date 2021-01-24 20:35:29
* @date 2021-01-31 11:26:13
* @since JDK1.8
*/
@Slf4j
@Validated
@RestController
@RequestMapping("empLeaveinfo")
@RequestMapping("empLeaveInfo")
@RequiredArgsConstructor
public class EmpLeaveInfoController {
@@ -53,7 +53,7 @@
try {
this.empLeaveinfoService.createEmpLeaveinfo(empLeaveinfo);
} catch (Exception e) {
String message = "新增EmpLeaveinfo失败";
String message = "新增员工请假记录失败";
log.error(message, e);
throw new FebsException(message);
}
@@ -65,7 +65,19 @@
try {
this.empLeaveinfoService.deleteEmpLeaveinfo(empLeaveinfo);
} catch (Exception e) {
String message = "删除EmpLeaveinfo失败";
String message = "删除员工请假记录失败";
log.error(message, e);
throw new FebsException(message);
}
}
@DeleteMapping("{ids}")
@PreAuthorize("hasAuthority('empLeaveinfo:delete')")
public void logicDeleteEmpLeaveinfo(@PathVariable("ids") String ids) throws FebsException {
try {
this.empLeaveinfoService.logicDelEmpLeaveinfo(ids);
} catch (Exception e) {
String message = "逻辑删除员工请假记录失败";
log.error(message, e);
throw new FebsException(message);
}
@@ -77,7 +89,7 @@
try {
this.empLeaveinfoService.updateEmpLeaveinfo(empLeaveinfo);
} catch (Exception e) {
String message = "修改EmpLeaveinfo失败";
String message = "修改员工请假记录失败";
log.error(message, e);
throw new FebsException(message);
}