可以在activity模块调用user的功能
关于feign
@FeignClient(value = "service-user") public interface UserInfoFeignClient { @GetMapping("/admin/user/userInfo/inner/getById/{id}") 需要完整路径 public UserInfo getById(@PathVariable Long id); }
需要加注解:
@EnableFeignClients(basePackages = "com.atguigu"
字符串判空:
if(!StringUtils.isEmpty(couponStatus))
关于优惠劵封装用户信息
couponUseList.stream().forEach(item->{ this.getUserInfoBycouponUse(item); });
微信公众号 后台管理系统是给管理员用的 微信公众号是用h5来做
什么是微信公众号? 线上线下微信互动营销方式
对parentId做判断 List<Menu> oneMenuList = menuList.stream().filter(menu -> menu.getParentId().longValue() == 0).collect(Collectors.toList());
关于封装与排序:
for(Menu oneMenu : oneMenuList) {
MenuVo oneMenuVo = new MenuVo();
BeanUtils.copyProperties(oneMenu, oneMenuVo);
List<Menu> twoMenuList = menuList.stream()
.filter(menu -> menu.getParentId().longValue() == oneMenu.getId())
.sorted(Comparator.comparing(Menu::getSort))
.collect(Collectors.toList()); 筛选出所属的子集 并做一个排序
List<MenuVo> children = new ArrayList<>();
for(Menu twoMenu : twoMenuList) {
MenuVo twoMenuVo = new MenuVo();
BeanUtils.copyProperties(twoMenu, twoMenuVo);
children.add(twoMenuVo);
}
Spring
BeanFactory ApplicationContext 后者的功能更多
MessageSource: 国际化功能,支持多种语言
ResourcePatternResolver: 通配符匹配资源路径
EnvironmentCapable: 环境信息,系统环境变量,*.properties、*.application.yml等配置文件中的值
ApplicationEventPublisher: 发布事件对象
BeanFactory实际上是ApplicationContext的一个父接口 其实BeanFactory 才是Spring的核心容器 前者组合了后者的功能