|
|
@@ -207,4 +207,36 @@ public class TtMerchantPoiController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("查询商铺资质材料状态") |
|
|
|
@GetMapping("/query_shop_meaterial") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
public ResultData queryShopMeaterial(String appId,Long id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] TtMerchantPoiController::findById"); |
|
|
|
if(StringUtils.isBlank(appId)){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"appId为空"); |
|
|
|
} |
|
|
|
WxAppinfo appinfo = appinfoService.getByAppId(appId); |
|
|
|
|
|
|
|
if(appinfo == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"找不到小程序信息"); |
|
|
|
} |
|
|
|
if(id == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
|
|
|
|
TtMerchantPoi record = ttMerchantPoiService.getById(id); |
|
|
|
if(record == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"查询不到商户"); |
|
|
|
} |
|
|
|
try{ |
|
|
|
TtOpenMaService openMaService = openService.getTtOpenComponentService().getTtMaServiceByAppid(appId); |
|
|
|
String res = openMaService.queryShopMeaterial(record.getSupplierExtId()); |
|
|
|
return new ResultData(res); |
|
|
|
}catch(Exception e){ |
|
|
|
logger.error("查询商铺资质材料状态 error"+ e.getMessage()); |
|
|
|
} |
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |