Browse Source

:sparkles: 数据库查询为null是也调用java的setter方法

lag 7 months ago
parent
commit
881b30bb6a

+ 2 - 0
ghjg-item-datashare-server/src/main/resources/application.yml

@@ -46,6 +46,8 @@ mybatis-plus:
     db-config:
       id-type: input
   type-enums-package: com.shanghaichengdi.ghjgitem.enums
+  configuration:
+    call-setters-on-nulls: true
 static:
   file:
     notPass:

+ 38 - 36
ghjg-item-datashare-server/src/main/resources/mapper/CommonMapper.xml

@@ -179,43 +179,45 @@
   </select>
 
   <select id="selectBoatReportInfoList" resultType="com.shanghaichengdi.ghjgitem.vo.BoatReportInfoVo">
-    select t.REPORT_ID,
-    t.SHIP_ID,
-    t.REPORT_NO,
-    t.ORG_CODE,
-    t.REPORT_PORT_NAME,
-    t.REPORT_PORT_CODE,
-    t.ARRIVAL_OR_LEAVE,
-    t.ARRIVAL_REPORT_ID,
-    t.NEXT_PORT_NAME,
-    t.NEXT_PORT_CODE,
-    t.REPORT_TIME,
-    t.EXPECT_TIME,
-    t.IF_ANCHORED,
-    t.DRAFT_FORWARD,
-    t.AFT_DRAFT,
-    t.BERTH_CODE,
-    t.BERTH_NAME,
-    t.ACTUAL_CARRYING_CAPACITY,
-    t.PORT_CARGO,
-    t.REAL_DANGER_CARGO,
-    t.PORT_DANGER_CARGO,
-    t.ACTUAL_CAPACITY,
-    t.PORT_PASSENGER,
-    t.REAL_VEHICLE,
-    t.PORT_VEHICLE,
-    t.NUM_OF_BARGE,
-    t.PORT_BARGE,
-    t.REAL_CONTAINER_QAY,
-    t.PORT_CONTAINER_QAY,
-    t.IF_REVOKE,
-    t.VOYAGE_REPORT,
-    t.FREQUENCY,
-    t.NAVIGATION_SECTION,
-    t.PRE_PORT_NAME,
-    t.PRE_PORT_CODE,
+    select t.REPORT_ID reportId,
+    t.SHIP_ID shipId,
+    t.REPORT_NO reportNo,
+    t.ORG_CODE orgCode,
+    t.REPORT_PORT_NAME reportPortName,
+    t.REPORT_PORT_CODE reportPortCode,
+    t.ARRIVAL_OR_LEAVE arrivalOrLeave,
+    t.ARRIVAL_REPORT_ID arrivalReportId,
+    t.NEXT_PORT_NAME nextPortName,
+    t.NEXT_PORT_CODE nextPortCode,
+    t.REPORT_TIME reportTime,
+    t.EXPECT_TIME expectTime,
+    t.IF_ANCHORED ifAnchored,
+    t.DRAFT_FORWARD draftForward,
+    t.AFT_DRAFT aftDraft,
+    t.BERTH_CODE berthCode,
+    t.BERTH_NAME berthName,
+    t.ACTUAL_CARRYING_CAPACITY actualCarryingCapacity,
+    t.PORT_CARGO portCargo,
+    t.REAL_DANGER_CARGO realDangerCargo,
+    t.PORT_DANGER_CARGO portDangerCargo,
+    t.ACTUAL_CAPACITY actualCapacity,
+    t.PORT_PASSENGER portPassenger,
+    t.REAL_VEHICLE realVehicle,
+    t.PORT_VEHICLE portVehicle,
+    t.NUM_OF_BARGE numOfBarge,
+    t.PORT_BARGE portBarge,
+    t.REAL_CONTAINER_QAY realContainerQay,
+    t.PORT_CONTAINER_QAY portContainerQay,
+    t.IF_REVOKE ifRevoke,
+    t.VOYAGE_REPORT voyageReport,
+    t.FREQUENCY frequency,
+    t.NAVIGATION_SECTION navigationSection,
+    t.PRE_PORT_NAME prePortName,
+    t.PRE_PORT_CODE prePortCode,
     t.SHIP_NAME_CN shipName,
-    t.MMSI
+    t.MMSI mmsi,
+    t.BID_NAME bidName,
+    t.MOBILE_PHONE mobilePhone
     from GHJG_BASICS.c_cb_ship_eep_report_rec partition(${partition}) t
     left join ghjg_basics.dict_district_port p on p.berthname = t.berth_name and p.valid = '有效'
     and p.lochus != '注销'

+ 2 - 0
ghjg-item-datashare-server/src/main/resources/profile/dev/application.yml

@@ -46,6 +46,8 @@ mybatis-plus:
     db-config:
       id-type: input
   type-enums-package: com.shanghaichengdi.ghjgitem.enums
+  configuration:
+    call-setters-on-nulls: true
 static:
   file:
     notPass:

+ 2 - 0
ghjg-item-datashare-server/src/main/resources/profile/pro/application.yml

@@ -46,6 +46,8 @@ mybatis-plus:
     db-config:
       id-type: input
   type-enums-package: com.shanghaichengdi.ghjgitem.enums
+  configuration:
+    call-setters-on-nulls: true
 static:
   file:
     notPass:

+ 2 - 0
ghjg-item-datashare-server/src/main/resources/profile/test/application.yml

@@ -46,6 +46,8 @@ mybatis-plus:
     db-config:
       id-type: input
   type-enums-package: com.shanghaichengdi.ghjgitem.enums
+  configuration:
+    call-setters-on-nulls: true
 static:
   file:
     notPass: