傅行帆 6 anni fa
parent
commit
48a2a0214b
21 ha cambiato i file con 2927 aggiunte e 1456 eliminazioni
  1. 0
    20
      CODE/smart-community/app-api/src/main/java/com/community/huiju/Test.java
  2. 5
    0
      CODE/smart-community/operate-api/pom.xml
  3. 2
    2
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/Swagger2.java
  4. 49
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/CommunityController.java
  5. 0
    65
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/TestController.java
  6. 0
    11
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/ScUserMapper.java
  7. 25
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/ToCommunitiesMapper.java
  8. 0
    14
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/microController/MicroTestController.java
  9. 0
    37
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ScUser.java
  10. 83
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ToCommunities.java
  11. 17
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/CommunityServiceI.java
  12. 0
    9
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/ScUserServiceI.java
  13. 37
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/CommunityServiceImpl.java
  14. 0
    25
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ScUserServiceImpl.java
  15. 13
    8
      CODE/smart-community/operate-api/src/main/resources/application.yml
  16. 1
    7
      CODE/smart-community/operate-api/src/main/resources/bootstrap.yml
  17. 0
    16
      CODE/smart-community/operate-api/src/main/resources/mapper/ScUserMapper.xml
  18. 151
    0
      CODE/smart-community/operate-api/src/main/resources/mapper/ToCommunitiesMapper.xml
  19. 1274
    623
      文档/MYSQL/smartCommunity.pdb
  20. 1270
    619
      文档/MYSQL/smartCommunity.pdm
  21. BIN
      文档/需求/APP需求补充接口.xlsx

+ 0
- 20
CODE/smart-community/app-api/src/main/java/com/community/huiju/Test.java Vedi File

@@ -1,20 +0,0 @@
1
-package com.community.huiju;
2
-
3
-import com.community.commom.utils.DateUtils;
4
-
5
-import java.util.Date;
6
-
7
-/**
8
- * @author admin
9
- * @Title: Test
10
- * @Description: TODO
11
- * @date 2018/10/23
12
- */
13
-public class Test {
14
-    public static void main(String[] args) {
15
-       Date str1 = new Date(12L);
16
-       Date str2 = new Date(16L);
17
-
18
-        System.out.println(str1.compareTo(str2));
19
-    }
20
-}

+ 5
- 0
CODE/smart-community/operate-api/pom.xml Vedi File

@@ -70,6 +70,11 @@
70 70
 			<version>1.3.2</version>
71 71
 		</dependency>
72 72
 
73
+		<dependency>
74
+			<groupId>com.github.pagehelper</groupId>
75
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
76
+			<version>1.2.3</version>
77
+		</dependency>
73 78
 
74 79
 		<dependency>
75 80
 			<groupId>mysql</groupId>

+ 2
- 2
CODE/smart-community/operate-api/src/main/java/com/community/huiju/Swagger2.java Vedi File

@@ -21,14 +21,14 @@ public class Swagger2 {
21 21
     @Bean
22 22
     public Docket docket(){
23 23
         return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
24
-                .apis(RequestHandlerSelectors.basePackage("com.example.huiju.controller"))
24
+                .apis(RequestHandlerSelectors.basePackage("com.community.huiju.controller"))
25 25
                 .paths(PathSelectors.any()).build();
26 26
     }
27 27
     //构建api文档的详细信息函数
28 28
     private ApiInfo apiInfo(){
29 29
         return new ApiInfoBuilder()
30 30
                 //页面标题
31
-                .title("eureka-client1 的 RESTful API")
31
+                .title("运营端 的 RESTful API")
32 32
                 //创建人
33 33
                 .contact(new Contact("fuxingfan","","fuxingfan@dingtalk.com"))
34 34
                 //版本号

+ 49
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/CommunityController.java Vedi File

@@ -0,0 +1,49 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.model.ToCommunities;
5
+import com.community.huiju.service.CommunityServiceI;
6
+import io.swagger.annotations.Api;
7
+import io.swagger.annotations.ApiImplicitParam;
8
+import io.swagger.annotations.ApiImplicitParams;
9
+import io.swagger.annotations.ApiOperation;
10
+import org.springframework.beans.factory.annotation.Autowired;
11
+import org.springframework.cloud.context.config.annotation.RefreshScope;
12
+import org.springframework.web.bind.annotation.RequestBody;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RequestMethod;
15
+import org.springframework.web.bind.annotation.RequestParam;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import java.util.List;
19
+
20
+/**
21
+ * @author FXF
22
+ * @date 2018-10-31
23
+ */
24
+@RestController
25
+@RefreshScope
26
+@RequestMapping("/")
27
+@Api(value = "运营端社区API", description = "运营端社区API")
28
+public class CommunityController {
29
+	
30
+	@Autowired
31
+	private CommunityServiceI communityService;
32
+	
33
+	@ApiOperation(value = "根据搜索条件获取小区列表", notes = "根据搜索条件获取小区列表")
34
+	@ApiImplicitParams({
35
+			@ApiImplicitParam(paramType = "body", name = "ToCommunities", dataType = "String",value =
36
+					"id:社区编号,communityName:社区名称(模糊查询), provinceId:省份id,cityId:城市id,districtId:区县id"),
37
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
38
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
39
+	})
40
+	@RequestMapping(value = "/communitys",method = RequestMethod.POST)
41
+	public ResponseBean getCommunitys(@RequestBody ToCommunities toCommunities,
42
+	                                  @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
43
+	                                  @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
44
+		ResponseBean responseBean = new ResponseBean();
45
+		List<ToCommunities> communitiesList = communityService.getCommunitys(toCommunities,pageNum,pageSize);
46
+		responseBean.addSuccess(communitiesList);
47
+		return responseBean;
48
+	}
49
+}

+ 0
- 65
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/TestController.java Vedi File

@@ -1,65 +0,0 @@
1
-package com.community.huiju.controller;
2
-
3
-import com.community.commom.redis.RedisTemplate;
4
-import com.community.huiju.model.ScUser;
5
-import com.community.huiju.service.ScUserServiceI;
6
-import com.community.huiju.microController.MicroTestController;
7
-import io.swagger.annotations.Api;
8
-import io.swagger.annotations.ApiOperation;
9
-import org.springframework.beans.factory.annotation.Autowired;
10
-import org.springframework.beans.factory.annotation.Value;
11
-import org.springframework.cloud.context.config.annotation.RefreshScope;
12
-import org.springframework.web.bind.annotation.RequestMapping;
13
-import org.springframework.web.bind.annotation.RequestMethod;
14
-import org.springframework.web.bind.annotation.ResponseBody;
15
-import org.springframework.web.bind.annotation.RestController;
16
-
17
-import java.util.List;
18
-
19
-/**
20
- * @author FXF
21
- * @date 2018-09-11
22
- */
23
-@RestController
24
-@RefreshScope
25
-@RequestMapping("/client1")
26
-@Api("eureka-client1的测试controller的API")
27
-public class TestController {
28
-    
29
-    @Value("${abc}")
30
-    private String abc;
31
-    
32
-    @Autowired
33
-    private ScUserServiceI scUserService;
34
-    
35
-    @Autowired
36
-    private MicroTestController microTestController;
37
-    
38
-    @Autowired
39
-    private RedisTemplate redisTemplate;
40
-    
41
-    @ApiOperation(value = "测试无参", notes = "无参")
42
-    @RequestMapping(value = "/hello",method = RequestMethod.GET)
43
-    @ResponseBody
44
-    public String index(){
45
-        redisTemplate.set("1","1");
46
-        return abc;
47
-    }
48
-    
49
-    /**
50
-     * 获取所有的用户信息
51
-     * @return
52
-     */
53
-    @ApiOperation(value = "测试restful接口", notes = "测试接口")
54
-    @RequestMapping(value = "/user",method = RequestMethod.GET)
55
-    @ResponseBody
56
-    public List<ScUser> getUser(){
57
-        return scUserService.getUser();
58
-    }
59
-    
60
-    @RequestMapping(value = "/feignUser",method = RequestMethod.GET)
61
-    @ResponseBody
62
-    public List<ScUser> getMicroUser(){
63
-        return microTestController.getUser();
64
-    }
65
-}

+ 0
- 11
CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/ScUserMapper.java Vedi File

@@ -1,11 +0,0 @@
1
-package com.community.huiju.dao;
2
-
3
-import com.community.huiju.model.ScUser;
4
-import org.apache.ibatis.annotations.Mapper;
5
-
6
-import java.util.List;
7
-
8
-@Mapper
9
-public interface ScUserMapper {
10
-	List<ScUser> find();
11
-}

+ 25
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/ToCommunitiesMapper.java Vedi File

@@ -0,0 +1,25 @@
1
+package com.community.huiju.dao;
2
+
3
+
4
+import com.community.huiju.model.ToCommunities;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface ToCommunitiesMapper {
12
+    int deleteByPrimaryKey(Integer id);
13
+
14
+    int insert(ToCommunities record);
15
+
16
+    int insertSelective(ToCommunities record);
17
+
18
+    ToCommunities selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(ToCommunities record);
21
+
22
+    int updateByPrimaryKey(ToCommunities record);
23
+    
24
+    List<ToCommunities> selectByCommunityName(ToCommunities record);
25
+}

+ 0
- 14
CODE/smart-community/operate-api/src/main/java/com/community/huiju/microController/MicroTestController.java Vedi File

@@ -1,14 +0,0 @@
1
-package com.community.huiju.microController;
2
-
3
-import com.community.huiju.model.ScUser;
4
-import org.springframework.cloud.openfeign.FeignClient;
5
-import org.springframework.web.bind.annotation.RequestMapping;
6
-
7
-import java.util.List;
8
-
9
-@FeignClient("eureka-client2")
10
-public interface MicroTestController {
11
-	
12
-	@RequestMapping("/user")
13
-	List<ScUser> getUser();
14
-}

+ 0
- 37
CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ScUser.java Vedi File

@@ -1,37 +0,0 @@
1
-package com.community.huiju.model;
2
-
3
-/**
4
- * @author FXF
5
- * @date 2018-09-19
6
- */
7
-public class ScUser {
8
-	private Integer id;
9
-	
10
-	private String userName;
11
-	
12
-	private String userPassword;
13
-	
14
-	public Integer getId() {
15
-		return id;
16
-	}
17
-	
18
-	public void setId(Integer id) {
19
-		this.id = id;
20
-	}
21
-	
22
-	public String getUserName() {
23
-		return userName;
24
-	}
25
-	
26
-	public void setUserName(String userName) {
27
-		this.userName = userName;
28
-	}
29
-	
30
-	public String getUserPassword() {
31
-		return userPassword;
32
-	}
33
-	
34
-	public void setUserPassword(String userPassword) {
35
-		this.userPassword = userPassword;
36
-	}
37
-}

+ 83
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ToCommunities.java Vedi File

@@ -0,0 +1,83 @@
1
+package com.community.huiju.model;
2
+
3
+public class ToCommunities {
4
+    private Integer id;
5
+
6
+    private String communityName;
7
+
8
+    private String communityAlias;
9
+
10
+    private Integer provinceId;
11
+
12
+    private Integer cityId;
13
+
14
+    private Integer districtId;
15
+
16
+    private String longitude;
17
+
18
+    private String latitude;
19
+
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    public void setId(Integer id) {
25
+        this.id = id;
26
+    }
27
+
28
+    public String getCommunityName() {
29
+        return communityName;
30
+    }
31
+
32
+    public void setCommunityName(String communityName) {
33
+        this.communityName = communityName == null ? null : communityName.trim();
34
+    }
35
+
36
+    public String getCommunityAlias() {
37
+        return communityAlias;
38
+    }
39
+
40
+    public void setCommunityAlias(String communityAlias) {
41
+        this.communityAlias = communityAlias == null ? null : communityAlias.trim();
42
+    }
43
+
44
+    public Integer getProvinceId() {
45
+        return provinceId;
46
+    }
47
+
48
+    public void setProvinceId(Integer provinceId) {
49
+        this.provinceId = provinceId;
50
+    }
51
+
52
+    public Integer getCityId() {
53
+        return cityId;
54
+    }
55
+
56
+    public void setCityId(Integer cityId) {
57
+        this.cityId = cityId;
58
+    }
59
+
60
+    public Integer getDistrictId() {
61
+        return districtId;
62
+    }
63
+
64
+    public void setDistrictId(Integer districtId) {
65
+        this.districtId = districtId;
66
+    }
67
+
68
+    public String getLongitude() {
69
+        return longitude;
70
+    }
71
+
72
+    public void setLongitude(String longitude) {
73
+        this.longitude = longitude == null ? null : longitude.trim();
74
+    }
75
+
76
+    public String getLatitude() {
77
+        return latitude;
78
+    }
79
+
80
+    public void setLatitude(String latitude) {
81
+        this.latitude = latitude == null ? null : latitude.trim();
82
+    }
83
+}

+ 17
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/CommunityServiceI.java Vedi File

@@ -0,0 +1,17 @@
1
+package com.community.huiju.service;
2
+
3
+import com.community.huiju.model.ToCommunities;
4
+
5
+import java.util.List;
6
+
7
+public interface CommunityServiceI {
8
+	
9
+	/**
10
+	 * 分页获取小区列表
11
+	 * @param toCommunities
12
+	 * @param pageNum
13
+	 * @param pageSize
14
+	 * @return
15
+	 */
16
+	List<ToCommunities> getCommunitys(ToCommunities toCommunities, Integer pageNum, Integer pageSize);
17
+}

+ 0
- 9
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/ScUserServiceI.java Vedi File

@@ -1,9 +0,0 @@
1
-package com.community.huiju.service;
2
-
3
-import com.community.huiju.model.ScUser;
4
-
5
-import java.util.List;
6
-
7
-public interface ScUserServiceI {
8
-	List<ScUser> getUser();
9
-}

+ 37
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/CommunityServiceImpl.java Vedi File

@@ -0,0 +1,37 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.huiju.dao.ToCommunitiesMapper;
4
+import com.community.huiju.model.ToCommunities;
5
+import com.community.huiju.service.CommunityServiceI;
6
+import com.github.pagehelper.PageHelper;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * @author FXF
14
+ * @date 2018-10-31
15
+ */
16
+@Service("communityService")
17
+public class CommunityServiceImpl implements CommunityServiceI {
18
+	
19
+	@Autowired
20
+	private ToCommunitiesMapper toCommunitiesMapper;
21
+	
22
+	/**
23
+	 * 分页获取小区列表
24
+	 * @param toCommunities
25
+	 * @param pageNum
26
+	 * @param pageSize
27
+	 * @return
28
+	 */
29
+	@Override
30
+	public List<ToCommunities> getCommunitys(ToCommunities toCommunities, Integer pageNum, Integer pageSize) {
31
+		//使用分页插件
32
+		PageHelper.startPage(pageNum, pageSize);
33
+		//获取数据
34
+		List<ToCommunities> list = toCommunitiesMapper.selectByCommunityName(toCommunities);
35
+		return list;
36
+	}
37
+}

+ 0
- 25
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ScUserServiceImpl.java Vedi File

@@ -1,25 +0,0 @@
1
-package com.community.huiju.service.impl;
2
-
3
-import com.community.huiju.dao.ScUserMapper;
4
-import com.community.huiju.model.ScUser;
5
-import com.community.huiju.service.ScUserServiceI;
6
-import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.stereotype.Service;
8
-
9
-import java.util.List;
10
-
11
-/**
12
- * @author FXF
13
- * @date 2018-09-19
14
- */
15
-@Service("scUserService")
16
-public class ScUserServiceImpl implements ScUserServiceI {
17
-	
18
-	@Autowired
19
-	private ScUserMapper scUserMapper;
20
-	
21
-	@Override
22
-	public List<ScUser> getUser() {
23
-		return scUserMapper.find();
24
-	}
25
-}

+ 13
- 8
CODE/smart-community/operate-api/src/main/resources/application.yml Vedi File

@@ -5,12 +5,17 @@ management:
5 5
         include: refresh,health,info
6 6
 ## Mybatis
7 7
 mybatis:
8
-  typeAliasesPackage: com.example.huiju.model
8
+  typeAliasesPackage: com.community.huiju.model
9 9
   mapperLocations: classpath:mapper/*.xml
10
-
11
-## ribbon feign
12
-ribbon:
13
-  ConnectTimeout: 500
14
-  ReadTimeout: 5000
15
-  MaxAutoRetriesNextServer: 2
16
-  MaxAutoRetries: 1
10
+  configuration:
11
+    call-setters-on-nulls: true
12
+# 分页配置
13
+pagehelper:
14
+  helper-dialect: mysql
15
+  reasonable: true
16
+  support-methods-arguments: true
17
+  params: count=countSql
18
+# 打印sql
19
+logging:
20
+  level:
21
+    com.community.huiju.dao: debug

+ 1
- 7
CODE/smart-community/operate-api/src/main/resources/bootstrap.yml Vedi File

@@ -2,23 +2,17 @@ server:
2 2
   port: 8083
3 3
 spring:
4 4
   application:
5
-    name: eureka-client1
5
+    name: operate-api
6 6
   cloud:
7 7
     config:
8 8
       name: application
9 9
       profile: dev
10 10
       label: master
11
-#      uri: http://localhost:7001/
12 11
       discovery:
13 12
         enabled: true
14 13
         serviceId: config-server
15 14
   session:
16 15
     store-type: jdbc
17
-  datasource:
18
-    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/smart_community?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
19
-    username: root
20
-    password: DQ@0lW##kBb2+-jPZC1s$Ma0h5$9W((q
21
-    driver-class-name: com.mysql.jdbc.Driver
22 16
 eureka:
23 17
   client:
24 18
     service-url:

+ 0
- 16
CODE/smart-community/operate-api/src/main/resources/mapper/ScUserMapper.xml Vedi File

@@ -1,16 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="ScUserMapper">
4
-
5
-    <parameterMap id="paramMap" type="ScUser"></parameterMap>
6
-
7
-    <resultMap id="resultMap" type="ScUser">
8
-        <id property="id" column="id"/>
9
-        <result property="userName" column="user_name"/>
10
-        <result property="userPassword" column="user_password"/>
11
-    </resultMap>
12
-
13
-    <select id="find" resultMap="resultMap">
14
-        select * from sc_user
15
-    </select>
16
-</mapper>

+ 151
- 0
CODE/smart-community/operate-api/src/main/resources/mapper/ToCommunitiesMapper.xml Vedi File

@@ -0,0 +1,151 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.ToCommunitiesMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.ToCommunities" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_name" property="communityName" jdbcType="VARCHAR" />
7
+    <result column="community_alias" property="communityAlias" jdbcType="VARCHAR" />
8
+    <result column="province_id" property="provinceId" jdbcType="INTEGER" />
9
+    <result column="city_id" property="cityId" jdbcType="INTEGER" />
10
+    <result column="district_id" property="districtId" jdbcType="INTEGER" />
11
+    <result column="longitude" property="longitude" jdbcType="VARCHAR" />
12
+    <result column="latitude" property="latitude" jdbcType="VARCHAR" />
13
+  </resultMap>
14
+  <sql id="Base_Column_List" >
15
+    id, community_name, community_alias, province_id, city_id, district_id, longitude, 
16
+    latitude
17
+  </sql>
18
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
19
+    select 
20
+    <include refid="Base_Column_List" />
21
+    from to_communities
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </select>
24
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
25
+    delete from to_communities
26
+    where id = #{id,jdbcType=INTEGER}
27
+  </delete>
28
+  <insert id="insert" parameterType="com.community.huiju.model.ToCommunities" >
29
+    insert into to_communities (id, community_name, community_alias, 
30
+      province_id, city_id, district_id, 
31
+      longitude, latitude)
32
+    values (#{id,jdbcType=INTEGER}, #{communityName,jdbcType=VARCHAR}, #{communityAlias,jdbcType=VARCHAR}, 
33
+      #{provinceId,jdbcType=INTEGER}, #{cityId,jdbcType=INTEGER}, #{districtId,jdbcType=INTEGER}, 
34
+      #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR})
35
+  </insert>
36
+  <insert id="insertSelective" parameterType="com.community.huiju.model.ToCommunities" >
37
+    insert into to_communities
38
+    <trim prefix="(" suffix=")" suffixOverrides="," >
39
+      <if test="id != null" >
40
+        id,
41
+      </if>
42
+      <if test="communityName != null" >
43
+        community_name,
44
+      </if>
45
+      <if test="communityAlias != null" >
46
+        community_alias,
47
+      </if>
48
+      <if test="provinceId != null" >
49
+        province_id,
50
+      </if>
51
+      <if test="cityId != null" >
52
+        city_id,
53
+      </if>
54
+      <if test="districtId != null" >
55
+        district_id,
56
+      </if>
57
+      <if test="longitude != null" >
58
+        longitude,
59
+      </if>
60
+      <if test="latitude != null" >
61
+        latitude,
62
+      </if>
63
+    </trim>
64
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
65
+      <if test="id != null" >
66
+        #{id,jdbcType=INTEGER},
67
+      </if>
68
+      <if test="communityName != null" >
69
+        #{communityName,jdbcType=VARCHAR},
70
+      </if>
71
+      <if test="communityAlias != null" >
72
+        #{communityAlias,jdbcType=VARCHAR},
73
+      </if>
74
+      <if test="provinceId != null" >
75
+        #{provinceId,jdbcType=INTEGER},
76
+      </if>
77
+      <if test="cityId != null" >
78
+        #{cityId,jdbcType=INTEGER},
79
+      </if>
80
+      <if test="districtId != null" >
81
+        #{districtId,jdbcType=INTEGER},
82
+      </if>
83
+      <if test="longitude != null" >
84
+        #{longitude,jdbcType=VARCHAR},
85
+      </if>
86
+      <if test="latitude != null" >
87
+        #{latitude,jdbcType=VARCHAR},
88
+      </if>
89
+    </trim>
90
+  </insert>
91
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.ToCommunities" >
92
+    update to_communities
93
+    <set >
94
+      <if test="communityName != null" >
95
+        community_name = #{communityName,jdbcType=VARCHAR},
96
+      </if>
97
+      <if test="communityAlias != null" >
98
+        community_alias = #{communityAlias,jdbcType=VARCHAR},
99
+      </if>
100
+      <if test="provinceId != null" >
101
+        province_id = #{provinceId,jdbcType=INTEGER},
102
+      </if>
103
+      <if test="cityId != null" >
104
+        city_id = #{cityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="districtId != null" >
107
+        district_id = #{districtId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="longitude != null" >
110
+        longitude = #{longitude,jdbcType=VARCHAR},
111
+      </if>
112
+      <if test="latitude != null" >
113
+        latitude = #{latitude,jdbcType=VARCHAR},
114
+      </if>
115
+    </set>
116
+    where id = #{id,jdbcType=INTEGER}
117
+  </update>
118
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.ToCommunities" >
119
+    update to_communities
120
+    set community_name = #{communityName,jdbcType=VARCHAR},
121
+      community_alias = #{communityAlias,jdbcType=VARCHAR},
122
+      province_id = #{provinceId,jdbcType=INTEGER},
123
+      city_id = #{cityId,jdbcType=INTEGER},
124
+      district_id = #{districtId,jdbcType=INTEGER},
125
+      longitude = #{longitude,jdbcType=VARCHAR},
126
+      latitude = #{latitude,jdbcType=VARCHAR}
127
+    where id = #{id,jdbcType=INTEGER}
128
+  </update>
129
+
130
+  <select id="selectByCommunityName" resultMap="BaseResultMap" parameterType="com.community.huiju.model.ToCommunities" >
131
+    select
132
+    <include refid="Base_Column_List" />
133
+    from to_communities
134
+    where 1=1
135
+    <if test="communityName != null and communityName != ''" >
136
+      and community_name like concat('%',#{communityName,jdbcType=VARCHAR},'%')
137
+    </if>
138
+    <if test="id != null and id != ''" >
139
+      and id = #{id,jdbcType=INTEGER}
140
+    </if>
141
+    <if test="provinceId != null and provinceId != ''" >
142
+      and province_id = #{provinceId,jdbcType=INTEGER}
143
+    </if>
144
+    <if test="cityId != null and cityId != ''" >
145
+      and city_id = #{cityId,jdbcType=INTEGER}
146
+    </if>
147
+    <if test="districtId != null and districtId != ''" >
148
+      and district_id = #{districtId,jdbcType=INTEGER}
149
+    </if>
150
+  </select>
151
+</mapper>

+ 1274
- 623
文档/MYSQL/smartCommunity.pdb
File diff suppressed because it is too large
Vedi File


+ 1270
- 619
文档/MYSQL/smartCommunity.pdm
File diff suppressed because it is too large
Vedi File


BIN
文档/需求/APP需求补充接口.xlsx Vedi File