平台建店接口
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.PlatformBuildEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.request.PlatformBuildAuditRequest;
|
||||
import com.cool.store.response.AuditInfoResponse;
|
||||
import com.cool.store.response.PlatformBuildResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OperationLogService;
|
||||
import com.cool.store.service.PlatformBuildService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/10/下午3:58
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("pc平台建店")
|
||||
@RestController
|
||||
@RequestMapping("/pc/platformBuild")
|
||||
public class PCPlatformBuildController {
|
||||
|
||||
@Resource
|
||||
private OperationLogService operationLogService;
|
||||
@Resource
|
||||
private PlatformBuildService platformBuildService;
|
||||
|
||||
@ApiOperation("根据type获取平台建店详情:1-抖音,2-快手,3-美团团购,4-饿了么,5-美团外卖")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<PlatformBuildResponse> get(@RequestParam("shopId") Long shopId,@RequestParam("type") Integer type) {
|
||||
return ResponseResult.success(platformBuildService.get(shopId, PlatformBuildEnum.DOU_YIN.getCode()));
|
||||
}
|
||||
|
||||
@ApiOperation("一级审批")
|
||||
@PostMapping("/firstAudit")
|
||||
public ResponseResult<Integer> firstAudit(@RequestBody @Validated PlatformBuildAuditRequest request) {
|
||||
request.setOperateUserId(CurrentUserHolder.getUserId());
|
||||
request.setOperateUserName(CurrentUserHolder.getUser().getName());
|
||||
return ResponseResult.success(platformBuildService.firstAudit(request));
|
||||
}
|
||||
@ApiOperation("二级级审批 美团外卖&饿了么")
|
||||
@PostMapping("/secondAudit")
|
||||
public ResponseResult<Integer> secondAudit(@RequestBody @Validated PlatformBuildAuditRequest request) {
|
||||
request.setOperateUserId(CurrentUserHolder.getUserId());
|
||||
request.setOperateUserName(CurrentUserHolder.getUser().getName());
|
||||
return ResponseResult.success(platformBuildService.secondAudit(request));
|
||||
}
|
||||
|
||||
@ApiOperation("根据type获取平台建店审批记录:1-抖音,2-快手,3-美团团购,4-饿了么,5-美团外卖")
|
||||
@GetMapping("/getAuditInfo")
|
||||
public ResponseResult<List<AuditInfoResponse>> getAuditInfo(@RequestParam("shopId") Long shopId, @RequestParam("type") Integer type) {
|
||||
List<Integer> shopSubStageStatusList = new ArrayList<>();
|
||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_180.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182.getShopSubStageStatus());
|
||||
}else if (type.equals(PlatformBuildEnum.KUAI_SHOU.getCode())) {
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_220.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222.getShopSubStageStatus());
|
||||
}else if (type.equals(PlatformBuildEnum.MEI_TUAN_TUAN_GOU.getCode())) {
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_200.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202.getShopSubStageStatus());
|
||||
}else if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_210.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214.getShopSubStageStatus());
|
||||
}else if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_190.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus());
|
||||
shopSubStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194.getShopSubStageStatus());
|
||||
}
|
||||
|
||||
return ResponseResult.success(operationLogService.getAuditInfo(shopId, shopSubStageStatusList));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.PlatformBuildEnum;
|
||||
import com.cool.store.request.PlatformBuildRequest;
|
||||
import com.cool.store.response.PlatformBuildResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PlatformBuildService;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/10/下午3:58
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("mini平台建店")
|
||||
@RestController
|
||||
@RequestMapping("/mini/platformBuild")
|
||||
public class MiniPlatformBuildController {
|
||||
|
||||
@Resource
|
||||
private PlatformBuildService platformBuildService;
|
||||
|
||||
@ApiOperation("获取是法人身份证号")
|
||||
@GetMapping("/getJuridicalIdCard")
|
||||
public ResponseResult<String> getJuridicalIdCard(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(platformBuildService.juridicalIdCard(shopId));
|
||||
}
|
||||
@ApiOperation("根据type获取平台建店详情:1-抖音,2-快手,3-美团团购,4-饿了么,5-美团外卖")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<PlatformBuildResponse> get(@RequestParam("shopId") Long shopId,@RequestParam("type") Integer type) {
|
||||
return ResponseResult.success(platformBuildService.get(shopId, PlatformBuildEnum.DOU_YIN.getCode()));
|
||||
}
|
||||
|
||||
@ApiOperation("根据type 提交或修改 平台建店详情:1-抖音,2-快手,3-美团团购,4-饿了么,5-美团外卖")
|
||||
@PostMapping("/submitOrUpdate")
|
||||
public ResponseResult<Integer> submitOrUpdate(@RequestBody @Validated PlatformBuildRequest request) {
|
||||
return ResponseResult.success(platformBuildService.submitOrUpdate(request, PartnerUserHolder.getUser()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user