1.配置文件
1.1开发环境配置文件
IM和Mall的配置文件去除发票相关配置项
invoice:
terminalCode: 0
appId: ZZS_PT_DZFP
version: 2.0
kjinterfaceCode: ECXML.FPKJ.BC.E_INV
xzinterfaceCode: ECXML.FPXZ.CX.E_INV
userName: P0000001
password: 3201000020MzkwM2IwZDAxM2MxY2ExOQ==
tax: 150300201007206301
authorizationCode: 5056bf7539
responseCode: 144
zipCode: 0
encryptCode: 0
codeType: 0
qymc: 51盒子开发十
nsrdzdah:
swjgDm:
pydm: "000001"
bmbBbh: 18.0
xhfDz: 江苏南京中山路129号中南国际大厦20楼21楼
xhfDh: 025-84701918
xhfYhzh: 中国银行股份有限公司南京中南大厦支行 531358191694
czdm: 10
IM的配置文件添加 RocketMQ配置内容
rocketmq:
nameServer: 10.11.0.215:9876
producer:
#超时时间
sendMessageTimeout: 30000
#发送组
group: biGroup
topic:
invoiceApply: invoiceApply_dev
invoiceResult: invoiceResult_dev
consumerGroup:
invoiceResult: invoiceResult_im_dev
MALL的配置
rocketmq:
nameServer: 10.11.0.215:9876
producer:
#超时时间
sendMessageTimeout: 30000
#发送组
group: mallGroup
topic:
autoCancel: autoCancel_dev
autoComplete: autoComplete_dev
autoCloseReturn: autoCloseReturn_dev
invoiceApply: invoiceApply_dev
invoiceResult: invoiceResult_dev
consumerGroup:
autoCancel: autoCancel_dev
autoComplete: autoComplete_dev
autoCloseReturn: autoCloseReturn_dev
invoiceResult: invoiceResult_trade_dev
Invoice-Service的配置项
# 数据源配置
spring:
datasource:
url: jdbc:mysql://10.11.0.215:3306/yurun_common?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
invoice:
url: "http://open.jsaisino.com//FPKJService/invoice/accept"
rocketmq:
nameServer: 10.11.0.215:9876
producer:
#超时时间
sendMessageTimeout: 30000
#发送组
group: publicInvoiceGroup
topic:
invoiceApply: invoiceApply_dev
invoiceDownload: invoiceDownload_dev
invoiceResult: invoiceResult_dev
consumerGroup:
invoiceApply: invoiceApply_dev
invoiceDownload: invoiceDownload_dev
2.数据库
2.1发票申请表添加字段 apply_result
1.电商
ALTER TABLE mall_trade.invoice_apply_record ADD apply_result CHAR(1) NULL COMMENT '申请结果:1:等待中 2:申请失败 3:申请成功';
2.IM
ALTER TABLE im.invoice_apply_record ADD apply_result CHAR(1) NULL COMMENT '申请结果:1:等待中 2:申请失败 3:申请成功';
初始化字段值
#所有已开票和已邮寄的发票申请 均是申请成功
update im.invoice_apply_record
set apply_result = '3'
where `status` in ('2','3');
#所有纸质(专用)发票申请未开票的 均是等待中
update im.invoice_apply_record
set apply_result ='1'
where `status` = '1' and invoice_type = '2';
#所有电票申请 未开票的 均为开票失败
update im.invoice_apply_record
set apply_result = '2'
where `status`='1' and invoice_type='1';
2.2数据迁移
1.IM
发票单数据迁移
insert into yurun_common.invoice_record
(id,apply_id,invoice_from,invoice_type,order_id,invoice_serial_no,invoice_no,invoice_code,
total_amount_tax,total_amount_notax,total_tax,invoice_url,invoice_status,invoice_time,is_red,
original_invoice_no,original_invoice_code,invoice_config_id)
select
id,apply_id,'2',IF(invoice_type = '2','1','2') ,order_id,invoice_serial_no,invoice_no,invoice_code,total_amount_tax,total_amount_notax,
total_tax,invoice_url, IF(invoice_status = '4','3',invoice_status),create_time,is_red,original_invoice_no,original_invoice_code,1
from
im.invoice_no_record;
发票单明细数据迁移
insert into
yurun_common.invoice_detail
(id,invoice_id,price,num,amount,tax_amount,tax_rate,order_detail_id)
select
id,invoice_id,price,num,amount,tax_amount,tax_rate,order_detail_id
from im.invoice_item_detail;
2.电商不做数据迁移
2.3 无用表整理
MALL-TRADE库和IM库中 发票单和发票明细表都无用了