|
|
@ -51,6 +51,7 @@ public class WechatRuleServiceImpl extends BaseServiceImpl<WechatRule> implement |
|
|
|
SysUser loginUser=(SysUser) subject.getPrincipal(); |
|
|
|
SysUser loginUser=(SysUser) subject.getPrincipal(); |
|
|
|
wechatRule.setCreateUserId(loginUser.getId()); |
|
|
|
wechatRule.setCreateUserId(loginUser.getId()); |
|
|
|
wechatRule.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); |
|
|
|
wechatRule.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); |
|
|
|
|
|
|
|
wechatRule.setCreateTime(new Date()); |
|
|
|
wechatRuleDao.save(wechatRule); |
|
|
|
wechatRuleDao.save(wechatRule); |
|
|
|
wechatKeywordList.forEach(wechatKeyword -> { |
|
|
|
wechatKeywordList.forEach(wechatKeyword -> { |
|
|
|
wechatKeyword.setCreateTime(new Date()); |
|
|
|
wechatKeyword.setCreateTime(new Date()); |
|
|
@ -58,10 +59,32 @@ public class WechatRuleServiceImpl extends BaseServiceImpl<WechatRule> implement |
|
|
|
wechatKeyword.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); |
|
|
|
wechatKeyword.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); |
|
|
|
wechatKeywordDao.save(wechatKeyword); |
|
|
|
wechatKeywordDao.save(wechatKeyword); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
return wechatRule; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public WechatRule saveRule(WechatRuleVo wechatRuleVo) { |
|
|
|
|
|
|
|
Subject subject= SecurityUtils.getSubject(); |
|
|
|
|
|
|
|
SysUser loginUser=(SysUser) subject.getPrincipal(); |
|
|
|
|
|
|
|
WechatRule wechatRule = new WechatRule(); |
|
|
|
|
|
|
|
BeanUtil.copyNotNull(wechatRule,wechatRuleVo); |
|
|
|
|
|
|
|
wechatRule.setCreateUserId(loginUser.getId()); |
|
|
|
|
|
|
|
wechatRule.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); |
|
|
|
wechatRule.setCreateTime(new Date()); |
|
|
|
wechatRule.setCreateTime(new Date()); |
|
|
|
|
|
|
|
wechatRuleDao.save(wechatRule); |
|
|
|
|
|
|
|
List<WechatKeyword> wechatKeywordList = wechatRuleVo.getWechatKeywordList(); |
|
|
|
|
|
|
|
wechatKeywordList.forEach(wechatKeyword -> { |
|
|
|
|
|
|
|
wechatKeyword.setCreateTime(new Date()); |
|
|
|
|
|
|
|
wechatKeyword.setWechatRuleId(wechatRule.getId()); |
|
|
|
|
|
|
|
wechatKeyword.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); |
|
|
|
|
|
|
|
wechatKeywordDao.save(wechatKeyword); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return wechatRule; |
|
|
|
return wechatRule; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<WechatRuleVo> findByWechatInfoId(Long wechatInfoId) { |
|
|
|
public List<WechatRuleVo> findByWechatInfoId(Long wechatInfoId) { |
|
|
|
List<WechatRuleVo> wechatRuleVos = new ArrayList<>(); |
|
|
|
List<WechatRuleVo> wechatRuleVos = new ArrayList<>(); |
|
|
|