qzyReal 1 年間 前
コミット
20fae6f2c5

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

@@ -33,7 +33,7 @@ public interface LevelOneServerInterface {
 
     /** 商铺信息处理 */
     @RequestMapping("/TbShop/rpc/shopDto")
-    public boolean shopDto(@RequestBody ShopDto shopDto);
+    public boolean shopDto(@RequestBody HtShopDTO shopDto);
 
     /** 远程调用  修改订单的叫车状态 */
     @RequestMapping("/app/TbOrder/rpc/updateOrderCallCarStatus")

+ 1 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterfaceFallback.java

@@ -36,7 +36,7 @@ public class LevelOneServerInterfaceFallback implements FallbackFactory<LevelOne
             }
 
             @Override
-            public boolean shopDto(ShopDto shopDto) {
+            public boolean shopDto(HtShopDTO shopDto) {
                 log.error("查询一级市场商户错误,当前对象:{},错误信息是:{}",shopDto.toString(),throwable.getMessage());
                 return false;
             }

+ 252 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtShopDTO.java

@@ -0,0 +1,252 @@
+package com.pj.api.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+import java.io.Serializable;
+
+
+public class HtShopDTO implements Serializable {
+
+
+    @JsonProperty("platSeqNo")
+    private String platSeqNo;
+    @JsonProperty("shopName")
+    private String shopName;
+    @JsonProperty("shopNo")
+    private String shopNo;
+    @JsonProperty("fieldCode")
+    private String fieldCode;
+    @JsonProperty("fieldName")
+    private String fieldName;
+    @JsonProperty("customsCode")
+    private String customsCode;
+    @JsonProperty("shopSccd")
+    private String shopSccd;
+    @JsonProperty("bnsScope")
+    private String bnsScope;
+    @JsonProperty("ownerName")
+    private String ownerName;
+    @JsonProperty("ownerIdtype")
+    private String ownerIdtype;
+    @JsonProperty("ownerTel")
+    private String ownerTel;
+    @JsonProperty("shopAddr")
+    private String shopAddr;
+    @JsonProperty("shopType")
+    private String shopType;
+    @JsonProperty("eDStatus")
+    private String eDStatus;
+    @JsonProperty("expiry")
+    private String expiry;
+    @JsonProperty("putrecNo")
+    private String putrecNo;
+    @JsonProperty("agentName")
+    private String agentName;
+    @JsonProperty("agentTel")
+    private String agentTel;
+    @JsonProperty("agentIdtype")
+    private String agentIdtype;
+    @JsonProperty("agentCiphertextIdno")
+    private String agentCiphertextIdno;
+    @JsonProperty("localGovernmentNo")
+    private String localGovernmentNo;
+    @JsonProperty("filingStatus")
+    private String filingStatus;
+    @JsonProperty("bank ")
+    private String bank;
+    @JsonProperty("bankAccount ")
+    private String bankAccount;
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(String shopNo) {
+        this.shopNo = shopNo;
+    }
+
+    public String getFieldCode() {
+        return fieldCode;
+    }
+
+    public void setFieldCode(String fieldCode) {
+        this.fieldCode = fieldCode;
+    }
+
+    public String getFieldName() {
+        return fieldName;
+    }
+
+    public void setFieldName(String fieldName) {
+        this.fieldName = fieldName;
+    }
+
+    public String getCustomsCode() {
+        return customsCode;
+    }
+
+    public void setCustomsCode(String customsCode) {
+        this.customsCode = customsCode;
+    }
+
+    public String getShopSccd() {
+        return shopSccd;
+    }
+
+    public void setShopSccd(String shopSccd) {
+        this.shopSccd = shopSccd;
+    }
+
+    public String getBnsScope() {
+        return bnsScope;
+    }
+
+    public void setBnsScope(String bnsScope) {
+        this.bnsScope = bnsScope;
+    }
+
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    public String getOwnerIdtype() {
+        return ownerIdtype;
+    }
+
+    public void setOwnerIdtype(String ownerIdtype) {
+        this.ownerIdtype = ownerIdtype;
+    }
+
+    public String getOwnerTel() {
+        return ownerTel;
+    }
+
+    public void setOwnerTel(String ownerTel) {
+        this.ownerTel = ownerTel;
+    }
+
+    public String getShopAddr() {
+        return shopAddr;
+    }
+
+    public void setShopAddr(String shopAddr) {
+        this.shopAddr = shopAddr;
+    }
+
+    public String getShopType() {
+        return shopType;
+    }
+
+    public void setShopType(String shopType) {
+        this.shopType = shopType;
+    }
+
+    public String geteDStatus() {
+        return eDStatus;
+    }
+
+    public void seteDStatus(String eDStatus) {
+        this.eDStatus = eDStatus;
+    }
+
+    public String getExpiry() {
+        return expiry;
+    }
+
+    public void setExpiry(String expiry) {
+        this.expiry = expiry;
+    }
+
+    public String getPutrecNo() {
+        return putrecNo;
+    }
+
+    public void setPutrecNo(String putrecNo) {
+        this.putrecNo = putrecNo;
+    }
+
+    public String getAgentName() {
+        return agentName;
+    }
+
+    public void setAgentName(String agentName) {
+        this.agentName = agentName;
+    }
+
+    public String getAgentTel() {
+        return agentTel;
+    }
+
+    public void setAgentTel(String agentTel) {
+        this.agentTel = agentTel;
+    }
+
+    public String getAgentIdtype() {
+        return agentIdtype;
+    }
+
+    public void setAgentIdtype(String agentIdtype) {
+        this.agentIdtype = agentIdtype;
+    }
+
+    public String getAgentCiphertextIdno() {
+        return agentCiphertextIdno;
+    }
+
+    public void setAgentCiphertextIdno(String agentCiphertextIdno) {
+        this.agentCiphertextIdno = agentCiphertextIdno;
+    }
+
+    public String getLocalGovernmentNo() {
+        return localGovernmentNo;
+    }
+
+    public void setLocalGovernmentNo(String localGovernmentNo) {
+        this.localGovernmentNo = localGovernmentNo;
+    }
+
+    public String getFilingStatus() {
+        return filingStatus;
+    }
+
+    public void setFilingStatus(String filingStatus) {
+        this.filingStatus = filingStatus;
+    }
+
+    public String getBank() {
+        return bank;
+    }
+
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+}

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

@@ -1,5 +1,6 @@
 package com.pj.listen;
 
+import cn.hutool.core.util.RandomUtil;
 import com.alibaba.fastjson2.JSONObject;
 import com.pj.api.dto.OrderDto;
 import com.pj.dto.DataDto;
@@ -40,7 +41,7 @@ public class BaseInfoListen {
         byte[] content = json.getBody();
         //保存到数据库
         String jsonString = new String(content);
-        htByteMapper.insert(new HtByte(null,null,jsonString,RabbitMQ.TEST_ACCEPT_QUEUE, FinishStatus.FINISH_STATUS_ZERO.getCode(),new Date()));
+        htByteMapper.insert(new HtByte(RandomUtil.randomString(64),null,jsonString,RabbitMQ.TEST_ACCEPT_QUEUE, FinishStatus.FINISH_STATUS_ZERO.getCode(),new Date()));
         System.out.println("\n消息同步完成。\n");
 
     }

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

@@ -146,7 +146,7 @@ public class HtByteTask {
                     break;
                 case "002":
                     //商铺备案
-                    ShopDto shopDto = JSONObject.parseObject(body, ShopDto.class);
+                    HtShopDTO shopDto = JSONObject.parseObject(body, HtShopDTO.class);
                     //保存
                     flag = FeignFactory.levelOneServerInterface.shopDto(shopDto);
                     methodHtByteTask.updateHtByteInfo(flag, item, dataDto);

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

@@ -3,6 +3,7 @@ package com.pj.tb_shop;
 import java.io.IOException;
 import java.util.List;
 
+import com.pj.api.dto.HtShopDTO;
 import com.pj.api.dto.ShopDto;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -131,7 +132,7 @@ public class TbShopController {
 	/*------            正常业务👆👆    rpc远程调用👇👇                         -----------*/
 
 	@RequestMapping("rpc/shopDto")
-	public boolean shopDto(@RequestBody ShopDto shopDto) throws Exception {
+	public boolean shopDto(@RequestBody HtShopDTO shopDto) throws Exception {
 		boolean b = tbShopService.shopDto(shopDto);
 		return b;
 	}

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

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.pj.api.client.admin.AdminInterface;
 import com.pj.api.dto.EnterpriseDto;
+import com.pj.api.dto.HtShopDTO;
 import com.pj.api.dto.ShopDto;
 import com.pj.common.core.exception.ServiceException;
 import com.pj.enummj.*;
@@ -217,7 +218,7 @@ public class TbShopService extends ServiceImpl<TbShopMapper, TbShop> implements
     /**
      * 远程调用方法
      */
-    public boolean shopDto(ShopDto shopDto) throws Exception {
+    public boolean shopDto(HtShopDTO shopDto) throws Exception {
         String tradeCode = shopDto.getFieldCode();
         TbTradeArea tbTradeArea = tbTradeAreaService.updateHandler(tradeCode, shopDto.getFieldName());
         TbShop tbShop = this.findByCode(shopDto.getShopNo());
@@ -241,7 +242,7 @@ public class TbShopService extends ServiceImpl<TbShopMapper, TbShop> implements
         }
         BeanUtils.copyProperties(tbShop, enterprise, "id");
         //设置基本属性
-        enterprise.setOwnerName(shopDto.getOwnerName()); // 个人姓名
+        enterprise.setOwnerName(shopDto.getOwnerName()).setDutyParagraph(shopDto.getShopSccd()); // 个人姓名
         enterprise.setDeleteStatus(Long.valueOf(DeleteStatus.DELETE_STATUS_ON.getCode())); // 逻辑删除,默认未删除
         enterprise.setJudgeStatus(JudgeStatus.JUDGE_STATUS_ONE.getCode());  // 审核状态,默认审核通过
         enterprise.setJudgeTime(new Date()); // 审核时间
@@ -249,10 +250,13 @@ public class TbShopService extends ServiceImpl<TbShopMapper, TbShop> implements
         enterprise.setShopName(shopDto.getShopName()); // 店铺ID
         enterprise.setBankAccount(shopDto.getBankAccount()); // 银行账户
         enterprise.setBank(shopDto.getBank()); // 银行名称
-        enterprise.setAddress(shopDto.getAddress()); // 地址
+        enterprise.setAddress(tbShop.getAddress()); // 地址
         enterprise.setType(null);  //  商户分类(自营商铺=自营商铺,劳务商铺=劳务商铺)
         enterprise.setIsLock(IsLock.IS_LOCK_ON.getCode()); // 默认未被锁定
-        enterprise.setTradeAreaId(tbTradeArea.getId()).setTradeAreaName(tbTradeArea.getName());
+        enterprise.setTradeAreaId(tbTradeArea.getId()).setBank(shopDto.getBank()).setBankAccount(shopDto.getBankAccount())
+                .setNationality(shopDto.getShopType().equals("1")?"中方商铺":"外国商铺")
+                .setLegalPerson(shopDto.getAgentName()).setIdCard(shopDto.getAgentCiphertextIdno())
+                .setTradeAreaName(tbTradeArea.getName());
         tbEnterpriseService.saveOrUpdate(enterprise);
         tbShop.setEnterpriseId(enterprise.getId()).setEnterpriseName(enterprise.getOwnerName());
         this.updateById(tbShop);