Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zelong.shao
2024-11-06 11:01:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
87969d825054be441a7b8ac8f530ff17f860c15a
87969d82
1 parent
0dc4ec58
customer|上传校验
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
435 additions
and
37 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/AbstractEtController.java
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/IConsignmentController.java
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/impl/AttachmentControllerImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/impl/ConsignmentControllerImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/data/bo/AddBo.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/dao/ConsignmentExtMapper.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/mapper/AttachmentExtMapper.xml
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IConsignmentExtRepository.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/ConsignmentExtRepositoryImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/IConsignmentService.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/AttachmentServiceImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentUtil.java
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/AttachmentValidate.java
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/ConsignmentValidate.java
server/biz-customer/src/main/resources/message_en_US.properties
server/biz-customer/src/main/resources/message_zh_CN.properties
server/common-dao/src/main/java/com/fedex/connect/common/dao/biz/ConsignmentMapper.java
server/common-dao/src/main/java/com/fedex/connect/common/mapper/biz/ConsignmentMapper.xml
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/Consignment.java
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/ConsignmentExample.java
server/common-dao/src/main/resources/generatorConfig.xml
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/enums/ResponseCode.java
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/enums/biz/ConsignmentEnum.java
server/manager-server/src/main/java/com/fedex/connect/manager/service/sys/impl/SysAuthServiceImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/AbstractEtController.java
View file @
87969d8
...
...
@@ -5,6 +5,8 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo;
import
com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil
;
import
com.fedex.connect.customer.service.biz.IAttachmentService
;
import
com.fedex.connect.customer.service.biz.IConsignmentService
;
import
com.fedex.connect.customer.validate.controller.biz.AttachmentValidate
;
import
com.fedex.connect.customer.validate.controller.biz.ConsignmentValidate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -29,6 +31,12 @@ public class AbstractEtController {
@Autowired
protected
IAttachmentService
attachmentService
;
@Autowired
protected
AttachmentValidate
attachmentValidate
;
@Autowired
protected
ConsignmentValidate
consignmentValidate
;
public
<
T
>
ResponseEntity
<
T
>
seeOther
(
String
url
)
{
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/IConsignmentController.java
View file @
87969d8
package
com
.
fedex
.
connect
.
customer
.
controller
.
biz
;
import
com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
com.fedex.connect.customer.data.query.ConsignmentQuery
;
import
org.springframework.web.bind.annotation.RequestBody
;
public
interface
IConsignmentController
{
ResponseResultVo
findConsignment
(
@RequestBody
ConsignmentQuery
consignmentQuery
);
ResponseResultVo
findConsignmentList
(
@RequestBody
ConsignmentQuery
consignmentQuery
);
ResponseResultVo
addConsignment
(
@RequestBody
AddBo
bo
);
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/impl/AttachmentControllerImpl.java
View file @
87969d8
...
...
@@ -30,6 +30,10 @@ public class AttachmentControllerImpl extends AbstractEtController implements IA
@PostMapping
(
"/find/history"
)
@ApiOperation
(
value
=
"历史上传记录查询"
)
public
ResponseResultVo
findHistory
(
@RequestBody
LongBo
bo
)
{
ResponseResultVo
responseResultVo
=
attachmentValidate
.
preCheckForFindHistory
(
bo
);
if
(
responseResultVo
!=
null
){
return
responseResultVo
;
}
Long
userId
=
null
;
try
{
userId
=
CurrentUserInfo
.
getUserId
();
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/impl/ConsignmentControllerImpl.java
View file @
87969d8
...
...
@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.util.CurrentUserInfo;
import
com.fedex.connect.common.model.sys.User
;
import
com.fedex.connect.customer.controller.AbstractEtController
;
import
com.fedex.connect.customer.controller.biz.IConsignmentController
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
com.fedex.connect.customer.data.query.ConsignmentQuery
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -29,27 +30,44 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConsignmentControllerImpl
.
class
);
@PostMapping
(
"/find"
)
@PostMapping
(
"/find
/list
"
)
@ApiOperation
(
value
=
"运单查询"
)
public
ResponseResultVo
findConsignment
(
@RequestBody
ConsignmentQuery
consignmentQuery
)
{
Long
userId
=
null
;
String
uuid
=
null
;
public
ResponseResultVo
findConsignmentList
(
@RequestBody
ConsignmentQuery
consignmentQuery
)
{
User
user
=
null
;
try
{
User
user
=
CurrentUserInfo
.
getUser
();
userId
=
user
.
getId
();
uuid
=
user
.
getUserUuid
();
userId
=
0L
;
user
=
CurrentUserInfo
.
getUser
();
//userId = 0L;
}
catch
(
Exception
e
)
{
logger
.
error
(
LogShowModel
.
showException
(
"Exception"
,
e
));
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
TOKEN_FORMAT_ERROR
.
getMsg
()));
}
if
(
user
Id
==
null
)
{
if
(
user
==
null
)
{
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
OVERDUE_TOKEN_CODE
.
getMsg
()));
}
ConsignmentQuery
query
=
ConsignmentQuery
.
dataProcessing
(
consignmentQuery
);
query
.
setUserId
(
user
Id
);
query
.
setUuid
(
u
uid
);
query
.
setUserId
(
user
.
getId
()
);
query
.
setUuid
(
u
ser
.
getUserUuid
()
);
return
consignmentService
.
findConsignments
(
query
);
}
@PostMapping
(
"/add"
)
@ApiOperation
(
"上传运单"
)
public
ResponseResultVo
addConsignment
(
@RequestBody
AddBo
bo
){
ResponseResultVo
responseResultVo
=
consignmentValidate
.
preCheckAdd
(
bo
);
if
(
responseResultVo
!=
null
){
return
responseResultVo
;
}
User
user
=
null
;
try
{
user
=
CurrentUserInfo
.
getUser
();
}
catch
(
Exception
e
)
{
logger
.
error
(
LogShowModel
.
showException
(
"Exception"
,
e
));
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
TOKEN_FORMAT_ERROR
.
getMsg
()));
}
if
(
user
==
null
)
{
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
OVERDUE_TOKEN_CODE
.
getMsg
()));
}
return
consignmentService
.
add
(
bo
,
user
);
}
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/data/bo/AddBo.java
0 → 100644
View file @
87969d8
package
com
.
fedex
.
connect
.
customer
.
data
.
bo
;
import
lombok.Data
;
@Data
public
class
AddBo
{
private
String
ConsignmentCode
;
private
String
shipperAccount
;
private
String
shipperCountry
;
private
String
recipientCountry
;
}
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/dao/ConsignmentExtMapper.java
View file @
87969d8
...
...
@@ -3,6 +3,8 @@ package com.fedex.connect.customer.repository.dao;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.customer.data.query.ConsignmentQuery
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
...
...
@@ -11,4 +13,12 @@ public interface ConsignmentExtMapper {
List
<
Consignment
>
findConsignments
(
ConsignmentQuery
query
);
Long
findAllCount
(
ConsignmentQuery
query
);
@Select
(
"SELECT * FROM ( "
+
"SELECT * FROM T_BIZ_CONSIGNMENT "
+
"WHERE CONSIGNMENT_CODE = #{consignmentCode} "
+
"AND CREATE_TIME >= SYSDATE - 30 "
+
"ORDER BY CREATE_TIME DESC"
+
") WHERE ROWNUM = 1"
)
Consignment
findByConsignmentCode
(
@Param
(
"consignmentCode"
)
String
consignmentCode
);
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/mapper/AttachmentExtMapper.xml
View file @
87969d8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.fedex.connect.customer.repository.dao.AttachmentMapper"
>
<mapper
namespace=
"com.fedex.connect.customer.repository.dao.Attachment
Ext
Mapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.fedex.connect.common.model.biz.Attachment"
>
<id
column=
"ID"
jdbcType=
"NUMERIC"
property=
"id"
/>
<result
column=
"BIZ_ID"
jdbcType=
"NUMERIC"
property=
"bizId"
/>
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IConsignmentExtRepository.java
View file @
87969d8
...
...
@@ -9,4 +9,6 @@ public interface IConsignmentExtRepository {
List
<
Consignment
>
findConsignments
(
ConsignmentQuery
query
);
Long
findAllCount
(
ConsignmentQuery
query
);
Consignment
findByConsignmentCode
(
String
consignmentCode
);
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/ConsignmentExtRepositoryImpl.java
View file @
87969d8
...
...
@@ -20,4 +20,9 @@ public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmen
public
Long
findAllCount
(
ConsignmentQuery
query
)
{
return
consignmentExtMapper
.
findAllCount
(
query
);
}
@Override
public
Consignment
findByConsignmentCode
(
String
consignmentCode
)
{
return
consignmentExtMapper
.
findByConsignmentCode
(
consignmentCode
);
}
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/IConsignmentService.java
View file @
87969d8
package
com
.
fedex
.
connect
.
customer
.
service
.
biz
;
import
com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
;
import
com.fedex.connect.common.model.sys.User
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
com.fedex.connect.customer.data.query.ConsignmentQuery
;
public
interface
IConsignmentService
{
/**
* @Author Szl
* @Description 功能说明 运单查询
* @Date 2024/11/5
* @param query
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
ResponseResultVo
findConsignments
(
ConsignmentQuery
query
);
/**
* @Author Szl
* @Description 功能说明 新增运单
* @Date 2024/11/5
* @param bo
* @param user
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
ResponseResultVo
add
(
AddBo
bo
,
User
user
);
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/AttachmentServiceImpl.java
View file @
87969d8
...
...
@@ -18,6 +18,14 @@ import java.util.List;
*/
@Service
public
class
AttachmentServiceImpl
extends
AbstractEtService
implements
IAttachmentService
{
/**
* @Author Szl
* @Description 功能说明 查询该运单历史数据
* @Date 2024/11/5
* @param userId
* @param bizId
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
public
ResponseResultVo
findHistory
(
Long
userId
,
Long
bizId
)
{
List
<
AttachmentHistoryDto
>
history
=
attachmentRepository
.
findHistory
(
bizId
);
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
View file @
87969d8
...
...
@@ -5,9 +5,13 @@ import com.fedex.connect.common.dependencies.date.vo.PageResult;
import
com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
;
import
com.fedex.connect.common.dependencies.util.Utils
;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.common.model.sys.User
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
com.fedex.connect.customer.data.query.ConsignmentQuery
;
import
com.fedex.connect.customer.service.AbstractEtService
;
import
com.fedex.connect.customer.service.biz.IConsignmentService
;
import
com.fedex.connect.customer.util.service.biz.ConsignmentUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -19,6 +23,17 @@ import java.util.List;
*/
@Service
public
class
ConsignmentServiceImpl
extends
AbstractEtService
implements
IConsignmentService
{
@Autowired
private
ConsignmentUtil
consignmentUtil
;
/**
* @Author Szl
* @Description 功能说明 运单查询
* @Date 2024/11/5
* @param query
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
public
ResponseResultVo
findConsignments
(
ConsignmentQuery
query
)
{
List
<
String
>
consignmentCodeList
=
query
.
getConsignmentCodeList
();
...
...
@@ -41,4 +56,28 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig
pageResult
.
setList
(
consignments
);
return
ResponseResultVo
.
succ
(
pageResult
);
}
/**
* @Author Szl
* @Description 功能说明 新增运单
* @Date 2024/11/5
* @param bo
* @param user
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
public
ResponseResultVo
add
(
AddBo
bo
,
User
user
){
//查询运单表是否存在已提交的运单
Consignment
consignment
=
consignmentExtRepository
.
findByConsignmentCode
(
bo
.
getConsignmentCode
());
if
(
consignment
!=
null
&&
consignment
.
getId
()
!=
null
){
//如果存在则进行bo基础校验
ResponseResultVo
responseResultVo
=
consignmentUtil
.
consignmentCreatorCheck
(
consignment
,
bo
);
if
(
responseResultVo
!=
null
){
return
responseResultVo
;
}
//校验是否是本账号的运单
}
//如果不存在直接返回
return
ResponseResultVo
.
succ
(
null
);
}
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/ConsignmentUtil.java
0 → 100644
View file @
87969d8
package
com
.
fedex
.
connect
.
customer
.
util
.
service
.
biz
;
import
com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
;
import
com.fedex.connect.common.dependencies.enums.ResponseCode
;
import
com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil
;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Author Szl
* @Description 类说明 运单相关util
* @Date 2024/11/5
*/
@Component
public
class
ConsignmentUtil
{
@Autowired
private
LocaleMessageUtil
localeMessageUtil
;
/**
* @Author Szl
* @Description 功能说明 校验运单创建人
* @Date 2024/11/5
* @param consignment
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
public
ResponseResultVo
consignmentCreatorCheck
(
Consignment
consignment
,
AddBo
bo
)
{
List
<
String
>
errList
=
new
ArrayList
<>();
// 校验字段是否匹配,并将错误信息添加到errList中
checkFieldMismatch
(
bo
.
getShipperAccount
(),
consignment
.
getShipperAccount
(),
"con_shipperAccount"
,
errList
);
checkFieldMismatch
(
bo
.
getRecipientCountry
(),
consignment
.
getRecipientCountry
(),
"con_recipientCountry"
,
errList
);
checkFieldMismatch
(
bo
.
getShipperCountry
(),
consignment
.
getShipperCountry
(),
"con_shipperCountry"
,
errList
);
if
(!
errList
.
isEmpty
())
{
String
enumResCode601
=
localeMessageUtil
.
getMessage
(
"enum_res_code_601"
);
String
errResult
=
String
.
join
(
","
,
errList
)
+
enumResCode601
;
return
ResponseResultVo
.
fail
(
ResponseCode
.
CONSIGNMENT_CREATOR_ERR
.
getCode
(),
errResult
);
}
return
null
;
}
/**
* @Author Szl
* @Description 功能说明 对比是否一致
* @Date 2024/11/5
* @param boField
* @param consignmentField
* @param messageKey
* @param errList
* @return void
*/
private
void
checkFieldMismatch
(
String
boField
,
String
consignmentField
,
String
messageKey
,
List
<
String
>
errList
)
{
if
(!
boField
.
equals
(
consignmentField
))
{
errList
.
add
(
localeMessageUtil
.
getMessage
(
messageKey
));
}
}
}
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/AttachmentValidate.java
0 → 100644
View file @
87969d8
package
com
.
fedex
.
connect
.
customer
.
validate
.
controller
.
biz
;
import
com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
;
import
com.fedex.connect.common.dependencies.enums.ResponseCode
;
import
com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil
;
import
com.fedex.connect.customer.data.bo.LongBo
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
/**
* @Author Szl
* @Description 类说明 附件校验类
* @Date 2024/11/5
*/
@Component
public
class
AttachmentValidate
{
@Resource
protected
LocaleMessageUtil
localeMessageUtil
;
/**
* @Author Szl
* @Description 功能说明 历史数据输入校验
* @Date 2024/11/5
* @param bo
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
public
ResponseResultVo
preCheckForFindHistory
(
LongBo
bo
){
if
(
bo
==
null
||
bo
.
getId
()
==
null
){
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
REQUEST_PARAM_NULL
.
getMsg
()));
}
return
null
;
}
}
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/ConsignmentValidate.java
0 → 100644
View file @
87969d8
package
com
.
fedex
.
connect
.
customer
.
validate
.
controller
.
biz
;
import
com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
;
import
com.fedex.connect.common.dependencies.enums.ResponseCode
;
import
com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.Resource
;
/**
* @Author Szl
* @Description 类说明 运单校验类
* @Date 2024/11/5
*/
@Component
public
class
ConsignmentValidate
{
@Resource
protected
LocaleMessageUtil
localeMessageUtil
;
/**
* @Author Szl
* @Description 功能说明 添加运单校验
* @Date 2024/11/5
* @param bo
* @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo
*/
public
ResponseResultVo
preCheckAdd
(
AddBo
bo
){
if
(
bo
==
null
||
StringUtils
.
isEmpty
(
bo
.
getAccountNo
())
||
StringUtils
.
isEmpty
(
bo
.
getConsignmentCode
())
||
StringUtils
.
isEmpty
(
bo
.
getRecipientCountry
())
||
StringUtils
.
isEmpty
(
bo
.
getShipperAccount
())
||
StringUtils
.
isEmpty
(
bo
.
getShipperCountry
())){
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
REQUEST_PARAM_NULL
.
getMsg
()));
}
return
null
;
}
}
server/biz-customer/src/main/resources/message_en_US.properties
View file @
87969d8
...
...
@@ -2,3 +2,9 @@ conl_cus_declare_count_max=單次最多可查詢1000個運單號碼
enum_res_code_301
=
登錄身份異常
enum_res_code_305
=
登錄已過期,請重新登錄
enum_res_code_601
=
不正确,请重新输入
con_shipperAccount
=
发货人计费账号
con_shipperCountry
=
始发国
con_recipientCountry
=
目的国
\ No newline at end of file
...
...
server/biz-customer/src/main/resources/message_zh_CN.properties
View file @
87969d8
...
...
@@ -2,3 +2,9 @@ conl_cus_declare_count_max=單次最多可查詢1000個運單號碼
enum_res_code_301
=
登錄身份異常
enum_res_code_305
=
登錄已過期,請重新登錄
enum_res_code_601
=
不正确,请重新输入
con_shipperAccount
=
发货人计费账号
con_shipperCountry
=
始发国
con_recipientCountry
=
目的国
\ No newline at end of file
...
...
server/common-dao/src/main/java/com/fedex/connect/common/dao/biz/ConsignmentMapper.java
View file @
87969d8
...
...
@@ -2,9 +2,10 @@ package com.fedex.connect.common.dao.biz;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.common.model.biz.ConsignmentExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
ConsignmentMapper
{
long
countByExample
(
ConsignmentExample
example
);
...
...
server/common-dao/src/main/java/com/fedex/connect/common/mapper/biz/ConsignmentMapper.xml
View file @
87969d8
...
...
@@ -47,6 +47,7 @@
<result
column=
"STATUS_ID"
jdbcType=
"NUMERIC"
property=
"statusId"
/>
<result
column=
"STATUS_NAME"
jdbcType=
"VARCHAR"
property=
"statusName"
/>
<result
column=
"DOC_NONDOC_FLAG"
jdbcType=
"VARCHAR"
property=
"docNondocFlag"
/>
<result
column=
"USER_UUID"
jdbcType=
"VARCHAR"
property=
"userUuid"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -115,7 +116,7 @@
RECIPIENT_CITY, FIRST_COMMIT_TIME, FIRST_SUBMITTER_ID, FIRST_SUBMITTER, COMMIT_TIME,
SUBMITTER_ID, SUBMITTER, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
MODIFY_USER_ID, MODIFY_USER_NAME, CE_INFO_ID, RECIPIENT_POSTAL_CODE, STATUS_ID, STATUS_NAME,
DOC_NONDOC_FLAG
DOC_NONDOC_FLAG
, USER_UUID
</sql>
<select
id=
"selectByExample"
parameterType=
"com.fedex.connect.common.model.biz.ConsignmentExample"
resultMap=
"BaseResultMap"
>
<include
refid=
"OracleDialectPrefix"
/>
...
...
@@ -169,7 +170,7 @@
CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
MODIFY_USER_ID, MODIFY_USER_NAME, CE_INFO_ID,
RECIPIENT_POSTAL_CODE, STATUS_ID, STATUS_NAME,
DOC_NONDOC_FLAG)
DOC_NONDOC_FLAG
, USER_UUID
)
values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{shipDate,jdbcType=TIMESTAMP},
#{shipperCountry,jdbcType=VARCHAR}, #{recipientCountry,jdbcType=VARCHAR}, #{destIataCode,jdbcType=VARCHAR},
#{originCountry,jdbcType=VARCHAR}, #{destinationCountry,jdbcType=VARCHAR}, #{customsCurrency,jdbcType=VARCHAR},
...
...
@@ -185,7 +186,7 @@
#{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
#{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}, #{ceInfoId,jdbcType=NUMERIC},
#{recipientPostalCode,jdbcType=VARCHAR}, #{statusId,jdbcType=NUMERIC}, #{statusName,jdbcType=VARCHAR},
#{docNondocFlag,jdbcType=VARCHAR})
#{docNondocFlag,jdbcType=VARCHAR}
, #{userUuid,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.fedex.connect.common.model.biz.Consignment"
>
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
...
...
@@ -326,6 +327,9 @@
<if
test=
"docNondocFlag != null"
>
DOC_NONDOC_FLAG,
</if>
<if
test=
"userUuid != null"
>
USER_UUID,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=NUMERIC},
...
...
@@ -461,6 +465,9 @@
<if
test=
"docNondocFlag != null"
>
#{docNondocFlag,jdbcType=VARCHAR},
</if>
<if
test=
"userUuid != null"
>
#{userUuid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.fedex.connect.common.model.biz.ConsignmentExample"
resultType=
"java.lang.Long"
>
...
...
@@ -607,6 +614,9 @@
<if
test=
"record.docNondocFlag != null"
>
DOC_NONDOC_FLAG = #{record.docNondocFlag,jdbcType=VARCHAR},
</if>
<if
test=
"record.userUuid != null"
>
USER_UUID = #{record.userUuid,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -658,7 +668,8 @@
RECIPIENT_POSTAL_CODE = #{record.recipientPostalCode,jdbcType=VARCHAR},
STATUS_ID = #{record.statusId,jdbcType=NUMERIC},
STATUS_NAME = #{record.statusName,jdbcType=VARCHAR},
DOC_NONDOC_FLAG = #{record.docNondocFlag,jdbcType=VARCHAR}
DOC_NONDOC_FLAG = #{record.docNondocFlag,jdbcType=VARCHAR},
USER_UUID = #{record.userUuid,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -798,6 +809,9 @@
<if
test=
"docNondocFlag != null"
>
DOC_NONDOC_FLAG = #{docNondocFlag,jdbcType=VARCHAR},
</if>
<if
test=
"userUuid != null"
>
USER_UUID = #{userUuid,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=NUMERIC}
</update>
...
...
@@ -846,7 +860,8 @@
RECIPIENT_POSTAL_CODE = #{recipientPostalCode,jdbcType=VARCHAR},
STATUS_ID = #{statusId,jdbcType=NUMERIC},
STATUS_NAME = #{statusName,jdbcType=VARCHAR},
DOC_NONDOC_FLAG = #{docNondocFlag,jdbcType=VARCHAR}
DOC_NONDOC_FLAG = #{docNondocFlag,jdbcType=VARCHAR},
USER_UUID = #{userUuid,jdbcType=VARCHAR}
where ID = #{id,jdbcType=NUMERIC}
</update>
<sql
id=
"OracleDialectPrefix"
>
...
...
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/Consignment.java
View file @
87969d8
...
...
@@ -235,6 +235,11 @@ public class Consignment implements Serializable {
*/
private
String
docNondocFlag
;
/**
* 用户UUID
*/
private
String
userUuid
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -597,6 +602,14 @@ public class Consignment implements Serializable {
this
.
docNondocFlag
=
docNondocFlag
==
null
?
null
:
docNondocFlag
.
trim
();
}
public
String
getUserUuid
()
{
return
userUuid
;
}
public
void
setUserUuid
(
String
userUuid
)
{
this
.
userUuid
=
userUuid
==
null
?
null
:
userUuid
.
trim
();
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -648,6 +661,7 @@ public class Consignment implements Serializable {
sb
.
append
(
", statusId="
).
append
(
statusId
);
sb
.
append
(
", statusName="
).
append
(
statusName
);
sb
.
append
(
", docNondocFlag="
).
append
(
docNondocFlag
);
sb
.
append
(
", userUuid="
).
append
(
userUuid
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/ConsignmentExample.java
View file @
87969d8
...
...
@@ -3125,6 +3125,76 @@ public class ConsignmentExample {
addCriterion
(
"DOC_NONDOC_FLAG not between"
,
value1
,
value2
,
"docNondocFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidIsNull
()
{
addCriterion
(
"USER_UUID is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidIsNotNull
()
{
addCriterion
(
"USER_UUID is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidEqualTo
(
String
value
)
{
addCriterion
(
"USER_UUID ="
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidNotEqualTo
(
String
value
)
{
addCriterion
(
"USER_UUID <>"
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidGreaterThan
(
String
value
)
{
addCriterion
(
"USER_UUID >"
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"USER_UUID >="
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidLessThan
(
String
value
)
{
addCriterion
(
"USER_UUID <"
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"USER_UUID <="
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidLike
(
String
value
)
{
addCriterion
(
"USER_UUID like"
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidNotLike
(
String
value
)
{
addCriterion
(
"USER_UUID not like"
,
value
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidIn
(
List
<
String
>
values
)
{
addCriterion
(
"USER_UUID in"
,
values
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"USER_UUID not in"
,
values
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"USER_UUID between"
,
value1
,
value2
,
"userUuid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserUuidNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"USER_UUID not between"
,
value1
,
value2
,
"userUuid"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
server/common-dao/src/main/resources/generatorConfig.xml
View file @
87969d8
...
...
@@ -73,12 +73,12 @@
generatedKey 指定KEY,Oracle需要指定序列。
sqlStatement 指定序列名称
-->
<table
schema=
"ICLEARIMP"
tableName=
"T_BIZ_USER_CONSIGNMENT_MAPPING"
domainObjectName=
"UserConsignmentMapping"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"ID"
sqlStatement=
"SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL"
/
>
</table
>
<!-- <table schema="ICLEARIMP" tableName="T_BIZ_USER_CONSIGNMENT_MAPPING" domainObjectName="UserConsignmentMapping"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">--
>
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL" />--
>
<!-- </table>--
>
<!-- <table schema="ICLEARIMP" tableName="T_LOG_OPERATION" domainObjectName="Operation"-->
...
...
@@ -105,12 +105,12 @@
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table tableName="T_BIZ_CONSIGNMENT" domainObjectName="Consignment"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">--
>
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CONSIGNMENT.NEXTVAL FROM DUAL" />--
>
<!-- </table>--
>
<table
tableName=
"T_BIZ_CONSIGNMENT"
domainObjectName=
"Consignment"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"ID"
sqlStatement=
"SELECT SEQ_T_BIZ_CONSIGNMENT.NEXTVAL FROM DUAL"
/
>
</table
>
<!-- <table tableName="T_BIZ_EMAIL" domainObjectName="Email"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
...
...
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/enums/ResponseCode.java
View file @
87969d8
...
...
@@ -48,15 +48,13 @@ public enum ResponseCode {
OVERDUE_TOKEN_CODE
(
305
,
"enum_res_code_305"
),
ROLE_CONFIRM_DEL
(
306
,
"enum_res_code_306"
),
INSERT_EXCEPITON
(
601
,
"enum_res_code_601"
),
RECORD_EXIST
(
602
,
"enum_res_code_602"
),
EXPORT_TOO_LARGE
(
603
,
"enum_res_code_603"
),
REQUEST_PARAM_NULL
(
604
,
"enum_res_code_604"
),
REQUEST_ID_NULL
(
605
,
"enum_res_code_605"
),
REQUEST_OBJECT_NULL
(
606
,
"enum_res_code_606"
),
REQUEST_PARAM_UNREASONABLE
(
606
,
"enum_res_code_607"
)
;
REQUEST_PARAM_UNREASONABLE
(
606
,
"enum_res_code_607"
)
,
CONSIGNMENT_CREATOR_ERR
(
601
,
"enum_res_code_601"
)
;
private
Integer
code
;
private
String
msg
;
...
...
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/enums/biz/ConsignmentEnum.java
0 → 100644
View file @
87969d8
package
com
.
fedex
.
connect
.
common
.
dependencies
.
enums
.
biz
;
public
enum
ConsignmentEnum
{
SHIPPER_ACCOUNT
(
01
,
"con_shipperAccount"
),
SHIPPER_COUNTRY
(
02
,
"con_shipperCountry"
),
RECIPIENT_COUNTRY
(
03
,
"con_recipientCountry"
),
;
private
Integer
code
;
private
String
msg
;
ConsignmentEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getMsg
()
{
return
msg
;
}
}
server/manager-server/src/main/java/com/fedex/connect/manager/service/sys/impl/SysAuthServiceImpl.java
View file @
87969d8
...
...
@@ -78,7 +78,7 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer
* @return token key
*/
public
ResponseResultVo
createFclToken
(
JsonObject
token
)
{
String
tokenKey
=
DatabaseConstants
.
FCL_PREFIX
+
UUID
.
randomUUID
();
String
tokenKey
=
""
+
UUID
.
randomUUID
();
try
{
/*redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + tokenKey, GsonUtils.beanToString(token), RedisConstants.REDIS_EXPRIE_TIME_1W);*/
redisUtilService
.
set
(
RedisConstants
.
REDIS_KEY_TOKEN
+
tokenKey
,
GsonUtils
.
beanToString
(
token
),
1
);
...
...
Please
register
or
login
to post a comment