5 changed files with 76 additions and 15 deletions
@ -0,0 +1,31 @@ |
|||||
|
package com.project.appeal.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.project.appeal.application.AppealApplication; |
||||
|
import com.project.appeal.domain.dto.AppealDTO; |
||||
|
import com.project.appeal.domain.param.AppealParam; |
||||
|
import com.project.base.domain.result.Result; |
||||
|
import com.project.operation.annotation.OperationLog; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* 申诉模块 |
||||
|
*/ |
||||
|
@RequestMapping("/api/admin/appeal") |
||||
|
@RestController |
||||
|
public class AppealAdmainController { |
||||
|
@Autowired |
||||
|
private AppealApplication appealApplication; |
||||
|
|
||||
|
@PostMapping("saveOrUpdate") |
||||
|
@OperationLog(module = "申诉审批") |
||||
|
public Result<AppealDTO> saveOrUpdate(@RequestBody AppealDTO appealDTO){ |
||||
|
return appealApplication.saveOrUpdate(appealDTO); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("list") |
||||
|
public Result<IPage<AppealDTO>> list(AppealParam appealParam){ |
||||
|
return appealApplication.list(appealParam); |
||||
|
} |
||||
|
} |
||||
@ -1,33 +1,25 @@ |
|||||
package com.project.appeal.controller; |
package com.project.appeal.controller; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.project.appeal.application.AppealApplication; |
import com.project.appeal.application.AppealApplication; |
||||
import com.project.appeal.domain.dto.AppealDTO; |
import com.project.appeal.domain.dto.AppealDTO; |
||||
import com.project.appeal.domain.param.AppealParam; |
|
||||
import com.project.base.domain.result.Result; |
import com.project.base.domain.result.Result; |
||||
import com.project.operation.annotation.OperationLog; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
import java.util.List; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
/** |
/** |
||||
* 申诉模块 |
* 申诉模块-考生端 |
||||
*/ |
*/ |
||||
@RequestMapping("/api/admin/appeal") |
@RequestMapping("/api/appeal") |
||||
@RestController |
@RestController |
||||
public class AppealController { |
public class AppealController { |
||||
@Autowired |
@Autowired |
||||
private AppealApplication appealApplication; |
private AppealApplication appealApplication; |
||||
|
|
||||
@PostMapping("saveOrUpdate") |
@PostMapping("saveOrUpdate") |
||||
@OperationLog(module = "申诉审批") |
|
||||
public Result<AppealDTO> saveOrUpdate(@RequestBody AppealDTO appealDTO){ |
public Result<AppealDTO> saveOrUpdate(@RequestBody AppealDTO appealDTO){ |
||||
return appealApplication.saveOrUpdate(appealDTO); |
return appealApplication.saveOrUpdate(appealDTO); |
||||
} |
} |
||||
|
|
||||
@GetMapping("list") |
|
||||
public Result<IPage<AppealDTO>> list(AppealParam appealParam){ |
|
||||
return appealApplication.list(appealParam); |
|
||||
} |
|
||||
} |
} |
||||
|
|||||
@ -0,0 +1,25 @@ |
|||||
|
package com.project.base.domain.exception; |
||||
|
|
||||
|
import com.project.base.domain.result.ResultCodeEnum; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class PermissionErrorException extends RuntimeException { |
||||
|
private Integer code; |
||||
|
|
||||
|
public PermissionErrorException() { |
||||
|
super(ResultCodeEnum.PERMISSION_DENIED.getMessage()); |
||||
|
this.code = ResultCodeEnum.PERMISSION_DENIED.getCode(); |
||||
|
} |
||||
|
|
||||
|
public PermissionErrorException(String msg) { |
||||
|
super(msg); |
||||
|
this.code = ResultCodeEnum.PERMISSION_DENIED.getCode(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public PermissionErrorException(Integer code , String msg) { |
||||
|
super(msg); |
||||
|
this.code = code; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue