package com.goafanti.admin.controller; import javax.annotation.Resource; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import com.goafanti.common.bo.Result; import com.goafanti.common.controller.BaseApiController; import com.goafanti.common.utils.StringUtils; import com.goafanti.user.service.UserService; /** * 科技明星 */ @RestController @RequestMapping(value = "/api/admin/star") public class AdminStarApiController extends BaseApiController { @Resource private UserService userService; /** * 科技明星列表 */ @RequestMapping(value = "/list", method = RequestMethod.GET) public Result starList(Integer number, String engagedField, String username, String professionalTitle, String workUnit, String pageNo, String pageSize) { Result res = new Result(); Integer pNo = 1; Integer pSize = 10; if (StringUtils.isNumeric(pageSize)) { pSize = Integer.parseInt(pageSize); } if (StringUtils.isNumeric(pageNo)) { pNo = Integer.parseInt(pageNo); } res.setData(userService.listStar(number, engagedField, username, professionalTitle, workUnit, pNo, pSize)); return res; } }