6 changed files with 66 additions and 2 deletions
@ -0,0 +1,39 @@ |
|||
package com.ccsens.mt.api; |
|||
|
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.mt.bean.dto.CompeteDto; |
|||
import com.ccsens.mt.bean.vo.CompeteVo; |
|||
import com.ccsens.mt.service.CompeteService; |
|||
import com.ccsens.mt.service.ICompeteService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
@Slf4j |
|||
@Api(tags = "用户信息", description = "") |
|||
@RestController |
|||
@RequestMapping("/compete/userMes") |
|||
public class CompeteCompanyController { |
|||
@Resource |
|||
private ICompeteService competeService; |
|||
@MustLogin |
|||
@ApiOperation(value = "用户的参赛单位id", notes = "") |
|||
@RequestMapping(value = "/getUserCompanyId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<CompeteVo.CompanyId> getUserCompanyId(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.GetUserCompany> params) { |
|||
log.info("查看当前用户的参赛单位id:{}",params); |
|||
CompeteVo.CompanyId companyId1=new CompeteVo.CompanyId(); |
|||
Long companyId = competeService.getUserCompanyId(params.getUserId(),params.getParam().getType()); |
|||
companyId1.setCompanyId(companyId); |
|||
return JsonResponse.newInstance().ok(companyId1); |
|||
} |
|||
} |
@ -1,5 +1,5 @@ |
|||
spring: |
|||
profiles: |
|||
active: dev |
|||
include: common, util-test |
|||
include: common, util-dev |
|||
|
|||
|
Loading…
Reference in new issue