tao.mo

task-schedule | 修改 | 推送IMP001报文开发

mt
2024年11月20日17:55:54
Showing 29 changed files with 454 additions and 91 deletions
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
16 <result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" /> 16 <result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" />
17 <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" /> 17 <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" />
18 <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" /> 18 <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" />
19 + <result column="EXT1" jdbcType="VARCHAR" property="ext1" />
20 + <result column="EXT2" jdbcType="NUMERIC" property="ext2" />
21 + <result column="EXT3" jdbcType="TIMESTAMP" property="ext3" />
19 </resultMap> 22 </resultMap>
20 <sql id="Example_Where_Clause"> 23 <sql id="Example_Where_Clause">
21 <where> 24 <where>
...@@ -77,7 +80,7 @@ ...@@ -77,7 +80,7 @@
77 </sql> 80 </sql>
78 <sql id="Base_Column_List"> 81 <sql id="Base_Column_List">
79 ID, CODE, NAME, VALUE, TYPE_CODE, TYPE_NAME, STATUS, DESCRIPTION, CREATE_TIME, CREATE_USER_ID, 82 ID, CODE, NAME, VALUE, TYPE_CODE, TYPE_NAME, STATUS, DESCRIPTION, CREATE_TIME, CREATE_USER_ID,
80 - CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME 83 + CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, EXT1, EXT2, EXT3
81 </sql> 84 </sql>
82 <select id="selectByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultMap="BaseResultMap"> 85 <select id="selectByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultMap="BaseResultMap">
83 <include refid="OracleDialectPrefix" /> 86 <include refid="OracleDialectPrefix" />
...@@ -120,12 +123,14 @@ ...@@ -120,12 +123,14 @@
120 VALUE, TYPE_CODE, TYPE_NAME, 123 VALUE, TYPE_CODE, TYPE_NAME,
121 STATUS, DESCRIPTION, CREATE_TIME, 124 STATUS, DESCRIPTION, CREATE_TIME,
122 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, 125 CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
123 - MODIFY_USER_ID, MODIFY_USER_NAME) 126 + MODIFY_USER_ID, MODIFY_USER_NAME, EXT1,
127 + EXT2, EXT3)
124 values (#{id,jdbcType=NUMERIC}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 128 values (#{id,jdbcType=NUMERIC}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
125 #{value,jdbcType=VARCHAR}, #{typeCode,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR}, 129 #{value,jdbcType=VARCHAR}, #{typeCode,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR},
126 #{status,jdbcType=NUMERIC}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 130 #{status,jdbcType=NUMERIC}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
127 #{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 131 #{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
128 - #{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}) 132 + #{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR},
133 + #{ext2,jdbcType=NUMERIC}, #{ext3,jdbcType=TIMESTAMP})
129 </insert> 134 </insert>
130 <insert id="insertSelective" parameterType="com.fedex.connect.common.model.sys.ParamConfig"> 135 <insert id="insertSelective" parameterType="com.fedex.connect.common.model.sys.ParamConfig">
131 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> 136 <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
...@@ -173,6 +178,15 @@ ...@@ -173,6 +178,15 @@
173 <if test="modifyUserName != null"> 178 <if test="modifyUserName != null">
174 MODIFY_USER_NAME, 179 MODIFY_USER_NAME,
175 </if> 180 </if>
181 + <if test="ext1 != null">
182 + EXT1,
183 + </if>
184 + <if test="ext2 != null">
185 + EXT2,
186 + </if>
187 + <if test="ext3 != null">
188 + EXT3,
189 + </if>
176 </trim> 190 </trim>
177 <trim prefix="values (" suffix=")" suffixOverrides=","> 191 <trim prefix="values (" suffix=")" suffixOverrides=",">
178 #{id,jdbcType=NUMERIC}, 192 #{id,jdbcType=NUMERIC},
...@@ -215,6 +229,15 @@ ...@@ -215,6 +229,15 @@
215 <if test="modifyUserName != null"> 229 <if test="modifyUserName != null">
216 #{modifyUserName,jdbcType=VARCHAR}, 230 #{modifyUserName,jdbcType=VARCHAR},
217 </if> 231 </if>
232 + <if test="ext1 != null">
233 + #{ext1,jdbcType=VARCHAR},
234 + </if>
235 + <if test="ext2 != null">
236 + #{ext2,jdbcType=NUMERIC},
237 + </if>
238 + <if test="ext3 != null">
239 + #{ext3,jdbcType=TIMESTAMP},
240 + </if>
218 </trim> 241 </trim>
219 </insert> 242 </insert>
220 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultType="java.lang.Long"> 243 <select id="countByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultType="java.lang.Long">
...@@ -268,6 +291,15 @@ ...@@ -268,6 +291,15 @@
268 <if test="record.modifyUserName != null"> 291 <if test="record.modifyUserName != null">
269 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, 292 MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
270 </if> 293 </if>
294 + <if test="record.ext1 != null">
295 + EXT1 = #{record.ext1,jdbcType=VARCHAR},
296 + </if>
297 + <if test="record.ext2 != null">
298 + EXT2 = #{record.ext2,jdbcType=NUMERIC},
299 + </if>
300 + <if test="record.ext3 != null">
301 + EXT3 = #{record.ext3,jdbcType=TIMESTAMP},
302 + </if>
271 </set> 303 </set>
272 <if test="_parameter != null"> 304 <if test="_parameter != null">
273 <include refid="Update_By_Example_Where_Clause" /> 305 <include refid="Update_By_Example_Where_Clause" />
...@@ -288,7 +320,10 @@ ...@@ -288,7 +320,10 @@
288 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR}, 320 CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR},
289 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP}, 321 MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
290 MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC}, 322 MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC},
291 - MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR} 323 + MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
324 + EXT1 = #{record.ext1,jdbcType=VARCHAR},
325 + EXT2 = #{record.ext2,jdbcType=NUMERIC},
326 + EXT3 = #{record.ext3,jdbcType=TIMESTAMP}
292 <if test="_parameter != null"> 327 <if test="_parameter != null">
293 <include refid="Update_By_Example_Where_Clause" /> 328 <include refid="Update_By_Example_Where_Clause" />
294 </if> 329 </if>
...@@ -335,6 +370,15 @@ ...@@ -335,6 +370,15 @@
335 <if test="modifyUserName != null"> 370 <if test="modifyUserName != null">
336 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, 371 MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
337 </if> 372 </if>
373 + <if test="ext1 != null">
374 + EXT1 = #{ext1,jdbcType=VARCHAR},
375 + </if>
376 + <if test="ext2 != null">
377 + EXT2 = #{ext2,jdbcType=NUMERIC},
378 + </if>
379 + <if test="ext3 != null">
380 + EXT3 = #{ext3,jdbcType=TIMESTAMP},
381 + </if>
338 </set> 382 </set>
339 where ID = #{id,jdbcType=NUMERIC} 383 where ID = #{id,jdbcType=NUMERIC}
340 </update> 384 </update>
...@@ -352,7 +396,10 @@ ...@@ -352,7 +396,10 @@
352 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR}, 396 CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR},
353 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP}, 397 MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
354 MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC}, 398 MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC},
355 - MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR} 399 + MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
400 + EXT1 = #{ext1,jdbcType=VARCHAR},
401 + EXT2 = #{ext2,jdbcType=NUMERIC},
402 + EXT3 = #{ext3,jdbcType=TIMESTAMP}
356 where ID = #{id,jdbcType=NUMERIC} 403 where ID = #{id,jdbcType=NUMERIC}
357 </update> 404 </update>
358 <sql id="OracleDialectPrefix"> 405 <sql id="OracleDialectPrefix">
......
...@@ -78,6 +78,21 @@ public class ParamConfig implements Serializable { ...@@ -78,6 +78,21 @@ public class ParamConfig implements Serializable {
78 */ 78 */
79 private String modifyUserName; 79 private String modifyUserName;
80 80
81 + /**
82 + * 扩展字段1字符串
83 + */
84 + private String ext1;
85 +
86 + /**
87 + * 扩展字段2数字
88 + */
89 + private Long ext2;
90 +
91 + /**
92 + * 扩展字段3日期
93 + */
94 + private Date ext3;
95 +
81 private static final long serialVersionUID = 1L; 96 private static final long serialVersionUID = 1L;
82 97
83 public Long getId() { 98 public Long getId() {
...@@ -192,6 +207,30 @@ public class ParamConfig implements Serializable { ...@@ -192,6 +207,30 @@ public class ParamConfig implements Serializable {
192 this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim(); 207 this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim();
193 } 208 }
194 209
210 + public String getExt1() {
211 + return ext1;
212 + }
213 +
214 + public void setExt1(String ext1) {
215 + this.ext1 = ext1 == null ? null : ext1.trim();
216 + }
217 +
218 + public Long getExt2() {
219 + return ext2;
220 + }
221 +
222 + public void setExt2(Long ext2) {
223 + this.ext2 = ext2;
224 + }
225 +
226 + public Date getExt3() {
227 + return ext3;
228 + }
229 +
230 + public void setExt3(Date ext3) {
231 + this.ext3 = ext3;
232 + }
233 +
195 @Override 234 @Override
196 public String toString() { 235 public String toString() {
197 StringBuilder sb = new StringBuilder(); 236 StringBuilder sb = new StringBuilder();
...@@ -212,6 +251,9 @@ public class ParamConfig implements Serializable { ...@@ -212,6 +251,9 @@ public class ParamConfig implements Serializable {
212 sb.append(", modifyTime=").append(modifyTime); 251 sb.append(", modifyTime=").append(modifyTime);
213 sb.append(", modifyUserId=").append(modifyUserId); 252 sb.append(", modifyUserId=").append(modifyUserId);
214 sb.append(", modifyUserName=").append(modifyUserName); 253 sb.append(", modifyUserName=").append(modifyUserName);
254 + sb.append(", ext1=").append(ext1);
255 + sb.append(", ext2=").append(ext2);
256 + sb.append(", ext3=").append(ext3);
215 sb.append(", serialVersionUID=").append(serialVersionUID); 257 sb.append(", serialVersionUID=").append(serialVersionUID);
216 sb.append("]"); 258 sb.append("]");
217 return sb.toString(); 259 return sb.toString();
......
...@@ -1044,6 +1044,196 @@ public class ParamConfigExample { ...@@ -1044,6 +1044,196 @@ public class ParamConfigExample {
1044 addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName"); 1044 addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName");
1045 return (Criteria) this; 1045 return (Criteria) this;
1046 } 1046 }
1047 +
1048 + public Criteria andExt1IsNull() {
1049 + addCriterion("EXT1 is null");
1050 + return (Criteria) this;
1051 + }
1052 +
1053 + public Criteria andExt1IsNotNull() {
1054 + addCriterion("EXT1 is not null");
1055 + return (Criteria) this;
1056 + }
1057 +
1058 + public Criteria andExt1EqualTo(String value) {
1059 + addCriterion("EXT1 =", value, "ext1");
1060 + return (Criteria) this;
1061 + }
1062 +
1063 + public Criteria andExt1NotEqualTo(String value) {
1064 + addCriterion("EXT1 <>", value, "ext1");
1065 + return (Criteria) this;
1066 + }
1067 +
1068 + public Criteria andExt1GreaterThan(String value) {
1069 + addCriterion("EXT1 >", value, "ext1");
1070 + return (Criteria) this;
1071 + }
1072 +
1073 + public Criteria andExt1GreaterThanOrEqualTo(String value) {
1074 + addCriterion("EXT1 >=", value, "ext1");
1075 + return (Criteria) this;
1076 + }
1077 +
1078 + public Criteria andExt1LessThan(String value) {
1079 + addCriterion("EXT1 <", value, "ext1");
1080 + return (Criteria) this;
1081 + }
1082 +
1083 + public Criteria andExt1LessThanOrEqualTo(String value) {
1084 + addCriterion("EXT1 <=", value, "ext1");
1085 + return (Criteria) this;
1086 + }
1087 +
1088 + public Criteria andExt1Like(String value) {
1089 + addCriterion("EXT1 like", value, "ext1");
1090 + return (Criteria) this;
1091 + }
1092 +
1093 + public Criteria andExt1NotLike(String value) {
1094 + addCriterion("EXT1 not like", value, "ext1");
1095 + return (Criteria) this;
1096 + }
1097 +
1098 + public Criteria andExt1In(List<String> values) {
1099 + addCriterion("EXT1 in", values, "ext1");
1100 + return (Criteria) this;
1101 + }
1102 +
1103 + public Criteria andExt1NotIn(List<String> values) {
1104 + addCriterion("EXT1 not in", values, "ext1");
1105 + return (Criteria) this;
1106 + }
1107 +
1108 + public Criteria andExt1Between(String value1, String value2) {
1109 + addCriterion("EXT1 between", value1, value2, "ext1");
1110 + return (Criteria) this;
1111 + }
1112 +
1113 + public Criteria andExt1NotBetween(String value1, String value2) {
1114 + addCriterion("EXT1 not between", value1, value2, "ext1");
1115 + return (Criteria) this;
1116 + }
1117 +
1118 + public Criteria andExt2IsNull() {
1119 + addCriterion("EXT2 is null");
1120 + return (Criteria) this;
1121 + }
1122 +
1123 + public Criteria andExt2IsNotNull() {
1124 + addCriterion("EXT2 is not null");
1125 + return (Criteria) this;
1126 + }
1127 +
1128 + public Criteria andExt2EqualTo(Long value) {
1129 + addCriterion("EXT2 =", value, "ext2");
1130 + return (Criteria) this;
1131 + }
1132 +
1133 + public Criteria andExt2NotEqualTo(Long value) {
1134 + addCriterion("EXT2 <>", value, "ext2");
1135 + return (Criteria) this;
1136 + }
1137 +
1138 + public Criteria andExt2GreaterThan(Long value) {
1139 + addCriterion("EXT2 >", value, "ext2");
1140 + return (Criteria) this;
1141 + }
1142 +
1143 + public Criteria andExt2GreaterThanOrEqualTo(Long value) {
1144 + addCriterion("EXT2 >=", value, "ext2");
1145 + return (Criteria) this;
1146 + }
1147 +
1148 + public Criteria andExt2LessThan(Long value) {
1149 + addCriterion("EXT2 <", value, "ext2");
1150 + return (Criteria) this;
1151 + }
1152 +
1153 + public Criteria andExt2LessThanOrEqualTo(Long value) {
1154 + addCriterion("EXT2 <=", value, "ext2");
1155 + return (Criteria) this;
1156 + }
1157 +
1158 + public Criteria andExt2In(List<Long> values) {
1159 + addCriterion("EXT2 in", values, "ext2");
1160 + return (Criteria) this;
1161 + }
1162 +
1163 + public Criteria andExt2NotIn(List<Long> values) {
1164 + addCriterion("EXT2 not in", values, "ext2");
1165 + return (Criteria) this;
1166 + }
1167 +
1168 + public Criteria andExt2Between(Long value1, Long value2) {
1169 + addCriterion("EXT2 between", value1, value2, "ext2");
1170 + return (Criteria) this;
1171 + }
1172 +
1173 + public Criteria andExt2NotBetween(Long value1, Long value2) {
1174 + addCriterion("EXT2 not between", value1, value2, "ext2");
1175 + return (Criteria) this;
1176 + }
1177 +
1178 + public Criteria andExt3IsNull() {
1179 + addCriterion("EXT3 is null");
1180 + return (Criteria) this;
1181 + }
1182 +
1183 + public Criteria andExt3IsNotNull() {
1184 + addCriterion("EXT3 is not null");
1185 + return (Criteria) this;
1186 + }
1187 +
1188 + public Criteria andExt3EqualTo(Date value) {
1189 + addCriterion("EXT3 =", value, "ext3");
1190 + return (Criteria) this;
1191 + }
1192 +
1193 + public Criteria andExt3NotEqualTo(Date value) {
1194 + addCriterion("EXT3 <>", value, "ext3");
1195 + return (Criteria) this;
1196 + }
1197 +
1198 + public Criteria andExt3GreaterThan(Date value) {
1199 + addCriterion("EXT3 >", value, "ext3");
1200 + return (Criteria) this;
1201 + }
1202 +
1203 + public Criteria andExt3GreaterThanOrEqualTo(Date value) {
1204 + addCriterion("EXT3 >=", value, "ext3");
1205 + return (Criteria) this;
1206 + }
1207 +
1208 + public Criteria andExt3LessThan(Date value) {
1209 + addCriterion("EXT3 <", value, "ext3");
1210 + return (Criteria) this;
1211 + }
1212 +
1213 + public Criteria andExt3LessThanOrEqualTo(Date value) {
1214 + addCriterion("EXT3 <=", value, "ext3");
1215 + return (Criteria) this;
1216 + }
1217 +
1218 + public Criteria andExt3In(List<Date> values) {
1219 + addCriterion("EXT3 in", values, "ext3");
1220 + return (Criteria) this;
1221 + }
1222 +
1223 + public Criteria andExt3NotIn(List<Date> values) {
1224 + addCriterion("EXT3 not in", values, "ext3");
1225 + return (Criteria) this;
1226 + }
1227 +
1228 + public Criteria andExt3Between(Date value1, Date value2) {
1229 + addCriterion("EXT3 between", value1, value2, "ext3");
1230 + return (Criteria) this;
1231 + }
1232 +
1233 + public Criteria andExt3NotBetween(Date value1, Date value2) {
1234 + addCriterion("EXT3 not between", value1, value2, "ext3");
1235 + return (Criteria) this;
1236 + }
1047 } 1237 }
1048 1238
1049 public static class Criteria extends GeneratedCriteria { 1239 public static class Criteria extends GeneratedCriteria {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 sys:系统 系统相关表,例如kafka表 40 sys:系统 系统相关表,例如kafka表
41 log: 日志 日志记录表,例如邮件发送日志表 41 log: 日志 日志记录表,例如邮件发送日志表
42 --> 42 -->
43 - <javaModelGenerator targetPackage="com.fedex.connect.common.model.biz" targetProject="src/main/java"> 43 + <javaModelGenerator targetPackage="com.fedex.connect.common.model.sys" targetProject="src/main/java">
44 <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性--> 44 <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性-->
45 <property name="enableSubPackages" value="false"/> 45 <property name="enableSubPackages" value="false"/>
46 <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false--> 46 <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false-->
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
52 </javaModelGenerator> 52 </javaModelGenerator>
53 53
54 <!-- 生成映射文件*.xml的位置--> 54 <!-- 生成映射文件*.xml的位置-->
55 - <sqlMapGenerator targetPackage="mapper.biz" targetProject="src/main/java/com/fedex/connect/common"> 55 + <sqlMapGenerator targetPackage="mapper.sys" targetProject="src/main/java/com/fedex/connect/common">
56 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> 56 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
57 <property name="enableSubPackages" value="false"/> 57 <property name="enableSubPackages" value="false"/>
58 </sqlMapGenerator> 58 </sqlMapGenerator>
59 59
60 <!-- 生成DAO的包名和位置 --> 60 <!-- 生成DAO的包名和位置 -->
61 - <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.biz" targetProject="src/main/java"> 61 + <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.sys" targetProject="src/main/java">
62 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> 62 <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
63 <property name="enableSubPackages" value="false"/> 63 <property name="enableSubPackages" value="false"/>
64 </javaClientGenerator> 64 </javaClientGenerator>
...@@ -73,12 +73,12 @@ ...@@ -73,12 +73,12 @@
73 generatedKey 指定KEY,Oracle需要指定序列。 73 generatedKey 指定KEY,Oracle需要指定序列。
74 sqlStatement 指定序列名称 74 sqlStatement 指定序列名称
75 --> 75 -->
76 - <table schema="ICLEARIMP" tableName="T_BIZ_USER_CONSIGNMENT_MAPPING" domainObjectName="UserConsignmentMapping" 76 +<!-- <table schema="ICLEARIMP" tableName="T_BIZ_USER_CONSIGNMENT_MAPPING" domainObjectName="UserConsignmentMapping"-->
77 - enableCountByExample="true" enableUpdateByExample="true" 77 +<!-- enableCountByExample="true" enableUpdateByExample="true"-->
78 - enableDeleteByExample="true" enableSelectByExample="true" 78 +<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
79 - selectByExampleQueryId="true"> 79 +<!-- selectByExampleQueryId="true">-->
80 - <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL" /> 80 +<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL" />-->
81 - </table> 81 +<!-- </table>-->
82 82
83 83
84 <!-- <table schema="ICLEARIMP" tableName="T_LOG_OPERATION" domainObjectName="Operation"--> 84 <!-- <table schema="ICLEARIMP" tableName="T_LOG_OPERATION" domainObjectName="Operation"-->
...@@ -169,12 +169,12 @@ ...@@ -169,12 +169,12 @@
169 <!-- selectByExampleQueryId="true">--> 169 <!-- selectByExampleQueryId="true">-->
170 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />--> 170 <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />-->
171 <!-- </table>--> 171 <!-- </table>-->
172 -<!-- <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"--> 172 + <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"
173 -<!-- enableCountByExample="true" enableUpdateByExample="true"--> 173 + enableCountByExample="true" enableUpdateByExample="true"
174 -<!-- enableDeleteByExample="true" enableSelectByExample="true"--> 174 + enableDeleteByExample="true" enableSelectByExample="true"
175 -<!-- selectByExampleQueryId="true">--> 175 + selectByExampleQueryId="true">
176 -<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />--> 176 + <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />
177 -<!-- </table>--> 177 + </table>
178 <!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"--> 178 <!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"-->
179 <!-- enableCountByExample="true" enableUpdateByExample="true"--> 179 <!-- enableCountByExample="true" enableUpdateByExample="true"-->
180 <!-- enableDeleteByExample="true" enableSelectByExample="true"--> 180 <!-- enableDeleteByExample="true" enableSelectByExample="true"-->
......
...@@ -21,6 +21,8 @@ public interface ParamConfigConstants { ...@@ -21,6 +21,8 @@ public interface ParamConfigConstants {
21 * @Date 2024/11/20 21 * @Date 2024/11/20
22 */ 22 */
23 interface TASK_PARAM_KEYS{ 23 interface TASK_PARAM_KEYS{
24 + //推送TW001间隔配置key
25 + String PUSH_IMP001_INTERVAL = "push_imp001_interval";
24 //推送进口文件定时任务处理数量 26 //推送进口文件定时任务处理数量
25 String PUSH_CON_NUMBER = "push_con_number"; 27 String PUSH_CON_NUMBER = "push_con_number";
26 // 28 //
......
...@@ -2,17 +2,18 @@ package com.fedex.connect.common.dependencies.repository.base; ...@@ -2,17 +2,18 @@ package com.fedex.connect.common.dependencies.repository.base;
2 2
3 import com.fedex.connect.common.dao.bi.DictionaryEntriesMapper; 3 import com.fedex.connect.common.dao.bi.DictionaryEntriesMapper;
4 import com.fedex.connect.common.dao.log.OperationMapper; 4 import com.fedex.connect.common.dao.log.OperationMapper;
5 +import com.fedex.connect.common.dao.sys.ParamConfigMapper;
5 import com.fedex.connect.common.dao.sys.RedisSlabMapper; 6 import com.fedex.connect.common.dao.sys.RedisSlabMapper;
6 import com.fedex.connect.common.dependencies.repository.dao.UserMapperExt; 7 import com.fedex.connect.common.dependencies.repository.dao.UserMapperExt;
7 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
8 9
9 public class BaseDao { 10 public class BaseDao {
10 @Autowired 11 @Autowired
11 - public UserMapperExt userMapperExt; 12 + protected UserMapperExt userMapperExt;
12 @Autowired 13 @Autowired
13 - public RedisSlabMapper redisSlabMapper; 14 + protected RedisSlabMapper redisSlabMapper;
14 @Autowired 15 @Autowired
15 - public DictionaryEntriesMapper dictionaryEntriesMapper; 16 + protected DictionaryEntriesMapper dictionaryEntriesMapper;
16 @Autowired 17 @Autowired
17 - public OperationMapper operationMapper; 18 + protected OperationMapper operationMapper;
18 } 19 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -134,9 +134,13 @@ public class DateUtil { ...@@ -134,9 +134,13 @@ public class DateUtil {
134 } 134 }
135 135
136 public static void main(String[] args){ 136 public static void main(String[] args){
137 - String prematchFltDate = "2019-06-11 15:52:52"; 137 + String ddd = "2024-11-20 16:00:00";
138 - prematchFltDate = prematchFltDate.length()>10 ? prematchFltDate.substring(10): prematchFltDate; 138 + Date beginDate = parse(ddd,PATTERN_DATE_TIME);
139 - logger.info(prematchFltDate); 139 + Date endDate = new Date();
140 + long diffInMilliseconds = Math.abs(endDate.getTime() - beginDate.getTime());
141 + // 引用形式的描述信息
142 + long diffInMinutes = diffInMilliseconds / (60 * 1000); // 将毫秒差值转换为分钟数
143 + System.out.println(diffInMinutes);
140 } 144 }
141 145
142 /** 146 /**
......
...@@ -12,7 +12,7 @@ import com.fedex.connect.manager.repository.dao.RoleExtMapper; ...@@ -12,7 +12,7 @@ import com.fedex.connect.manager.repository.dao.RoleExtMapper;
12 import com.fedex.connect.manager.repository.dao.RolePrivilegeExtMapper; 12 import com.fedex.connect.manager.repository.dao.RolePrivilegeExtMapper;
13 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
14 14
15 -public class BaseDao { 15 +public class AbstractDaoRepository {
16 @Autowired 16 @Autowired
17 public UserLoginInfoMapper userLoginInfoMapper; 17 public UserLoginInfoMapper userLoginInfoMapper;
18 @Autowired 18 @Autowired
......
...@@ -5,6 +5,6 @@ import org.apache.ibatis.annotations.Select; ...@@ -5,6 +5,6 @@ import org.apache.ibatis.annotations.Select;
5 5
6 public interface ParamConfigExtMapper { 6 public interface ParamConfigExtMapper {
7 7
8 - @Select("SELECT VALUE FROM T_SYS_PARAM_CONFIG WHERE CODE = #{code}") 8 + @Select("SELECT VALUE FROM T_SYS_PARAM_CONFIG WHERE CODE = #{code} AND STATUS = 1")
9 String findValueByCode(@Param("code") String code); 9 String findValueByCode(@Param("code") String code);
10 } 10 }
......
...@@ -3,7 +3,7 @@ package com.fedex.connect.manager.repository.repo.bi.impl; ...@@ -3,7 +3,7 @@ package com.fedex.connect.manager.repository.repo.bi.impl;
3 import com.fedex.connect.common.dependencies.cache.CacheSystem; 3 import com.fedex.connect.common.dependencies.cache.CacheSystem;
4 import com.fedex.connect.common.dependencies.contants.DictionaryConstants; 4 import com.fedex.connect.common.dependencies.contants.DictionaryConstants;
5 import com.fedex.connect.common.model.bi.DictionaryEntries; 5 import com.fedex.connect.common.model.bi.DictionaryEntries;
6 -import com.fedex.connect.manager.repository.base.BaseDao; 6 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
7 import com.fedex.connect.manager.repository.repo.bi.IDicEntriesRepository; 7 import com.fedex.connect.manager.repository.repo.bi.IDicEntriesRepository;
8 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Repository; 9 import org.springframework.stereotype.Repository;
...@@ -16,7 +16,7 @@ import java.util.List; ...@@ -16,7 +16,7 @@ import java.util.List;
16 * @Date 2024/11/6 16 * @Date 2024/11/6
17 */ 17 */
18 @Repository 18 @Repository
19 -public class DicEntriesRepositoryImpl extends BaseDao implements IDicEntriesRepository { 19 +public class DicEntriesRepositoryImpl extends AbstractDaoRepository implements IDicEntriesRepository {
20 @Autowired 20 @Autowired
21 CacheSystem cacheSystem; 21 CacheSystem cacheSystem;
22 22
......
1 package com.fedex.connect.manager.repository.repo.log.impl; 1 package com.fedex.connect.manager.repository.repo.log.impl;
2 2
3 import com.fedex.connect.common.model.log.UserLoginInfo; 3 import com.fedex.connect.common.model.log.UserLoginInfo;
4 -import com.fedex.connect.manager.repository.base.BaseDao; 4 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
5 import com.fedex.connect.manager.repository.repo.log.IUserLoginLogRepository; 5 import com.fedex.connect.manager.repository.repo.log.IUserLoginLogRepository;
6 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
7 7
8 @Repository 8 @Repository
9 -public class UserLoginLogRepositoryImpl extends BaseDao implements IUserLoginLogRepository { 9 +public class UserLoginLogRepositoryImpl extends AbstractDaoRepository implements IUserLoginLogRepository {
10 10
11 @Override 11 @Override
12 public int insert(UserLoginInfo userLoginInfo) { 12 public int insert(UserLoginInfo userLoginInfo) {
......
1 package com.fedex.connect.manager.repository.repo.sys; 1 package com.fedex.connect.manager.repository.repo.sys;
2 2
3 -public interface IParamConfigExtRepository { 3 +public interface IParamConfigRepository {
4 String findValueByCode(String code); 4 String findValueByCode(String code);
5 } 5 }
......
1 package com.fedex.connect.manager.repository.repo.sys.impl; 1 package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 -import com.fedex.connect.manager.repository.base.BaseDao; 3 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
4 -import com.fedex.connect.manager.repository.repo.sys.IParamConfigExtRepository; 4 +import com.fedex.connect.manager.repository.repo.sys.IParamConfigRepository;
5 import org.springframework.stereotype.Repository; 5 import org.springframework.stereotype.Repository;
6 6
7 @Repository 7 @Repository
8 -public class ParamConfigExtRepositoryImpl extends BaseDao implements IParamConfigExtRepository { 8 +public class ParamConfigRepositoryImpl extends AbstractDaoRepository implements IParamConfigRepository {
9 9
10 @Override 10 @Override
11 public String findValueByCode(String code) { 11 public String findValueByCode(String code) {
......
1 package com.fedex.connect.manager.repository.repo.sys.impl; 1 package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.model.sys.Privilege; 3 import com.fedex.connect.common.model.sys.Privilege;
4 -import com.fedex.connect.manager.repository.base.BaseDao; 4 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
5 import com.fedex.connect.manager.repository.repo.sys.IPrivilegeRepository; 5 import com.fedex.connect.manager.repository.repo.sys.IPrivilegeRepository;
6 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
7 7
8 import java.util.List; 8 import java.util.List;
9 9
10 @Repository 10 @Repository
11 -public class PrivilegeRepositoryImpl extends BaseDao implements IPrivilegeRepository { 11 +public class PrivilegeRepositoryImpl extends AbstractDaoRepository implements IPrivilegeRepository {
12 12
13 @Override 13 @Override
14 public List<Privilege> findPrivilegesByIds(List<Long> ids) { 14 public List<Privilege> findPrivilegesByIds(List<Long> ids) {
......
...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl; ...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.model.sys.RedisSlab; 3 import com.fedex.connect.common.model.sys.RedisSlab;
4 import com.fedex.connect.common.model.sys.RedisSlabExample; 4 import com.fedex.connect.common.model.sys.RedisSlabExample;
5 -import com.fedex.connect.manager.repository.base.BaseDao; 5 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
6 import com.fedex.connect.manager.repository.repo.sys.IRedisSlabRepository; 6 import com.fedex.connect.manager.repository.repo.sys.IRedisSlabRepository;
7 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
8 8
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class RedisSlabExtImpl extends BaseDao implements IRedisSlabRepository { 12 +public class RedisSlabExtImpl extends AbstractDaoRepository implements IRedisSlabRepository {
13 13
14 @Override 14 @Override
15 public int insert(RedisSlab record) { 15 public int insert(RedisSlab record) {
......
1 package com.fedex.connect.manager.repository.repo.sys.impl; 1 package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 -import com.fedex.connect.manager.repository.base.BaseDao; 3 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
4 import com.fedex.connect.manager.repository.repo.sys.IRolePrivilegeRepository; 4 import com.fedex.connect.manager.repository.repo.sys.IRolePrivilegeRepository;
5 import org.apache.ibatis.annotations.Param; 5 import org.apache.ibatis.annotations.Param;
6 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
...@@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository; ...@@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository;
8 import java.util.List; 8 import java.util.List;
9 9
10 @Repository 10 @Repository
11 -public class RolePrivilegeRepositoryImpl extends BaseDao implements IRolePrivilegeRepository { 11 +public class RolePrivilegeRepositoryImpl extends AbstractDaoRepository implements IRolePrivilegeRepository {
12 public List<Long> findByRoleIds(@Param("roleIds") List<Long> roleIds){ 12 public List<Long> findByRoleIds(@Param("roleIds") List<Long> roleIds){
13 return rolePrivilegeExtMapper.findByRoleIds(roleIds); 13 return rolePrivilegeExtMapper.findByRoleIds(roleIds);
14 } 14 }
......
...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl; ...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.model.sys.Role; 3 import com.fedex.connect.common.model.sys.Role;
4 import com.fedex.connect.common.model.sys.RoleExample; 4 import com.fedex.connect.common.model.sys.RoleExample;
5 -import com.fedex.connect.manager.repository.base.BaseDao; 5 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
6 import com.fedex.connect.manager.repository.repo.sys.IRoleRepository; 6 import com.fedex.connect.manager.repository.repo.sys.IRoleRepository;
7 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
8 8
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class RoleRepositoryImpl extends BaseDao implements IRoleRepository { 12 +public class RoleRepositoryImpl extends AbstractDaoRepository implements IRoleRepository {
13 13
14 @Override 14 @Override
15 public List<Role> selectByExample(RoleExample example) { 15 public List<Role> selectByExample(RoleExample example) {
......
...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl; ...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.model.sys.User; 3 import com.fedex.connect.common.model.sys.User;
4 import com.fedex.connect.common.model.sys.UserExample; 4 import com.fedex.connect.common.model.sys.UserExample;
5 -import com.fedex.connect.manager.repository.base.BaseDao; 5 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
6 import com.fedex.connect.manager.repository.repo.sys.IUserRepository; 6 import com.fedex.connect.manager.repository.repo.sys.IUserRepository;
7 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
8 8
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class UserExtRepositoryImpl extends BaseDao implements IUserRepository { 12 +public class UserExtRepositoryImpl extends AbstractDaoRepository implements IUserRepository {
13 13
14 @Override 14 @Override
15 public List<User> selectByExample(UserExample example) { 15 public List<User> selectByExample(UserExample example) {
......
...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl; ...@@ -2,14 +2,14 @@ package com.fedex.connect.manager.repository.repo.sys.impl;
2 2
3 import com.fedex.connect.common.model.sys.UserRole; 3 import com.fedex.connect.common.model.sys.UserRole;
4 import com.fedex.connect.common.model.sys.UserRoleExample; 4 import com.fedex.connect.common.model.sys.UserRoleExample;
5 -import com.fedex.connect.manager.repository.base.BaseDao; 5 +import com.fedex.connect.manager.repository.base.AbstractDaoRepository;
6 import com.fedex.connect.manager.repository.repo.sys.IUserRoleRepository; 6 import com.fedex.connect.manager.repository.repo.sys.IUserRoleRepository;
7 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
8 8
9 import java.util.List; 9 import java.util.List;
10 10
11 @Repository 11 @Repository
12 -public class UserRoleRepositoryImpl extends BaseDao implements IUserRoleRepository { 12 +public class UserRoleRepositoryImpl extends AbstractDaoRepository implements IUserRoleRepository {
13 13
14 @Override 14 @Override
15 public List<UserRole> selectByExample(UserRoleExample example) { 15 public List<UserRole> selectByExample(UserRoleExample example) {
......
1 package com.fedex.connect.manager.util; 1 package com.fedex.connect.manager.util;
2 2
3 -import com.fedex.connect.manager.repository.repo.sys.IParamConfigExtRepository; 3 +import com.fedex.connect.manager.repository.repo.sys.IParamConfigRepository;
4 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.stereotype.Component; 5 import org.springframework.stereotype.Component;
6 6
...@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component; ...@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
13 public class ParamConfigUtil { 13 public class ParamConfigUtil {
14 14
15 @Autowired 15 @Autowired
16 - private IParamConfigExtRepository paramConfigExtRepository; 16 + private IParamConfigRepository paramConfigExtRepository;
17 17
18 /** 18 /**
19 * @Author Szl 19 * @Author Szl
......
1 package com.fedex.connect.task.aspect; 1 package com.fedex.connect.task.aspect;
2 2
3 +import com.fedex.connect.common.dependencies.util.DateUtil;
4 +import com.fedex.connect.common.model.sys.ParamConfig;
3 import com.fedex.connect.task.annotation.ProcessingInterval; 5 import com.fedex.connect.task.annotation.ProcessingInterval;
6 +import com.fedex.connect.task.repository.repo.sys.IParamConfigRepository;
4 import lombok.extern.slf4j.Slf4j; 7 import lombok.extern.slf4j.Slf4j;
5 import org.aspectj.lang.ProceedingJoinPoint; 8 import org.aspectj.lang.ProceedingJoinPoint;
6 import org.aspectj.lang.Signature; 9 import org.aspectj.lang.Signature;
...@@ -10,9 +13,14 @@ import org.aspectj.lang.annotation.Pointcut; ...@@ -10,9 +13,14 @@ import org.aspectj.lang.annotation.Pointcut;
10 import org.aspectj.lang.reflect.MethodSignature; 13 import org.aspectj.lang.reflect.MethodSignature;
11 import org.slf4j.Logger; 14 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory; 15 import org.slf4j.LoggerFactory;
16 +import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Component; 17 import org.springframework.stereotype.Component;
18 +import org.springframework.util.StringUtils;
14 19
15 import java.lang.reflect.Method; 20 import java.lang.reflect.Method;
21 +import java.time.temporal.ChronoUnit;
22 +import java.util.Date;
23 +import java.util.Objects;
16 24
17 /** 25 /**
18 * @Author mt 26 * @Author mt
...@@ -23,7 +31,8 @@ import java.lang.reflect.Method; ...@@ -23,7 +31,8 @@ import java.lang.reflect.Method;
23 @Slf4j 31 @Slf4j
24 @Component 32 @Component
25 public class ExecuteAspect { 33 public class ExecuteAspect {
26 - private Logger log = LoggerFactory.getLogger(ExecuteAspect.class); 34 + @Autowired
35 + IParamConfigRepository paramConfigRepository;
27 36
28 @Pointcut("@annotation(com.fedex.connect.task.annotation.ProcessingInterval)") 37 @Pointcut("@annotation(com.fedex.connect.task.annotation.ProcessingInterval)")
29 public void executePointCut() 38 public void executePointCut()
...@@ -42,14 +51,51 @@ public class ExecuteAspect { ...@@ -42,14 +51,51 @@ public class ExecuteAspect {
42 Signature signature = pjp.getSignature(); 51 Signature signature = pjp.getSignature();
43 MethodSignature methodSignature = (MethodSignature) signature; 52 MethodSignature methodSignature = (MethodSignature) signature;
44 Method method = methodSignature.getMethod(); 53 Method method = methodSignature.getMethod();
45 - long begin = System.currentTimeMillis(); 54 + //判断该定时任务是否执行
46 - log.info("{} Job Task Start......", method.getName()); 55 + boolean execute = this.isExecute(processingTime);
47 - obj = pjp.proceed(); 56 + if(execute) {
48 - long end = System.currentTimeMillis(); 57 + long begin = System.currentTimeMillis();
49 - log.info("{} Job Task end......execution time--{}ms", method.getName(),(end-begin)); 58 + log.info("{} Job Task Start......", method.getName());
59 + obj = pjp.proceed();
60 + long end = System.currentTimeMillis();
61 + log.info("{} Job Task end......execution time--{}ms", method.getName(), (end - begin));
62 + }
50 }catch(Throwable throwable){ 63 }catch(Throwable throwable){
51 log.error("ExecuteAspect.executeAround error : " + throwable.getMessage() , throwable); 64 log.error("ExecuteAspect.executeAround error : " + throwable.getMessage() , throwable);
52 } 65 }
53 return obj; 66 return obj;
54 } 67 }
68 +
69 + /**
70 + * @Author mt
71 + * @Description 判断定时任务是否执行
72 + * @Date 2024/11/20
73 + * @param processingInterval
74 + * @return boolean
75 + */
76 + private boolean isExecute(ProcessingInterval processingInterval){
77 + boolean execute = true;
78 + if(Objects.nonNull(processingInterval)){
79 + String paramCode = processingInterval.paramCode();
80 + if(StringUtils.hasText(paramCode)){
81 + ParamConfig paramConfig = paramConfigRepository.findValueByCode(paramCode);
82 + if(Objects.nonNull(paramConfig)
83 + && Objects.nonNull(paramConfig.getValue())
84 + && Objects.nonNull(paramConfig.getExt3())){
85 + //任务执行间隔
86 + Long interval = Long.valueOf(paramConfig.getValue());
87 + Date lastExecutionTime = paramConfig.getExt3();
88 + Date endDate = new Date();
89 + long diffInMilliseconds = Math.abs(endDate.getTime() - lastExecutionTime.getTime());
90 + // 将毫秒差值转换为分钟数
91 + long diffInMinutes = diffInMilliseconds / (60 * 1000);
92 + //上次执行时间小于间隔时间,则本次任务不进行执行
93 + if(diffInMinutes < interval){
94 + execute = false;
95 + }
96 + }
97 + }
98 + }
99 + return execute;
100 + }
55 } 101 }
...\ No newline at end of file ...\ No newline at end of file
......
1 package com.fedex.connect.task.job; 1 package com.fedex.connect.task.job;
2 2
3 +import com.fedex.connect.common.dependencies.contants.ParamConfigConstants;
3 import com.fedex.connect.task.annotation.ProcessingInterval; 4 import com.fedex.connect.task.annotation.ProcessingInterval;
4 import com.fedex.connect.task.service.biz.IPushObService; 5 import com.fedex.connect.task.service.biz.IPushObService;
5 import org.springframework.beans.factory.annotation.Autowired; 6 import org.springframework.beans.factory.annotation.Autowired;
...@@ -20,10 +21,9 @@ public class Imp001Job { ...@@ -20,10 +21,9 @@ public class Imp001Job {
20 /** 21 /**
21 * 推送Imp001数据给到进口组 22 * 推送Imp001数据给到进口组
22 */ 23 */
23 - @ProcessingInterval 24 + @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_INTERVAL)
24 @Scheduled(cron = "${export.task.allocation.sendOb}") 25 @Scheduled(cron = "${export.task.allocation.sendOb}")
25 public void sendObTask() { 26 public void sendObTask() {
26 -
27 sendObService.sendOb(); 27 sendObService.sendOb();
28 } 28 }
29 29
......
...@@ -5,6 +5,7 @@ import com.fedex.connect.common.dao.biz.PushObMapper; ...@@ -5,6 +5,7 @@ import com.fedex.connect.common.dao.biz.PushObMapper;
5 import com.fedex.connect.common.dao.log.EmailHistoryMapper; 5 import com.fedex.connect.common.dao.log.EmailHistoryMapper;
6 import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; 6 import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper;
7 import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; 7 import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper;
8 +import com.fedex.connect.common.dao.sys.ParamConfigMapper;
8 import com.fedex.connect.task.repository.dao.*; 9 import com.fedex.connect.task.repository.dao.*;
9 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
10 11
...@@ -32,5 +33,5 @@ public class AbstractDaoRepository { ...@@ -32,5 +33,5 @@ public class AbstractDaoRepository {
32 @Autowired 33 @Autowired
33 protected PushObMapperExt pushObMapperExt; 34 protected PushObMapperExt pushObMapperExt;
34 @Autowired 35 @Autowired
35 - protected ParamConfigExtMapper paramConfigExtMapper; 36 + protected ParamConfigMapper paramConfigMapper;
36 } 37 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -11,18 +11,18 @@ import java.util.List; ...@@ -11,18 +11,18 @@ import java.util.List;
11 public interface PushObMapperExt { 11 public interface PushObMapperExt {
12 12
13 @Select( "<script>" + 13 @Select( "<script>" +
14 - "SELECT * FROM T_PUSH_OB_LOG WHERE PUSH_STATUS = #{pushStatus,jdbcType=NUMERIC} AND ROWNUM &lt;= 500" + 14 + "SELECT * FROM T_PUSH_OB_LOG WHERE STATUS_CODE = #{statusCode,jdbcType=VARCHAR} AND ROWNUM &lt;= 500" +
15 "</script>") 15 "</script>")
16 - List<PushOb> findPushObByStatus(@Param("pushStatus") Long pushStatus); 16 + List<PushOb> findPushObByStatus(@Param("statusCode") String statusCode);
17 17
18 @Select( "<script>" + 18 @Select( "<script>" +
19 - "SELECT * FROM T_PUSH_OB_LOG WHERE PUSH_NUM &lt; #{pushNum,jdbcType=NUMERIC} AND PUSH_STATUS = #{pushStatus,jdbcType=NUMERIC} AND ROWNUM &lt;= 500" + 19 + "SELECT * FROM T_PUSH_OB_LOG WHERE PUSH_NUM &lt; #{pushNum,jdbcType=NUMERIC} AND STATUS_CODE = #{statusCode,jdbcType=VARCHAR} AND ROWNUM &lt;= 500" +
20 "</script>") 20 "</script>")
21 - List<PushOb> findPushObByStatusAndNum(@Param("pushNum") Long pushNum, @Param("pushStatus") Long pushStatus); 21 + List<PushOb> findPushObByStatusAndNum(@Param("pushNum") Long pushNum, @Param("statusCode") String statusCode);
22 22
23 @Select( "<script>" + 23 @Select( "<script>" +
24 - "SELECT count(*) FROM T_PUSH_OB_LOG WHERE PUSH_NUM &gt;= #{pushNum,jdbcType=NUMERIC} AND PUSH_STATUS = #{pushStatus,jdbcType=NUMERIC} " + 24 + "SELECT count(*) FROM T_PUSH_OB_LOG WHERE PUSH_NUM &gt;= #{pushNum,jdbcType=NUMERIC} AND PUSH_STATUS = #{statusCode,jdbcType=VARCHAR} " +
25 "AND TRUNC(CREATE_TIME) = TRUNC(TO_DATE(#{date,jdbcType=VARCHAR}, 'YYYY-MM-DD'))" + 25 "AND TRUNC(CREATE_TIME) = TRUNC(TO_DATE(#{date,jdbcType=VARCHAR}, 'YYYY-MM-DD'))" +
26 "</script>") 26 "</script>")
27 - Integer findErrPushForEmail(@Param("pushNum") Long pushNum, @Param("pushStatus") Long pushStatus, @Param("date") String date); 27 + Integer findErrPushForEmail(@Param("pushNum") Long pushNum, @Param("statusCode") String statusCode, @Param("date") String date);
28 } 28 }
......
...@@ -27,20 +27,20 @@ public interface IPushObRepository { ...@@ -27,20 +27,20 @@ public interface IPushObRepository {
27 * @Author mt 27 * @Author mt
28 * @Description 根据推送次数,推送状态查找需要推送记录 28 * @Description 根据推送次数,推送状态查找需要推送记录
29 * @Date 2024/11/20 29 * @Date 2024/11/20
30 - * @param pushStatus 30 + * @param statusCode
31 * @return java.util.List<com.fedex.connect.common.model.biz.PushOb> 31 * @return java.util.List<com.fedex.connect.common.model.biz.PushOb>
32 */ 32 */
33 - List<PushOb> findPushOb(Long pushStatus); 33 + List<PushOb> findPushOb(String statusCode);
34 34
35 /** 35 /**
36 * @Author mt 36 * @Author mt
37 * @Description 根据推送次数,推送状态查找需要推送记录 37 * @Description 根据推送次数,推送状态查找需要推送记录
38 * @Date 2024/11/20 38 * @Date 2024/11/20
39 * @param pushNum 39 * @param pushNum
40 - * @param pushStatus 40 + * @param statusCode
41 * @return java.util.List<com.fedex.connect.common.model.biz.PushOb> 41 * @return java.util.List<com.fedex.connect.common.model.biz.PushOb>
42 */ 42 */
43 - List<PushOb> findErrPushOb(Long pushNum,Long pushStatus); 43 + List<PushOb> findErrPushOb(Long pushNum,String statusCode);
44 44
45 - Integer findErrPushForEmail(Long pushNum,Long pushStatus,String date); 45 + Integer findErrPushForEmail(Long pushNum,String statusCode,String date);
46 } 46 }
......
...@@ -34,32 +34,32 @@ public class PushObRepositoryImpl extends AbstractDaoRepository implements IPush ...@@ -34,32 +34,32 @@ public class PushObRepositoryImpl extends AbstractDaoRepository implements IPush
34 } 34 }
35 35
36 /** 36 /**
37 - * @Author mt 37 + * @Author mt
38 - * @Description 根据推送次数,推送状态查找需要推送记录 38 + * @Description 根据推送次数,推送状态查找需要推送记录
39 - * @Date 2024/5/24 39 + * @Date 2024/11/20
40 - * @param pushStatus 40 + * @param statusCode
41 - * @return java.util.List<com.fedex.export.repository.entity.PushOb> 41 + * @return java.util.List<com.fedex.connect.common.model.biz.PushOb>
42 - */ 42 + */
43 @Override 43 @Override
44 - public List<PushOb> findPushOb(Long pushStatus) { 44 + public List<PushOb> findPushOb(String statusCode) {
45 - return pushObMapperExt.findPushObByStatus(pushStatus); 45 + return pushObMapperExt.findPushObByStatus(statusCode);
46 } 46 }
47 47
48 /** 48 /**
49 - * @Author mt 49 + * @Author mt
50 - * @Description 根据推送次数,推送状态查找需要推送记录 50 + * @Description 根据推送次数,推送状态查找需要推送记录
51 - * @Date 2024/5/24 51 + * @Date 2024/11/20
52 - * @param pushNum 52 + * @param pushNum
53 - * @param pushStatus 53 + * @param statusCode
54 - * @return java.util.List<com.fedex.export.repository.entity.PushOb> 54 + * @return java.util.List<com.fedex.connect.common.model.biz.PushOb>
55 - */ 55 + */
56 @Override 56 @Override
57 - public List<PushOb> findErrPushOb(Long pushNum, Long pushStatus) { 57 + public List<PushOb> findErrPushOb(Long pushNum, String statusCode) {
58 - return pushObMapperExt.findPushObByStatusAndNum(pushNum,pushStatus); 58 + return pushObMapperExt.findPushObByStatusAndNum(pushNum,statusCode);
59 } 59 }
60 60
61 @Override 61 @Override
62 - public Integer findErrPushForEmail(Long pushNum, Long pushStatus, String date) { 62 + public Integer findErrPushForEmail(Long pushNum, String statusCode, String date) {
63 - return pushObMapperExt.findErrPushForEmail(pushNum,pushStatus,date); 63 + return pushObMapperExt.findErrPushForEmail(pushNum,statusCode,date);
64 } 64 }
65 } 65 }
......
1 +package com.fedex.connect.task.repository.repo.sys;
2 +
3 +import com.fedex.connect.common.model.sys.ParamConfig;
4 +
5 +public interface IParamConfigRepository {
6 + ParamConfig findValueByCode(String code);
7 +}
1 +package com.fedex.connect.task.repository.repo.sys.impl;
2 +
3 +import com.fedex.connect.common.dependencies.enums.base.StatusEnum;
4 +import com.fedex.connect.common.model.sys.ParamConfig;
5 +import com.fedex.connect.common.model.sys.ParamConfigExample;
6 +import com.fedex.connect.task.repository.base.AbstractDaoRepository;
7 +import com.fedex.connect.task.repository.repo.sys.IParamConfigRepository;
8 +import org.springframework.stereotype.Repository;
9 +import org.springframework.util.CollectionUtils;
10 +
11 +@Repository
12 +public class ParamConfigRepositoryImpl extends AbstractDaoRepository implements IParamConfigRepository {
13 +
14 + @Override
15 + public ParamConfig findValueByCode(String code) {
16 + ParamConfigExample example = new ParamConfigExample();
17 + ParamConfigExample.Criteria criteria = example.createCriteria();
18 + criteria.andCodeEqualTo(code);
19 + criteria.andStatusEqualTo(StatusEnum.YES.getCode());
20 + return CollectionUtils.firstElement(paramConfigMapper.selectByExample(example));
21 + }
22 +}
...\ No newline at end of file ...\ No newline at end of file
1 package com.fedex.connect.task.service.biz.impl; 1 package com.fedex.connect.task.service.biz.impl;
2 2
3 +import com.fedex.connect.common.dependencies.enums.biz.PushObStatusEnum;
3 import com.fedex.connect.common.model.biz.Consignment; 4 import com.fedex.connect.common.model.biz.Consignment;
4 import com.fedex.connect.common.model.biz.PushOb; 5 import com.fedex.connect.common.model.biz.PushOb;
5 import com.fedex.connect.task.service.base.BaseService; 6 import com.fedex.connect.task.service.base.BaseService;
...@@ -28,7 +29,7 @@ public class PushObServiceImpl extends BaseService implements IPushObService { ...@@ -28,7 +29,7 @@ public class PushObServiceImpl extends BaseService implements IPushObService {
28 @Override 29 @Override
29 public void sendOb() { 30 public void sendOb() {
30 //获取需要处理的记录 31 //获取需要处理的记录
31 -// List<PushObLog> pushObLogList = pushObLogRepository.findPushObLog(Constant.SEND_TW001_KEYS.PUSH_OB_STATUS_WAIT); 32 + List<PushOb> pushObLogList = pushObRepository.findPushOb(PushObStatusEnum.TO_BE_SENT.getCode());
32 } 33 }
33 34
34 /** 35 /**
......