|
|
|
@@ -13,6 +13,8 @@ import com.iformall.mapper.WxCUserMapper; |
|
|
|
import com.iformall.mapper.WxCuserFloatingLayerMapper; |
|
|
|
import com.iformall.mapper.WxFloatingLayerMapper; |
|
|
|
import com.iformall.service.WxCuserFloatingLayerService; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -43,13 +45,16 @@ public class WxCuserFloatingLayerServiceImpl implements WxCuserFloatingLayerServ |
|
|
|
@Override |
|
|
|
public WxFloatingLayer getFloatingLayer(String openId, String appId) { |
|
|
|
WxAppinfo appinfo = appinfoMapper.findByAppId(appId); |
|
|
|
if (StringUtils.isBlank(openId)) { |
|
|
|
return getWxFloatingLayer(appinfo.getTenantInfo()); |
|
|
|
} |
|
|
|
//1 查看是否存在用户,用户不存在 直接返回浮层信息 |
|
|
|
WxCUser user = new WxCUser(); |
|
|
|
user.setOpenId(openId); |
|
|
|
user.setAppId(appId); |
|
|
|
user.updateTenantInfo(appinfo); |
|
|
|
WxCUser byOpenId = wxCUserMapper.findByOpenId(user); |
|
|
|
logger.info("appinfo.gettenantinfo"+appinfo.getTenantInfo()); |
|
|
|
logger.info("appinfo.gettenantinfo"+appinfo.getTenantInfo().getTenantId()); |
|
|
|
if (byOpenId == null) { |
|
|
|
return getWxFloatingLayer(appinfo.getTenantInfo()); |
|
|
|
} |
|
|
|
|