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
tao.mo
2024-11-19 17:02:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1bf750a5ccc58cc732d3da7187d6e284596f3ae4
1bf750a5
1 parent
579da082
biz-customer | 修改 | 运单提交
mt 2024年11月19日17:02:45
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
375 additions
and
36 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/enums/ResponseCode.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/base/BaseDao.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IAttachmentRepository.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IUploadRecordRepository.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IUserConsignmentMappingRepository.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/AttachmentRepositoryImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/UploadRecordRepositoryImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/UserConsignmentMappingRepositoryImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/base/BaseService.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/AttachmentUtil.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/mapper/biz/UserConsignmentMappingMapper.xml
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/UserConsignmentMapping.java
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/UserConsignmentMappingExample.java
server/common-dao/src/main/resources/generatorConfig.xml
server/biz-customer/src/main/java/com/fedex/connect/customer/enums/ResponseCode.java
View file @
1bf750a
...
...
@@ -33,7 +33,7 @@ public enum ResponseCode {
MESSAGE_CODE_30013
(
30013
,
"business_exception_30013"
),
MESSAGE_CODE_30014
(
30014
,
"business_exception_30014"
),
MESSAGE_CODE_30015
(
30015
,
"business_success_30015"
),
MESSAGE_CODE_30016
(
30016
,
"business_exception_30016"
),
/******打个样,编写样例*****/
// MESSAGE_CODE_30001(30001,"business_exception_30001"),
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/base/BaseDao.java
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
repository
.
base
;
import
com.fedex.connect.common.dao.biz.AttachmentMapper
;
import
com.fedex.connect.common.dao.biz.ConsignmentMapper
;
import
com.fedex.connect.common.dao.biz.UploadRecordMapper
;
import
com.fedex.connect.common.dao.biz.UserConsignmentMappingMapper
;
import
com.fedex.connect.customer.repository.dao.AttachmentExtMapper
;
import
com.fedex.connect.customer.repository.dao.ConsignmentExtMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
public
class
BaseDao
{
@Autowired
p
ublic
ConsignmentMapper
consignment
Mapper
;
p
rotected
UploadRecordMapper
uploadRecord
Mapper
;
@Autowired
p
ublic
ConsignmentExtMapper
consignmentEx
tMapper
;
p
rotected
ConsignmentMapper
consignmen
tMapper
;
@Autowired
public
AttachmentExtMapper
attachmentExtMapper
;
protected
AttachmentMapper
attachmentMapper
;
@Autowired
protected
UserConsignmentMappingMapper
userConsignmentMappingMapper
;
@Autowired
protected
ConsignmentExtMapper
consignmentExtMapper
;
@Autowired
protected
AttachmentExtMapper
attachmentExtMapper
;
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IAttachmentRepository.java
View file @
1bf750a
...
...
@@ -11,4 +11,8 @@ public interface IAttachmentRepository {
List
<
AttachmentHistoryDto
>
findHistory
(
AttachmentHistoryQuery
attachmentHistoryQuery
);
Attachment
queryInfo
(
UserConsignmentInfoQuery
userConsignmentInfoQuery
);
Attachment
save
(
Attachment
entity
);
void
saveAll
(
List
<
Attachment
>
list
);
}
\ No newline at end of file
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IUploadRecordRepository.java
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
repository
.
repo
;
public
interface
IUploadRecordRepository
{
import
com.fedex.connect.common.model.biz.UploadRecord
;
import
java.util.List
;
public
interface
IUploadRecordRepository
{
/**
* @Author mt
* @Description 上传记录保存或更新
* @Date 2024/11/19
* @param entity
* @return com.fedex.connect.common.model.biz.UploadRecord
*/
UploadRecord
save
(
UploadRecord
entity
);
/**
* @Author mt
* @Description 上传记录批量保存或更新
* @Date 2024/11/19
* @param list
* @return void
*/
void
saveAll
(
List
<
UploadRecord
>
list
);
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/IUserConsignmentMappingRepository.java
0 → 100644
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
repository
.
repo
;
import
com.fedex.connect.common.model.biz.UserConsignmentMapping
;
import
java.util.List
;
public
interface
IUserConsignmentMappingRepository
{
/**
* @Author mt
* @Description 根据用户id,运单号查找用户运单关系映射记录
* @Date 2024/11/19
* @param userId
* @param consignmentId
* @return com.fedex.connect.common.model.biz.UserConsignmentMapping
*/
UserConsignmentMapping
findByUserIdConsignmentId
(
Long
userId
,
Long
consignmentId
);
/**
* @Author mt
* @Description 用户与运单映射信息保存或更新
* @Date 2024/11/19
* @param entity
* @return com.fedex.connect.common.model.biz.UserConsignmentMapping
*/
UserConsignmentMapping
save
(
UserConsignmentMapping
entity
);
/**
* @Author mt
* @Description 用户与运单映射信息批量保存或更新
* @Date 2024/11/19
* @param list
* @return void
*/
void
saveAll
(
List
<
UserConsignmentMapping
>
list
);
}
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/AttachmentRepositoryImpl.java
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
repository
.
repo
.
impl
;
import
com.fedex.connect.common.model.biz.Attachment
;
import
com.fedex.connect.common.model.biz.UploadRecord
;
import
com.fedex.connect.customer.data.dto.AttachmentHistoryDto
;
import
com.fedex.connect.customer.data.query.AttachmentHistoryQuery
;
import
com.fedex.connect.customer.data.query.UserConsignmentInfoQuery
;
...
...
@@ -28,4 +29,27 @@ public class AttachmentRepositoryImpl extends BaseDao implements IAttachmentRepo
public
Attachment
queryInfo
(
UserConsignmentInfoQuery
userConsignmentInfoQuery
){
return
attachmentExtMapper
.
queryInfo
(
userConsignmentInfoQuery
);
}
@Override
public
Attachment
save
(
Attachment
entity
)
{
if
(
entity
!=
null
)
{
if
(
entity
.
getId
()
==
null
||
entity
.
getId
().
longValue
()
<=
0
)
{
attachmentMapper
.
insertSelective
(
entity
);
}
else
if
(
entity
.
getId
()
!=
null
&&
entity
.
getId
().
longValue
()
>
0
){
attachmentMapper
.
updateByPrimaryKeySelective
(
entity
);
}
}
return
entity
;
}
@Override
public
void
saveAll
(
List
<
Attachment
>
list
)
{
list
.
stream
().
forEach
(
p
->{
if
(
p
.
getId
()
==
null
||
p
.
getId
().
longValue
()
<=
0
){
attachmentMapper
.
insertSelective
(
p
);
}
else
if
(
p
.
getId
()
!=
null
&&
p
.
getId
().
longValue
()
>
0
){
attachmentMapper
.
updateByPrimaryKeySelective
(
p
);
}
});
}
}
\ No newline at end of file
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/UploadRecordRepositoryImpl.java
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
repository
.
repo
.
impl
;
import
com.fedex.connect.common.model.biz.UploadRecord
;
import
com.fedex.connect.customer.repository.base.BaseDao
;
import
com.fedex.connect.customer.repository.repo.IUploadRecordRepository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
UploadRecordRepositoryImpl
extends
BaseDao
implements
IUploadRecordRepository
{
@Override
public
UploadRecord
save
(
UploadRecord
entity
)
{
if
(
entity
!=
null
)
{
if
(
entity
.
getId
()
==
null
||
entity
.
getId
().
longValue
()
<=
0
)
{
uploadRecordMapper
.
insertSelective
(
entity
);
}
else
if
(
entity
.
getId
()
!=
null
&&
entity
.
getId
().
longValue
()
>
0
){
uploadRecordMapper
.
updateByPrimaryKeySelective
(
entity
);
}
}
return
entity
;
}
@Override
public
void
saveAll
(
List
<
UploadRecord
>
list
)
{
list
.
stream
().
forEach
(
p
->{
if
(
p
.
getId
()
==
null
||
p
.
getId
().
longValue
()
<=
0
){
uploadRecordMapper
.
insertSelective
(
p
);
}
else
if
(
p
.
getId
()
!=
null
&&
p
.
getId
().
longValue
()
>
0
){
uploadRecordMapper
.
updateByPrimaryKeySelective
(
p
);
}
});
}
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/UserConsignmentMappingRepositoryImpl.java
0 → 100644
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
repository
.
repo
.
impl
;
import
com.fedex.connect.common.dependencies.enums.base.StatusEnum
;
import
com.fedex.connect.common.model.biz.UserConsignmentMapping
;
import
com.fedex.connect.common.model.biz.UserConsignmentMappingExample
;
import
com.fedex.connect.customer.repository.base.BaseDao
;
import
com.fedex.connect.customer.repository.repo.IUserConsignmentMappingRepository
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
@Repository
public
class
UserConsignmentMappingRepositoryImpl
extends
BaseDao
implements
IUserConsignmentMappingRepository
{
/**
* @Author mt
* @Description 根据用户id,运单号查找用户运单关系映射记录
* @Date 2024/11/19
* @param userId
* @param consignmentId
* @return com.fedex.connect.common.model.biz.UserConsignmentMapping
*/
public
UserConsignmentMapping
findByUserIdConsignmentId
(
Long
userId
,
Long
consignmentId
){
UserConsignmentMappingExample
example
=
new
UserConsignmentMappingExample
();
UserConsignmentMappingExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andConsignmentIdEqualTo
(
consignmentId
);
criteria
.
andStatusEqualTo
(
StatusEnum
.
YES
.
getCode
());
return
CollectionUtils
.
firstElement
(
userConsignmentMappingMapper
.
selectByExample
(
example
));
}
@Override
public
UserConsignmentMapping
save
(
UserConsignmentMapping
entity
)
{
if
(
entity
!=
null
)
{
if
(
entity
.
getId
()
==
null
||
entity
.
getId
().
longValue
()
<=
0
)
{
userConsignmentMappingMapper
.
insertSelective
(
entity
);
}
else
if
(
entity
.
getId
()
!=
null
&&
entity
.
getId
().
longValue
()
>
0
){
userConsignmentMappingMapper
.
updateByPrimaryKeySelective
(
entity
);
}
}
return
entity
;
}
@Override
public
void
saveAll
(
List
<
UserConsignmentMapping
>
list
)
{
list
.
stream
().
forEach
(
p
->{
if
(
p
.
getId
()
==
null
||
p
.
getId
().
longValue
()
<=
0
){
userConsignmentMappingMapper
.
insertSelective
(
p
);
}
else
if
(
p
.
getId
()
!=
null
&&
p
.
getId
().
longValue
()
>
0
){
userConsignmentMappingMapper
.
updateByPrimaryKeySelective
(
p
);
}
});
}
}
server/biz-customer/src/main/java/com/fedex/connect/customer/service/base/BaseService.java
View file @
1bf750a
...
...
@@ -4,19 +4,18 @@ import com.fedex.connect.common.dependencies.util.ResponseUtils;
import
com.fedex.connect.customer.repository.repo.IAttachmentRepository
;
import
com.fedex.connect.customer.repository.repo.IConsignmentRepository
;
import
com.fedex.connect.customer.repository.repo.IUploadRecordRepository
;
import
com.fedex.connect.customer.repository.repo.IUserConsignmentMappingRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
public
class
BaseService
{
@Autowired
protected
ResponseUtils
responseUtils
;
@Autowired
protected
IConsignmentRepository
consignmentRepository
;
@Autowired
protected
IAttachmentRepository
attachmentRepository
;
@Autowired
protected
IUploadRecordRepository
uploadRecordRepository
;
@Autowired
protected
IUserConsignmentMappingRepository
userConsignmentMappingRepository
;
}
\ No newline at end of file
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
View file @
1bf750a
package
com
.
fedex
.
connect
.
customer
.
service
.
biz
.
impl
;
import
com.fedex.connect.common.dependencies.date.vo.ResponseVo
;
import
com.fedex.connect.common.dependencies.enums.base.StatusEnum
;
import
com.fedex.connect.common.dependencies.util.AssignmentFieldUtils
;
import
com.fedex.connect.common.dependencies.util.ResponseUtils
;
import
com.fedex.connect.common.model.biz.Attachment
;
import
com.fedex.connect.common.model.biz.Consignment
;
import
com.fedex.connect.common.model.biz.UploadRecord
;
import
com.fedex.connect.common.model.biz.UserConsignmentMapping
;
import
com.fedex.connect.common.model.sys.User
;
import
com.fedex.connect.customer.data.bo.AddBo
;
import
com.fedex.connect.customer.data.bo.ConsignmentBo
;
...
...
@@ -17,11 +20,15 @@ import com.fedex.connect.customer.util.service.biz.UploadRecordUtil;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Optional
;
/**
* @Author Szl
...
...
@@ -95,26 +102,91 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
* @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
*/
public
ResponseVo
submitConsignment
(
MultipartFile
[]
files
,
ConsignmentBo
consignmentBo
,
User
user
){
List
<
Attachment
>
attachmentList
=
null
;
try
{
/**
* 上传附件,并将附件信息返回
*/
List
<
Attachment
>
attachmentList
=
attachmentService
.
uploadAttachments
(
files
,
attachmentList
=
attachmentService
.
uploadAttachments
(
files
,
consignmentBo
.
getAttachmentBizTypeList
(),
user
,
consignmentBo
.
getConsignmentCode
());
/**
* 初始化运单信息
*/
Consignment
consignment
=
consignmentUtil
.
initConsignment
(
consignmentBo
,
user
);
Consignment
consignment
=
consignmentUtil
.
initConsignment
(
consignmentBo
,
user
);
/**
* 初始化上传记录信息
*/
// UploadRecord uploadRecord = uploadRecordUtil.initUploadRecord(consignment.getConsignmentCode());
UploadRecord
uploadRecord
=
uploadRecordUtil
.
initUploadRecord
(
consignment
.
getConsignmentCode
());
/**
* 保存运单相关信息
*/
this
.
saveSubmitInfo
(
consignment
,
attachmentList
,
uploadRecord
,
user
);
/**
* 初始化插入预清关文件推送任务日志,szl添加
*/
/**
* 初始化插入预清关文件邮件推送日志,mt添加
*/
}
catch
(
Exception
ex
){
/**
* 提交异常,需要删除对应已上传附件
*/
attachmentService
.
deleteAttachments
(
attachmentList
);
responseUtils
.
fail
(
ResponseCode
.
MESSAGE_CODE_30016
,
ex
);
}
return
responseUtils
.
success
(
ResponseCode
.
MESSAGE_CODE_30015
);
}
private
void
saveSubmitInfo
(
List
<
Attachment
>
attachmentList
,
Consignment
consignment
,
UploadRecord
uploadRecord
){
/**
* @Author mt
* @Description 保存运单相关信息
* @Date 2024/11/19
* @param consignment
* @param attachmentList
* @param uploadRecord
* @param user
* @return void
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveSubmitInfo
(
Consignment
consignment
,
List
<
Attachment
>
attachmentList
,
UploadRecord
uploadRecord
,
User
user
)
throws
Exception
{
/**
* 保存或更新运单表
*/
consignmentRepository
.
save
(
consignment
);
//设置上传记录表运单ID
uploadRecord
.
setConsignmentId
(
consignment
.
getId
());
/**
* 保存上传记录表
*/
uploadRecordRepository
.
save
(
uploadRecord
);
//设置附件表运单id,上传记录表id
Optional
.
ofNullable
(
attachmentList
).
orElse
(
new
ArrayList
<>()).
stream
().
filter
(
Objects:
:
nonNull
).
forEach
(
p
->{
p
.
setBizId
(
consignment
.
getId
());
p
.
setUploadRecordId
(
uploadRecord
.
getId
());
});
/**
* 保存附件表信息
*/
attachmentRepository
.
saveAll
(
attachmentList
);
//用户uuid与运单uuid不一致,则需要添加用户运单中间表信息
if
(!
user
.
getUserUuid
().
equals
(
consignment
.
getUserUuid
())){
/**
* 查找用户与运单关联信息
*/
UserConsignmentMapping
userConsignmentMapping
=
userConsignmentMappingRepository
.
findByUserIdConsignmentId
(
user
.
getId
(),
consignment
.
getId
());
if
(
Objects
.
isNull
(
userConsignmentMapping
)){
userConsignmentMapping
=
new
UserConsignmentMapping
();
userConsignmentMapping
.
setUserId
(
user
.
getId
());
userConsignmentMapping
.
setConsignmentId
(
consignment
.
getId
());
userConsignmentMapping
.
setStatus
(
StatusEnum
.
YES
.
getCode
());
AssignmentFieldUtils
.
assignmentTableBaseField
(
userConsignmentMapping
);
userConsignmentMappingRepository
.
save
(
userConsignmentMapping
);
}
}
}
}
\ No newline at end of file
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/util/service/biz/AttachmentUtil.java
View file @
1bf750a
...
...
@@ -21,9 +21,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.*
;
/**
* @Author mt
...
...
@@ -77,7 +75,7 @@ public class AttachmentUtil {
* @return void
*/
public
void
deleteAttachments
(
List
<
Attachment
>
attachmentList
){
attachmentList
.
stream
(
).
forEach
(
p
->{
Optional
.
ofNullable
(
attachmentList
).
orElse
(
new
ArrayList
<>()).
stream
().
filter
(
Objects:
:
nonNull
).
forEach
(
p
->{
String
filePathName
=
p
.
getFilePath
()
+
File
.
separator
+
p
.
getFileName
();
try
{
nioFileUtils
.
deleteIfExists
(
filePathName
);
...
...
@@ -105,6 +103,8 @@ public class AttachmentUtil {
String
suffix
=
sourceFileName
.
substring
(
sourceFileName
.
lastIndexOf
(
BaseSeparatorConstants
.
SEPARATOR_POINT
));
String
filePathName
=
null
;
try
{
//设置运单号
attachment
.
setConsignmentCode
(
consignmentCode
);
//用户上传原文件名称
attachment
.
setSourceFileName
(
sourceFileName
);
//生成系统文件名称例子:AWB_123456789012_20241023164532982_001.pdf
...
...
server/biz-customer/src/main/resources/message_en_US.properties
View file @
1bf750a
...
...
@@ -43,3 +43,4 @@ business_exception_30012=UUID不一致
business_exception_30013
=
文件名为:#{0},上传失败,请检查后重试
business_exception_30014
=
运单信息加载失败,请稍后重试
business_success_30015
=
提交成功
business_exception_30016
=
运单提交失败
\ No newline at end of file
...
...
server/biz-customer/src/main/resources/message_zh_CN.properties
View file @
1bf750a
...
...
@@ -43,3 +43,4 @@ business_exception_30012=UUID不一致
business_exception_30013
=
文件名为:#{0},上传失败,请检查后重试
business_exception_30014
=
运单信息加载失败,请稍后重试
business_success_30015
=
提交成功
business_exception_30016
=
运单提交失败
\ No newline at end of file
...
...
server/common-dao/src/main/java/com/fedex/connect/common/mapper/biz/UserConsignmentMappingMapper.xml
View file @
1bf750a
...
...
@@ -12,6 +12,7 @@
<result
column=
"MODIFY_TIME"
jdbcType=
"TIMESTAMP"
property=
"modifyTime"
/>
<result
column=
"MODIFY_USER_ID"
jdbcType=
"NUMERIC"
property=
"modifyUserId"
/>
<result
column=
"MODIFY_USER_NAME"
jdbcType=
"VARCHAR"
property=
"modifyUserName"
/>
<result
column=
"CONSIGNMENT_CODE"
jdbcType=
"VARCHAR"
property=
"consignmentCode"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -73,7 +74,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
ID, USER_ID, CONSIGNMENT_ID, STATUS, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME,
MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME
MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME
, CONSIGNMENT_CODE
</sql>
<select
id=
"selectByExample"
parameterType=
"com.fedex.connect.common.model.biz.UserConsignmentMappingExample"
resultMap=
"BaseResultMap"
>
<include
refid=
"OracleDialectPrefix"
/>
...
...
@@ -115,11 +116,11 @@
insert into ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING (ID, USER_ID, CONSIGNMENT_ID,
STATUS, CREATE_TIME, CREATE_USER_ID,
CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID,
MODIFY_USER_NAME)
MODIFY_USER_NAME
, CONSIGNMENT_CODE
)
values (#{id,jdbcType=NUMERIC}, #{userId,jdbcType=NUMERIC}, #{consignmentId,jdbcType=NUMERIC},
#{status,jdbcType=NUMERIC}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=NUMERIC},
#{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyUserId,jdbcType=NUMERIC},
#{modifyUserName,jdbcType=VARCHAR})
#{modifyUserName,jdbcType=VARCHAR}
, #{consignmentCode,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.fedex.connect.common.model.biz.UserConsignmentMapping"
>
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
...
...
@@ -155,6 +156,9 @@
<if
test=
"modifyUserName != null"
>
MODIFY_USER_NAME,
</if>
<if
test=
"consignmentCode != null"
>
CONSIGNMENT_CODE,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=NUMERIC},
...
...
@@ -185,6 +189,9 @@
<if
test=
"modifyUserName != null"
>
#{modifyUserName,jdbcType=VARCHAR},
</if>
<if
test=
"consignmentCode != null"
>
#{consignmentCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.fedex.connect.common.model.biz.UserConsignmentMappingExample"
resultType=
"java.lang.Long"
>
...
...
@@ -226,6 +233,9 @@
<if
test=
"record.modifyUserName != null"
>
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
</if>
<if
test=
"record.consignmentCode != null"
>
CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -242,7 +252,8 @@
CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR},
MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP},
MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC},
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -277,6 +288,9 @@
<if
test=
"modifyUserName != null"
>
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
</if>
<if
test=
"consignmentCode != null"
>
CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=NUMERIC}
</update>
...
...
@@ -290,7 +304,8 @@
CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR},
MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP},
MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC},
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR}
where ID = #{id,jdbcType=NUMERIC}
</update>
<sql
id=
"OracleDialectPrefix"
>
...
...
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/UserConsignmentMapping.java
View file @
1bf750a
...
...
@@ -58,6 +58,11 @@ public class UserConsignmentMapping implements Serializable {
*/
private
String
modifyUserName
;
/**
* 运单号
*/
private
String
consignmentCode
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -140,6 +145,14 @@ public class UserConsignmentMapping implements Serializable {
this
.
modifyUserName
=
modifyUserName
==
null
?
null
:
modifyUserName
.
trim
();
}
public
String
getConsignmentCode
()
{
return
consignmentCode
;
}
public
void
setConsignmentCode
(
String
consignmentCode
)
{
this
.
consignmentCode
=
consignmentCode
==
null
?
null
:
consignmentCode
.
trim
();
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -156,6 +169,7 @@ public class UserConsignmentMapping implements Serializable {
sb
.
append
(
", modifyTime="
).
append
(
modifyTime
);
sb
.
append
(
", modifyUserId="
).
append
(
modifyUserId
);
sb
.
append
(
", modifyUserName="
).
append
(
modifyUserName
);
sb
.
append
(
", consignmentCode="
).
append
(
consignmentCode
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
server/common-dao/src/main/java/com/fedex/connect/common/model/biz/UserConsignmentMappingExample.java
View file @
1bf750a
...
...
@@ -744,6 +744,76 @@ public class UserConsignmentMappingExample {
addCriterion
(
"MODIFY_USER_NAME not between"
,
value1
,
value2
,
"modifyUserName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeIsNull
()
{
addCriterion
(
"CONSIGNMENT_CODE is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeIsNotNull
()
{
addCriterion
(
"CONSIGNMENT_CODE is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeEqualTo
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE ="
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE <>"
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeGreaterThan
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE >"
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE >="
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeLessThan
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE <"
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE <="
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeLike
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE like"
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeNotLike
(
String
value
)
{
addCriterion
(
"CONSIGNMENT_CODE not like"
,
value
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"CONSIGNMENT_CODE in"
,
values
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"CONSIGNMENT_CODE not in"
,
values
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"CONSIGNMENT_CODE between"
,
value1
,
value2
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConsignmentCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"CONSIGNMENT_CODE not between"
,
value1
,
value2
,
"consignmentCode"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
server/common-dao/src/main/resources/generatorConfig.xml
View file @
1bf750a
...
...
@@ -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"-->
...
...
@@ -117,12 +117,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"-->
...
...
Please
register
or
login
to post a comment