|
@@ -13,6 +13,7 @@ import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -34,15 +35,22 @@ public class WxAuthApi {
|
|
|
private final DoctorService doctorService;
|
|
|
|
|
|
@ApiOperation("供应商信息")
|
|
|
- @ApiImplicitParam(name = "appId", required = true, value = "供应商公众号appId")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
|
|
|
+ @ApiImplicitParam(name = "appId", required = false, value = "供应商公众号appId")
|
|
|
+ })
|
|
|
@GetMapping("/shop/info")
|
|
|
- public ResponseJson<WxShopVo> getWxShopInfo(String appId) {
|
|
|
- return authClubService.getWxShopInfo(appId);
|
|
|
+ public ResponseJson<WxShopVo> getWxShopInfo(Integer authUserId, String appId) {
|
|
|
+ if (null == authUserId && StringUtils.isEmpty(appId)) {
|
|
|
+ return ResponseJson.error("参数异常,供应商用户id和appId不能同时为空", null);
|
|
|
+ }
|
|
|
+ return authClubService.getWxShopInfo(authUserId, appId);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("已认证机构列表")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "appId", required = true, value = "供应商公众号appId"),
|
|
|
+ @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
|
|
|
+ @ApiImplicitParam(name = "appId", required = false, value = "供应商公众号appId"),
|
|
|
@ApiImplicitParam(name = "lngAndLat", required = false, value = "用户当前经纬度"),
|
|
|
@ApiImplicitParam(name = "clubName", required = false, value = "机构名称"),
|
|
|
@ApiImplicitParam(name = "provinceId", required = false, value = "省id"),
|
|
@@ -52,11 +60,14 @@ public class WxAuthApi {
|
|
|
@ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
|
|
|
})
|
|
|
@GetMapping("/club/list")
|
|
|
- public ResponseJson<PageInfo<WxClubListVo>> getWxClubList(String appId, String lngAndLat, String clubName, Integer provinceId,
|
|
|
+ public ResponseJson<PageInfo<WxClubListVo>> getWxClubList(Integer authUserId, String appId, String lngAndLat, String clubName, Integer provinceId,
|
|
|
Integer cityId, Integer townId,
|
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
- return authClubService.getWxClubList(appId, lngAndLat, clubName, provinceId, cityId, townId, pageNum, pageSize);
|
|
|
+ if (null == authUserId && StringUtils.isEmpty(appId)) {
|
|
|
+ return ResponseJson.error("参数异常,供应商用户id和appId不能同时为空", null);
|
|
|
+ }
|
|
|
+ return authClubService.getWxClubList(authUserId, appId, lngAndLat, clubName, provinceId, cityId, townId, pageNum, pageSize);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("已认证机构详情")
|
|
@@ -68,16 +79,20 @@ public class WxAuthApi {
|
|
|
|
|
|
@ApiOperation("设备分类列表")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "appId", required = true, value = "供应商公众号appId"),
|
|
|
+ @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
|
|
|
+ @ApiImplicitParam(name = "appId", required = false, value = "供应商公众号appId"),
|
|
|
@ApiImplicitParam(name = "name", required = false, value = "设备分类名称"),
|
|
|
@ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
|
|
|
@ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
|
|
|
})
|
|
|
@GetMapping("/product/type/list")
|
|
|
- public ResponseJson<PageInfo<WxProductTypeListVo>> getWxProductTypeList(String appId, String name,
|
|
|
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
- return authProductService.getWxProductTypeList(appId, name, pageNum, pageSize);
|
|
|
+ public ResponseJson<PageInfo<WxProductTypeListVo>> getWxProductTypeList(Integer authUserId, String appId, String name,
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
+ if (null == authUserId && StringUtils.isEmpty(appId)) {
|
|
|
+ return ResponseJson.error("参数异常,供应商用户id和appId不能同时为空", null);
|
|
|
+ }
|
|
|
+ return authProductService.getWxProductTypeList(authUserId, appId, name, pageNum, pageSize);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("已认证商品列表")
|
|
@@ -103,17 +118,21 @@ public class WxAuthApi {
|
|
|
|
|
|
@ApiOperation("已认证医师列表")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "appId", required = true, value = "供应商公众号appId"),
|
|
|
+ @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
|
|
|
+ @ApiImplicitParam(name = "appId", required = false, value = "供应商公众号appId"),
|
|
|
@ApiImplicitParam(name = "doctorType", required = false, value = "医师类型:1操作医师,2培训医师"),
|
|
|
@ApiImplicitParam(name = "doctorName", required = false, value = "医师名称"),
|
|
|
@ApiImplicitParam(name = "pageNum", required = false, value = "第几页"),
|
|
|
@ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
|
|
|
})
|
|
|
@GetMapping("/doctor/list")
|
|
|
- public ResponseJson<PageInfo<WxDoctorListVo>> getWxDoctorList(String appId, Integer doctorType, String doctorName,
|
|
|
+ public ResponseJson<PageInfo<WxDoctorListVo>> getWxDoctorList(Integer authUserId, String appId, Integer doctorType, String doctorName,
|
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
- return doctorService.getWxDoctorList(appId, doctorType, doctorName, pageNum, pageSize);
|
|
|
+ if (null == authUserId && StringUtils.isEmpty(appId)) {
|
|
|
+ return ResponseJson.error("参数异常,供应商用户id和appId不能同时为空", null);
|
|
|
+ }
|
|
|
+ return doctorService.getWxDoctorList(authUserId, appId, doctorType, doctorName, pageNum, pageSize);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("已认证医师详情")
|