jiangping
2024-12-10 eb275c6d06d3c27fd30bbf4975d27c93d7f56eb2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformBooksServiceImpl.java
@@ -10,7 +10,10 @@
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.SmsConstants;
import com.doumee.core.utils.Utils;
import com.doumee.core.wx.wxPlat.WxPlatConstants;
import com.doumee.core.wx.wxPlat.WxPlatNotice;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dao.SmsConfigMapper;
import com.doumee.dao.business.dao.SmsEmailMapper;
import com.doumee.dao.business.join.ApproveJoinMapper;
import com.doumee.dao.business.model.*;
@@ -35,6 +38,7 @@
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -85,6 +89,9 @@
    @Autowired
    private EmayService emayService;
    @Autowired
    private WxNoticeConfigMapper wxNoticeConfigMapper;
    @Override
    public Integer create(PlatformBooks platformBooks) {
@@ -284,6 +291,17 @@
        //创建审批流信息
        approveService.createApproveForPlatfrom(approveTempl.getId(),platformBooks.getId(),platformBooks.getDriverId());
        //发送公众号通知 给提交人
        Member member = memberMapper.selectById(platformBooks.getDriverId());
        if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getOpenid())){
            WxPlatNotice wxPlatNotice = new WxPlatNotice();
            wxPlatNotice.sendPlatformBookTemplateNotice(
                    wxNoticeConfigMapper,platformBooks,
                    WxPlatConstants.platformBookContent.platformBookUpload,
                    systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                    Arrays.asList(member.getOpenid().split(",")),0);
        }
        return platformBooks.getId();
    }