|
@@ -17,6 +17,7 @@ import java.util.UUID;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -180,15 +181,33 @@ public class UserCenterService {
|
|
|
return uccenter + "callback/h5Pay?companyid=" + companyid + "&apporderid=" + order.getOrderid() + "&sign=" + sign;
|
|
|
}
|
|
|
|
|
|
- public ControllerResult pushReportMsg(String phone, Integer reportid){
|
|
|
- Map<String, Object> data = new HashMap<>();
|
|
|
- return this.sendTemplateMsg(companyid, phone, reprotPushTemplateId, myhost + "rjreport/" + reportid, JSON.toJSONString(data));
|
|
|
+ public ControllerResult pushReportMsg(List<String> uids, String title, String name, String reportid,
|
|
|
+ String tjdate, String position, String remark){
|
|
|
+ for (String uid: uids){
|
|
|
+ Map<String, Object> data = new HashMap<>();
|
|
|
+ data.put("first", this.getMsgItem(title));
|
|
|
+ data.put("keyword1", this.getMsgItem(name));
|
|
|
+ data.put("keyword2", this.getMsgItem(reportid));
|
|
|
+ data.put("keyword3", this.getMsgItem(tjdate));
|
|
|
+ data.put("keyword4", this.getMsgItem(position));
|
|
|
+ data.put("remark", this.getMsgItem(remark));
|
|
|
+
|
|
|
+ this.sendTemplateMsg(companyid, uid, reprotPushTemplateId, myhost + "rjreport/" + reportid, JSON.toJSONString(data));
|
|
|
+ }
|
|
|
+ return new ControllerResult(Boolean.TRUE);
|
|
|
+ }
|
|
|
+
|
|
|
+ private Map<String, Object> getMsgItem(String value){
|
|
|
+ Map<String, Object> item = new HashMap<>();
|
|
|
+ item.put("value", value);
|
|
|
+ item.put("color", "#173177");
|
|
|
+ return item;
|
|
|
}
|
|
|
|
|
|
- public ControllerResult sendTemplateMsg(String companyid, String phone, String templateid, String url, String data){
|
|
|
+ public ControllerResult sendTemplateMsg(String companyid, String uid, String templateid, String url, String data){
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("companyid", this.companyid);
|
|
|
- params.put("phone", phone);
|
|
|
+ params.put("uid", uid);
|
|
|
params.put("templateid", templateid);
|
|
|
params.put("url", url);
|
|
|
params.put("data", data);
|