空指针getIsAc
This commit is contained in:
@@ -82,7 +82,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
|
||||
@Override
|
||||
@Cacheable(key = "#id")
|
||||
public ShopInfo getById(Serializable id) {
|
||||
public ShopInfo getById(Serializable id) throws ApiNotPrintException {
|
||||
ShopInfo shopInfo = super.getById(id);
|
||||
if(shopInfo == null){
|
||||
throw new ApiNotPrintException("店铺不存在");
|
||||
|
||||
@@ -133,6 +133,9 @@ public class UserAuthorizationServiceImpl implements UserAuthorizationService {
|
||||
* 初始化用户微信公众号二维码\
|
||||
*/
|
||||
private void initAc(UserInfo userInfo) {
|
||||
if (userInfo.getIsAc() == null) {
|
||||
userInfo.setIsAc(0);
|
||||
}
|
||||
if (userInfo.getIsAc() == 0 &&
|
||||
(StrUtil.isBlank(userInfo.getWechatAcQrcode()) || userInfo.getAcQrcodeValidTime() == null || userInfo.getAcQrcodeValidTime().isBefore(LocalDateTime.now()))) {
|
||||
String qrCode = acAccountUtil.createQrCode(userInfo.getId());
|
||||
|
||||
Reference in New Issue
Block a user