| @@ -41,9 +41,12 @@ public class WxMsgModelServiceImpl implements WxMsgModelService { | |||||
| @Override | @Override | ||||
| public ResultData saveOrUpdate(WxMsgModel wxMsgModel) { | public ResultData saveOrUpdate(WxMsgModel wxMsgModel) { | ||||
| String tenantid="1"; | |||||
| //从短信配置中查询密钥 bid 等信息 | //从短信配置中查询密钥 bid 等信息 | ||||
| WxMsgConfig wxMsgConfig = new WxMsgConfig(); | WxMsgConfig wxMsgConfig = new WxMsgConfig(); | ||||
| wxMsgConfig.setTenantId("1"); | |||||
| wxMsgConfig.setTenantId(tenantid); | |||||
| List<WxMsgConfig> wxMsgConfigs = wxMsgConfigMapper.findList(wxMsgConfig); | List<WxMsgConfig> wxMsgConfigs = wxMsgConfigMapper.findList(wxMsgConfig); | ||||
| if(wxMsgConfigs.size()==0)return new ResultData(Result.SUCCESS, "您还未接入短信运营商,请联系平台管理员"); | if(wxMsgConfigs.size()==0)return new ResultData(Result.SUCCESS, "您还未接入短信运营商,请联系平台管理员"); | ||||
| wxMsgConfig = wxMsgConfigs.get(0); | wxMsgConfig = wxMsgConfigs.get(0); | ||||
| @@ -102,6 +105,7 @@ public class WxMsgModelServiceImpl implements WxMsgModelService { | |||||
| if (wxMsgModel.getId() == null) { | if (wxMsgModel.getId() == null) { | ||||
| IdWorker idWorker = new IdWorker(0, 0); | IdWorker idWorker = new IdWorker(0, 0); | ||||
| wxMsgModel.setId(idWorker.nextId()); | wxMsgModel.setId(idWorker.nextId()); | ||||
| wxMsgModel.setTenantId(tenantid); | |||||
| wxMsgModel.setCreatetime(new Date()); | wxMsgModel.setCreatetime(new Date()); | ||||
| wxMsgModelMapper.insertSelective(wxMsgModel); | wxMsgModelMapper.insertSelective(wxMsgModel); | ||||
| } else { | } else { | ||||