|
|
|
@@ -0,0 +1,47 @@ |
|
|
|
package com.simple.controller; |
|
|
|
|
|
|
|
import com.simple.common.ErrorCode; |
|
|
|
import com.simple.common.Result; |
|
|
|
import com.simple.common.ResultData; |
|
|
|
import com.simple.domain.po.WxAppinfo; |
|
|
|
import com.simple.domain.po.WxMall; |
|
|
|
import com.simple.mapper.WxAppinfoMapper; |
|
|
|
import com.simple.service.WxAppinfoService; |
|
|
|
import com.simple.service.WxMallService; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("wxMall") |
|
|
|
public class WxMallController extends BaseController { |
|
|
|
private Logger logger = Logger.getLogger(WxMallController.class); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxMallService wxMallService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxAppinfoService wxAppinfoService; |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("根据appId获取") |
|
|
|
@GetMapping("/getAppIcon") |
|
|
|
@ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true) |
|
|
|
public ResultData getAppIcon(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); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |