胡轶钦 5 年之前
父節點
當前提交
7f666a4a6c

+ 6
- 0
pom.xml 查看文件

177
 				<profiles.active>gzysd</profiles.active>
177
 				<profiles.active>gzysd</profiles.active>
178
 			</properties>
178
 			</properties>
179
 		</profile>
179
 		</profile>
180
+		<profile>
181
+			<id>3.0</id>
182
+			<properties>
183
+				<profiles.active>3.0</profiles.active>
184
+			</properties>
185
+		</profile>
180
 	</profiles>
186
 	</profiles>
181
 	<build>
187
 	<build>
182
 		<plugins>
188
 		<plugins>

+ 8
- 1
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java 查看文件

716
     public String codeGenerator (){
716
     public String codeGenerator (){
717
         double r = Math.random();
717
         double r = Math.random();
718
         int i = (int)(r*100000);
718
         int i = (int)(r*100000);
719
-        return String.valueOf(i);
719
+        String str = String.valueOf(i);
720
+        if(str.length()>6){
721
+            int need = 6-str.length();
722
+            for(int j=0;j<need;j++){
723
+                str += "0";
724
+            }
725
+        }
726
+        return str;
720
     }
727
     }
721
 
728
 
722
     @Override
729
     @Override

+ 58
- 0
src/main/resources/application-3.0.yml 查看文件

1
+server:
2
+  port: 8080
3
+spring:
4
+  application:
5
+    name: estateagents
6
+  datasource:
7
+    username: estateagents
8
+      password: DQ@0lW##kBb2+-jPZ
9
+      url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/estateagents3.0?useUnicode=true&serverTimezone=CTT&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true&zeroDateTimeBehavior=convertToNull
10
+      driver-class-name: com.mysql.cj.jdbc.Driver
11
+    initial-size: 10 # 初始化连接数
12
+    max-active: 20 # 最大连接数
13
+    min-idle: 8 # 最小空闲数
14
+    max-idle: 8 # 最大空闲数
15
+  servlet:
16
+    multipart:
17
+      max-file-size: 10MB
18
+      max-request-size: 50MB
19
+
20
+##mybatis-plus
21
+mybatis-plus:
22
+  configuration:
23
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24
+    call-setters-on-nulls: true
25
+  mapper-locations: classpath:mapper/*.xml
26
+
27
+ali:
28
+  accessKeyId: LTAIkc75dpkJw8Lb
29
+  accessKeySecret: v4bvXCaix6vSDTCFfwSAdqV53iFEQw
30
+  oss:
31
+    endpoint: oss-cn-shanghai.aliyuncs.com
32
+    bucketName: estateagents
33
+    bucketURL: https://estateagents.oss-cn-shanghai.aliyuncs.com
34
+
35
+# 手机短信服务
36
+sms:
37
+  url: http://micservice.ycjcjy.com/sms
38
+  method: POST
39
+  contentType: "application/json;charset=UTF-8"
40
+  template:
41
+    code:
42
+    tel:
43
+    params:
44
+
45
+  # 以下为各模板 code
46
+  # 验证码
47
+  captcha:
48
+    # 模板 code
49
+    code: "0301"
50
+    # 有效时间 秒
51
+    expire: 120
52
+    # 验证码长度
53
+    size: 4
54
+    # 短信签名
55
+    sign: 营销云
56
+
57
+  visitor:
58
+    code: "0501"

+ 12
- 9
src/main/resources/mapper/TaPersonMapper.xml 查看文件

27
 
27
 
28
     <select id="selectBuildingConsultants" resultType="java.util.HashMap">
28
     <select id="selectBuildingConsultants" resultType="java.util.HashMap">
29
         SELECT
29
         SELECT
30
-            t.person_id AS id,
31
-            t.name,
32
-            t.company,
33
-            t.department,
34
-            t.post,
35
-            t.tel AS phone,
36
-            t.avatarurl AS avatar,
37
-            t.photo
30
+            u.user_idAS id,
31
+            u.user_name,
32
+            u.org_name,
33
+            u.department,
34
+            u.position,
35
+            u.phone,
36
+            u.avatar,
37
+            u.photo,
38
+            u.description,
39
+
38
         FROM
40
         FROM
39
             ta_person t
41
             ta_person t
40
-        JOIN ta_person_building s USING (person_id)
42
+        JOIN ta_person_building s USING (user_id)
43
+        left join ta_user u on t.user_id = u.user_id
41
         WHERE
44
         WHERE
42
             s.building_id = #{buildingId}
45
             s.building_id = #{buildingId}
43
         AND t.person_type = #{personType}
46
         AND t.person_type = #{personType}