|
|
@@ -19,9 +19,9 @@ import com.goafanti.common.enums.DemandAuditStatus;
|
|
|
import com.goafanti.common.enums.DemandReleaseStatus;
|
|
|
import com.goafanti.common.model.Achievement;
|
|
|
import com.goafanti.common.model.AchievementInterest;
|
|
|
+import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.Demand;
|
|
|
import com.goafanti.common.model.DemandInterest;
|
|
|
-import com.goafanti.common.model.User;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.demand.service.DemandInterestService;
|
|
|
import com.goafanti.demand.service.DemandService;
|
|
|
@@ -81,7 +81,7 @@ public class PortalInterestApiController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/demandCancelInterest", method = RequestMethod.POST)
|
|
|
public Result demandCancelInterest(String id) {
|
|
|
Result res = new Result();
|
|
|
- if(!(TokenManager.getToken() instanceof User)){
|
|
|
+ if(TokenManager.getToken() instanceof Admin){
|
|
|
res.getError().add(buildError(ErrorConstants.NON_LOGIN));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -99,7 +99,7 @@ public class PortalInterestApiController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/demandInterest", method = RequestMethod.POST)
|
|
|
public Result demandInterest(String id) {
|
|
|
Result res = new Result();
|
|
|
- if(!(TokenManager.getToken() instanceof User)){
|
|
|
+ if(TokenManager.getToken() instanceof Admin){
|
|
|
res.getError().add(buildError(ErrorConstants.NON_LOGIN));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -131,7 +131,7 @@ public class PortalInterestApiController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/achievementCancelInterest", method = RequestMethod.POST)
|
|
|
public Result achievementCancelInterest(String id) {
|
|
|
Result res = new Result();
|
|
|
- if(!(TokenManager.getToken() instanceof User)){
|
|
|
+ if(TokenManager.getToken() instanceof Admin){
|
|
|
res.getError().add(buildError(ErrorConstants.NON_LOGIN));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -149,7 +149,7 @@ public class PortalInterestApiController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/achievementInterest", method = RequestMethod.POST)
|
|
|
public Result achievementInterest(String id) {
|
|
|
Result res = new Result();
|
|
|
- if(!(TokenManager.getToken() instanceof User)){
|
|
|
+ if(TokenManager.getToken() instanceof Admin){
|
|
|
res.getError().add(buildError(ErrorConstants.NON_LOGIN));
|
|
|
return res;
|
|
|
}
|