Commit 1b0778b0 by huluobin

企业微信推送Fix bug

parent ae621e21
...@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service; ...@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -42,7 +43,7 @@ public class TechnicianPushServiceImpl implements TechnicianPushService { ...@@ -42,7 +43,7 @@ public class TechnicianPushServiceImpl implements TechnicianPushService {
ScheduleManage scheduleManage = scheduleManageMapper.selectById(scheduledId); ScheduleManage scheduleManage = scheduleManageMapper.selectById(scheduledId);
String name = scheduleManage.getStoreScheduleUsername(); String name = scheduleManage.getStoreScheduleUsername();
String phone = scheduleManage.getTelephone(); String phone = scheduleManage.getTelephone();
String date = scheduleManage.getArriveTime().toString(); String date = new SimpleDateFormat("yyyy年MM月dd HH:mm:ss").format(scheduleManage.getArriveTime());
List<ScheduleServe> scheduleServeList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>().eq(ScheduleServe::getSchId, scheduledId)); List<ScheduleServe> scheduleServeList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>().eq(ScheduleServe::getSchId, scheduledId));
String serves = scheduleServeList.stream().map(ScheduleServe::getServeName).collect(Collectors.joining(",")); String serves = scheduleServeList.stream().map(ScheduleServe::getServeName).collect(Collectors.joining(","));
...@@ -56,11 +57,11 @@ public class TechnicianPushServiceImpl implements TechnicianPushService { ...@@ -56,11 +57,11 @@ public class TechnicianPushServiceImpl implements TechnicianPushService {
EnterpriseWxMsg.EnterpriseTextWxMsg textWxMsg = new EnterpriseWxMsg.EnterpriseTextWxMsg(); EnterpriseWxMsg.EnterpriseTextWxMsg textWxMsg = new EnterpriseWxMsg.EnterpriseTextWxMsg();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
String content = builder.append("预约提醒\n") String content = builder.append("预约提醒\n\n")
.append("预约客户").append(name).append("\n") .append("预约客户: ").append(name).append("\n")
.append("预约客户手机").append(phone).append("\n") .append("预约客户手机: ").append(phone).append("\n")
.append("预约时间:").append(date).append("\n") .append("预约时: ").append(date).append("\n")
.append("预约技师").append(technicianNames).append("\n") .append("预约技师: ").append(technicianNames).append("\n")
.append("预约项目: ").append(serves).append("\n") .append("预约项目: ").append(serves).append("\n")
.toString(); .toString();
textWxMsg.setMentioned_mobile_list(storeTechnicianList.stream().map(StoreTechnician::getMobile).collect(Collectors.toList())); textWxMsg.setMentioned_mobile_list(storeTechnicianList.stream().map(StoreTechnician::getMobile).collect(Collectors.toList()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment