Commit 30b5d96726baae21e672778aa90e26ef6e26d172
1 parent
7f725b2ca0
Exists in
master
and in
8 other branches
platform permission
add return pageinfo
Showing 5 changed files with 51 additions and 5 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/Organization.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/OrganizationQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/OrganizationService.java
- platform-biz-service/src/main/resources/mainOrm/Organization.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/Organization.java
View file @
30b5d96
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | private String provinceId; |
| 18 | 18 | private String cityId; |
| 19 | 19 | private String areaId; |
| 20 | + private String streetId; //½ÖµÀ ³ÇÕò | |
| 20 | 21 | private String address; |
| 21 | 22 | private String description; |
| 22 | 23 | private Integer publishId; |
| ... | ... | @@ -34,6 +35,14 @@ |
| 34 | 35 | private String foreignId; |
| 35 | 36 | |
| 36 | 37 | Map<String, Departments> departmentsMap = new HashMap<>(); |
| 38 | + | |
| 39 | + public String getStreetId() { | |
| 40 | + return streetId; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setStreetId(String streetId) { | |
| 44 | + this.streetId = streetId; | |
| 45 | + } | |
| 37 | 46 | |
| 38 | 47 | public Map<String, Departments> getDepartmentsMap() { |
| 39 | 48 | return departmentsMap; |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/OrganizationQuery.java
View file @
30b5d96
| ... | ... | @@ -15,6 +15,7 @@ |
| 15 | 15 | private String provinceId; |
| 16 | 16 | private String cityId; |
| 17 | 17 | private String areaId; |
| 18 | + private String streetId; //½ÖµÀ ³ÇÕò | |
| 18 | 19 | private String address; |
| 19 | 20 | private String description; |
| 20 | 21 | private Integer publishId; |
| ... | ... | @@ -25,6 +26,15 @@ |
| 25 | 26 | private String shortCode; |
| 26 | 27 | private String keyword; |
| 27 | 28 | private String foreignId; |
| 29 | + | |
| 30 | + | |
| 31 | + public String getStreetId() { | |
| 32 | + return streetId; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setStreetId(String streetId) { | |
| 36 | + this.streetId = streetId; | |
| 37 | + } | |
| 28 | 38 | |
| 29 | 39 | public String getForeignId() { |
| 30 | 40 | return foreignId; |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/OrganizationService.java
View file @
30b5d96
| ... | ... | @@ -5,7 +5,18 @@ |
| 5 | 5 | |
| 6 | 6 | import java.util.List; |
| 7 | 7 | |
| 8 | -public interface OrganizationService {public void addOrganization(Organization obj);public void updateOrganization(Organization obj);public void deleteOrganization(Integer id);public Organization getOrganization(Integer id);public int queryOrganizationCount(OrganizationQuery query);public List<Organization> queryOrganization(OrganizationQuery query); | |
| 8 | +public interface OrganizationService { | |
| 9 | + public void addOrganization(Organization obj); | |
| 10 | + | |
| 11 | + public void updateOrganization(Organization obj); | |
| 12 | + | |
| 13 | + public void deleteOrganization(Integer id); | |
| 14 | + | |
| 15 | + public Organization getOrganization(Integer id); | |
| 16 | + | |
| 17 | + public int queryOrganizationCount(OrganizationQuery query); | |
| 18 | + | |
| 19 | + public List<Organization> queryOrganization(OrganizationQuery query); | |
| 9 | 20 | |
| 10 | 21 | } |
platform-biz-service/src/main/resources/mainOrm/Organization.xml
View file @
30b5d96
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | <result column="area_manage" property="areaManage" jdbcType="INTEGER"/> |
| 11 | 11 | <result column="province_id" property="provinceId" jdbcType="VARCHAR"/> |
| 12 | 12 | <result column="city_id" property="cityId" jdbcType="VARCHAR"/> |
| 13 | + <result column="street_id" property="streetId" jdbcType="VARCHAR"/> | |
| 13 | 14 | <result column="area_id" property="areaId" jdbcType="VARCHAR"/> |
| 14 | 15 | <result column="address" property="address" jdbcType="VARCHAR"/> |
| 15 | 16 | <result column="description" property="description" jdbcType="VARCHAR"/> |
| ... | ... | @@ -25,8 +26,8 @@ |
| 25 | 26 | |
| 26 | 27 | <insert id="addOrganization" parameterType="com.lyms.platform.permission.model.Organization"> |
| 27 | 28 | <selectKey order="AFTER" keyProperty="id" resultType="java.lang.Integer"> SELECT LAST_INSERT_ID() </selectKey> |
| 28 | -insert into organization (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode) | |
| 29 | -values (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode}) | |
| 29 | +insert into organization (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,street_id) | |
| 30 | +values (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode},#{streetId}) | |
| 30 | 31 | </insert> |
| 31 | 32 | |
| 32 | 33 | |
| ... | ... | @@ -57,6 +58,9 @@ |
| 57 | 58 | <if test="areaId != null"> |
| 58 | 59 | area_id = #{areaId,jdbcType=INTEGER}, |
| 59 | 60 | </if> |
| 61 | + <if test="streetId != null"> | |
| 62 | + street_id = #{streetId,jdbcType=INTEGER}, | |
| 63 | + </if> | |
| 60 | 64 | <if test="address != null and address != ''"> |
| 61 | 65 | address = #{address,jdbcType=VARCHAR}, |
| 62 | 66 | </if> |
| ... | ... | @@ -92,7 +96,7 @@ |
| 92 | 96 | |
| 93 | 97 | |
| 94 | 98 | <select id="getOrganization" resultMap="OrganizationResultMap" parameterType="java.lang.Integer"> |
| 95 | -select id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id | |
| 99 | +select id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id,street_id | |
| 96 | 100 | from organization where id = #{id,jdbcType=INTEGER} |
| 97 | 101 | </select> |
| 98 | 102 | |
| ... | ... | @@ -137,6 +141,9 @@ |
| 137 | 141 | <if test="areaId != null"> |
| 138 | 142 | and area_id = #{areaId,jdbcType=INTEGER} |
| 139 | 143 | </if> |
| 144 | + <if test="streetId != null"> | |
| 145 | + and street_id = #{streetId,jdbcType=INTEGER} | |
| 146 | + </if> | |
| 140 | 147 | <if test="address != null and address != ''"> |
| 141 | 148 | and address = #{address,jdbcType=VARCHAR} |
| 142 | 149 | </if> |
| ... | ... | @@ -171,7 +178,7 @@ |
| 171 | 178 | <select id="queryOrganization" resultMap="OrganizationResultMap" |
| 172 | 179 | parameterType="com.lyms.platform.permission.model.OrganizationQuery"> |
| 173 | 180 | select |
| 174 | - id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id | |
| 181 | + id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id,street_id | |
| 175 | 182 | from organization |
| 176 | 183 | <include refid="OrganizationCondition"/> |
| 177 | 184 | <include refid="orderAndLimit"/> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
30b5d96
| ... | ... | @@ -100,6 +100,7 @@ |
| 100 | 100 | @RequestParam(value = "provinceId", required = false) String provinceId, |
| 101 | 101 | @RequestParam(value = "cityId", required = false) String cityId, |
| 102 | 102 | @RequestParam(value = "areaId", required = false) String areaId, |
| 103 | + @RequestParam(value = "streetId", required = false) String streetId, | |
| 103 | 104 | @RequestParam(value = "address", required = false) String address, |
| 104 | 105 | @RequestParam(value = "description", required = false) String description, |
| 105 | 106 | @RequestParam(value = "shortCode", required = false) String shortCode) { |
| ... | ... | @@ -124,6 +125,7 @@ |
| 124 | 125 | organization.setProvinceId(provinceId); |
| 125 | 126 | organization.setCityId(cityId); |
| 126 | 127 | organization.setAreaId(areaId); |
| 128 | + organization.setStreetId(streetId); | |
| 127 | 129 | organization.setAddress(address); |
| 128 | 130 | organization.setDescription(description); |
| 129 | 131 | organization.setShortcode(shortCode); |
| ... | ... | @@ -149,6 +151,7 @@ |
| 149 | 151 | @RequestParam(value = "provinceId") String provinceId, |
| 150 | 152 | @RequestParam(value = "cityId") String cityId, |
| 151 | 153 | @RequestParam(value = "areaId") String areaId, |
| 154 | + @RequestParam(value = "streetId") String streetId, | |
| 152 | 155 | @RequestParam(value = "address") String address, |
| 153 | 156 | @RequestParam(value = "description", required = false) String description, |
| 154 | 157 | @RequestParam(value = "shortCode", required = false) String shortCode) { |
| ... | ... | @@ -178,6 +181,7 @@ |
| 178 | 181 | organization.setProvinceId(provinceId); |
| 179 | 182 | organization.setCityId(cityId); |
| 180 | 183 | organization.setAreaId(areaId); |
| 184 | + organization.setStreetId(streetId); | |
| 181 | 185 | organization.setAddress(address); |
| 182 | 186 | organization.setDescription(description); |
| 183 | 187 | organization.setShortcode(shortCode); |
| ... | ... | @@ -237,6 +241,11 @@ |
| 237 | 241 | BasicConfig p2 = basicConfigService.getOneBasicConfigById(p1.getParentId()); |
| 238 | 242 | if (p2 != null && SystemConfig.CHINA_BASIC_ID.equals(p2.getParentId())) { |
| 239 | 243 | organizationQuery.setAreaId(areaId); |
| 244 | + } else { | |
| 245 | +// BasicConfig p3 = basicConfigService.getOneBasicConfigById(p1.getParentId()); | |
| 246 | +// if (p2 != null && SystemConfig.CHINA_BASIC_ID.equals(p3.getParentId())) { | |
| 247 | + organizationQuery.setStreetId(areaId); | |
| 248 | +// } | |
| 240 | 249 | } |
| 241 | 250 | } |
| 242 | 251 | } |