徐勤民 5 ay önce
ebeveyn
işleme
76d21acf9f

+ 2 - 1
src/main/java/cn/org/bjca/trust/java/imserver/controller/sys/v1/TenantV1Controller.java

@@ -39,7 +39,8 @@ public class TenantV1Controller {
             t.setUserEmail(tenant.getUserEmail());
             t.setUserName(tenant.getUserName());
             t.setUserPhone(tenant.getUserPhone());
-            t.setTenantNo(TimeHelper.getTimeString("yyyyMMddHHmm") + (new Random().nextInt(899999999) + 100000000));
+            t.setAdmin(tenant.getTenantNo().isBlank());
+            t.setTenantNo(!tenant.getTenantNo().isBlank() ? tenant.getTenantNo() : TimeHelper.getTimeString("yyyyMMddHHmm") + (new Random().nextInt(899999999) + 100000000));
             tenantRepository.save(t);
 
 //            RabbitMQHelper.requestByGetAndParams("http://114.115.203.60:15672/api/vhosts/" + appid, "");

+ 1 - 0
src/main/java/cn/org/bjca/trust/java/imserver/entitys/sys/TenantEntity.java

@@ -15,4 +15,5 @@ public class TenantEntity extends AbstractBaseTimeEntity {
     private String userName;
     private String userPhone;
     private String userEmail;
+    private boolean isAdmin;
 }

+ 2 - 2
src/main/resources/application.properties

@@ -3,11 +3,11 @@ server.port=4561
 #????????????
 spring.jpa.hibernate.ddl-auto=update
 #mysql?????????????
-spring.datasource.url = jdbc:mysql://114.115.203.60:3306/szyx-im?serverTimezone=Asia/Shanghai
+spring.datasource.url = jdbc:mysql://39.107.53.187:3306/szyx-im?serverTimezone=Asia/Shanghai
 #??????
 spring.datasource.username = szyx-im
 #?????
-spring.datasource.password = nGFYwCMYMNELCeRp
+spring.datasource.password = xdrKhnaLrSBbrmzx
 #mysql???????????
 spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
 #jpa?????????Hibernate?sql(??)