测试接口
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/30 9:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class BaseUserInfoRequest {
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("申请人姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("常驻区域")
|
||||
private String liveArea;
|
||||
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantShopArea;
|
||||
|
||||
@ApiModelProperty("意向开店区域ID")
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
||||
private Integer acceptAdjustType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 开放城市VO
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/29 16:27
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class OpenAreaVO {
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("parent.id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("区域路径")
|
||||
private String areaPath;
|
||||
|
||||
@ApiModelProperty("背景图URL 重点区域时候必填")
|
||||
private String backgroundBanner;
|
||||
|
||||
@ApiModelProperty("详情banner URL 重点区域时候必填")
|
||||
private String detailBanner;
|
||||
|
||||
@ApiModelProperty("状态 open-开放 keyOpen-重点开放 notOpen-未开放 saturated-已饱和")
|
||||
private String areaStatus;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUserId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/29 19:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class OpenProvinceVO {
|
||||
|
||||
@ApiModelProperty("可申请省份")
|
||||
List<OpenAreaVO> applyProvinceList;
|
||||
|
||||
@ApiModelProperty("可预约省份")
|
||||
List<OpenAreaVO> reservationProvinceList;
|
||||
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ public interface WechatMiniAppService {
|
||||
|
||||
CodeSessionVO miniProgramLogin(MiniProgramLoginDTO param);
|
||||
|
||||
CodeSessionVO getUserPhoneNumber(MiniProgramLoginDTO param);
|
||||
|
||||
MiniProgramUserVO queryMiniProgramUser(MiniProgramMsgDTO param);
|
||||
CodeSessionVO queryMiniProgramUser(MiniProgramMsgDTO param);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,12 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MiniProgramUserVO queryMiniProgramUser(MiniProgramMsgDTO param) {
|
||||
public CodeSessionVO getUserPhoneNumber(MiniProgramLoginDTO param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodeSessionVO queryMiniProgramUser(MiniProgramMsgDTO param) {
|
||||
String sessionCacheKey = MessageFormat.format(CommonConstants.MINI_PROGRAM_SESSION_KEY, param.getAppid(), param.getOpenid());
|
||||
String sessionKey = redisUtilPool.getString(sessionCacheKey);
|
||||
if (StringUtils.isBlank(sessionKey)) {
|
||||
@@ -73,6 +78,6 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
if (Objects.isNull(miniProgramUser)) {
|
||||
throw new ServiceException(ErrorCodeEnum.GET_WECHAT_USER_INFO_FAIL);
|
||||
}
|
||||
return miniProgramUser;
|
||||
return new CodeSessionVO();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,10 +36,17 @@ public class MiniProgramAppController {
|
||||
return ResponseResult.success(codeSessionVO);
|
||||
}
|
||||
|
||||
@ApiOperation("获取手机号")
|
||||
@PostMapping("/code/getUserPhoneNumber")
|
||||
public ResponseResult<CodeSessionVO> getUserPhoneNumber(@RequestBody @Valid MiniProgramLoginDTO param) {
|
||||
CodeSessionVO codeSessionVO = wechatMiniAppService.getUserPhoneNumber(param);
|
||||
return ResponseResult.success(codeSessionVO);
|
||||
}
|
||||
|
||||
@ApiOperation("获取小程序用户信息")
|
||||
@PostMapping("/user")
|
||||
public ResponseResult<MiniProgramUserVO> queryMiniProgramUser(@RequestBody @Valid MiniProgramMsgDTO param) {
|
||||
MiniProgramUserVO miniProgramUserVO = wechatMiniAppService.queryMiniProgramUser(param);
|
||||
return ResponseResult.success(miniProgramUserVO);
|
||||
public ResponseResult<CodeSessionVO> queryMiniProgramUser(@RequestBody @Valid MiniProgramMsgDTO param) {
|
||||
CodeSessionVO codeSessionVO = wechatMiniAppService.queryMiniProgramUser(param);
|
||||
return ResponseResult.success(codeSessionVO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.vo.OpenAreaVO;
|
||||
import com.cool.store.vo.OpenProvinceVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/29 14:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping({"/v1/partnerManage/{enterprise-id}/openArea" })
|
||||
@Slf4j
|
||||
public class OpenAreaController {
|
||||
|
||||
|
||||
@GetMapping(path = "/getOpenAreaList")
|
||||
@ApiOperation("开放城市(重点城市接口 区域申请搜索 )")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "keyOpenFlag", value = "重点城市标识 重点城市查询入参", required = false),
|
||||
@ApiImplicitParam(name = "parentId", value = "父区域名称", required = false),
|
||||
@ApiImplicitParam(name = "type", value = "可预约-reservation 可申请-apply ", required = false),
|
||||
@ApiImplicitParam(name = "keyWord", value = "搜索关键字", required = false),
|
||||
@ApiImplicitParam(name = "pageNumber", value = "页码", required = false),
|
||||
@ApiImplicitParam(name = "pageSize", value = "分页大小", required = false)
|
||||
})
|
||||
public ResponseResult<PageInfo<OpenAreaVO>> getOpenAreaList(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
|
||||
@RequestParam(value = "keyOpenFlag",required = false)Boolean keyOpenFlag,
|
||||
@RequestParam(value = "parentId",required = false)Boolean parentId,
|
||||
@RequestParam(value = "type",required = false)Boolean type,
|
||||
@RequestParam(value = "keyWord",required = false)Boolean keyWord,
|
||||
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
|
||||
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(path = "/getOpenProvince")
|
||||
@ApiOperation("可申请加盟省份/可预约加盟省份")
|
||||
public ResponseResult<OpenProvinceVO> getOpenProvince(@PathVariable(value = "enterprise-id", required = false) String enterpriseId){
|
||||
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.vo.OpenAreaVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/29 20:04
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping({"/v1/partnerManage/{enterprise-id}/partner" })
|
||||
@Slf4j
|
||||
public class PartnerController {
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/applyBaseInfo")
|
||||
@ApiOperation("提交基本信息")
|
||||
public ResponseResult<Boolean> applyBaseInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
|
||||
@RequestBody BaseUserInfoRequest baseUserInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path = "/changeBaseInfo")
|
||||
@ApiOperation("变更基本信息")
|
||||
public ResponseResult<Boolean> changeBaseInfo(@PathVariable(value = "enterprise-id", required = false) String enterpriseId,
|
||||
@RequestBody BaseUserInfoRequest baseUserInfoRequest){
|
||||
|
||||
//前提 未提交加盟申请
|
||||
//成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(path = "/getSubmitIntentionApplyFlag")
|
||||
@ApiOperation("获取提交意向申请标识 true 已提交 false 未提交")
|
||||
public ResponseResult<Boolean> getSubmitIntentionApplyFlag(@PathVariable(value = "enterprise-id", required = false) String enterpriseId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user