Commit 0361b046 authored by 廖旭伟's avatar 廖旭伟

修改测试bug

parent 8c40dcb5
......@@ -64,7 +64,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq>{
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
return Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
PageInfo pageInfo = buildPageInfo(feedbackReq);
......
......@@ -101,7 +101,7 @@ public class NewsApiController extends AbstractBaseController<NewsReq> {
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
return Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
PageInfo pageInfo = buildPageInfo(newsReq);
......
......@@ -75,7 +75,7 @@ public class ProductApiController extends AbstractBaseController<ProductReq>{
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
return Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
PageInfo pageInfo = buildPageInfo(productReq);
......
......@@ -67,7 +67,8 @@ public class StaffApiController extends AbstractBaseController<StaffReq>{
Rest<Object> rest = Rest.ok();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
//throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
return Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
if(!ObjectUtils.isEmpty(staffReq.getId())){
......@@ -100,7 +101,7 @@ public class StaffApiController extends AbstractBaseController<StaffReq>{
Rest<Object> rest = Rest.ok();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
return Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
if(!ObjectUtils.isEmpty(staffReq.getId())){
......@@ -133,7 +134,7 @@ public class StaffApiController extends AbstractBaseController<StaffReq>{
Rest<Object> rest = Rest.ok();
Context context = this.getContext();
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
throw new AppException(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
return Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT);
}
try {
if(!ObjectUtils.isEmpty(staffReq.getId())){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment