发送消息

master
382696293@qq.com 2 years ago
parent bf1a7bcdbe
commit 0ed879e430

@ -14,7 +14,8 @@ public enum WxUserIntegralMessageTypeEnum {
CARE_PLAN(4, "护理计划"), CARE_PLAN(4, "护理计划"),
QUESTIONNAIRE_ACTIVITY(5, "问卷活动"), QUESTIONNAIRE_ACTIVITY(5, "问卷活动"),
MEMBER_MANAGEMENT(6, "会员管理"), MEMBER_MANAGEMENT(6, "会员管理"),
MESSAGE_TEMPLATE(7, "消息模板"); MESSAGE_TEMPLATE(7, "消息模板"),
LEAVE_MESSAGE(8, "留言");
private final Integer code; private final Integer code;
private final String info; private final String info;

@ -9,6 +9,7 @@ import com.flossom.common.core.enums.WxUserIntegralMessageTypeEnum;
import com.flossom.common.core.mapper.CtLeaveMessageMapper; import com.flossom.common.core.mapper.CtLeaveMessageMapper;
import com.flossom.common.core.mapper.WxScriptMessageMapper; import com.flossom.common.core.mapper.WxScriptMessageMapper;
import com.flossom.common.core.mapper.WxUserScriptLogMapper; import com.flossom.common.core.mapper.WxUserScriptLogMapper;
import com.flossom.common.core.utils.DateUtils;
import com.flossom.common.security.utils.SecurityUtils; import com.flossom.common.security.utils.SecurityUtils;
import com.flossom.miniProgram.service.ICtleaveMeassageService; import com.flossom.miniProgram.service.ICtleaveMeassageService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -39,10 +40,14 @@ public class CtleaveMessageServiceImpl implements ICtleaveMeassageService {
BeanUtils.copyProperties(wxScriptMessage, wxUserScriptLog); BeanUtils.copyProperties(wxScriptMessage, wxUserScriptLog);
wxUserScriptLog.setId(null); wxUserScriptLog.setId(null);
wxUserScriptLog.setWxUserId(SecurityUtils.getLoginUser().getWxUserMember().getId()); wxUserScriptLog.setWxUserId(SecurityUtils.getLoginUser().getWxUserMember().getId());
wxUserScriptLog.setMessageType(WxUserIntegralMessageTypeEnum.USER_REGISTRATION.getCode()); wxUserScriptLog.setMessageType(WxUserIntegralMessageTypeEnum.LEAVE_MESSAGE.getCode());
wxUserScriptLog.setIsCustom(0); wxUserScriptLog.setIsCustom(0);
wxUserScriptLog.setTitile(wxScriptMessage.getMessageTitle()); wxUserScriptLog.setTitile(wxScriptMessage.getMessageTitle());
wxUserScriptLog.setContent(wxScriptMessage.getMessageContent()); wxUserScriptLog.setContent(wxScriptMessage.getMessageContent());
wxUserScriptLog.setCreateTime(DateUtils.getNowDate());
wxUserScriptLog.setCreateBy(null);
wxUserScriptLog.setUpdateTime(null);
wxUserScriptLog.setUpdateBy(null);
wxUserScriptLogMapper.insertWxUserScriptLog(wxUserScriptLog); wxUserScriptLogMapper.insertWxUserScriptLog(wxUserScriptLog);
} }

@ -107,6 +107,8 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
wxUserScriptLog.setContent(wxScriptMessage.getMessageContent()); wxUserScriptLog.setContent(wxScriptMessage.getMessageContent());
wxUserScriptLog.setCreateTime(DateUtils.getNowDate()); wxUserScriptLog.setCreateTime(DateUtils.getNowDate());
wxUserScriptLog.setCreateBy(null); wxUserScriptLog.setCreateBy(null);
wxUserScriptLog.setUpdateTime(null);
wxUserScriptLog.setUpdateBy(null);
wxUserScriptLogMapper.insertWxUserScriptLog(wxUserScriptLog); wxUserScriptLogMapper.insertWxUserScriptLog(wxUserScriptLog);
} }
} }

Loading…
Cancel
Save