|
|
@@ -24,6 +24,7 @@ import com.usoftchina.smartschool.wechat.api.WechatApi;
|
|
|
import com.usoftchina.smartschool.wechat.dto.MessageInfoDTO;
|
|
|
import com.usoftchina.smartschool.wechat.dto.TransferDTO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
@@ -49,6 +50,9 @@ public class NoticeServiceImpl implements NoticeService{
|
|
|
@Autowired
|
|
|
private SchoolTemplateMapper schoolTemplateMapper;
|
|
|
|
|
|
+ @Value("${smartschool.domain.wechat}")
|
|
|
+ private String baseWechatUrl;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public DocBaseDTO save(Notify formdata) {
|
|
|
@@ -137,6 +141,14 @@ public class NoticeServiceImpl implements NoticeService{
|
|
|
}
|
|
|
noticers.forEach(noticer -> {
|
|
|
MessageInfoDTO msg = new MessageInfoDTO();
|
|
|
+ String endUrl = null;
|
|
|
+ if (noticer.getType() == 1) {
|
|
|
+ endUrl = "/parent/" + id + "?stuId=" + noticer.getPersonId();
|
|
|
+ }else {
|
|
|
+ endUrl = "/teacher/" + id + "?teacherId=" + noticer.getPersonId();
|
|
|
+ }
|
|
|
+ String url = baseWechatUrl + endUrl;
|
|
|
+ msg.setUrl(url);
|
|
|
msg.setTitle(data.getNotify_title());
|
|
|
msg.setKeyword1(school.getSchool_name());
|
|
|
msg.setKeyword2("校办公室");
|