| | |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.taobao.api.ApiException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | /** |
| | | * 安防/消防 markdown |
| | | * @param hiddenDanger |
| | | * @return |
| | | */ |
| | | public OapiMessageCorpconversationAsyncsendV2Request.Msg getHiddenDangerNoticeMsg(HiddenDanger hiddenDanger){ |
| | | public OapiMessageCorpconversationAsyncsendV2Request.Msg getAlarmNoticeMsg(String areaName,String submitTime,String infoType){ |
| | | OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg(); |
| | | msg.setMsgtype("markdown"); |
| | | OapiMessageCorpconversationAsyncsendV2Request.Markdown markdown = new OapiMessageCorpconversationAsyncsendV2Request.Markdown(); |
| | | markdown.setTitle("园区存在安防/消防隐患"); |
| | | markdown.setText(hiddenDanger.getAreaName()+"在"+DateUtil.formatDate(hiddenDanger.getSubmitTime(),"YYYY-MM-dd HH:mm")+"发生"+hiddenDanger.getCategoryName()+",请及时前往安防中心/消防中心进行处理"); |
| | | markdown.setText(areaName+"在"+submitTime+"发生"+infoType+",请及时前往安防中心/消防中心进行处理"); |
| | | msg.setMarkdown(markdown); |
| | | return msg; |
| | | } |