package com.icloud.server.scala.pub

import com.icloud.server.scala.goods.{CreateGoodsReq, Goods, GoodsPackage}
import com.icloud.server.utils.IdWorker
import com.icloud.server.web.json.JsonResult
import io.swagger.annotations.{Api, ApiImplicitParam, ApiImplicitParams, ApiOperation}
import org.springframework.web.bind.annotation.{CrossOrigin, PostMapping, RequestBody, RequestMapping, ResponseBody, RestController}


@Api(tags = Array("统一接口:公共服务"), value = "API", hidden = true)
@RestController
@RequestMapping(Array("/pub/"))
@CrossOrigin
class PublicUnite {



  @ApiOperation( value = "获取(学生/其他)的Id", notes = "" )
  @PostMapping(Array("getid"))
  @ResponseBody
  def getId(): JsonResult = {
    new JsonResult(new IdWorker().nextId())
  }

}
