9 changed files with 128 additions and 12 deletions
@ -0,0 +1,43 @@ |
|||
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.bean.vo.ProvinceCompeteVo; |
|||
import com.ccsens.mt.service.IProvinceService; |
|||
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; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "远程比赛省赛(集体报名)", description = "") |
|||
@RestController |
|||
@RequestMapping("/province") |
|||
public class ProvinceController { |
|||
@Resource |
|||
private IProvinceService provinceService; |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "查找当前用户填写的信息的概览", notes = "") |
|||
@RequestMapping(value = "/overview", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<ProvinceCompeteVo.CompeteOverview> getOverview(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) { |
|||
log.info("查找当前用户填写的信息的概览:{}",params); |
|||
ProvinceCompeteVo.CompeteOverview competeOverview = provinceService.getOverview(params.getParam(),params.getUserId()); |
|||
log.info("查找当前用户填写的信息的概览:{}",competeOverview); |
|||
return JsonResponse.newInstance().ok(competeOverview); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.ccsens.mt.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class ProvinceCompeteVo { |
|||
@Data |
|||
@ApiModel("查看首页概览") |
|||
public static class CompeteOverview{ |
|||
@ApiModelProperty("参赛公司id") |
|||
private Long companyId; |
|||
@ApiModelProperty("参赛公司id") |
|||
private String companyName; |
|||
@ApiModelProperty("当前添加的教练的人数") |
|||
private int coachNum; |
|||
@ApiModelProperty("当前添加的领队的人数") |
|||
private int guideNum; |
|||
@ApiModelProperty("当前添加的参赛人员的人数") |
|||
private int playerNum; |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.ccsens.mt.service; |
|||
|
|||
import com.ccsens.mt.bean.dto.CompeteDto; |
|||
import com.ccsens.mt.bean.vo.ProvinceCompeteVo; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IProvinceService { |
|||
/** |
|||
* 查找当前用户填写的信息的概览 |
|||
* @param param |
|||
* @param userId |
|||
* @return |
|||
*/ |
|||
ProvinceCompeteVo.CompeteOverview getOverview(CompeteDto.CompeteTime param, Long userId); |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.ccsens.mt.service; |
|||
|
|||
import com.ccsens.mt.bean.dto.CompeteDto; |
|||
import com.ccsens.mt.bean.vo.ProvinceCompeteVo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|||
public class ProvinceService implements IProvinceService{ |
|||
|
|||
@Override |
|||
public ProvinceCompeteVo.CompeteOverview getOverview(CompeteDto.CompeteTime param, Long userId) { |
|||
return null; |
|||
} |
|||
} |
Loading…
Reference in new issue