2 Commits 36e1e83da3 ... b32fac751b

Tác giả SHA1 Thông báo Ngày
  Mechrevo b32fac751b Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder 1 năm trước cách đây
  Mechrevo 315d728a60 8.28 互市测试案例 1 năm trước cách đây

+ 2 - 2
sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java

@@ -24,11 +24,11 @@ public interface LevelOneServerInterface {
 
     /** 远程调用: 对合作社信息进行事务处理 */
     @RequestMapping("/TbCooperative/rpc/cooperativeDto")
-    public boolean cooperativeDto(CooperativeDto cooperativeDto);
+    public boolean cooperativeDto(@RequestBody CooperativeDto cooperativeDto);
 
     /** 商铺信息处理 */
     @RequestMapping("/TbShop/rpc/shopDto")
-    public boolean shopDto(ShopDto shopDto);
+    public boolean shopDto(@RequestBody ShopDto shopDto);
 
     /** 远程调用  修改订单的叫车状态 */
     @RequestMapping("/app/TbOrder/rpc/updateOrderCallCarStatus")

+ 58 - 2
sp-core/sp-base/src/main/java/com/pj/utils/ht/AESUtil.java

@@ -1,5 +1,6 @@
 package com.pj.utils.ht;
 
+import com.pj.rabbitmq.RabbitMQ;
 import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -219,15 +220,70 @@ public class AESUtil {
         System.out.println("aes解密结果:" + decrypt);
         System.out.println();
 
+        /*
+边民: CkB9nBTgtwQYyW+/luLX0BdXYHTdcBMnQRnN1BHVWDjXd1Gqt9Yl3M/lI5WxljI39cJa3XTmWT3WH/zQpG4AZsqbSb1TO8f43+UgdQRfJqChYy69B2JZsV0856REEBb7h89mYXyCTHl3eeImf/Ilw8Xq5XQ6cc0WV4/AltZLVj9AiCqi0YV2PY7FXjl6nP/gboh3T+Z+LxNmY/iTk5oUUhaIxt+PFitgkEkOeZrTP3NhLxtaAPwoFxDmPGSZEWWDLgJSdvJeYMUKPz+sL12ybzMVudqo6B2lYUDCWpcQ4L6pGJaXH7qBwUP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ugyBmowudxUNJ1of8olnSRAhxJpx68XMyMqFHP5rD0u8IdN0w/NxTRBmWzc8EIOIYcQtz9wfe2JbEIixfwI6RT0HKD/JCPdwRPRrXKjG5W6nPxS1XolIIFk63dD0Oz+0m5Z2VeoCGY9a7EsKZ3QkqMirzAcItbrs0ZLjlUdVzYe5c+t0sldCv+TQOI1PU0Jqv6eLwQfHrDCxj3PGRtoxNHArQ4+qmY/+xssEYIHVdf1vmpZAH2uhD7xH6gA5UItcz4RXjhWVZG9idK/Q7bhvHh8ms4DiWEDFVVXBqF71t9IUP2aTCjjrohmhDKp7ZiqPHbh8CV/a05zl3t7yjpLXrEKW2t8Cgou2ufL2D1YzmGkuKdzuto9u8YXNcLPeyk+4ZpgVaB8pzl3RurD7X3MWrU8sXXH552c009K7+c5EQZYiFvi2iJg0JPhbjU9ohwjmnvMuPxSff6z4myx0LgU2S1HqOE5bypfnF9x0uVoWkL1igcDC8MnFA08rzEKaX94Qm8nrVYxNk+uypR3Z0BRYygvEtO5we9w/RnszwcKhTIA4jb4KXHf3XRM9JaQivhzeo+wJpiWhXdJVyipRLjHGzpIbNjrvksWnXF55budIwgxuLscyzVjTPG2G8I4IVAjbfpdd9hfy9PZn1vG9sev2Re31D3kHndCAETGbWzWb9
+
+        */
 
         System.out.println("--------AES_CBC加密解密---------");
-        String cbcResult = encryptCBC("测试AES加密12456", random);
+//        String cbcResult = encryptCBC("{ \"platSeqNo\": \"1111111111\", \"birplAddr\": \"云南昆明\", \"borderName\": \"张边民\",\"borderTel\": \"18896542158\",\"customsCode\": \"10086\", \"startDate\": \"2012-5-7\",\"endDate\": \"2022-8-9\", \"expiry\": \"2025-8-7\",\"fieldCode\": \"2546\",\"filingStatus\": \"1\", \"gencd\": \"2\", \"idCardNo\": \"452036547821563014\",\"idcdGcertPgoffNm\": \"云南海关\", \"localGovernmentNo\": \"0771\", \"putrecNo\": \"123456789\"}", RabbitMQ.ACC_KEY);
+        String cbcResult = encryptCBC("{ \"platSeqNo\": \"54453\", \n" +
+                "\"customsCode\": \"43535\", \n" +
+                "\"orgName\": \"不知道叫什么互助组\", \n" +
+                "\"address\": \"云南互市\",\n" +
+                " \"shopsSccd\": \"23124\",\n" +
+                " \"eDStatus\": \"1\",\n" +
+                " \"expiry\": \"2025-9-9\", \n" +
+                "\"putrecNo\": \"523523\", \n" +
+                "\"localGovernmentNo\": \"46465\",\n" +
+                " \"filingStatus\": \"1\", \n" +
+                "\"fieldCode\": \"512412\", \n" +
+                "\"borderList\": [\n" +
+                "{ \"borderNo\":\"31231\",\n" +
+                " \"borderPutrecNo\":\"14213123\",\n" +
+                " \"borderName\":\"什么鬼\",\n" +
+                " \"idCardNo\":\"54236987412369820\",\n" +
+                " \"borderAddr\":\"云南昆明\",\n" +
+                " \"borderTel\":\"12354821456\", \n" +
+                "\"groupId\":\"14\"\n" +
+                "},\n" +
+                "{ \"borderNo\":\"131\", \n" +
+                "\"borderPutrecNo\":\"41422\",\n" +
+                " \"borderName\":\"王小锤\",\n" +
+                " \"ciphertextIdno\":\"36542158963214752\",\n" +
+                " \"borderAddr\":\"云南普洱\", \n" +
+                "\"borderTel\":\"1258453454\",\n" +
+                " \"groupId\":\"14\"\n" +
+                "}],\"dclBorderList\": [\n" +
+                "{\n" +
+                "\"dclNo\":\"31\",\n" +
+                " \"borderPutrecNo\":\"421312\",\n" +
+                " \"declareName\":\"犬鸡笼\",\n" +
+                " \"idCardNo\":\"54641145521452\",\n" +
+                " \"borderTel\":\"1456123135\",\n" +
+                " \"groupId\":\"14\"\n" +
+                "},{ \"dclNo\":\"5632\", \n" +
+                "\"borderPutrecNo\":\"46541231\", \n" +
+                "\"declareName\":\"送终鸡\",\n" +
+                " \"idCardNo\":\"452102896320147513\",\n" +
+                " \"borderTel\":\"12398524563\", \n" +
+                "\"groupId\":\"14\"\n" +
+                "}\n" +
+                "] }",RabbitMQ.ACC_KEY);
         System.out.println("aes_cbc加密结果:" + cbcResult);
         System.out.println();
 
         System.out.println("---------解密CBC---------");
-        String cbcDecrypt = decryptCBC(cbcResult, random);
+        String cbcDecrypt = decryptCBC(cbcResult, RabbitMQ.ACC_KEY);
         System.out.println("aes解密结果:" + cbcDecrypt);
         System.out.println();
     }
+
+
 }

+ 1 - 1
sp-service/async-server/src/main/java/com/pj/listen/BaseInfoListen.java

@@ -35,7 +35,7 @@ public class BaseInfoListen {
         byte[] content = json.getBody();
         //保存到数据库
         String jsonString = new String(content);
-        htByteMapper.insert(new HtByte(json.getMessageProperties().getMessageId(),jsonString,RabbitMQ.TEST_ACCEPT_QUEUE, FinishStatus.FINISH_STATUS_ZERO.getCode(),new Date()));
+        htByteMapper.insert(new HtByte(null,jsonString,RabbitMQ.TEST_ACCEPT_QUEUE, FinishStatus.FINISH_STATUS_ZERO.getCode(),new Date()));
         System.out.println("\n消息同步完成。\n");
 
     }

+ 19 - 3
sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java

@@ -77,13 +77,17 @@ public class HtByteTask {
                     PeopleDto peopleDto = JSONObject.parseObject(body, PeopleDto.class);
                     //根据其内的身份证,有则新增,无则修改???
                     flag = levelOneServerInterface.peopleDto(peopleDto);
-                    if(!flag){
+                    if(flag){
                         //将完成状态设置成 2 , 表示处理失败
-                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+                        item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
                         //保存
                         htByteMapper.updateById(item);
                         //todo: 发送失败信息给管理员
+
+                        break;
                     }
+                    item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+                    htByteMapper.updateById(item);
                     break;
                 case "002":
                     //商铺备案
@@ -96,8 +100,12 @@ public class HtByteTask {
                         //保存
                         htByteMapper.updateById(item);
                         //todo: 发送失败信息给管理员
+
+                        break;
                     }
-                    break;
+                item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+                htByteMapper.updateById(item);
+                break;
                 case "003":
                     //边民互助组备案
                     GroupDto groupDto = JSONObject.parseObject(body, GroupDto.class);
@@ -109,7 +117,11 @@ public class HtByteTask {
                         //保存
                         htByteMapper.updateById(item);
                         //todo: 发送失败信息给管理员
+
+                        break;
                     }
+                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+                    htByteMapper.updateById(item);
                     break;
                 case "004":
                     //边民合作社备案
@@ -122,7 +134,11 @@ public class HtByteTask {
                         //保存
                         htByteMapper.updateById(item);
                         //todo: 发送失败信息给管理员
+
+                        break;
                     }
+                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+                    htByteMapper.updateById(item);
                     break;
                 case "005":
                     //车辆

+ 2 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeController.java

@@ -6,6 +6,7 @@ import com.pj.project4sp.SP;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -89,7 +90,7 @@ public class TbCooperativeController {
 
 	/** 远程调用: 对合作社信息进行事务处理 */
 	@RequestMapping("rpc/cooperativeDto")
-	public boolean cooperativeDto(CooperativeDto cooperativeDto){
+	public boolean cooperativeDto(@RequestBody CooperativeDto cooperativeDto){
 		boolean b = tbCooperativeService.cooperativeDto(cooperativeDto);
 		return b;
 	}

+ 3 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.api.dto.CooperativeDto;
 import com.pj.current.satoken.StpUserUtil;
+import com.pj.enummj.DeleteStatus;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -69,6 +70,8 @@ public class TbCooperativeService extends ServiceImpl<TbCooperativeMapper,TbCoop
 	public boolean cooperativeDto(CooperativeDto cooperativeDto){
 		TbCooperative tbCooperative = new TbCooperative();
 		BeanUtils.copyProperties(cooperativeDto,tbCooperative);
+		tbCooperative.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
+		tbCooperative.setCreateTime(new Date());
 		return this.save(tbCooperative);
 	}
 

+ 2 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupService.java

@@ -355,6 +355,8 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 	public boolean groupDto(GroupDto groupDto){
 		TbGroup tbGroup = new TbGroup();
 		BeanUtils.copyProperties(groupDto,tbGroup);
+		tbGroup.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
+		tbGroup.setCreateTime(new Date());
 		boolean save = this.save(tbGroup);
 		return save;
 	}

+ 4 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleService.java

@@ -533,7 +533,10 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		TbPeople tbPeople = new TbPeople();
 		//数据拷贝
 		BeanUtils.copyProperties(peopleDto,tbPeople);
-		//todo: 判断其身份证? 有责新增,无则修改
+		//设置基本信息
+		tbPeople.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
+		tbPeople.setCreateTime(new Date());
+		//todo: 判断其身份证? 无则新增,无有则修改
 		if(tbPeople.getIdCardNo() != null){
 			boolean save = this.save(tbPeople);
 			return save;

+ 1 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopController.java

@@ -131,7 +131,7 @@ public class TbShopController {
 	/*------            正常业务👆👆    rpc远程调用👇👇                         -----------*/
 
 	@RequestMapping("rpc/shopDto")
-	public boolean shopDto(ShopDto shopDto){
+	public boolean shopDto(@RequestBody ShopDto shopDto){
 		boolean b = tbShopService.shopDto(shopDto);
 		return b;
 	}

+ 4 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopService.java

@@ -4,10 +4,12 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.List;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.pj.api.dto.ShopDto;
+import com.pj.enummj.DeleteStatus;
 import com.pj.utils.so.SoMap;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFRow;
@@ -178,6 +180,8 @@ public class TbShopService extends ServiceImpl<TbShopMapper, TbShop> implements
 	public boolean shopDto(ShopDto shopDto){
 		TbShop tbShop = new TbShop();
 		BeanUtils.copyProperties(shopDto,tbShop);
+		tbShop.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
+		tbShop.setCreateTime(new Date());
 		int insert = tbShopMapper.insert(tbShop);
 		return insert == 1;
 	}