|
|
|
@@ -7,13 +7,16 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.iformall.domain.po.WxAppinfo; |
|
|
|
import com.iformall.domain.po.WxTemplateMsg; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.po.msg.AppUniformMsg; |
|
|
|
import com.iformall.domain.po.msg.BaseMsg; |
|
|
|
import com.iformall.mapper.WxAppinfoMapper; |
|
|
|
import com.iformall.mapper.WxTemplateMsgMapper; |
|
|
|
import com.iformall.service.msg.MsgSendService; |
|
|
|
import com.iformall.service.wechat.FmOpenService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -30,6 +33,10 @@ import java.util.List; |
|
|
|
@Service |
|
|
|
public class SendWeappUniformMsgServiceImpl implements MsgSendService { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxAppinfoMapper appinfoMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxTemplateMsgMapper wxTemplateMsgMapper; |
|
|
|
|
|
|
|
@@ -41,6 +48,10 @@ public class SendWeappUniformMsgServiceImpl implements MsgSendService { |
|
|
|
AppUniformMsg appUniformMsg = (AppUniformMsg)baseMsg; |
|
|
|
|
|
|
|
TenantEntity tenantEntity = appUniformMsg.getTenantInfo(); |
|
|
|
if (StringUtils.isBlank(tenantEntity.getTenantId())) { |
|
|
|
WxAppinfo appinfo = appinfoMapper.findByAppId(appUniformMsg.getAppId()); |
|
|
|
tenantEntity = appinfo.getTenantInfo(); |
|
|
|
} |
|
|
|
WxTemplateMsg msg = null; |
|
|
|
|
|
|
|
WxMaService wxMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appUniformMsg.getAppId()); |
|
|
|
|