| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller.basic; | package com.iformall.controller.basic; | ||||
| import com.google.code.kaptcha.Constants; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| @@ -7,13 +8,22 @@ import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.WxMall; | import com.iformall.domain.po.WxMall; | ||||
| import com.iformall.enums.EnumGroupSupport; | import com.iformall.enums.EnumGroupSupport; | ||||
| import com.iformall.service.WxMallService; | import com.iformall.service.WxMallService; | ||||
| import com.iformall.utils.ShiroUtils; | |||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.apache.commons.io.IOUtils; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import javax.imageio.ImageIO; | |||||
| import javax.servlet.ServletException; | |||||
| import javax.servlet.ServletOutputStream; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.awt.image.BufferedImage; | |||||
| import java.io.IOException; | |||||
| @RestController | @RestController | ||||
| @RequestMapping("wxMall") | @RequestMapping("wxMall") | ||||
| public class WxMallController extends BaseController { | public class WxMallController extends BaseController { | ||||
| @@ -57,5 +67,17 @@ public class WxMallController extends BaseController { | |||||
| return new ResultData(mall); | return new ResultData(mall); | ||||
| } | } | ||||
| @ApiOperation("验证码") | |||||
| @GetMapping("/imgUrlH") | |||||
| public ResultData imgUrlH(){ | |||||
| logger.debug("[" + getIpAddr() + "] WxMallController::imgUrlH"); | |||||
| WxMall mall = wxMallService.getByTenantInfo(getUser()); | |||||
| if(mall == null) { | |||||
| logger.error("未配置相应的mall"); | |||||
| return new ResultData(Result.ERROR, "未配置相应的mall"); | |||||
| } | |||||
| return new ResultData(mall.getImgUrlH()); | |||||
| } | |||||
| } | } | ||||