|
@@ -6,6 +6,7 @@ import com.jeeplus.weChat.domain.TemplateInfo;
|
|
|
import com.jeeplus.weChat.domain.TranTemplate;
|
|
|
import com.jeeplus.weChat.domain.WXTransportTemplate;
|
|
|
import com.jeeplus.weChat.util.HttpUtils;
|
|
|
+import lombok.extern.log4j.Log4j2;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -20,6 +21,7 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Service
|
|
|
@Transactional
|
|
|
+@Log4j2
|
|
|
public class WxSendService {
|
|
|
|
|
|
@Value("${wechat.sendTemplateUrl}")
|
|
@@ -79,24 +81,24 @@ public class WxSendService {
|
|
|
tranTemplate.setUrl(resource.getUrl());
|
|
|
|
|
|
//设置模板ID
|
|
|
- tranTemplate.setTemplate_id("ehTUuyDFL7f2RApsMXLsJEPlCgt82aTj2vtmO2l9Cso");
|
|
|
+ tranTemplate.setTemplate_id("-e-nHVBDe8SetRjPX8K7cKB4q3KeNV56WHkpQg5rBjU");
|
|
|
//给模板的内容赋值
|
|
|
Map<String , TemplateInfo> dataMap = new HashMap<>();
|
|
|
|
|
|
TemplateInfo title = new TemplateInfo(resource.getTitleName(),"#173177");
|
|
|
- dataMap.put("title",title);
|
|
|
+ dataMap.put("thing2",title);
|
|
|
|
|
|
TemplateInfo processName = new TemplateInfo(resource.getProcessName(),"#173177");
|
|
|
- dataMap.put("processName",processName);
|
|
|
+ dataMap.put("thing3",processName);
|
|
|
|
|
|
TemplateInfo currentStage = new TemplateInfo(resource.getCurrentStage(),"#173177");
|
|
|
- dataMap.put("currentStage",currentStage);
|
|
|
+ dataMap.put("thing11",currentStage);
|
|
|
|
|
|
TemplateInfo processInitiator = new TemplateInfo(resource.getProcessInitiator(),"#173177");
|
|
|
- dataMap.put("processInitiator",processInitiator);
|
|
|
+ dataMap.put("thing4",processInitiator);
|
|
|
|
|
|
TemplateInfo createTime = new TemplateInfo(resource.getCreateTime(),"#173177");
|
|
|
- dataMap.put("createTime",createTime);
|
|
|
+ dataMap.put("time5",createTime);
|
|
|
|
|
|
tranTemplate.setData(dataMap);
|
|
|
|