|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.simple.controller; |
|
|
|
|
|
|
|
import com.simple.annotation.AuthIgnore; |
|
|
|
import com.simple.common.ErrorCode; |
|
|
|
import com.simple.common.Result; |
|
|
|
import com.simple.common.ResultData; |
|
|
|
@@ -20,7 +21,7 @@ import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("wxMall") |
|
|
|
@RequestMapping("/api/mall") |
|
|
|
public class WxMallController extends BaseController { |
|
|
|
private Logger logger = Logger.getLogger(WxMallController.class); |
|
|
|
|
|
|
|
@@ -31,6 +32,7 @@ public class WxMallController extends BaseController { |
|
|
|
private WxAppinfoService wxAppinfoService; |
|
|
|
|
|
|
|
|
|
|
|
@AuthIgnore |
|
|
|
@ApiOperation("根据appId获取") |
|
|
|
@GetMapping("/getAppIcon") |
|
|
|
@ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true) |
|
|
|
@@ -49,5 +51,20 @@ public class WxMallController extends BaseController { |
|
|
|
return new ResultData(Result.SUCCESS, "查询成功", resultMap); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据appId获取") |
|
|
|
@GetMapping("/mallInfo") |
|
|
|
@ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true) |
|
|
|
public ResultData getMallInfo(String appId) { |
|
|
|
WxAppinfo appInfo = wxAppinfoService.getByAppId(appId); |
|
|
|
if (appInfo == null) { |
|
|
|
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); |
|
|
|
} |
|
|
|
WxMall mall = wxMallService.getByTenantId(appInfo.getTenantId()); |
|
|
|
if (mall==null) { |
|
|
|
return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND); |
|
|
|
} |
|
|
|
return new ResultData(Result.SUCCESS, "查询成功", mall); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |