Browse Source

5/17 工单修改

lwhhszx 1 year ago
parent
commit
51866e486e

+ 3 - 3
src/main/java/com/example/xiaoshiweixinback/controller/PayController.java

@@ -33,7 +33,7 @@ public class PayController {
 
     @Operation(summary = "回调成功")
     @PostMapping("/success")
-    private String success(@RequestBody WeiXinSuccessDTO weiXinSuccessDTO) throws IOException {
+    public String success(@RequestBody WeiXinSuccessDTO weiXinSuccessDTO) throws IOException {
         try {
             WeiXinSuccessDTO.Resource resource = weiXinSuccessDTO.getResource();
             WeixinSuccessVO weixinSuccessVO = authorizationService.decryptMessage(resource.getAssociated_data(), resource.getNonce(), resource.getCiphertext());
@@ -51,7 +51,7 @@ public class PayController {
 
     @Operation(summary = "下单并获取订单信息")
     @PostMapping("/getPayTickets")
-    private Response getPayTickets(@RequestBody WeiXinPayDTO weiXinPayDTO) {
+    public Response getPayTickets(@RequestBody WeiXinPayDTO weiXinPayDTO) {
         Records records = new Records();
         try {
             GetPayTicketVO getPayTicketVO = weixinPayService.getPayTickets(weiXinPayDTO);
@@ -65,7 +65,7 @@ public class PayController {
 
     @Operation(summary = "回调成功")
     @PostMapping("/testAuthorization")
-    private String testAuthorization() {
+    public String testAuthorization() {
         try {
             String associatedData = "transaction";
             String nonce = "yxul9eBG7PQp";

+ 6 - 3
src/main/java/com/example/xiaoshiweixinback/service/TicketRightsProtectionService.java

@@ -54,7 +54,8 @@ public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProte
         TicketRightsProtection ticketRightsProtection = this.getOne(rightsProtectionWrapper, false);
         if (ticketRightsProtection != null) {
             String rightProof = ticketRightsProtection.getRightProof();
-            String[] stringArray = rightProof.split(",");
+            if (rightProof != null){
+                String[] stringArray = rightProof.split(",");
             List<String> proofGuids = new ArrayList<>(Arrays.asList(stringArray));
             List<SystemFile> systemFiles = new ArrayList<>();
             if (proofGuids.size() != 0) {
@@ -67,8 +68,10 @@ public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProte
                 } catch (Exception e) {
                 }
             }
-            rightsProtectionVO.setProofGuids(proofGuids);
-            rightsProtectionVO.setProofFileList(systemFiles);
+                rightsProtectionVO.setProofGuids(proofGuids);
+                rightsProtectionVO.setProofFileList(systemFiles);
+        }
+
             BeanUtils.copyProperties(ticketRightsProtection, rightsProtectionVO);
         }
         return  rightsProtectionVO;

+ 5 - 2
src/main/java/com/example/xiaoshiweixinback/service/TicketService.java

@@ -227,6 +227,7 @@ public class TicketService extends ServiceImpl<TicketMapper, Ticket> {
                         TicketRightsProtection ticketRightsProtection = ticketRightsProtectionService.getOne(rightsProtectionWrapper, false);
                         if (ticketRightsProtection != null) {
                             String rightProof = ticketRightsProtection.getRightProof();
+                            if(rightProof!=null){
                             String[] stringArray = rightProof.split(",");
                             List<String> proofGuids = new ArrayList<>(Arrays.asList(stringArray));
                             List<SystemFile> systemFiles = new ArrayList<>();
@@ -239,9 +240,11 @@ public class TicketService extends ServiceImpl<TicketMapper, Ticket> {
                                     }
                                 } catch (Exception e) {
                                 }
+                                rightsProtectionVO.setProofGuids(proofGuids);
+                                rightsProtectionVO.setProofFileList(systemFiles);
                             }
-                            rightsProtectionVO.setProofGuids(proofGuids);
-                            rightsProtectionVO.setProofFileList(systemFiles);
+                            }
+
                             BeanUtils.copyProperties(ticketRightsProtection, rightsProtectionVO);
                         }
                         ticketVO.setTicketRightsProtectionVO(rightsProtectionVO);