Commit cacc9d74 by 章春雨

Merge branch 'zcy-fix' into 'master'

更新以及上传二维码去掉OSS转file

See merge request rays/pcloud-book!305
parents 85079775 3fbe6d57
......@@ -180,7 +180,7 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
} else if (UpdateStatusEnum.SUCCESS.value.equals(updateQrDTO.getUpdateState())) {
if (!StringUtil.isEmpty(qrcodeUrl)) {
String url = QrcodeUtils.create(qrcodeUrl);
url = QrcodeTools.ossToFile(url);
//url = QrcodeTools.ossToFile(url);
updateQrDTO.setUrl(StringUtil.isEmpty(url) ? null : url);
} else {
updateQrDTO.setUrl(null);
......@@ -304,7 +304,7 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
if (weixinQrcodeVO.getQrcodeUrl().equalsIgnoreCase(newUrl)) {
throw new BookBizException(BookBizException.ERROR, "二维码无法识别,请重新上传!");
}
weixinQrcode.setQrcodeUrl(QrcodeTools.ossToFile(newUrl));
weixinQrcode.setQrcodeUrl(newUrl);
weixinQrcode.setGeneration(weixinQrcodeVO.getGeneration());
Long qrcodeId = weixinQrcodeDao.insert(weixinQrcode);
//若需要同步微信群id 则同步微信群
......
......@@ -18,9 +18,11 @@ import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.permission.PermissionException;
import com.pcloud.common.utils.SessionUtil;
import com.pcloud.common.utils.cookie.Cookie;
import org.codehaus.jackson.JsonParseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -69,7 +71,8 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade {
}
@GetMapping("getChangeGroupQrCode")
public ResponseDto<String> getChangeGroupQrCode(@RequestParam("classifyId") Long classifyId) {
public ResponseDto<String> getChangeGroupQrCode(@CookieValue("userInfo") String userInfo, @RequestParam("classifyId") Long classifyId) {
Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID);
String qrCodeUrl = groupQrcodeBiz.getChangeGroupQrCode(classifyId);
return new ResponseDto<>(qrCodeUrl);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment