mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 07:25:07 +08:00
fix: 获得微信小程序码(base64 image)
This commit is contained in:
@ -4,6 +4,7 @@ import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxJsapiSignatureRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO;
|
||||
import cn.iocoder.yudao.module.system.service.social.SocialClientService;
|
||||
import me.chanjar.weixin.common.bean.WxJsapiSignature;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -40,4 +41,9 @@ public class SocialClientApiImpl implements SocialClientApi {
|
||||
return BeanUtils.toBean(info, SocialWxPhoneNumberInfoRespDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO) {
|
||||
return socialClientService.getWxaQrcode(reqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,10 +43,4 @@ public class SocialUserApiImpl implements SocialUserApi {
|
||||
return socialUserService.getSocialUserByCode(userType, socialType, code, state);
|
||||
}
|
||||
|
||||
// TODO @puhui999:貌似搞到 SocialClientApiImpl 更合适,二维码和用户关系不大;这样 socialUserService 也不用绕一次了
|
||||
@Override
|
||||
public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) {
|
||||
return socialUserService.getWxQrcode(reqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public interface SocialClientService {
|
||||
* @param reqVO 请求信息
|
||||
* @return 小程序二维码
|
||||
*/
|
||||
byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO);
|
||||
byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO);
|
||||
|
||||
// =================== 客户端管理 ===================
|
||||
|
||||
|
@ -229,7 +229,7 @@ public class SocialClientServiceImpl implements SocialClientService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) {
|
||||
public byte[] getWxaQrcode(SocialWxQrcodeReqDTO reqVO) {
|
||||
WxMaService service = getWxMaService(reqVO.getUserType());
|
||||
try {
|
||||
return service.getQrcodeService().createWxaCodeUnlimitBytes(reqVO.getScene(), reqVO.getPath(),
|
||||
|
@ -87,12 +87,4 @@ public interface SocialUserService {
|
||||
*/
|
||||
PageResult<SocialUserDO> getSocialUserPage(SocialUserPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得小程序二维码
|
||||
*
|
||||
* @param reqVO 请求信息
|
||||
* @return 小程序二维码
|
||||
*/
|
||||
byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO);
|
||||
|
||||
}
|
||||
|
@ -171,9 +171,4 @@ public class SocialUserServiceImpl implements SocialUserService {
|
||||
return socialUserMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getWxQrcode(SocialWxQrcodeReqDTO reqVO) {
|
||||
return socialClientService.getWxQrcode(reqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user