| | |
| | | import com.ruoyi.collaborativeApproval.dto.StaffContactsPersonalDTO; |
| | | import com.ruoyi.collaborativeApproval.pojo.StaffContactsPersonal; |
| | | import com.ruoyi.collaborativeApproval.service.StaffContactsPersonalService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | private StaffContactsPersonalService staffContactsPersonalService; |
| | | @GetMapping("/getList") |
| | | @ApiOperation("分页查询") |
| | | @Log(title = "分页查询员工联系人", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, StaffContactsPersonalDTO staffContactsPersonalDTO ){ |
| | | return AjaxResult.success(staffContactsPersonalService.listPage(page, staffContactsPersonalDTO)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增") |
| | | @Log(title = "新增员工联系人", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody StaffContactsPersonal staffContactsPersonal){ |
| | | return AjaxResult.success(staffContactsPersonalService.save(staffContactsPersonal)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation("删除") |
| | | @Log(title = "删除员工联系人", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable("id") Long id){ |
| | | // if (CollectionUtils.isEmpty(id)) { |
| | | // throw new RuntimeException("请传入要删除的ID"); |