|
@@ -11,6 +11,7 @@ import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.core.parameters.P;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.security.KeyFactory;
|
|
import java.security.KeyFactory;
|
|
@@ -40,7 +41,7 @@ public class VipUserExamController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
@ApiOperation("查询当前用户考试会员列表")
|
|
@ApiOperation("查询当前用户考试会员列表")
|
|
- public ResponsePageInfo<VipUserExam> list(Long userId,Long examId) throws Exception {
|
|
|
|
|
|
+ public ResponsePageInfo<VipUserExam> list(Long userId, Long examId) throws Exception {
|
|
VipUserExam vipUserExam = new VipUserExam();
|
|
VipUserExam vipUserExam = new VipUserExam();
|
|
vipUserExam.setUserId(userId);
|
|
vipUserExam.setUserId(userId);
|
|
vipUserExam.setExamId(examId);
|
|
vipUserExam.setExamId(examId);
|
|
@@ -61,7 +62,16 @@ public class VipUserExamController extends BaseController {
|
|
) {
|
|
) {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("user_id", userId);
|
|
map.put("user_id", userId);
|
|
- return toResponse(vipUserExamService.removeByMap(map) ? 1 : 0);
|
|
|
|
|
|
+
|
|
|
|
+ boolean isDel = vipUserExamService.removeByMap(map);
|
|
|
|
+ if(isDel) {
|
|
|
|
+ Response response = new Response(200,"删除成功");
|
|
|
|
+ return response;
|
|
|
|
+ } else {
|
|
|
|
+ Response response = new Response(200,"该记录不存在");
|
|
|
|
+ return response;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|