|
@@ -1,10 +1,18 @@
|
|
package com.caimei365.user.controller;
|
|
package com.caimei365.user.controller;
|
|
|
|
|
|
|
|
+import com.caimei365.user.model.ResponseJson;
|
|
|
|
+import com.caimei365.user.model.dto.ClubTemporaryDto;
|
|
|
|
+import com.caimei365.user.model.dto.OnlineDto;
|
|
|
|
+import com.caimei365.user.model.vo.ClubTemporaryVo;
|
|
import com.caimei365.user.service.SellerService;
|
|
import com.caimei365.user.service.SellerService;
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Description
|
|
* Description
|
|
@@ -12,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
* @author : Charles
|
|
* @author : Charles
|
|
* @date : 2021/3/24
|
|
* @date : 2021/3/24
|
|
*/
|
|
*/
|
|
-@Api(tags="协销用户API")
|
|
|
|
|
|
+@Api(tags = "协销用户API")
|
|
@RestController
|
|
@RestController
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
@RequestMapping("/user/seller")
|
|
@RequestMapping("/user/seller")
|
|
@@ -20,5 +28,48 @@ public class SellerApi {
|
|
|
|
|
|
private final SellerService sellerService;
|
|
private final SellerService sellerService;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 待注册机构列表
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("待注册机构列表")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "userId", required = true, value = "协销userId"),
|
|
|
|
+ @ApiImplicitParam(name = "searchName", required = false, value = "搜索名称"),
|
|
|
|
+ @ApiImplicitParam(name = "pageNum", required = true, value = "第几页"),
|
|
|
|
+ @ApiImplicitParam(name = "pageSize", required = true, value = "一页多少条")
|
|
|
|
+ })
|
|
|
|
|
|
|
|
+ @GetMapping("/temporary/club")
|
|
|
|
+ public ResponseJson<PageInfo<ClubTemporaryVo>> temporaryClub(Integer userId, String searchName,
|
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
|
|
|
+ if (userId == null) {
|
|
|
|
+ return ResponseJson.error("参数异常", null);
|
|
|
|
+ }
|
|
|
|
+ return sellerService.temporaryClub(userId, searchName, pageNum, pageSize);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改待注册机构资料
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("修改待注册机构资料")
|
|
|
|
+ @PostMapping("/modify/temporary/club")
|
|
|
|
+ public ResponseJson<String> modifyTemporaryClub(ClubTemporaryDto temporaryDto) {
|
|
|
|
+ if (temporaryDto.getId() == null || StringUtils.isBlank(temporaryDto.getBindMobile())) {
|
|
|
|
+ return ResponseJson.error("参数异常", null);
|
|
|
|
+ }
|
|
|
|
+ return sellerService.modifyTemporaryClub(temporaryDto);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 删除待注册机构资料
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("删除待注册机构资料")
|
|
|
|
+ @PostMapping("/delete/temporary/club")
|
|
|
|
+ public ResponseJson<String> deleteTemporaryClub(OnlineDto onlineDto) {
|
|
|
|
+ if (onlineDto.getId() == null) {
|
|
|
|
+ return ResponseJson.error("参数异常", null);
|
|
|
|
+ }
|
|
|
|
+ return sellerService.deleteTemporaryClub(onlineDto.getId());
|
|
|
|
+ }
|
|
}
|
|
}
|