FlowRoleCityVo.java 608 B

12345678910111213141516171819202122232425262728
  1. package com.nokia.vo;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import com.nokia.pojo.City;
  5. import com.nokia.pojo.Role;
  6. import lombok.Data;
  7. @Data
  8. public class FlowRoleCityVo {
  9. // 角色id
  10. private Integer roleId;
  11. // 角色名
  12. private String roleName;
  13. // 赋权地市
  14. private List<Integer> cities;
  15. public FlowRoleCityVo(Role role) {
  16. this.roleId = role.getRoleId();
  17. this.roleName = role.getRoleName();
  18. this.cities = new ArrayList<>();
  19. for (City city : role.getCities()) {
  20. this.cities.add(city.getCityId());
  21. }
  22. }
  23. }