|
@@ -9,12 +9,12 @@ import com.caimei365.user.model.dto.ShopRegisterDto;
|
|
|
import com.caimei365.user.model.po.ClubPo;
|
|
|
import com.caimei365.user.model.po.ShopPo;
|
|
|
import com.caimei365.user.service.RegisterService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
* @author : Charles
|
|
|
* @date : 2021/3/10
|
|
|
*/
|
|
|
+@Api(tags="注册Api")
|
|
|
@RestController
|
|
|
@RequiredArgsConstructor
|
|
|
@RequestMapping("/user/register")
|
|
@@ -49,13 +50,16 @@ public class RegisterApi {
|
|
|
* @param headers HttpHeaders
|
|
|
* @return ClubPo
|
|
|
*/
|
|
|
+ @ApiOperation("注册普通机构")
|
|
|
@Idempotent(prefix="idempotent_club", keys={"#baseUser"}, expire=5)
|
|
|
@PostMapping("/club")
|
|
|
- public ResponseJson clubRegister(ClubRegisterDto clubRegisterDto,
|
|
|
- String passWordConfirm,
|
|
|
- String smsCode,
|
|
|
- Integer isAgreed,
|
|
|
- @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson clubRegister(
|
|
|
+ ClubRegisterDto clubRegisterDto,
|
|
|
+ @ApiParam(required = true, value = "用户确认密码") @RequestParam("passWordConfirm") String passWordConfirm,
|
|
|
+ @ApiParam(required = true, value = "短信验证码") @RequestParam("smsCode") String smsCode,
|
|
|
+ @ApiParam(required = true, value = "是否同意勾选同意协议,1是,其他否") @RequestParam("isAgreed") Integer isAgreed,
|
|
|
+ @RequestHeader HttpHeaders headers
|
|
|
+ ) {
|
|
|
return registerService.clubRegister(clubRegisterDto, passWordConfirm, smsCode, isAgreed, headers);
|
|
|
}
|
|
|
|
|
@@ -90,8 +94,12 @@ public class RegisterApi {
|
|
|
* @param headers HttpHeaders
|
|
|
* @return ClubPo
|
|
|
*/
|
|
|
+ @ApiOperation("普通机构升级会员机构")
|
|
|
@PostMapping("/club/upgrade")
|
|
|
- public ResponseJson clubUpgrade(ClubUpgradeDto upgradeDto, @RequestHeader HttpHeaders headers){
|
|
|
+ public ResponseJson clubUpgrade(
|
|
|
+ ClubUpgradeDto upgradeDto,
|
|
|
+ @RequestHeader HttpHeaders headers
|
|
|
+ ){
|
|
|
return registerService.clubUpgrade(upgradeDto, headers);
|
|
|
}
|
|
|
|
|
@@ -125,8 +133,13 @@ public class RegisterApi {
|
|
|
* @param headers HttpHeaders
|
|
|
* @return ClubPo
|
|
|
*/
|
|
|
+ @ApiOperation("协销拉机构上线(机构注册)")
|
|
|
@PostMapping("/club/online")
|
|
|
- public ResponseJson<ClubPo> clubOnline(ClubOnlineDto onlineDto, Integer isAgreed, @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<ClubPo> clubOnline(
|
|
|
+ ClubOnlineDto onlineDto,
|
|
|
+ @ApiParam("是否同意勾选同意协议,1是,其他否") @RequestParam("isAgreed") Integer isAgreed,
|
|
|
+ @RequestHeader HttpHeaders headers
|
|
|
+ ) {
|
|
|
return registerService.clubOnline(onlineDto, isAgreed, headers);
|
|
|
}
|
|
|
|
|
@@ -156,18 +169,21 @@ public class RegisterApi {
|
|
|
* @param passWordConfirm 用户确认密码
|
|
|
* @param smsCode 短信验证码(旧:activationCode)
|
|
|
* @param isAgreed 是否同意勾选同意协议,1是,其他否
|
|
|
- * @param whichStep 注册步数
|
|
|
+ * @param whichStep 注册步数: PC(0),小程序(1,2,3)
|
|
|
* @param headers HttpHeaders
|
|
|
* @return ShopPo
|
|
|
*/
|
|
|
+ @ApiOperation("供应商注册")
|
|
|
@Idempotent(prefix="idempotent_shop", keys={"#shopRegisterDto"}, expire=5)
|
|
|
@PostMapping("/shop/applets")
|
|
|
- public ResponseJson<ShopPo> shopRegister(ShopRegisterDto shopRegisterDto,
|
|
|
- String passWordConfirm,
|
|
|
- String smsCode,
|
|
|
- Integer isAgreed,
|
|
|
- Integer whichStep,
|
|
|
- @RequestHeader HttpHeaders headers) {
|
|
|
+ public ResponseJson<ShopPo> shopRegister(
|
|
|
+ ShopRegisterDto shopRegisterDto,
|
|
|
+ @ApiParam("用户确认密码") @RequestParam("passWordConfirm") String passWordConfirm,
|
|
|
+ @ApiParam("短信验证码") @RequestParam("smsCode") String smsCode,
|
|
|
+ @ApiParam("是否同意勾选同意协议,1是,其他否") @RequestParam("isAgreed") Integer isAgreed,
|
|
|
+ @ApiParam("注册步数: PC(0),小程序(1,2,3)") @RequestParam("whichStep") Integer whichStep,
|
|
|
+ @RequestHeader HttpHeaders headers
|
|
|
+ ) {
|
|
|
return registerService.shopRegister(shopRegisterDto, passWordConfirm, smsCode, isAgreed, whichStep, headers);
|
|
|
}
|
|
|
|