feat(sip): 更新订单信息和外部接口鉴权
- 修改订单信息相关代码,增加 bgType 字段并更新相关 mapper 和 service- 更新外部接口鉴权方式,使用静态变量 API_KEY 替代硬编码的字符串 -调整 OrderInfoVo 结构,添加 lastUpdateTime 字段 - 修改 ruoyi-admin 和 ruoyi-sip 的 artifactId - 更新 ruoyi-admin 的资源过滤配置master
parent
626e5ac48e
commit
522ce35d68
|
@ -9,7 +9,7 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
<artifactId>oms-admin</artifactId>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
|
@ -134,6 +134,22 @@
|
|||
</configuration>
|
||||
</plugin> -->
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<excludes>
|
||||
<exclude>**/*.yml</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ ruoyi:
|
|||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为80
|
||||
port: 8080
|
||||
port: 28080
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-sip</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ruoyi-sip Maven Webapp</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
|
|
|
@ -37,6 +37,7 @@ public class ExternalController {
|
|||
private IDeliveryListService deliveryListService;
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
private final static String API_KEY = "c7f858d0-30b8-4b7f-9ea1-0ccf5ceb1c54";
|
||||
|
||||
|
||||
|
||||
|
@ -46,7 +47,8 @@ public class ExternalController {
|
|||
if (StringUtils.isEmpty(apiKey)) {
|
||||
return AjaxResult.error("apiKey不能为空");
|
||||
}
|
||||
if (!"12345".equals(apiKey)){
|
||||
|
||||
if (!API_KEY.equals(apiKey)) {
|
||||
return AjaxResult.error("鉴权失败");
|
||||
}
|
||||
return AjaxResult.success(orderInfoService.getOrderInfo(dto));
|
||||
|
@ -58,7 +60,7 @@ public class ExternalController {
|
|||
if (StringUtils.isEmpty(apiKey)) {
|
||||
return AjaxResult.error("apiKey不能为空");
|
||||
}
|
||||
if (!"12345".equals(apiKey)){
|
||||
if (!API_KEY.equals(apiKey)){
|
||||
return AjaxResult.error("鉴权失败");
|
||||
}
|
||||
return AjaxResult.success(deliveryListService.getNumberInfo(dto));
|
||||
|
|
|
@ -46,6 +46,7 @@ public class OrderInfo extends BaseEntity
|
|||
private String customerName;
|
||||
//客户编码
|
||||
private String customerCode;
|
||||
private String bgType;
|
||||
/**
|
||||
* 客户邮编
|
||||
*/
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.sip.domain.*;
|
||||
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||
import com.ruoyi.sip.service.IAgentInfoService;
|
||||
|
@ -173,8 +175,8 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
orderInfoVo.setOrderName(orderInfo.getOrderName());
|
||||
orderInfoVo.setVersionCode(orderInfo.getVersionCode());
|
||||
// 固定值待确认
|
||||
orderInfoVo.setBgType("1");
|
||||
|
||||
orderInfoVo.setBgType(DictUtils.getDictLabel("bg_type", orderInfo.getBgType()));
|
||||
orderInfoVo.setLastUpdateTime(orderInfo.getUpdatedAt());
|
||||
// 设置代表处信息
|
||||
setAgentInfo(orderInfoVo, agentInfoMap.get(orderInfo.getOrderAgentCode()));
|
||||
// 设置客户信息
|
||||
|
@ -235,7 +237,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
orderInfoVo.setCustomerCode(dto.getCustomerCode());
|
||||
orderInfoVo.setCustomerName(dto.getCustomerName());
|
||||
orderInfoVo.setCustomerPostcode(dto.getCustomerPostcode());
|
||||
orderInfoVo.setIndustryType(dto.getIndustryType());
|
||||
orderInfoVo.setIndustryType(DictUtils.getDictLabel("industry_type",dto.getIndustryType()));
|
||||
orderInfoVo.setCustomerAddress(dto.getCustomerAddress());
|
||||
orderInfoVo.setContactPerson(dto.getCustomerContact());
|
||||
orderInfoVo.setContactEmail(dto.getCustomerEmail());
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.ruoyi.sip.vo;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : ch
|
||||
* @version : 1.0
|
||||
|
@ -56,6 +58,5 @@ public class OrderInfoVo {
|
|||
private String contactPhone;
|
||||
//客户邮箱
|
||||
private String contactEmail;
|
||||
|
||||
|
||||
private Date lastUpdateTime;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<result property="orderType" column="order_type"/>
|
||||
<result property="orderAgentCode" column="order_agent_code"/>
|
||||
<result property="orderPartnerCode" column="order_partner_code"/>
|
||||
<result property="bgType" column="bg_type"/>
|
||||
<result property="orderDate" column="order_date"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
|
@ -85,6 +86,7 @@
|
|||
order_type,
|
||||
order_agent_code,
|
||||
order_partner_code,
|
||||
bg_type,
|
||||
order_date,
|
||||
status,
|
||||
remark,
|
||||
|
|
Loading…
Reference in New Issue