1
This commit is contained in:
@@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.jarvis.config.JarvisGoofishProperties;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrder;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog;
|
||||
import com.ruoyi.jarvis.service.IErpGoofishOrderService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -40,6 +41,13 @@ public class ErpGoofishOrderController extends BaseController {
|
||||
return AjaxResult.success(erpGoofishOrderService.selectById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('jarvis:erpGoofishOrder:query')")
|
||||
@GetMapping("/{id}/eventLogs")
|
||||
public AjaxResult eventLogs(@PathVariable Long id) {
|
||||
List<ErpGoofishOrderEventLog> list = erpGoofishOrderService.listEventLogsByOrderId(id);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('jarvis:erpGoofishOrder:edit')")
|
||||
@Log(title = "闲管家拉单", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/pull/{appKey}")
|
||||
|
||||
@@ -65,6 +65,20 @@ CREATE TABLE IF NOT EXISTS erp_goofish_order (
|
||||
KEY idx_modify_time (modify_time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='闲管家 ERP 订单(全量跟踪)';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS erp_goofish_order_event_log (
|
||||
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
order_id bigint(20) NOT NULL COMMENT 'erp_goofish_order.id',
|
||||
app_key varchar(64) DEFAULT NULL,
|
||||
order_no varchar(64) NOT NULL,
|
||||
event_type varchar(32) NOT NULL COMMENT 'ORDER_SYNC/LOGISTICS_SYNC/SHIP',
|
||||
source varchar(64) NULL COMMENT 'NOTIFY/LIST/DETAIL_REFRESH 等',
|
||||
message varchar(1024) NOT NULL,
|
||||
create_time datetime DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY idx_goofish_evt_order (order_id),
|
||||
KEY idx_goofish_evt_time (create_time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='闲管家订单状态/物流/发货变更日志';
|
||||
|
||||
-- 可选:从旧枚举迁入两条示例(密钥请上线后立即修改)
|
||||
-- INSERT INTO erp_open_config (app_key,app_secret,xy_user_name,remark,express_code,express_name,status,order_num)
|
||||
-- VALUES ('1016208368633221','***','余生请多关照66','海尔胡歌',NULL,'日日顺','0',1);
|
||||
|
||||
@@ -186,6 +186,23 @@ PREPARE puk FROM @sql_uk;
|
||||
EXECUTE puk;
|
||||
DEALLOCATE PREPARE puk;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- 5.5) 订单变更事件日志表
|
||||
-- -----------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS erp_goofish_order_event_log (
|
||||
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
order_id bigint(20) NOT NULL COMMENT 'erp_goofish_order.id',
|
||||
app_key varchar(64) DEFAULT NULL,
|
||||
order_no varchar(64) NOT NULL,
|
||||
event_type varchar(32) NOT NULL COMMENT 'ORDER_SYNC/LOGISTICS_SYNC/SHIP',
|
||||
source varchar(64) NULL COMMENT 'NOTIFY/LIST/DETAIL_REFRESH 等',
|
||||
message varchar(1024) NOT NULL,
|
||||
create_time datetime DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY idx_goofish_evt_order (order_id),
|
||||
KEY idx_goofish_evt_time (create_time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='闲管家订单状态/物流/发货变更日志';
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- 6) 清理存储过程
|
||||
-- -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user