فهرست منبع

公告使用myseql.UUID

phoenix 1 سال پیش
والد
کامیت
39954cf8d8

+ 1 - 1
src/main/java/com/xjrsoft/module/oa/entity/NewsRelation.java

@@ -28,7 +28,7 @@ public class NewsRelation implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty("主键")
-    private Long id;
+    private String id;
 
     @ApiModelProperty("新闻主键")
     private Long newsId;

+ 1 - 1
src/main/java/com/xjrsoft/module/oa/vo/NewsRelationVo.java

@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
 @Data
 public class NewsRelationVo {
     @ApiModelProperty("主键")
-    private Long id;
+    private String id;
 
     @ApiModelProperty("新闻主键")
     private Long newsId;

+ 4 - 4
src/main/resources/mapper/oa/NewsRelationMapper.xml

@@ -6,7 +6,7 @@
     <insert id="insertAllTeaStaff" parameterType="java.lang.Long">
         insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark)
             (select
-                     UNIX_TIMESTAMP()*(FLOOR(RAND() * (1000 - 1 + 1)) + 1)*(FLOOR(RAND() * (1000 - 1 + 1)) + 1),
+                 UUID(),
                      #{newsId},
                      t.id,
                      NOW(),
@@ -20,7 +20,7 @@
     <insert id="insertDeptUser">
         insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark)
         (select
-        UNIX_TIMESTAMP()*(FLOOR(RAND() * (1000 - 1 + 1)) + 1)*(FLOOR(RAND() * (1000 - 1 + 1)) + 1),
+        UUID(),
         #{newsId},
         t.id,
         NOW(),
@@ -43,7 +43,7 @@
     <insert id="insertClassUser">
         insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark)
         (select
-        UNIX_TIMESTAMP()*(FLOOR(RAND() * (1000 - 1 + 1)) + 1)*(FLOOR(RAND() * (1000 - 1 + 1)) + 1),
+        UUID(),
         #{newsId},
         t.id,
         NOW(),
@@ -64,7 +64,7 @@
     <insert id="insertPersonl">
         insert into xjr_oa_news_relation (id, news_id, user_id, create_date, read_mark)
         (select
-        UNIX_TIMESTAMP()*(FLOOR(RAND() * (1000 - 1 + 1)) + 1)*(FLOOR(RAND() * (1000 - 1 + 1)) + 1),
+        UUID(),
         #{newsId},
         t.id,
         NOW(),