chen 1 ヶ月 前
コミット
1b52e7419f

+ 30 - 40
.idea/workspace.xml

@@ -5,26 +5,9 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="10b05465-08d5-4de9-8c1b-7ff9bbb70b98" name="更改" comment="">
-      <change beforePath="$PROJECT_DIR$/target/classes/META-INF/MANIFEST.MF" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/application.properties" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/cn/zhentao/DemoApplication.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/cn/zhentao/controller/DtoController.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/cn/zhentao/pojo/Dto.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/cn/zhentao/pojo/ResultVo.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/cn/zhentao/service/DtoService.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/cn/zhentao/service/Iml/DtoServiceIml.class" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/classes/static/index.html" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/demo-0.0.1-SNAPSHOT.jar" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/demo-0.0.1-SNAPSHOT.jar.original" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-archiver/pom.properties" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/surefire-reports/2025-03-30T20-04-20_770.dumpstream" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/surefire-reports/TEST-cn.zhentao.DemoApplicationTests.xml" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/surefire-reports/cn.zhentao.DemoApplicationTests.txt" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/test-classes/cn/zhentao/DemoApplicationTests.class" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/zhentao/pojo/Dto.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/zhentao/pojo/Dto.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/cn/zhentao/test/DtoTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/zhentao/test/DtoTest.java" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -60,30 +43,33 @@
     </option>
   </component>
   <component name="ProjectId" id="2v3pZzMCqUpMuD99yjyVEc2wQTx" />
-  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
+    <ConfirmationsSetting value="2" id="Add" />
+  </component>
   <component name="ProjectViewState">
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "RequestMappingsPanelOrder0": "0",
-    "RequestMappingsPanelOrder1": "1",
-    "RequestMappingsPanelWidth0": "75",
-    "RequestMappingsPanelWidth1": "75",
-    "RunOnceActivity.OpenProjectViewOnStart": "true",
-    "RunOnceActivity.ShowReadmeOnStart": "true",
-    "WebServerToolWindowFactoryState": "false",
-    "last_opened_file_path": "D:/yun7/demo",
-    "node.js.detected.package.eslint": "true",
-    "node.js.detected.package.tslint": "true",
-    "node.js.selected.package.eslint": "(autodetect)",
-    "node.js.selected.package.tslint": "(autodetect)",
-    "settings.editor.selected.configurable": "preferences.pluginManager",
-    "spring.configuration.checksum": "fe01ce2a7fbac8fafaed7c982a04e229",
-    "vue.rearranger.settings.migration": "true"
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
+    &quot;RequestMappingsPanelOrder0&quot;: &quot;0&quot;,
+    &quot;RequestMappingsPanelOrder1&quot;: &quot;1&quot;,
+    &quot;RequestMappingsPanelWidth0&quot;: &quot;75&quot;,
+    &quot;RequestMappingsPanelWidth1&quot;: &quot;75&quot;,
+    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
+    &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
+    &quot;last_opened_file_path&quot;: &quot;D:/yun7/demo&quot;,
+    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
+    &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
+    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
+    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
+    &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
+    &quot;spring.configuration.checksum&quot;: &quot;fe01ce2a7fbac8fafaed7c982a04e229&quot;,
+    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   }
-}]]></component>
+}</component>
   <component name="RunManager" selected="应用程序.DtoTest">
     <configuration name="DtoTest" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
       <option name="MAIN_CLASS_NAME" value="cn.zhentao.test.DtoTest" />
@@ -121,11 +107,15 @@
       <updated>1743383672367</updated>
       <workItem from="1743383674052" duration="66000" />
       <workItem from="1743383748480" duration="82000" />
-      <workItem from="1743383839024" duration="2819000" />
+      <workItem from="1743383839024" duration="3885000" />
+      <workItem from="1743399094199" duration="1706000" />
     </task>
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="3" />
   </component>
+  <component name="VcsManagerConfiguration">
+    <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
+  </component>
 </project>

+ 2 - 1
src/main/java/cn/zhentao/pojo/Dto.java

@@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 
 import javax.validation.constraints.*;
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 import java.util.Date;
 
 @Data
@@ -34,7 +35,7 @@ public class Dto {
     @Pattern(regexp="^((13[0-9])|(14[0-9])|(15([8-9]))|(166)|(17[0-9])|(18[8-9])|(19[0-9]))\\d{8}$",message ="手机号码格式错误")
     private String mobile;//手然号
     @NotNull(message="日期不能为空")@DateTimeFormat(pattern ="yyyy-MM-dd HH:mm:ss")@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone ="GMT+8")
-    private Date nowDate;//日期格式
+    private String nowDate;//日期格式
 
     private String reqId;
 }

+ 20 - 4
src/main/java/cn/zhentao/test/DtoTest.java

@@ -9,8 +9,10 @@ import cn.zhentao.pojo.ResultVo;
 import com.alibaba.fastjson.JSON;
 import lombok.extern.slf4j.Slf4j;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -25,14 +27,21 @@ public class DtoTest {
         // 准备测试数据
         String reqId = "test_req_" + System.currentTimeMillis();
         String reqTime = LocalDateTime.now().format(DATE_TIME_FORMATTER);
-        
+        Integer amount=666;
+        BigDecimal price=new BigDecimal("999");
+        String mobile="15623564859";
+        String nowDate =LocalDateTime.now().format(DATE_TIME_FORMATTER);
         // 创建DTO对象
         Dto dto = new Dto();
         dto.setAppId(APP_ID);
         dto.setGoodsId("test_goods_001");
         dto.setReqId(reqId);
         dto.setReqTime(reqTime);
-        
+        dto.setAmount(amount);
+        dto.setPrice(price);
+        dto.setMobile(mobile);
+        dto.setNowDate(nowDate);
+
         // 生成签名
         String sign = generateSign(dto);
         dto.setSign(sign);
@@ -45,11 +54,15 @@ public class DtoTest {
     }
     
     private static String generateSign(Dto dto) {
-        String content = String.format("%s%s%s%s%s",
+        String content = String.format("%s%s%s%s%s%s%s%s%s",
                 dto.getAppId(),
                 dto.getGoodsId(),
                 dto.getReqId(),
                 dto.getReqTime(),
+                dto.getAmount(),
+                dto.getPrice(),
+                dto.getMobile(),
+                dto.getNowDate(),
                 APP_KEY);
         return cn.hutool.crypto.SecureUtil.md5(content);
     }
@@ -76,7 +89,10 @@ public class DtoTest {
             params.put("reqId", dto.getReqId());
             params.put("reqTime", dto.getReqTime());
             params.put("sign", dto.getSign());
-            
+            params.put("amount",dto.getAmount());
+            params.put("price",dto.getPrice());
+            params.put("mobile",dto.getMobile());
+            params.put("nowDate",dto.getNowDate());
             HttpResponse response = HttpRequest.get(BASE_URL + "/add2")
                     .header("reqId", reqId)
                     .form(params)

BIN
target/classes/cn/zhentao/pojo/Dto.class


BIN
target/classes/cn/zhentao/test/DtoTest.class


BIN
target/demo-0.0.1-SNAPSHOT.jar


BIN
target/demo-0.0.1-SNAPSHOT.jar.original


ファイルの差分が大きいため隠しています
+ 2 - 2
target/surefire-reports/TEST-cn.zhentao.DemoApplicationTests.xml


+ 1 - 1
target/surefire-reports/cn.zhentao.DemoApplicationTests.txt

@@ -1,4 +1,4 @@
 -------------------------------------------------------------------------------
 Test set: cn.zhentao.DemoApplicationTests
 -------------------------------------------------------------------------------
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.131 s - in cn.zhentao.DemoApplicationTests
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.944 s - in cn.zhentao.DemoApplicationTests

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません