jinhui.wang

Merge remote-tracking branch 'origin/master' into ver1.0.0-wjh

Showing 195 changed files with 1153 additions and 746 deletions
......@@ -9,6 +9,7 @@ cd ../../
base_dir=`pwd`
pName='package'
server='server'
prefix='ipc-'
mkdir $base_dir/${pName}
rm -f $base_dir/${pName}/*.war
......@@ -30,7 +31,7 @@ echo '######## 打包模块: '${moduleName}
cd $base_dir/${server}/${moduleName}
mvn clean install -Dmaven.test.skip=true -P$profile
oriName=${moduleName}-${sVersion}_${profile}.war.original
tarName=${moduleName}-${version}_${profile}.war
tarName=${prefix}${moduleName}-${version}_${profile}.war
cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
......@@ -41,7 +42,7 @@ echo '######## 打包模块: '${moduleName}
cd $base_dir/${server}/${moduleName}
mvn clean install -Dmaven.test.skip=true -P$profile
oriName=${moduleName}-${sVersion}_${profile}.war.original
tarName=${moduleName}-${version}_${profile}.war
tarName=${prefix}${moduleName}-${version}_${profile}.war
cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
......@@ -52,7 +53,7 @@ echo '######## 打包模块: '${moduleName}
cd $base_dir/${server}/${moduleName}
mvn clean install -Dmaven.test.skip=true -P$profile
oriName=${moduleName}-${sVersion}_${profile}.war.original
tarName=${moduleName}-${version}_${profile}.war
tarName=${prefix}${moduleName}-${version}_${profile}.war
cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
......@@ -63,7 +64,7 @@ echo '######## 打包模块: '${moduleName}
cd $base_dir/${server}/${moduleName}
mvn clean install -Dmaven.test.skip=true -P$profile
oriName=${moduleName}-${sVersion}_${profile}.war.original
tarName=${moduleName}-${version}_${profile}.war
tarName=${prefix}${moduleName}-${version}_${profile}.war
cp target/${oriName} $base_dir && mv $base_dir/${oriName} $base_dir/${pName}/${tarName}
echo '######## 打包完成目录: '$base_dir/${pName}/${tarName}
......
......@@ -14,8 +14,9 @@ public interface CustomerConstant {
interface VALIDATE_KEYS{
//最大上传文件个数100个
Integer UPLOAD_FILE_MAX_TOTAL = 100;
//最大上传总文件大小95M
Integer UPLOAD_FILE_MAX_SIZE = 95 * 1024 * 1024;
//文件大小95M
Integer FILE_MAX_SIZE = 95;
//最大上传总文件大小95kb
Integer UPLOAD_FILE_MAX_SIZE = FILE_MAX_SIZE * 1024 * 1024;
}
}
}
\ No newline at end of file
......
package com.fedex.connect.customer.controller.biz.impl;
import com.fedex.connect.common.dependencies.annotation.OperationMethodLog;
import com.fedex.connect.common.dependencies.contants.AnnotationConstants;
import com.fedex.connect.common.dependencies.util.FileUtil;
import com.fedex.connect.customer.controller.base.BaseController;
import com.fedex.connect.customer.controller.biz.IAttachmentController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Author Szl
* @Description 类说明 附件相关
......@@ -18,4 +27,15 @@ import org.springframework.web.bind.annotation.RestController;
@Api(value = "AttachmentControllerImpl", tags = {"附件操作相关"})
public class AttachmentController extends BaseController implements IAttachmentController {
@GetMapping(value = "/downLoadFile")
@OperationMethodLog(describe = "business_log_20008",remarkType = AnnotationConstants.LOG_REMARK_TYPE_SPECIAL,status = AnnotationConstants.LOG_STATUS_SHOW)
@ApiOperation(value = "下载单个文件")
public void downLoadFile(HttpServletRequest request, HttpServletResponse response,
@RequestParam(name = "path") String path, @RequestParam(name = "name") String name) throws Exception {
name = new String(name.getBytes("UTF-8"), "ISO-8859-1");
String contentType = FileUtil.getContentType(name);
response.setHeader("Content-Disposition", "attachment;filename=" + name +";content-type:"+contentType);
FileUtil.download(request, response, path + FileUtil.SIGN, name,contentType);
}
}
......
......@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
public class UploadRecordController extends BaseController implements IUploadRecordController {
@Override
@PostMapping("/queryHistoryList/{consignmentId}")
@PostMapping("/queryHistoryList")
@ApiOperation(value = "ResponseVo", notes = "运单历史上传记录查询")
@OperationMethodLog(describe = "business_log_20006")
public ResponseVo queryHistoryList(@RequestBody AttachmentHistoryQuery attachmentHistoryQuery) {
......
......@@ -31,4 +31,6 @@ public class ConsignmentBo {
//文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型)
@BaseNotBlank(describe = "business_field_31008")
private List<Attachment> attachmentBizTypeList;
//是否使用DM005标志
private Long ceFlag;
}
......
......@@ -8,5 +8,5 @@ public class ConsignmentAddDto {
* 是否为该用户的运单 1:是 0:否
*/
private Integer isCreatorFlag;
private Long consignmentId;
private ConsignmentDto consignment;
}
......
package com.fedex.connect.customer.data.dto;
import com.fedex.connect.common.model.biz.Consignment;
import lombok.Data;
@Data
public class ConsignmentDto extends Consignment {
private Long ceFlag;
}
......@@ -34,4 +34,6 @@ public class FindConsignmentsDto {
private String userInputOriginCountryCode;
private String userInputOriginCountry;
private Long ceFlag;
}
......
package com.fedex.connect.customer.data.query;
import com.fedex.connect.common.dependencies.util.DateUtil;
import com.fedex.connect.common.dependencies.util.Utils;
import com.fedex.connect.customer.data.PageBase;
import lombok.Data;
import org.springframework.util.CollectionUtils;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
import java.time.format.DateTimeFormatter;
import java.util.List;
/**
......@@ -24,15 +22,34 @@ public class ConsignmentQuery extends PageBase {
if (Utils.isNotEmpty(query.getConsignmentCode())) {
query.setConsignmentCodeList(Utils.split(query.getConsignmentCode(), "[;\\n]"));
}
if(!CollectionUtils.isEmpty(query.getConsignmentCodeList())) {
query.setCreateTimeFrom(null);
query.setCreateTimeTo(null);
}
//如果没有输入查询条件,则默认查三天的数据
if (CollectionUtils.isEmpty(query.getConsignmentCodeList()) && Utils.isEmpty(query.getConsignmentCode())){
if(!CollectionUtils.isEmpty(query.getConsignmentCodeList()) && Utils.isEmpty(query.getCreateTimeFrom()) && Utils.isEmpty(query.getCreateTimeTo())) {
// 获取当前日期,减去180天
LocalDate localDate = LocalDate.now().minusDays(180);
// 设置 createTimeFrom 为 180 天前的日期(不带时分秒)
String createTimeFrom = localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
query.setCreateTimeFrom(createTimeFrom);
// 获取当前日期(不带时分秒)
LocalDate currentDate = LocalDate.now();
// 设置 createTimeTo 为今天的日期(不带时分秒)
String createTimeTo = currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
query.setCreateTimeTo(createTimeTo);
}else if (Utils.isEmpty(query.getCreateTimeFrom()) && Utils.isEmpty(query.getCreateTimeTo())) {
// 获取当前日期,减去3天
LocalDate localDate = LocalDate.now().minusDays(3);
query.setCreateTimeFrom(DateUtil.timeFormat(Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant())));
query.setCreateTimeTo(DateUtil.timeFormat(new Date()));
// 设置 createTimeFrom 为 3 天前的日期(不带时分秒)
String createTimeFrom = localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
query.setCreateTimeFrom(createTimeFrom);
// 获取当前日期(不带时分秒)
LocalDate currentDate = LocalDate.now();
// 设置 createTimeTo 为今天的日期(不带时分秒)
String createTimeTo = currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
query.setCreateTimeTo(createTimeTo);
}
query.setStart(query.getStart());
return query;
......
......@@ -34,6 +34,10 @@ public enum ResponseCode {
MESSAGE_CODE_30014(30014,"business_exception_30014"),
MESSAGE_CODE_30015(30015,"business_success_30015"),
MESSAGE_CODE_30016(30016,"business_exception_30016"),
MESSAGE_CODE_30017(30017,"business_exception_30017"),
MESSAGE_CODE_30018(30018,"business_exception_30018"),
MESSAGE_CODE_30019(30019,"business_exception_30019"),
MESSAGE_CODE_30020(30020,"business_exception_30020"),
/******打个样,编写样例*****/
// MESSAGE_CODE_30001(30001,"business_exception_30001"),
......
......@@ -4,6 +4,7 @@ import com.fedex.connect.common.dao.biz.*;
import com.fedex.connect.customer.repository.dao.AttachmentExtMapper;
import com.fedex.connect.customer.repository.dao.ConsignmentExtMapper;
import com.fedex.connect.customer.repository.dao.UploadRecordExtMapper;
import com.fedex.connect.customer.repository.dao.UserExtMapper;
import org.springframework.beans.factory.annotation.Autowired;
public class BaseDao {
......@@ -25,4 +26,6 @@ public class BaseDao {
protected EmailMapper emailMapper;
@Autowired
protected UploadRecordExtMapper uploadRecordExtMapper;
@Autowired
protected UserExtMapper userExtMapper;
}
\ No newline at end of file
......
......@@ -25,8 +25,9 @@ public interface ConsignmentExtMapper {
") WHERE ROWNUM = 1")
Consignment findByConsignmentCode(@Param("consignmentCode") String consignmentCode, @Param("dateParam") LocalDate dateParam);
@Select("SELECT BC.* FROM T_BIZ_CONSIGNMENT BC LEFT JOIN T_BIZ_USER_CONSIGNMENT_MAPPING BUCM ON(BC.ID = BUCM.CONSIGNMENT_ID) " +
"WHERE BC.ID = #{query.consignmentId} AND (BC.USER_UUID = #{query.userUuid} OR BUCM.USER_ID = #{query.userId})")
@Select("SELECT BC.* FROM T_BIZ_CONSIGNMENT BC WHERE BC.ID = #{query.consignmentId}")
Consignment findConsignmentInfo(@Param("query") UserConsignmentInfoQuery query);
@Select("SELECT ID FROM T_BIZ_CONSIGNMENT WHERE ID = #{id} FOR UPDATE NOWAIT")
Long lockConsignmentRow(@Param("id") Long id);
}
......
package com.fedex.connect.customer.repository.dao;
import com.fedex.connect.common.model.sys.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface UserExtMapper {
@Select("SELECT * FROM T_SYS_USER WHERE USER_UUID = #{uuid}")
public User findUserByUuid(@Param("uuid") String uuid);
}
......@@ -33,7 +33,8 @@
c.SHIPPER_ACCOUNT,
c.USER_INPUT_SHIPPER_ACCOUNT,
c.USER_INPUT_ORIGIN_COUNTRY_CODE,
c.USER_INPUT_ORIGIN_COUNTRY
c.USER_INPUT_ORIGIN_COUNTRY,
MAX(m.CE_FLAG) AS CE_FLAG
</sql>
<select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto">
......@@ -47,14 +48,17 @@
(m.user_id = #{userId} AND m.consignment_id IS NOT NULL)
OR c.user_uuid = #{uuid,jdbcType=VARCHAR}
)
<if test="statusCode != null and statusCode != ''">
<if test="statusCode != null and statusCode != '' and statusCode != 'null'">
AND c.STATUS_CODE = #{statusCode}
</if>
<if test="statusCode == 'null'">
AND c.STATUS_CODE IS NULL
</if>
<if test="createTimeFrom != null and createTimeFrom != ''">
AND c.CREATE_TIME &gt;= TO_DATE(#{createTimeFrom}, 'YYYY-MM-DD HH24:MI:SS')
AND c.CREATE_TIME &gt; TO_DATE(#{createTimeFrom} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="createTimeTo != null and createTimeTo != ''">
AND c.CREATE_TIME &lt;= TO_DATE(#{createTimeTo}, 'YYYY-MM-DD HH24:MI:SS')
AND c.CREATE_TIME &lt; TO_DATE(#{createTimeTo} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="consignmentCodeList != null and consignmentCodeList.size() != 0">
AND c.CONSIGNMENT_CODE IN
......@@ -62,6 +66,13 @@
#{item}
</foreach>
</if>
GROUP BY
c.ID, c.CONSIGNMENT_CODE, c.RECIPIENT_CONTACT_NAME, c.RECIPIENT_COMPANY,
c.ORIGIN_COUNTRY, c.DOC_NONDOC_FLAG, c.CREATE_USER_NAME, c.CREATE_TIME,
c.MODIFY_TIME, c.STATUS_NAME, c.USER_UUID, c.SHIPPER_ACCOUNT,
c.USER_INPUT_SHIPPER_ACCOUNT, c.USER_INPUT_ORIGIN_COUNTRY_CODE,
c.USER_INPUT_ORIGIN_COUNTRY
ORDER BY c.CREATE_TIME DESC
<include refid="OracleDialectSuffix" />
</select>
......@@ -76,10 +87,10 @@
OR c.user_uuid = #{uuid,jdbcType=VARCHAR}
)
<if test="createTimeFrom != null and createTimeFrom != ''">
AND c.CREATE_TIME &gt;= TO_DATE(#{createTimeFrom}, 'YYYY-MM-DD HH24:MI:SS')
AND c.CREATE_TIME &gt; TO_DATE(#{createTimeFrom} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="createTimeTo != null and createTimeTo != ''">
AND c.CREATE_TIME &lt;= TO_DATE(#{createTimeTo}, 'YYYY-MM-DD HH24:MI:SS')
AND c.CREATE_TIME &lt; TO_DATE(#{createTimeTo} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="consignmentCodeList != null and consignmentCodeList.size() != 0">
AND c.CONSIGNMENT_CODE IN
......@@ -91,4 +102,5 @@
</mapper>
\ No newline at end of file
......
......@@ -327,7 +327,7 @@
FROM
T_BIZ_UPLOAD_RECORD
WHERE
CONSIGNMENT_ID = #{consignmentId}
CONSIGNMENT_ID = #{consignmentId} ORDER BY ID DESC
<include refid="OracleDialectSuffix" />
</select>
</mapper>
\ No newline at end of file
......
......@@ -23,4 +23,6 @@ public interface IConsignmentRepository {
Consignment saveOrUpdate(Consignment entity);
void saveOrUpdateAll(List<Consignment> list);
void lockConsignmentRow(Long id);
}
......
......@@ -30,4 +30,14 @@ public interface IUserConsignmentMappingRepository {
* @return void
*/
void saveOrUpdateAll(List<UserConsignmentMapping> list);
/**
* @Author Szl
* @Description 功能说明 根据用户id和运单号查询mapping
* @Date 2024/12/31
* @param userId
* @param consignmentCode
* @return com.fedex.connect.common.model.biz.UserConsignmentMapping
*/
UserConsignmentMapping findByUserIdAndConsignmentCode(Long userId,String consignmentCode);
}
......
package com.fedex.connect.customer.repository.repo;
import com.fedex.connect.common.model.sys.User;
public interface IUserRepository {
User findUserByUuid(String uuid);
}
......@@ -8,6 +8,7 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery;
import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import com.fedex.connect.customer.repository.base.BaseDao;
import com.fedex.connect.customer.repository.repo.IConsignmentRepository;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
......@@ -45,14 +46,10 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe
if (SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME.equals(consignment.getCreateUserName())){
consignment.setCreateUserName(user.getUserName());
}
if (!user.getUserUuid().equals(consignment.getUserUuid()) && !user.getAccountNo().equals(consignment.getShipperAccount())){
if (!StringUtils.equals(user.getUserUuid(), consignment.getUserUuid()) && (consignment.getCeFlag() != null && consignment.getCeFlag() == 0)) {
consignment.setRecipientContactName(null);
consignment.setRecipientCompany(null);
consignment.setDocNondocFlag(null);
consignment.setCreateUserName(null);
consignment.setCreateTime(null);
consignment.setModifyTime(null);
consignment.setStatusName(null);
consignment.setUserUuid(null);
consignment.setShipperAccount(null);
consignment.setOriginCountry(consignment.getUserInputOriginCountry());
......@@ -97,4 +94,16 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe
}
});
}
/**
* @Author mt
* @Description 为运单表增加行级锁,行级锁使用主键id作为标志,否则可能锁表
* @Date 2024/12/20
* @param id
* @return void
*/
@Override
public void lockConsignmentRow(Long id){
consignmentExtMapper.lockConsignmentRow(id);
}
}
......
......@@ -51,4 +51,22 @@ public class UserConsignmentMappingRepositoryImpl extends BaseDao implements IUs
}
});
}
/**
* @Author Szl
* @Description 功能说明 根据用户id和运单号查询mapping
* @Date 2024/12/31
* @param userId
* @param consignmentCode
* @return com.fedex.connect.common.model.biz.UserConsignmentMapping
*/
@Override
public UserConsignmentMapping findByUserIdAndConsignmentCode(Long userId,String consignmentCode){
UserConsignmentMappingExample example = new UserConsignmentMappingExample();
UserConsignmentMappingExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andConsignmentCodeEqualTo(consignmentCode);
criteria.andStatusEqualTo(StatusEnum.YES.getCode());
return CollectionUtils.firstElement(userConsignmentMappingMapper.selectByExample(example));
}
}
......
package com.fedex.connect.customer.repository.repo.impl;
import com.fedex.connect.common.model.sys.User;
import com.fedex.connect.customer.repository.base.BaseDao;
import com.fedex.connect.customer.repository.repo.IUserRepository;
import org.springframework.stereotype.Repository;
@Repository
public class UserRepositoryImpl extends BaseDao implements IUserRepository {
@Override
public User findUserByUuid(String uuid) {
return userExtMapper.findUserByUuid(uuid);
}
}
package com.fedex.connect.customer.service.biz;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.biz.UploadRecord;
import com.fedex.connect.common.model.sys.User;
public interface IEmailService {
void saveNotificationEmail(Consignment consignment, User user) throws Exception;
void savePushConsignmentFileEmail(Consignment consignment, UploadRecord uploadRecord) throws Exception;
}
......
......@@ -78,8 +78,8 @@ public class AttachmentServiceImpl extends BaseService implements IAttachmentSer
++i;
}
}catch(Exception ex){
//如果上传过程中存在失败,则所有已上传的文件进行删除
attachmentUtil.deleteAttachments(attachmentList);
//如果上传过程中存在失败,则所有已上传的文件进行删除,已上传文件不进行删除
// attachmentUtil.deleteAttachments(attachmentList);
throw ex;
}
return attachmentList;
......
......@@ -7,11 +7,13 @@ 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.dto.FindConsignmentsDto;
import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import com.fedex.connect.customer.data.query.ConsignmentQuery;
import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import com.fedex.connect.customer.enums.ResponseCode;
import com.fedex.connect.customer.service.base.BaseService;
import com.fedex.connect.customer.service.biz.IConsignmentQueryService;
import com.fedex.connect.customer.util.service.biz.ConsignmentQueryUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -24,6 +26,10 @@ import java.util.Objects;
*/
@Service
public class ConsignmentQueryServiceImpl extends BaseService implements IConsignmentQueryService {
@Autowired
ConsignmentQueryUtil consignmentQueryUtil;
/**
* @Author Szl
* @Description 功能说明 运单查询
......@@ -60,19 +66,12 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign
* @param userConsignmentInfoQuery
* @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
*/
public ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery){
public ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery) {
Consignment consignment = consignmentRepository.findConsignmentInfo(userConsignmentInfoQuery);
if(Objects.nonNull(consignment)
&& !consignment.getUserUuid().equals(userConsignmentInfoQuery.getUserUuid())
&& !consignment.getShipperAccount().equals(userConsignmentInfoQuery.getShipperAccount())){
Consignment consignmentTemp = new Consignment();
consignmentTemp.setId(consignment.getId());
consignmentTemp.setConsignmentCode(consignment.getConsignmentCode());
consignmentTemp.setShipperAccount(consignment.getShipperAccount());
consignmentTemp.setOriginCountry(consignment.getOriginCountry());
consignmentTemp.setDestinationCountry(consignment.getDestinationCountry());
consignment = consignmentTemp;
}
return responseUtils.success(consignment);
/**
* 对查询数据进行筛选
*/
Consignment resultConsignment = consignmentQueryUtil.findConsignment(userConsignmentInfoQuery,consignment);
return responseUtils.success(resultConsignment);
}
}
}
\ No newline at end of file
......
......@@ -2,7 +2,11 @@ package com.fedex.connect.customer.service.biz.impl;
import com.fedex.connect.common.dependencies.contants.DigitConstants;
import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
import com.fedex.connect.common.model.biz.*;
import com.fedex.connect.common.dependencies.exception.OpErrorException;
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;
......@@ -11,28 +15,25 @@ import com.fedex.connect.customer.enums.ResponseCode;
import com.fedex.connect.customer.service.base.BaseService;
import com.fedex.connect.customer.service.biz.IAttachmentService;
import com.fedex.connect.customer.service.biz.IConsignmentService;
import com.fedex.connect.customer.service.biz.IEmailService;
import com.fedex.connect.customer.util.service.biz.ConsignmentUtil;
import com.fedex.connect.customer.util.service.biz.PushObUtil;
import com.fedex.connect.customer.util.service.biz.UploadRecordUtil;
import com.fedex.connect.customer.util.service.biz.UserConsignmentMappingUtil;
import com.fedex.connect.customer.validate.controller.biz.AttachmentValidate;
import lombok.extern.slf4j.Slf4j;
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.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* @Author Szl
* @Description 类说明 运单操作相关service
* @Date 2024/10/31
*/
@Slf4j
@Service
public class ConsignmentServiceImpl extends BaseService implements IConsignmentService {
@Autowired
......@@ -40,13 +41,9 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
@Autowired
private UploadRecordUtil uploadRecordUtil;
@Autowired
private UserConsignmentMappingUtil userConsignmentMappingUtil;
@Autowired
private PushObUtil pushObUtil;
@Autowired
private IAttachmentService attachmentService;
@Autowired
private IEmailService emailService;
private AttachmentValidate attachmentValidate;
/**
* @Author Szl
......@@ -57,6 +54,15 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
* @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
*/
public ResponseVo add(AddBo bo, User user){
ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
if (StringUtils.isEmpty(bo.getConsignmentCode()) || !bo.getConsignmentCode().matches("\\d{12}")) {
consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
responseUtils.fail(ResponseCode.MESSAGE_CODE_30017);
}
if (!StringUtils.isEmpty(bo.getShipperAccount()) && !bo.getShipperAccount().matches("\\d{9}")) {
consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
responseUtils.fail(ResponseCode.MESSAGE_CODE_30019);
}
//查询运单表是否存在已提交的运单
LocalDate thirtyDaysAgo = LocalDate.now().minusDays(30);
Consignment consignment = consignmentRepository.findByConsignmentCode(bo.getConsignmentCode(),thirtyDaysAgo);
......@@ -64,7 +70,6 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
* 不存在则直接返回
*/
if (consignment == null){
ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ZERO);
if (!StringUtils.isEmpty(bo.getShipperAccount())){
if (Objects.equals(user.getAccountNo(),bo.getShipperAccount())){
......@@ -73,7 +78,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
/**
* 不存在运单,并且没有填写shipperAccount,则直接返回
*/
return responseUtils.success(consignmentAddDto);
return responseUtils.success(ResponseCode.MESSAGE_CODE_30020,consignmentAddDto);
}
}else {
/**
......@@ -83,14 +88,23 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
}
}
/**
* 存在运单则获取mapping表
*/
UserConsignmentMapping byUserIdAndConsignmentCode = userConsignmentMappingRepository.findByUserIdAndConsignmentCode(user.getId(), consignment.getConsignmentCode());
Long ceFlag = 1L;
if (byUserIdAndConsignmentCode == null){
ceFlag = 3L;
}else if (byUserIdAndConsignmentCode.getCeFlag() != null){
ceFlag = byUserIdAndConsignmentCode.getCeFlag();
}
/**
* 根据是否是DM501返回不同的提示
*/
if (StringUtils.isEmpty(consignment.getUserUuid())){
if (StringUtils.isEmpty(consignment.getUserUuid()) && StringUtils.isEmpty(consignment.getShipperAccount())){
/**
* 非501数据
*/
if (StringUtils.isEmpty(bo.getShipperAccount())){
ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
return responseUtils.success(consignmentAddDto);
}
......@@ -99,7 +113,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
/**
* 501数据
*/
return consignmentUtil.consignmentCheckWithCe(consignment,bo,user);
return consignmentUtil.consignmentCheckWithCe(consignment,bo,user,ceFlag);
}
}
......@@ -122,6 +136,11 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
consignmentBo.getAttachmentBizTypeList(),
user,
consignmentBo.getConsignmentCode());
/**
* 拷贝附件后,需要再次进行附件信息验证
*/
attachmentValidate.validateAttachment(attachmentList);
/**
* 初始化运单信息
*/
......@@ -129,87 +148,24 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
/**
* 初始化上传记录信息
*/
UploadRecord uploadRecord = uploadRecordUtil.initUploadRecord(consignment.getConsignmentCode());
UploadRecord uploadRecord = uploadRecordUtil.initUploadRecord(consignment.getConsignmentCode(),user);
/**
* 保存运单相关信息
*/
this.submitInfo(consignment,attachmentList,uploadRecord,user);
consignmentUtil.submitInfo(consignment,attachmentList,uploadRecord,user,consignmentBo.getCeFlag());
}catch(OpErrorException ex){
/**
* 提交异常,需要删除对应已上传附件,已上传文件不进行删除
*/
// attachmentService.deleteAttachments(attachmentList);
throw ex;
}catch(Exception ex){
/**
* 提交异常,需要删除对应已上传附件
* 提交异常,需要删除对应已上传附件,已上传文件不进行删除
*/
attachmentService.deleteAttachments(attachmentList);
// attachmentService.deleteAttachments(attachmentList);
responseUtils.fail(ResponseCode.MESSAGE_CODE_30016,ex);
}
return responseUtils.success(ResponseCode.MESSAGE_CODE_30015);
}
/**
* @Author mt
* @Description 保存运单相关信息
* @Date 2024/11/19
* @param consignment
* @param attachmentList
* @param uploadRecord
* @param user
* @return void
*/
@Transactional(rollbackFor = Exception.class)
public void submitInfo(Consignment consignment,
List<Attachment> attachmentList,
UploadRecord uploadRecord,
User user) throws Exception{
/**
* 保存或更新运单表
*/
consignmentRepository.saveOrUpdate(consignment);
//设置上传记录表运单ID
uploadRecord.setConsignmentId(consignment.getId());
/**
* 保存上传记录表
*/
uploadRecordRepository.saveOrUpdate(uploadRecord);
//设置附件表运单id,上传记录表id
Optional.ofNullable(attachmentList).orElse(new ArrayList<>()).stream().filter(Objects::nonNull).forEach(p->{
p.setBizId(consignment.getId());
p.setUploadRecordId(uploadRecord.getId());
});
/**
* 保存附件表信息
*/
attachmentRepository.saveOrUpdateAll(attachmentList);
//用户uuid与运单uuid不一致,则需要添加用户运单中间表信息
if(!user.getUserUuid().equals(consignment.getUserUuid())){
/**
* 查找用户与运单关联信息
*/
UserConsignmentMapping userConsignmentMapping = userConsignmentMappingRepository.findByUserIdConsignmentId(user.getId(),consignment.getId());
if(Objects.isNull(userConsignmentMapping)){
/**
* 初始化插入预清关文件推送任务日志
*/
userConsignmentMapping = userConsignmentMappingUtil.initUserConsignmentMapping(user.getId(),consignment.getId());
/**
* 初始化插入预清关文件推送任务日志
*/
userConsignmentMappingRepository.saveOrUpdate(userConsignmentMapping);
}
}
/**
* Todo 初始化插入预清关文件推送任务日志,szl添加
*/
/**
* 初始化插入预清关文件邮件推送日志,mt添加
*/
PushOb pushOb = pushObUtil.initPushOb(consignment,user);
/**
* 初始化插入提醒发件人邮件日志
*/
emailService.saveNotificationEmail(consignment,user);
/**
* 推送进口文件主表
*/
pushObRepository.saveOrUpdate(pushOb);
}
}
\ No newline at end of file
......
......@@ -2,6 +2,7 @@ package com.fedex.connect.customer.service.biz.impl;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.biz.Email;
import com.fedex.connect.common.model.biz.UploadRecord;
import com.fedex.connect.common.model.sys.User;
import com.fedex.connect.customer.service.base.BaseService;
import com.fedex.connect.customer.service.biz.IEmailService;
......@@ -26,7 +27,7 @@ public class EmailServiceImpl extends BaseService implements IEmailService {
*/
@Override
public void saveNotificationEmail(Consignment consignment, User user) throws Exception {
if (!StringUtils.isEmpty(consignment.getUserUuid()) && consignment.getUserUuid().equals(user.getUserUuid())){
if (StringUtils.isEmpty(consignment.getUserUuid()) || consignment.getUserUuid().equals(user.getUserUuid())) {
return;
}
/**
......@@ -39,4 +40,17 @@ public class EmailServiceImpl extends BaseService implements IEmailService {
*/
emailRepository.save(email);
}
@Override
public void savePushConsignmentFileEmail(Consignment consignment,UploadRecord uploadRecord) throws Exception {
/**
* 初始化Email对象
*/
Email email = new Email();
emailUtil.initPushConsignmentFileEmail(email,consignment, uploadRecord);
/**
* 保存入库
*/
emailRepository.save(email);
}
}
......
......@@ -38,7 +38,7 @@ public class UploadRecordServiceImpl extends BaseService implements IUploadRecor
AttachmentHistoryDto attachmentHistoryDto = new AttachmentHistoryDto();
attachmentHistoryDto.setUploadRecord(uploadRecord);
attachmentHistoryDto.setCreatorFlag(
(uploadRecord.getCreateUserId() != null) ?
(uploadRecord.getCreateUserId() != null) && uploadRecord.getCreateUserId().equals(user.getId()) ?
DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO
);
attachmentHistoryDtos.add(attachmentHistoryDto);
......
......@@ -52,10 +52,10 @@ public class AttachmentUtil {
private void initAttachment(Attachment attachment,String bizType,User user) throws Exception{
DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(bizType);
attachment.setBizTypeCode(attachmentBizTypeEntries.getCode());
attachment.setBizTypeName(attachmentBizTypeEntries.getEnglishName());
attachment.setBizTypeName(attachmentBizTypeEntries.getDescription());
DictionaryEntries attachmentFileTypeEntries = cacheSystem.getDicAttachmentFileType(AttachmentFileTypeEnum.FILE.getCode());
attachment.setFileTypeCode(attachmentFileTypeEntries.getCode());
attachment.setFileTypeName(attachmentFileTypeEntries.getEnglishName());
attachment.setFileTypeName(attachmentFileTypeEntries.getDescription());
attachment.setStatus(StatusEnum.YES.getCode());
attachment.setCreateUserId(user.getId());
attachment.setCreateUserName(user.getUserName());
......@@ -142,6 +142,7 @@ public class AttachmentUtil {
public static MultipartFile findFileByName(MultipartFile[] files, String fileName) {
for (MultipartFile file : files) {
log.info("fileName:" + file.getOriginalFilename());
if (file.getOriginalFilename().equals(fileName)) {
return file; // 找到匹配的文件,返回该文件
}
......
package com.fedex.connect.customer.util.service.biz;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.biz.UserConsignmentMapping;
import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import com.fedex.connect.customer.repository.repo.IUserConsignmentMappingRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Objects;
/**
* @Author mt
* @Description 运单数据查询处理
* @Date 2024/12/24
*/
@Slf4j
@Component
public class ConsignmentQueryUtil {
@Autowired
protected IUserConsignmentMappingRepository userConsignmentMappingRepository;
/**
* @Author mt
* @Description 运单查询数据筛选
* @Date 2024/12/24
* @param userConsignmentInfoQuery
* @param consignment
* @return com.fedex.connect.common.model.biz.Consignment
*/
public Consignment findConsignment(UserConsignmentInfoQuery userConsignmentInfoQuery,Consignment consignment){
/**
* 查询mapping表
*/
UserConsignmentMapping byUserIdAndConsignmentCode = userConsignmentMappingRepository.findByUserIdAndConsignmentCode(userConsignmentInfoQuery.getUserId(), consignment.getConsignmentCode());
Consignment resultConsignment = null;
if(Objects.nonNull(consignment)){
//uuid相同,则将运单所有信息返回给到前端
if(Objects.equals(userConsignmentInfoQuery.getUserUuid(),consignment.getUserUuid()) || (byUserIdAndConsignmentCode.getCeFlag() == null || byUserIdAndConsignmentCode.getCeFlag() == 1L)){
//1:如果运单UUID与登录账号UUID相同或者用户shipperAccount与运单shipperAccount相同,则显示运单、收发件人信息,以及501信息
resultConsignment = consignment;
}else {
//如果运单UUID与登录账号UUID不同,用户shipperAccount与运单录入的shipperAccount一致,则只显示用户录入的运单号、shipperAccount、始发国
resultConsignment = new Consignment();
resultConsignment.setId(consignment.getId());
resultConsignment.setConsignmentCode(consignment.getConsignmentCode());
resultConsignment.setUserInputOriginCountry(consignment.getUserInputOriginCountry());
resultConsignment.setUserInputOriginCountryCode(consignment.getUserInputOriginCountryCode());
resultConsignment.setUserInputShipperAccount(consignment.getUserInputShipperAccount());
resultConsignment.setDestinationCountry(consignment.getDestinationCountry());
resultConsignment.setDestinationCountryCode(consignment.getDestinationCountryCode());
}
}
return resultConsignment;
}
}
......@@ -2,23 +2,49 @@ package com.fedex.connect.customer.util.service.biz;
import com.fedex.connect.common.dependencies.enums.biz.EmailStatusEnum;
import com.fedex.connect.common.dependencies.enums.biz.EmailTypeEnum;
import com.fedex.connect.common.dependencies.template.clearanceEmail.DuplicateEmailTemplate;
import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.biz.Email;
import com.fedex.connect.common.model.biz.UploadRecord;
import com.fedex.connect.customer.repository.repo.IUserRepository;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Optional;
@Component
public class EmailUtil {
@Autowired
private IUserRepository iUserRepository;
@Autowired
private DuplicateEmailTemplate duplicateEmailTemplate;
public void initNotificationEmail(Email email, Consignment consignment) throws Exception{
email.setBizId(consignment.getId());
email.setBizCode(consignment.getConsignmentCode());
email.setToAddress(consignment.getShipperEmail());
email.setSubject("");
email.setSubject("");
String emailAddress = Optional.ofNullable(consignment.getUserUuid())
.map(iUserRepository::findUserByUuid)
.map(user -> StringUtils.defaultIfEmpty(user.getEmail(), consignment.getShipperEmail()))
.orElse(consignment.getShipperEmail());
email.setToAddress(emailAddress);
email.setSubject(duplicateEmailTemplate.getTitle(email.getBizCode()));
email.setTypeName(EmailTypeEnum.NOTIFICATION_SENDER.getMsg());
email.setTypeCode(EmailTypeEnum.NOTIFICATION_SENDER.getCode());
email.setStatusName(EmailStatusEnum.PENDING.getMsg());
email.setStatusCode(EmailStatusEnum.PENDING.getCode());
AssignmentFieldUtils.assignmentTableBaseField(email);
}
public void initPushConsignmentFileEmail(Email email, Consignment consignment,UploadRecord uploadRecord) throws Exception{
email.setBizId(uploadRecord.getId());
email.setBizCode(consignment.getConsignmentCode());
email.setSubject("");
email.setTypeName(EmailTypeEnum.PUSH_CON_FILE.getMsg());
email.setTypeCode(EmailTypeEnum.PUSH_CON_FILE.getCode());
email.setStatusName(EmailStatusEnum.PENDING.getMsg());
email.setStatusCode(EmailStatusEnum.PENDING.getCode());
AssignmentFieldUtils.assignmentTableBaseField(email);
}
}
......
......@@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
import com.fedex.connect.common.model.bi.DictionaryEntries;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.biz.PushOb;
import com.fedex.connect.common.model.biz.UploadRecord;
import com.fedex.connect.common.model.sys.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -29,14 +30,15 @@ public class PushObUtil {
* @param
* @return com.fedex.connect.common.model.biz.PushOb
*/
public PushOb initPushOb(Consignment consignment, User user) throws Exception{
public PushOb initPushOb(Consignment consignment, UploadRecord uploadRecord, User user) throws Exception{
DictionaryEntries pushObStatus = cacheSystem.getDicPushObStatus(PushObStatusEnum.TO_BE_SENT.getCode());
PushOb pushOb = new PushOb();
pushOb.setConsignmentId(consignment.getId());
pushOb.setConsignmentCode(consignment.getConsignmentCode());
pushOb.setPushNum(DigitConstants.DIGIT_ZERO_LONG);
pushOb.setStatusCode(pushObStatus.getCode());
pushOb.setStatusName(pushObStatus.getEnglishName());
pushOb.setStatusName(pushObStatus.getDescription());
pushOb.setUploadRecordId(uploadRecord.getId());
pushOb.setCreateUserId(user.getId());
pushOb.setCreateUserName(user.getUserName());
pushOb.setModifyUserId(user.getId());
......
......@@ -6,6 +6,7 @@ import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum;
import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
import com.fedex.connect.common.model.bi.DictionaryEntries;
import com.fedex.connect.common.model.biz.UploadRecord;
import com.fedex.connect.common.model.sys.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -28,7 +29,7 @@ public class UploadRecordUtil {
* @param consignmentCode
* @return com.fedex.connect.common.model.biz.UploadRecord
*/
public UploadRecord initUploadRecord(String consignmentCode) throws Exception{
public UploadRecord initUploadRecord(String consignmentCode, User user) throws Exception{
DictionaryEntries consignmentStatusDic = cacheSystem.getDicConsignmentStatus(ConsignmentStatusEnum.CONSIGNMENT_STATUS_01.getCode());
UploadRecord uploadRecord = new UploadRecord();
//记录当前运单号
......@@ -36,6 +37,10 @@ public class UploadRecordUtil {
//记录当前运单状态
uploadRecord.setStatusCode(consignmentStatusDic.getCode());
uploadRecord.setStatusName(consignmentStatusDic.getEnglishName());
uploadRecord.setCreateUserId(user.getId());
uploadRecord.setCreateUserName(user.getUserName());
uploadRecord.setModifyUserId(user.getId());
uploadRecord.setModifyUserName(user.getUserName());
/**
* 初始化基础字段
*/
......
......@@ -2,6 +2,7 @@ package com.fedex.connect.customer.util.service.biz;
import com.fedex.connect.common.dependencies.enums.base.StatusEnum;
import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.biz.UserConsignmentMapping;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
......@@ -22,10 +23,11 @@ public class UserConsignmentMappingUtil {
* @param
* @return com.fedex.connect.common.model.biz.PushOb
*/
public UserConsignmentMapping initUserConsignmentMapping(Long userId,Long consignmentId) throws Exception{
public UserConsignmentMapping initUserConsignmentMapping(Long userId, Consignment consignment) throws Exception{
UserConsignmentMapping userConsignmentMapping = new UserConsignmentMapping();
userConsignmentMapping.setUserId(userId);
userConsignmentMapping.setConsignmentId(consignmentId);
userConsignmentMapping.setConsignmentId(consignment.getId());
userConsignmentMapping.setConsignmentCode(consignment.getConsignmentCode());
userConsignmentMapping.setStatus(StatusEnum.YES.getCode());
AssignmentFieldUtils.assignmentTableBaseField(userConsignmentMapping);
return userConsignmentMapping;
......
package com.fedex.connect.customer.validate.controller.biz;
import com.fedex.connect.common.dependencies.contants.DigitConstants;
import com.fedex.connect.common.dependencies.util.ResponseUtils;
import com.fedex.connect.common.dependencies.util.Utils;
import com.fedex.connect.common.model.biz.Attachment;
import com.fedex.connect.customer.constants.CustomerConstant;
import com.fedex.connect.customer.data.bo.ConsignmentBo;
import com.fedex.connect.customer.enums.ResponseCode;
......@@ -34,20 +34,52 @@ public class AttachmentValidate {
*/
public void validateFile(MultipartFile[] files, ConsignmentBo consignmentBo){
//文件为空
if(Objects.isNull(files)
|| files.length == DigitConstants.DIGIT_MINUS_ONE
|| Objects.isNull(consignmentBo)
if(Objects.isNull(consignmentBo)
|| Objects.isNull(consignmentBo.getAttachmentBizTypeList())){
responseUtils.fail(ResponseCode.MESSAGE_CODE_30006);
}
//上传最大文件个数限制
if(files.length > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){
if(Objects.nonNull(files) && files.length > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){
responseUtils.fail(ResponseCode.MESSAGE_CODE_30007,CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL);
}
//上传总文件大小限制
List<Long> fileSizeList = new ArrayList<>();
for(MultipartFile file : files){
fileSizeList.add(file.getSize());
if(Objects.nonNull(files)) {
for (MultipartFile file : files) {
fileSizeList.add(file.getSize());
}
}
//总文件大小
Long totalSize = Utils.listOf(fileSizeList).stream().filter(Objects::nonNull)
.mapToLong(f -> Optional.ofNullable(f).orElse(0L)).sum();
//最大上传总文件大小超过95M
if(totalSize > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_SIZE){
responseUtils.fail(ResponseCode.MESSAGE_CODE_30008,CustomerConstant.VALIDATE_KEYS.FILE_MAX_SIZE);
}
}
/**
* @Author mt
* @Description 附件信息校验
* @Date 2024/11/12
* @param files
* @return void
*/
public void validateAttachment(List<Attachment> files){
//文件为空
if(Objects.isNull(files)){
return;
}
//上传最大文件个数限制
if(Objects.nonNull(files) && files.size() > CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL){
responseUtils.fail(ResponseCode.MESSAGE_CODE_30007,CustomerConstant.VALIDATE_KEYS.UPLOAD_FILE_MAX_TOTAL);
}
//上传总文件大小限制
List<Long> fileSizeList = new ArrayList<>();
if(Objects.nonNull(files)) {
for (Attachment file : files) {
fileSizeList.add(file.getFileSize());
}
}
//总文件大小
Long totalSize = Utils.listOf(fileSizeList).stream().filter(Objects::nonNull)
......
package com.fedex.connect.customer.validate.controller.biz;
import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
import com.fedex.connect.common.dependencies.util.ResponseUtils;
import com.fedex.connect.customer.enums.ResponseCode;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -8,23 +8,7 @@ spring:
#系统环境
env: dev
export:
jwt:
securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
urlWhiteList:
- /icleartw/auth
- /icleartw/monitor/ok
- /icleartw/sysUser/logout
- /icleartw/swagger-resources
- /icleartw/webjars
uriWhiteList:
- /icleartw/swagger-ui.html
- /icleartw/swagger-ui/*
- /icleartw/v2/api-docs
- /icleartw/login.html
expire_1H: 7200
expire_1D: 604800
mail:
smtp:
host: smtp.qiye.aliyun.com
......
spring:
datasource:
jndi-name: jdbc/iclearConnectDS
jndi-name: jdbc/iclconnectDS
profiles:
#系统环境
env: prod
export:
jwt:
securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
urlWhiteList:
- /icleartw/auth
- /icleartw/monitor/ok
- /icleartw/sysUser/logout
- /icleartw/swagger-resources
- /icleartw/webjars
uriWhiteList:
- /icleartw/swagger-ui.html
- /icleartw/swagger-ui/*
- /icleartw/v2/api-docs
- /icleartw/login.html
expire_1H: 7200
expire_1D: 604800
mail:
smtp:
host: mapper.gslb.fedex.com
......@@ -38,4 +23,4 @@ export:
upload:
path:
attachment: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/attachment
\ No newline at end of file
attachment: /var/share/iClearPreCLR/upload/attachment
\ No newline at end of file
......
spring:
datasource:
jndi-name: jdbc/iclearConnectDS
jndi-name: jdbc/iclconnectDS
profiles:
#系统环境
env: test
export:
jwt:
securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
urlWhiteList:
- /icleartw/auth
- /icleartw/monitor/ok
- /icleartw/sysUser/logout
- /icleartw/swagger-resources
- /icleartw/webjars
uriWhiteList:
- /icleartw/swagger-ui.html
- /icleartw/swagger-ui/*
- /icleartw/v2/api-docs
- /icleartw/login.html
expire_1H: 7200
expire_1D: 604800
mail:
smtp:
host: smtp.qiye.aliyun.com
......
spring:
datasource:
jndi-name: jdbc/iclearConnectDS
jndi-name: jdbc/iclconnectDS
profiles:
#系统环境
env: uat
export:
jwt:
securityKey: C*F-JaNdRgUkXn2r5u8x/A?D(G+KbPeShVmYq3s6v9y$B&E)H@McQfTjWnZr4u7w
urlWhiteList:
- /icleartw/auth
- /icleartw/monitor/ok
- /icleartw/sysUser/logout
- /icleartw/swagger-resources
- /icleartw/webjars
uriWhiteList:
- /icleartw/swagger-ui.html
- /icleartw/swagger-ui/*
- /icleartw/v2/api-docs
- /icleartw/login.html
expire_1H: 7200
expire_1D: 604800
mail:
smtp:
host: mapper.gslb.fedex.com
......@@ -38,4 +23,4 @@ export:
upload:
path:
attachment: /var/share/iclearConnect/upload/attachment
\ No newline at end of file
attachment: /var/share/iClearPreCLR/upload/attachment
\ No newline at end of file
......
......@@ -29,6 +29,7 @@ import:
- /biz-customer/user/logout
- /biz-customer/swagger-resources
- /biz-customer/webjars
- /biz-customer/csrf
uriWhiteList:
- /biz-customer/swagger-ui.html
- /biz-customer/swagger-ui/*
......@@ -43,4 +44,8 @@ mybatis:
configuration:
#开启驼峰与下划线转换
map-underscore-to-camel-case: true
call-setters-on-nulls: true
\ No newline at end of file
call-setters-on-nulls: true
#全局异常拦截是否生效
common:
exception-advice-webconfig:
enable: true
\ No newline at end of file
......
......@@ -2,7 +2,7 @@
<configuration>
<springProfile name="dev,uat,prod">
<!-- 日志存放路径 -->
<property name="log.path" value="/var/fedex/iclearConnect/weblogic/iclearConnect/biz-customer" />
<property name="log.path" value="/var/fedex/iclconnect/weblogic/biz-customer" />
</springProfile>
<springProfile name="test">
<!-- 日志存放路径 -->
......
#******************系统操作日志记录,中文展示******************
business_log_20001=添加运单
business_log_20002=提交运单
business_log_20003=运单查询
business_log_20004=运单详细信息查询
business_log_20005=根据运单ID查询用户上传记录
business_log_20006=运单历史上传记录查询
business_log_20007=上传历史附件记录
business_log_20008=下载附件
system_exception_20003=提示信息过长,未保存成功
#******************鉴权相关提示,需要做国际化******************
#authentication包
#没有访问权限
system_exception_10001=No access rights.
#没有通过权限认证
system_exception_10002=Failed to pass the authentication.
#登录身份异常
system_exception_10003=Login identity is abnormal.
#登录超过8小时,请重新登录
system_exception_10004=Login has exceeded 8 hours, please log in again.
#登录已过期,请重新登录
system_exception_10005=Login has expired, please log in again.
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
#发货人计费账号
business_field_31001=shipper account
#运单ID
business_field_31002=tracking number ID
#运单号
business_field_31003=tracking number
#始发国编码
business_field_31004=origin country ID
#始发国名称
business_field_31005=origin country
#目的国编码
business_field_31006=destination country ID
#目的国全称
business_field_31007=destination country
#文件业务类型
business_field_31008=upload file type
#*********具体响应到前端**********
#{0}必填字段未填写
business_exception_30001=Required fields not filled in.
#单次最多可查询1000个运单号码
business_exception_30002=A maximum of 1,000 waybill numbers can be queried at a time.
#暂时没用,预留
business_exception_30003={0}不正确,请重新输入
business_exception_30004=The waybill you entered is generated by another user, whether continue uploading?
business_exception_30005=The waybill you entered is generated by another account, whether continue uploading?
#附件未上传
business_exception_30006=Attachment not uploaded.
#所有上传文件数量不超过{0}个文件
business_exception_30007=The total number of uploaded files should not exceed 100 files.
#所有上传文件总大小不超过{0}M
business_exception_30008=The total size of all uploaded files should not exceed {0}MB.
#暂时没用,预留
business_exception_30009=运单或发票未上传
#暂时没用,预留
business_exception_30010=文件类型不在:运单、发票、箱单、其他
#该运单已被其他人创建,不可以重复创建
business_exception_30011=This waybill has been created by someone else and cannot be created again.
#暂时没用,预留
business_exception_30012=UUID不一致
#文件名为:{0},上传失败,请检查后重试
business_exception_30013=File name: {0}, upload failed, please check and try again
#运单信息加载失败,请稍后重试
business_exception_30014=Air waybill information loading failed, please try again later
#提交成功
business_success_30015=Submission successful
#提交失败,请稍后重试!
business_exception_30016=Submission failed, please try again later!
#运单号填写错误,请检查!
business_exception_30017=Air waybill number is incorrect, please check!
#运单提交失败,该运单正在被其他用户操作,请稍后重试
business_exception_30018=Air waybill submission failed, the waybill is being operated by other users, please try again later.
#Shipper Account填写错误(Shipper Account是由9位数字组成)
business_exception_30019=Incorrect Shipper Account(Shipper Account is composed of 9 digits).
#您当前登录账号的shipper Account与您正在录入的shipperAccount不一致,请确认是否继续?
business_exception_30020=The Shipper Account you are entering is inconsistent with your login Shipper Account. Please confirm whether to continue?
\ No newline at end of file
......
......@@ -6,42 +6,77 @@ business_log_20004=运单详细信息查询
business_log_20005=根据运单ID查询用户上传记录
business_log_20006=运单历史上传记录查询
business_log_20007=上传历史附件记录
business_log_20008=下载附件
system_exception_20003=提示信息过长,未保存成功
#******************鉴权相关提示,需要做国际化******************
#authentication包
system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录已过期,请重新登录
#没有访问权限
system_exception_10001=No access rights.
#没有通过权限认证
system_exception_10002=Failed to pass the authentication.
#登录身份异常
system_exception_10003=Login identity is abnormal.
#登录超过8小时,请重新登录
system_exception_10004=Login has exceeded 8 hours, please log in again.
#登录已过期,请重新登录
system_exception_10005=Login has expired, please log in again.
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
business_field_31001=发货人计费账号
business_field_31002=运单ID
business_field_31003=运单号
business_field_31004=原产国编码
business_field_31005=原产国名称
business_field_31006=目的国编码
business_field_31007=目的国全称
business_field_31008=文件业务类型
#发货人计费账号
business_field_31001=shipper account
#运单ID
business_field_31002=tracking number ID
#运单号
business_field_31003=tracking number
#始发国编码
business_field_31004=origin country ID
#始发国名称
business_field_31005=origin country
#目的国编码
business_field_31006=destination country ID
#目的国全称
business_field_31007=destination country
#文件业务类型
business_field_31008=upload file type
#*********具体响应到前端**********
business_exception_30001=#{0}必填字段未填写
business_exception_30002=单次最多可查询1000个运单号码
business_exception_30003=#{0}不正确,请重新输入
business_exception_30004=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
business_exception_30005=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
business_exception_30006=附件上传不符合标准
business_exception_30007=所有上传文件数量不超过#{0}个文件
business_exception_30008=所有上传文件总大小不超过#{0}M
#{0}必填字段未填写
business_exception_30001=Required fields not filled in.
#单次最多可查询1000个运单号码
business_exception_30002=A maximum of 1,000 waybill numbers can be queried at a time.
#暂时没用,预留
business_exception_30003={0}不正确,请重新输入
business_exception_30004=The waybill you entered is generated by another user, whether continue uploading?
business_exception_30005=The waybill you entered is generated by another account, whether continue uploading?
#附件未上传
business_exception_30006=Attachment not uploaded.
#所有上传文件数量不超过{0}个文件
business_exception_30007=The total number of uploaded files should not exceed 100 files.
#所有上传文件总大小不超过{0}M
business_exception_30008=The total size of all uploaded files should not exceed {0}MB.
#暂时没用,预留
business_exception_30009=运单或发票未上传
#暂时没用,预留
business_exception_30010=文件类型不在:运单、发票、箱单、其他
business_exception_30011=该运单已被其他人创建,不可以重复创建
#该运单已被其他人创建,不可以重复创建
business_exception_30011=This waybill has been created by someone else and cannot be created again.
#暂时没用,预留
business_exception_30012=UUID不一致
business_exception_30013=文件名为:#{0},上传失败,请检查后重试
business_exception_30014=运单信息加载失败,请稍后重试
business_success_30015=提交成功
business_exception_30016=运单提交失败
\ No newline at end of file
#文件名为:{0},上传失败,请检查后重试
business_exception_30013=File name: {0}, upload failed, please check and try again
#运单信息加载失败,请稍后重试
business_exception_30014=Air waybill information loading failed, please try again later
#提交成功
business_success_30015=Submission successful
#提交失败,请稍后重试!
business_exception_30016=Submission failed, please try again later!
#运单号填写错误,请检查!
business_exception_30017=Air waybill number is incorrect, please check!
#运单提交失败,该运单正在被其他用户操作,请稍后重试
business_exception_30018=Air waybill submission failed, the waybill is being operated by other users, please try again later.
#Shipper Account填写错误(Shipper Account是由9位数字组成)
business_exception_30019=Incorrect Shipper Account(Shipper Account is composed of 9 digits).
#您当前登录账号的shipper Account与您正在录入的shipperAccount不一致,请确认是否继续?
business_exception_30020=The Shipper Account you are entering is inconsistent with your login Shipper Account. Please confirm whether to continue?
\ No newline at end of file
......
#******************系统操作日志记录,中文展示******************
business_log_20001=添加运单
business_log_20002=提交运单
business_log_20003=运单查询
business_log_20004=运单详细信息查询
business_log_20005=根据运单ID查询用户上传记录
business_log_20006=运单历史上传记录查询
business_log_20007=上传历史附件记录
system_exception_20003=提示信息过长,未保存成功
#******************鉴权相关提示,需要做国际化******************
#authentication包
system_exception_10001=没有访问权限
system_exception_10002=没有通过权限认证
system_exception_10003=登录身份异常
system_exception_10004=登录超过8小时,请重新登录
system_exception_10005=登录已过期
system_exception_10006=登录已过期,请重新登录
#******************业务相关、需要做国际化******************
#*********用于字段描述使用,不单独使用**********
business_field_31001=发货人计费账号
business_field_31002=运单ID
business_field_31003=运单号
business_field_31004=原产国编码
business_field_31005=原产国名称
business_field_31006=目的国编码
business_field_31007=目的国全称
business_field_31008=文件业务类型
#*********具体响应到前端**********
business_exception_30001=${0}必填字段未填写
business_exception_30002=单次最多可查询1000个运单号码
business_exception_30003=${0}不正确,请重新输入
business_exception_30004=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
business_exception_30005=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
business_exception_30006=附件上传不符合标准
business_exception_30007=所有上传文件数量不超过50个文件
business_exception_30008=所有上传文件总大小不超过50M
business_exception_30009=运单或发票未上传
business_exception_30010=文件类型不在:运单、发票、箱单、其他
business_exception_30011=该运单已被其他人创建,不可以重复创建
business_exception_30012=UUID不一致
business_exception_30013=文件名为:#{0},上传失败,请检查后重试
business_exception_30014=运单信息加载失败,请稍后重试
business_success_30015=提交成功
business_exception_30016=运单提交失败
\ No newline at end of file
##******************系统操作日志记录,中文展示******************
#business_log_20001=添加运单
#business_log_20002=提交运单
#business_log_20003=运单查询
#business_log_20004=运单详细信息查询
#business_log_20005=根据运单ID查询用户上传记录
#business_log_20006=运单历史上传记录查询
#business_log_20007=上传历史附件记录
#business_log_20008=下载附件
#system_exception_20003=提示信息过长,未保存成功
#
##******************鉴权相关提示,需要做国际化******************
##authentication包
#system_exception_10001=没有访问权限
#system_exception_10002=没有通过权限认证
#system_exception_10003=登录身份异常
#system_exception_10004=登录超过8小时,请重新登录
#system_exception_10005=登录已过期,请重新登录
#
##******************业务相关、需要做国际化******************
##*********用于字段描述使用,不单独使用**********
##business_field_31001=发货人计费账号
#business_field_31001=shipper account
##business_field_31002=运单ID
#business_field_31002=tracking number ID
##business_field_31003=运单号
#business_field_31003=tracking number
##business_field_31004=始发国编码
#business_field_31004=origin country ID
##business_field_31005=始发国名称
#business_field_31005=origin country
##business_field_31006=目的国编码
#business_field_31006=destination country ID
##business_field_31007=目的国全称
#business_field_31007=destination country
##business_field_31008=文件业务类型
#business_field_31008=upload file type
#
##*********具体响应到前端**********
#business_exception_30001={0}必填字段未填写
#business_exception_30002=单次最多可查询1000个运单号码
#business_exception_30003={0}不正确,请重新输入
#business_exception_30004=The waybill you entered is generated by another user, whether continue uploading?
#business_exception_30005=The waybill you entered is generated by another account, whether continue uploading?
#business_exception_30006=附件未上传
#business_exception_30007=所有上传文件数量不超过{0}个文件
#business_exception_30008=所有上传文件总大小不超过{0}M
#business_exception_30009=运单或发票未上传
#business_exception_30010=文件类型不在:运单、发票、箱单、其他
#business_exception_30011=该运单已被其他人创建,不可以重复创建
#business_exception_30012=UUID不一致
#business_exception_30013=文件名为:{0},上传失败,请检查后重试
#business_exception_30014=运单信息加载失败,请稍后重试
#business_success_30015=提交成功
#business_exception_30016=提交失败,请稍后重试!
#business_exception_30017=运单号填写错误,请检查!
#business_exception_30018=运单提交失败,该运单正在被其他用户操作,请稍后重试
#business_exception_30019=Shipper Account填写错误(Shipper Account是由9位数字组成)
#business_exception_30020=您当前登录账号的shipper Account与您正在录入的shipperAccount不一致,请确认是否继续?
\ No newline at end of file
......
......@@ -2,6 +2,7 @@ package com.fedex.connect.common.dao.log;
import com.fedex.connect.common.model.log.Operation;
import com.fedex.connect.common.model.log.OperationExample;
import com.fedex.connect.common.model.log.OperationWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Param;
......@@ -12,25 +13,25 @@ public interface OperationMapper {
int deleteByPrimaryKey(Long id);
int insert(Operation record);
int insert(OperationWithBLOBs record);
int insertSelective(Operation record);
int insertSelective(OperationWithBLOBs record);
List<Operation> selectByExampleWithBLOBs(OperationExample example);
List<OperationWithBLOBs> selectByExampleWithBLOBs(OperationExample example);
List<Operation> selectByExample(OperationExample example);
Operation selectByPrimaryKey(Long id);
OperationWithBLOBs selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Operation record, @Param("example") OperationExample example);
int updateByExampleSelective(@Param("record") OperationWithBLOBs record, @Param("example") OperationExample example);
int updateByExampleWithBLOBs(@Param("record") Operation record, @Param("example") OperationExample example);
int updateByExampleWithBLOBs(@Param("record") OperationWithBLOBs record, @Param("example") OperationExample example);
int updateByExample(@Param("record") Operation record, @Param("example") OperationExample example);
int updateByPrimaryKeySelective(Operation record);
int updateByPrimaryKeySelective(OperationWithBLOBs record);
int updateByPrimaryKeyWithBLOBs(Operation record);
int updateByPrimaryKeyWithBLOBs(OperationWithBLOBs record);
int updateByPrimaryKey(Operation record);
}
\ No newline at end of file
......
......@@ -118,7 +118,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_BIZ_CE_INFO
from iclconnect.T_BIZ_CE_INFO
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -130,15 +130,15 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ICLEARIMP.T_BIZ_CE_INFO
from iclconnect.T_BIZ_CE_INFO
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_BIZ_CE_INFO
delete from iclconnect.T_BIZ_CE_INFO
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.biz.CeInfoExample">
delete from ICLEARIMP.T_BIZ_CE_INFO
delete from iclconnect.T_BIZ_CE_INFO
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -147,7 +147,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_BIZ_CE_INFO (ID, CONSIGNMENT_CODE, SEND_TIME,
insert into iclconnect.T_BIZ_CE_INFO (ID, CONSIGNMENT_CODE, SEND_TIME,
SHIP_DATE, DEST_IATA_CODE, CREATE_TIME,
CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
MODIFY_USER_ID, MODIFY_USER_NAME, CUSTOMS_CURRENCY,
......@@ -180,7 +180,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_BIZ_CE_INFO
insert into iclconnect.T_BIZ_CE_INFO
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="consignmentCode != null">
......@@ -417,13 +417,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.biz.CeInfoExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_BIZ_CE_INFO
select count(*) from iclconnect.T_BIZ_CE_INFO
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_BIZ_CE_INFO
update iclconnect.T_BIZ_CE_INFO
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -548,7 +548,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_BIZ_CE_INFO
update iclconnect.T_BIZ_CE_INFO
set ID = #{record.id,jdbcType=NUMERIC},
CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR},
SEND_TIME = #{record.sendTime,jdbcType=TIMESTAMP},
......@@ -593,7 +593,7 @@
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.biz.CeInfo">
update ICLEARIMP.T_BIZ_CE_INFO
update iclconnect.T_BIZ_CE_INFO
<set>
<if test="consignmentCode != null">
CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
......@@ -713,7 +713,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.biz.CeInfo">
update ICLEARIMP.T_BIZ_CE_INFO
update iclconnect.T_BIZ_CE_INFO
set CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
SEND_TIME = #{sendTime,jdbcType=TIMESTAMP},
SHIP_DATE = #{shipDate,jdbcType=TIMESTAMP},
......
......@@ -19,6 +19,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="UPLOAD_RECORD_ID" jdbcType="NUMERIC" property="uploadRecordId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
......@@ -81,7 +82,7 @@
<sql id="Base_Column_List">
ID, CONSIGNMENT_CODE, CONSIGNMENT_ID, PUSH_TIME, STATUS_CODE, STATUS_NAME, PUSH_NUM,
FILE_PATH, FILE_BACK_PATH, FILE_NAME, REMARK, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME,
MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME
MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, UPLOAD_RECORD_ID
</sql>
<select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultMap="BaseResultMap">
<include refid="OracleDialectPrefix" />
......@@ -125,13 +126,15 @@
PUSH_NUM, FILE_PATH, FILE_BACK_PATH,
FILE_NAME, REMARK, CREATE_TIME,
CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
MODIFY_USER_ID, MODIFY_USER_NAME)
MODIFY_USER_ID, MODIFY_USER_NAME, UPLOAD_RECORD_ID
)
values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{consignmentId,jdbcType=NUMERIC},
#{pushTime,jdbcType=TIMESTAMP}, #{statusCode,jdbcType=VARCHAR}, #{statusName,jdbcType=VARCHAR},
#{pushNum,jdbcType=NUMERIC}, #{filePath,jdbcType=VARCHAR}, #{fileBackPath,jdbcType=VARCHAR},
#{fileName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
#{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR})
#{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}, #{uploadRecordId,jdbcType=NUMERIC}
)
</insert>
<insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.PushOb">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
......@@ -188,6 +191,9 @@
<if test="modifyUserName != null">
MODIFY_USER_NAME,
</if>
<if test="uploadRecordId != null">
UPLOAD_RECORD_ID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=NUMERIC},
......@@ -239,6 +245,9 @@
<if test="modifyUserName != null">
#{modifyUserName,jdbcType=VARCHAR},
</if>
<if test="uploadRecordId != null">
#{uploadRecordId,jdbcType=NUMERIC},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultType="java.lang.Long">
......@@ -301,6 +310,9 @@
<if test="record.modifyUserName != null">
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
</if>
<if test="record.uploadRecordId != null">
UPLOAD_RECORD_ID = #{record.uploadRecordId,jdbcType=NUMERIC},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -324,7 +336,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},
UPLOAD_RECORD_ID = #{record.uploadRecordId,jdbcType=NUMERIC}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -380,6 +393,9 @@
<if test="modifyUserName != null">
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
</if>
<if test="uploadRecordId != null">
UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC},
</if>
</set>
where ID = #{id,jdbcType=NUMERIC}
</update>
......@@ -400,7 +416,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},
UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC}
where ID = #{id,jdbcType=NUMERIC}
</update>
<sql id="OracleDialectPrefix">
......
......@@ -13,6 +13,7 @@
<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" />
<result column="CE_FLAG" jdbcType="NUMERIC" property="ceFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
......@@ -74,7 +75,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, CONSIGNMENT_CODE
MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, CONSIGNMENT_CODE, CE_FLAG
</sql>
<select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample" resultMap="BaseResultMap">
<include refid="OracleDialectPrefix" />
......@@ -84,7 +85,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -96,15 +97,15 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
delete from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample">
delete from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
delete from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -113,20 +114,20 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING (ID, USER_ID, CONSIGNMENT_ID,
insert into iclconnect.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, CONSIGNMENT_CODE)
MODIFY_USER_NAME, CONSIGNMENT_CODE, CE_FLAG)
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}, #{consignmentCode,jdbcType=VARCHAR})
#{modifyUserName,jdbcType=VARCHAR}, #{consignmentCode,jdbcType=VARCHAR}, #{ceFlag,jdbcType=NUMERIC})
</insert>
<insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
insert into iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="userId != null">
......@@ -159,6 +160,9 @@
<if test="consignmentCode != null">
CONSIGNMENT_CODE,
</if>
<if test="ceFlag != null">
CE_FLAG,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=NUMERIC},
......@@ -192,16 +196,19 @@
<if test="consignmentCode != null">
#{consignmentCode,jdbcType=VARCHAR},
</if>
<if test="ceFlag != null">
#{ceFlag,jdbcType=NUMERIC},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMappingExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
select count(*) from iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -236,13 +243,16 @@
<if test="record.consignmentCode != null">
CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR},
</if>
<if test="record.ceFlag != null">
CE_FLAG = #{record.ceFlag,jdbcType=NUMERIC},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
set ID = #{record.id,jdbcType=NUMERIC},
USER_ID = #{record.userId,jdbcType=NUMERIC},
CONSIGNMENT_ID = #{record.consignmentId,jdbcType=NUMERIC},
......@@ -254,12 +264,13 @@
MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC},
MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR},
CONSIGNMENT_CODE = #{record.consignmentCode,jdbcType=VARCHAR}
CE_FLAG = #{record.ceFlag,jdbcType=NUMERIC}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping">
update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
<set>
<if test="userId != null">
USER_ID = #{userId,jdbcType=NUMERIC},
......@@ -291,11 +302,14 @@
<if test="consignmentCode != null">
CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR},
</if>
<if test="ceFlag != null">
CE_FLAG = #{ceFlag,jdbcType=NUMERIC},
</if>
</set>
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.biz.UserConsignmentMapping">
update ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
update iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
set USER_ID = #{userId,jdbcType=NUMERIC},
CONSIGNMENT_ID = #{consignmentId,jdbcType=NUMERIC},
STATUS = #{status,jdbcType=NUMERIC},
......@@ -306,6 +320,7 @@
MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC},
MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR},
CONSIGNMENT_CODE = #{consignmentCode,jdbcType=VARCHAR}
CE_FLAG = #{ceFlag,jdbcType=NUMERIC}
where ID = #{id,jdbcType=NUMERIC}
</update>
<sql id="OracleDialectPrefix">
......
......@@ -98,7 +98,7 @@
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -114,7 +114,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -128,15 +128,15 @@
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
delete from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistoryExample">
delete from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
delete from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -145,7 +145,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY (ID, MESSAGE_ID, MESSAGE_CODE,
insert into iclconnect.T_SYS_KAFKA_STORAGE_HISTORY (ID, MESSAGE_ID, MESSAGE_CODE,
SENDER_ID, RECEIVER_ID, SEND_TIME,
CONSIGNMENT_CODE, FREQUENCY, STATUS,
STATUS_NAME, REMARK, CREATE_TIME,
......@@ -164,7 +164,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
insert into iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="messageId != null">
......@@ -275,13 +275,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistoryExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
select count(*) from iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -343,7 +343,7 @@
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
set ID = #{record.id,jdbcType=NUMERIC},
MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
......@@ -367,7 +367,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
set ID = #{record.id,jdbcType=NUMERIC},
MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
......@@ -390,7 +390,7 @@
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory">
update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
<set>
<if test="messageId != null">
MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
......@@ -447,7 +447,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory">
update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
SENDER_ID = #{senderId,jdbcType=VARCHAR},
......@@ -468,7 +468,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.KafkaStorageHistory">
update ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
update iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
SENDER_ID = #{senderId,jdbcType=VARCHAR},
......
......@@ -98,7 +98,7 @@
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -114,7 +114,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -128,15 +128,15 @@
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
delete from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorageExample">
delete from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
delete from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -145,7 +145,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE (ID, MESSAGE_ID, MESSAGE_CODE,
insert into iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE (ID, MESSAGE_ID, MESSAGE_CODE,
SENDER_ID, RECEIVER_ID, SEND_TIME,
CONSIGNMENT_CODE, FREQUENCY, STATUS,
STATUS_NAME, REMARK, CREATE_TIME,
......@@ -164,7 +164,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
insert into iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="messageId != null">
......@@ -275,13 +275,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorageExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
select count(*) from iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -343,7 +343,7 @@
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
set ID = #{record.id,jdbcType=NUMERIC},
MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
......@@ -367,7 +367,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
set ID = #{record.id,jdbcType=NUMERIC},
MESSAGE_ID = #{record.messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{record.messageCode,jdbcType=VARCHAR},
......@@ -390,7 +390,7 @@
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage">
update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
<set>
<if test="messageId != null">
MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
......@@ -447,7 +447,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage">
update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
SENDER_ID = #{senderId,jdbcType=VARCHAR},
......@@ -468,7 +468,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.KafkaTemporaryStorage">
update ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
update iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
set MESSAGE_ID = #{messageId,jdbcType=VARCHAR},
MESSAGE_CODE = #{messageCode,jdbcType=VARCHAR},
SENDER_ID = #{senderId,jdbcType=VARCHAR},
......
......@@ -90,7 +90,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_PARAM_CONFIG
from iclconnect.T_SYS_PARAM_CONFIG
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -102,15 +102,15 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_PARAM_CONFIG
from iclconnect.T_SYS_PARAM_CONFIG
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_SYS_PARAM_CONFIG
delete from iclconnect.T_SYS_PARAM_CONFIG
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample">
delete from ICLEARIMP.T_SYS_PARAM_CONFIG
delete from iclconnect.T_SYS_PARAM_CONFIG
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -119,7 +119,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_PARAM_CONFIG (ID, CODE, NAME,
insert into iclconnect.T_SYS_PARAM_CONFIG (ID, CODE, NAME,
VALUE, TYPE_CODE, TYPE_NAME,
STATUS, DESCRIPTION, CREATE_TIME,
CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME,
......@@ -136,7 +136,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_PARAM_CONFIG
insert into iclconnect.T_SYS_PARAM_CONFIG
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="code != null">
......@@ -241,13 +241,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.sys.ParamConfigExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_SYS_PARAM_CONFIG
select count(*) from iclconnect.T_SYS_PARAM_CONFIG
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_SYS_PARAM_CONFIG
update iclconnect.T_SYS_PARAM_CONFIG
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -306,7 +306,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_SYS_PARAM_CONFIG
update iclconnect.T_SYS_PARAM_CONFIG
set ID = #{record.id,jdbcType=NUMERIC},
CODE = #{record.code,jdbcType=VARCHAR},
NAME = #{record.name,jdbcType=VARCHAR},
......@@ -329,7 +329,7 @@
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.ParamConfig">
update ICLEARIMP.T_SYS_PARAM_CONFIG
update iclconnect.T_SYS_PARAM_CONFIG
<set>
<if test="code != null">
CODE = #{code,jdbcType=VARCHAR},
......@@ -383,7 +383,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.ParamConfig">
update ICLEARIMP.T_SYS_PARAM_CONFIG
update iclconnect.T_SYS_PARAM_CONFIG
set CODE = #{code,jdbcType=VARCHAR},
NAME = #{name,jdbcType=VARCHAR},
VALUE = #{value,jdbcType=VARCHAR},
......
......@@ -99,7 +99,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_USER
from iclconnect.T_SYS_USER
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -111,15 +111,15 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_USER
from iclconnect.T_SYS_USER
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_SYS_USER
delete from iclconnect.T_SYS_USER
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.UserExample">
delete from ICLEARIMP.T_SYS_USER
delete from iclconnect.T_SYS_USER
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -128,7 +128,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_USER (ID, LOGIN_NAME, USER_NAME,
insert into iclconnect.T_SYS_USER (ID, LOGIN_NAME, USER_NAME,
PASSWORD, USER_UUID, EMAIL,
PHONE, COMPANY_NAME, ACCOUNT_NO,
UNIFIED_BUSINESS_NUM, CUSTOMS_SERIAL_NUM, TYPE_CODE,
......@@ -151,7 +151,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_USER
insert into iclconnect.T_SYS_USER
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="loginName != null">
......@@ -298,13 +298,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.sys.UserExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_SYS_USER
select count(*) from iclconnect.T_SYS_USER
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_SYS_USER
update iclconnect.T_SYS_USER
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -384,7 +384,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_SYS_USER
update iclconnect.T_SYS_USER
set ID = #{record.id,jdbcType=NUMERIC},
LOGIN_NAME = #{record.loginName,jdbcType=VARCHAR},
USER_NAME = #{record.userName,jdbcType=VARCHAR},
......@@ -414,7 +414,7 @@
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.User">
update ICLEARIMP.T_SYS_USER
update iclconnect.T_SYS_USER
<set>
<if test="loginName != null">
LOGIN_NAME = #{loginName,jdbcType=VARCHAR},
......@@ -489,7 +489,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.User">
update ICLEARIMP.T_SYS_USER
update iclconnect.T_SYS_USER
set LOGIN_NAME = #{loginName,jdbcType=VARCHAR},
USER_NAME = #{userName,jdbcType=VARCHAR},
PASSWORD = #{password,jdbcType=VARCHAR},
......
......@@ -83,7 +83,7 @@
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_USER_ROLE
from iclconnect.T_SYS_USER_ROLE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -95,15 +95,15 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ICLEARIMP.T_SYS_USER_ROLE
from iclconnect.T_SYS_USER_ROLE
where ID = #{id,jdbcType=NUMERIC}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ICLEARIMP.T_SYS_USER_ROLE
delete from iclconnect.T_SYS_USER_ROLE
where ID = #{id,jdbcType=NUMERIC}
</delete>
<delete id="deleteByExample" parameterType="com.fedex.connect.common.model.sys.UserRoleExample">
delete from ICLEARIMP.T_SYS_USER_ROLE
delete from iclconnect.T_SYS_USER_ROLE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -112,7 +112,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_USER_ROLE (ID, USER_ID, ROLE_ID,
insert into iclconnect.T_SYS_USER_ROLE (ID, USER_ID, ROLE_ID,
STATUS, CREATE_TIME, CREATE_USER_ID,
CREATE_USER_NAME, MODIFY_TIME, MODIFY_USER_ID,
MODIFY_USER_NAME)
......@@ -125,7 +125,7 @@
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long">
SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL
</selectKey>
insert into ICLEARIMP.T_SYS_USER_ROLE
insert into iclconnect.T_SYS_USER_ROLE
<trim prefix="(" suffix=")" suffixOverrides=",">
ID,
<if test="userId != null">
......@@ -188,13 +188,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.fedex.connect.common.model.sys.UserRoleExample" resultType="java.lang.Long">
select count(*) from ICLEARIMP.T_SYS_USER_ROLE
select count(*) from iclconnect.T_SYS_USER_ROLE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update ICLEARIMP.T_SYS_USER_ROLE
update iclconnect.T_SYS_USER_ROLE
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=NUMERIC},
......@@ -232,7 +232,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update ICLEARIMP.T_SYS_USER_ROLE
update iclconnect.T_SYS_USER_ROLE
set ID = #{record.id,jdbcType=NUMERIC},
USER_ID = #{record.userId,jdbcType=NUMERIC},
ROLE_ID = #{record.roleId,jdbcType=NUMERIC},
......@@ -248,7 +248,7 @@
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.fedex.connect.common.model.sys.UserRole">
update ICLEARIMP.T_SYS_USER_ROLE
update iclconnect.T_SYS_USER_ROLE
<set>
<if test="userId != null">
USER_ID = #{userId,jdbcType=NUMERIC},
......@@ -281,7 +281,7 @@
where ID = #{id,jdbcType=NUMERIC}
</update>
<update id="updateByPrimaryKey" parameterType="com.fedex.connect.common.model.sys.UserRole">
update ICLEARIMP.T_SYS_USER_ROLE
update iclconnect.T_SYS_USER_ROLE
set USER_ID = #{userId,jdbcType=NUMERIC},
ROLE_ID = #{roleId,jdbcType=NUMERIC},
STATUS = #{status,jdbcType=NUMERIC},
......
......@@ -9,7 +9,7 @@ import java.util.Date;
/**
* DESC: CE501报文业务表,增加需要加密标志
* TABLE: ICLEARIMP.T_BIZ_CE_INFO
* TABLE: iclconnect.T_BIZ_CE_INFO
*/
@SensitiveEntity
public class CeInfo implements Serializable {
......
......@@ -94,6 +94,11 @@ public class PushOb implements Serializable {
*/
private String modifyUserName;
/**
* 用户上传记录表ID
*/
private Long uploadRecordId;
private static final long serialVersionUID = 1L;
public Long getId() {
......@@ -232,6 +237,14 @@ public class PushOb implements Serializable {
this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim();
}
public Long getUploadRecordId() {
return uploadRecordId;
}
public void setUploadRecordId(Long uploadRecordId) {
this.uploadRecordId = uploadRecordId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
......@@ -255,6 +268,7 @@ public class PushOb implements Serializable {
sb.append(", modifyTime=").append(modifyTime);
sb.append(", modifyUserId=").append(modifyUserId);
sb.append(", modifyUserName=").append(modifyUserName);
sb.append(", uploadRecordId=").append(uploadRecordId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
......
......@@ -35,12 +35,12 @@ public class PushObDetail implements Serializable {
private String statusName;
/**
* 推送文件类型字典CODE,关联数据字典表。指定字典目录CODE:PUSH_OB_FILE_TYPE
* 推送文件类型字典CODE,关联数据字典表。指定字典目录CODE:ATTACHMENT_BIZ_TYPE,取值Ext1 字段值
*/
private String fileTypeCode;
/**
* 推送文件类型名称(XXX、XXX
* 推送文件类型名称(AWB、INV、PKL、OTH
*/
private String fileType;
......
......@@ -1234,6 +1234,66 @@ public class PushObExample {
addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName");
return (Criteria) this;
}
public Criteria andUploadRecordIdIsNull() {
addCriterion("UPLOAD_RECORD_ID is null");
return (Criteria) this;
}
public Criteria andUploadRecordIdIsNotNull() {
addCriterion("UPLOAD_RECORD_ID is not null");
return (Criteria) this;
}
public Criteria andUploadRecordIdEqualTo(Long value) {
addCriterion("UPLOAD_RECORD_ID =", value, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdNotEqualTo(Long value) {
addCriterion("UPLOAD_RECORD_ID <>", value, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdGreaterThan(Long value) {
addCriterion("UPLOAD_RECORD_ID >", value, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdGreaterThanOrEqualTo(Long value) {
addCriterion("UPLOAD_RECORD_ID >=", value, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdLessThan(Long value) {
addCriterion("UPLOAD_RECORD_ID <", value, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdLessThanOrEqualTo(Long value) {
addCriterion("UPLOAD_RECORD_ID <=", value, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdIn(List<Long> values) {
addCriterion("UPLOAD_RECORD_ID in", values, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdNotIn(List<Long> values) {
addCriterion("UPLOAD_RECORD_ID not in", values, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdBetween(Long value1, Long value2) {
addCriterion("UPLOAD_RECORD_ID between", value1, value2, "uploadRecordId");
return (Criteria) this;
}
public Criteria andUploadRecordIdNotBetween(Long value1, Long value2) {
addCriterion("UPLOAD_RECORD_ID not between", value1, value2, "uploadRecordId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
......
......@@ -5,7 +5,7 @@ import java.util.Date;
/**
* DESC: 用户运单关系映射表
* TABLE: ICLEARIMP.T_BIZ_USER_CONSIGNMENT_MAPPING
* TABLE: iclconnect.T_BIZ_USER_CONSIGNMENT_MAPPING
*/
public class UserConsignmentMapping implements Serializable {
/**
......@@ -63,6 +63,11 @@ public class UserConsignmentMapping implements Serializable {
*/
private String consignmentCode;
/**
* 是否使用CE数据标志(0“非501数据,1:501数据)
*/
private Long ceFlag;
private static final long serialVersionUID = 1L;
public Long getId() {
......@@ -153,6 +158,18 @@ public class UserConsignmentMapping implements Serializable {
this.consignmentCode = consignmentCode == null ? null : consignmentCode.trim();
}
public Long getCeFlag() {
return ceFlag;
}
public void setCeFlag(Long ceFlag) {
this.ceFlag = ceFlag;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
......
......@@ -61,7 +61,7 @@ public class EmailHistory implements Serializable {
/**
* 发送次数(0-3次)
*/
private Long sendNum;
private int sendNum;
/**
* 邮件发送时间
......@@ -190,11 +190,11 @@ public class EmailHistory implements Serializable {
this.statusName = statusName == null ? null : statusName.trim();
}
public Long getSendNum() {
public int getSendNum() {
return sendNum;
}
public void setSendNum(Long sendNum) {
public void setSendNum(int sendNum) {
this.sendNum = sendNum;
}
......
......@@ -5,7 +5,7 @@ import java.util.Date;
/**
* DESC: 操作日志
* TABLE: ICLEARIMP.T_LOG_OPERATION
* TABLE: iclconnect.T_LOG_OPERATION
*/
public class Operation implements Serializable {
/**
......@@ -44,21 +44,6 @@ public class Operation implements Serializable {
private String url;
/**
* 请求参数
*/
private String requestParameters;
/**
* 操作结果
*/
private String result;
/**
* 状态(0:展示、1:不展示)
*/
private Long status;
/**
* 创建时间
*/
private Date createTime;
......@@ -104,9 +89,9 @@ public class Operation implements Serializable {
private Long exceuteConsume;
/**
* 备注
* 状态(0:展示、1:不展示)
*/
private String remark;
private Long status;
private static final long serialVersionUID = 1L;
......@@ -166,30 +151,6 @@ public class Operation implements Serializable {
this.url = url == null ? null : url.trim();
}
public String getRequestParameters() {
return requestParameters;
}
public void setRequestParameters(String requestParameters) {
this.requestParameters = requestParameters == null ? null : requestParameters.trim();
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result == null ? null : result.trim();
}
public Long getStatus() {
return status;
}
public void setStatus(Long status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
......@@ -262,12 +223,12 @@ public class Operation implements Serializable {
this.exceuteConsume = exceuteConsume;
}
public String getRemark() {
return remark;
public Long getStatus() {
return status;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
public void setStatus(Long status) {
this.status = status;
}
@Override
......@@ -283,9 +244,6 @@ public class Operation implements Serializable {
sb.append(", module=").append(module);
sb.append(", describe=").append(describe);
sb.append(", url=").append(url);
sb.append(", requestParameters=").append(requestParameters);
sb.append(", result=").append(result);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", createUserId=").append(createUserId);
sb.append(", createUserName=").append(createUserName);
......@@ -295,7 +253,7 @@ public class Operation implements Serializable {
sb.append(", requestTime=").append(requestTime);
sb.append(", responseTime=").append(responseTime);
sb.append(", exceuteConsume=").append(exceuteConsume);
sb.append(", remark=").append(remark);
sb.append(", status=").append(status);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
......
......@@ -595,206 +595,6 @@ public class OperationExample {
return (Criteria) this;
}
public Criteria andRequestParametersIsNull() {
addCriterion("REQUEST_PARAMETERS is null");
return (Criteria) this;
}
public Criteria andRequestParametersIsNotNull() {
addCriterion("REQUEST_PARAMETERS is not null");
return (Criteria) this;
}
public Criteria andRequestParametersEqualTo(String value) {
addCriterion("REQUEST_PARAMETERS =", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersNotEqualTo(String value) {
addCriterion("REQUEST_PARAMETERS <>", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersGreaterThan(String value) {
addCriterion("REQUEST_PARAMETERS >", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersGreaterThanOrEqualTo(String value) {
addCriterion("REQUEST_PARAMETERS >=", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersLessThan(String value) {
addCriterion("REQUEST_PARAMETERS <", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersLessThanOrEqualTo(String value) {
addCriterion("REQUEST_PARAMETERS <=", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersLike(String value) {
addCriterion("REQUEST_PARAMETERS like", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersNotLike(String value) {
addCriterion("REQUEST_PARAMETERS not like", value, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersIn(List<String> values) {
addCriterion("REQUEST_PARAMETERS in", values, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersNotIn(List<String> values) {
addCriterion("REQUEST_PARAMETERS not in", values, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersBetween(String value1, String value2) {
addCriterion("REQUEST_PARAMETERS between", value1, value2, "requestParameters");
return (Criteria) this;
}
public Criteria andRequestParametersNotBetween(String value1, String value2) {
addCriterion("REQUEST_PARAMETERS not between", value1, value2, "requestParameters");
return (Criteria) this;
}
public Criteria andResultIsNull() {
addCriterion("RESULT is null");
return (Criteria) this;
}
public Criteria andResultIsNotNull() {
addCriterion("RESULT is not null");
return (Criteria) this;
}
public Criteria andResultEqualTo(String value) {
addCriterion("RESULT =", value, "result");
return (Criteria) this;
}
public Criteria andResultNotEqualTo(String value) {
addCriterion("RESULT <>", value, "result");
return (Criteria) this;
}
public Criteria andResultGreaterThan(String value) {
addCriterion("RESULT >", value, "result");
return (Criteria) this;
}
public Criteria andResultGreaterThanOrEqualTo(String value) {
addCriterion("RESULT >=", value, "result");
return (Criteria) this;
}
public Criteria andResultLessThan(String value) {
addCriterion("RESULT <", value, "result");
return (Criteria) this;
}
public Criteria andResultLessThanOrEqualTo(String value) {
addCriterion("RESULT <=", value, "result");
return (Criteria) this;
}
public Criteria andResultLike(String value) {
addCriterion("RESULT like", value, "result");
return (Criteria) this;
}
public Criteria andResultNotLike(String value) {
addCriterion("RESULT not like", value, "result");
return (Criteria) this;
}
public Criteria andResultIn(List<String> values) {
addCriterion("RESULT in", values, "result");
return (Criteria) this;
}
public Criteria andResultNotIn(List<String> values) {
addCriterion("RESULT not in", values, "result");
return (Criteria) this;
}
public Criteria andResultBetween(String value1, String value2) {
addCriterion("RESULT between", value1, value2, "result");
return (Criteria) this;
}
public Criteria andResultNotBetween(String value1, String value2) {
addCriterion("RESULT not between", value1, value2, "result");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("STATUS is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("STATUS is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Long value) {
addCriterion("STATUS =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Long value) {
addCriterion("STATUS <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Long value) {
addCriterion("STATUS >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Long value) {
addCriterion("STATUS >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Long value) {
addCriterion("STATUS <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Long value) {
addCriterion("STATUS <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Long> values) {
addCriterion("STATUS in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Long> values) {
addCriterion("STATUS not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Long value1, Long value2) {
addCriterion("STATUS between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Long value1, Long value2) {
addCriterion("STATUS not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("CREATE_TIME is null");
return (Criteria) this;
......@@ -1354,6 +1154,66 @@ public class OperationExample {
addCriterion("EXCEUTE_CONSUME not between", value1, value2, "exceuteConsume");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("STATUS is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("STATUS is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Long value) {
addCriterion("STATUS =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Long value) {
addCriterion("STATUS <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Long value) {
addCriterion("STATUS >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Long value) {
addCriterion("STATUS >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Long value) {
addCriterion("STATUS <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Long value) {
addCriterion("STATUS <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Long> values) {
addCriterion("STATUS in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Long> values) {
addCriterion("STATUS not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Long value1, Long value2) {
addCriterion("STATUS between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Long value1, Long value2) {
addCriterion("STATUS not between", value1, value2, "status");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
......
package com.fedex.connect.common.model.log;
import java.io.Serializable;
/**
* DESC: 操作日志
* TABLE: iclconnect.T_LOG_OPERATION
*/
public class OperationWithBLOBs extends Operation implements Serializable {
/**
* 备注
*/
private String remark;
/**
* 请求参数
*/
private String requestParameters;
/**
* 请求结果
*/
private String result;
private static final long serialVersionUID = 1L;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getRequestParameters() {
return requestParameters;
}
public void setRequestParameters(String requestParameters) {
this.requestParameters = requestParameters == null ? null : requestParameters.trim();
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result == null ? null : result.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", remark=").append(remark);
sb.append(", requestParameters=").append(requestParameters);
sb.append(", result=").append(result);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ import java.util.Date;
/**
* DESC: KAFKA数据历史表
* TABLE: ICLEARIMP.T_SYS_KAFKA_STORAGE_HISTORY
* TABLE: iclconnect.T_SYS_KAFKA_STORAGE_HISTORY
*/
public class KafkaStorageHistory implements Serializable {
/**
......
......@@ -5,7 +5,7 @@ import java.util.Date;
/**
* DESC: KAFKA临时表
* TABLE: ICLEARIMP.T_SYS_KAFKA_TEMPORARY_STORAGE
* TABLE: iclconnect.T_SYS_KAFKA_TEMPORARY_STORAGE
*/
public class KafkaTemporaryStorage implements Serializable {
/**
......
......@@ -5,7 +5,7 @@ import java.util.Date;
/**
* DESC: 系统参数配置表
* TABLE: ICLEARIMP.T_SYS_PARAM_CONFIG
* TABLE: iclconnect.T_SYS_PARAM_CONFIG
*/
public class ParamConfig implements Serializable {
/**
......
......@@ -8,7 +8,7 @@ import java.util.Date;
/**
* DESC: 用户表
* TABLE: ICLEARIMP.T_SYS_USER
* TABLE: iclconnect.T_SYS_USER
*/
@SensitiveEntity
public class User implements Serializable {
......
......@@ -5,7 +5,7 @@ import java.util.Date;
/**
* DESC: 用户角色表
* TABLE: ICLEARIMP.T_SYS_USER_ROLE
* TABLE: iclconnect.T_SYS_USER_ROLE
*/
public class UserRole implements Serializable {
/**
......
......@@ -40,7 +40,7 @@
sys:系统 系统相关表,例如kafka表
log: 日志 日志记录表,例如邮件发送日志表
-->
<javaModelGenerator targetPackage="com.fedex.connect.common.model.sys" targetProject="src/main/java">
<javaModelGenerator targetPackage="com.fedex.connect.common.model.biz" targetProject="src/main/java">
<!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性-->
<property name="enableSubPackages" value="false"/>
<!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false-->
......@@ -52,13 +52,13 @@
</javaModelGenerator>
<!-- 生成映射文件*.xml的位置-->
<sqlMapGenerator targetPackage="mapper.sys" targetProject="src/main/java/com/fedex/connect/common">
<sqlMapGenerator targetPackage="mapper.biz" targetProject="src/main/java/com/fedex/connect/common">
<!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
<property name="enableSubPackages" value="false"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.sys" targetProject="src/main/java">
<javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.biz" targetProject="src/main/java">
<!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
......@@ -135,14 +135,12 @@
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true">
<generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" />
</table>
<!-- <table tableName="T_BI_PORTCLEAR_EMAIL_MAPPING" domainObjectName="PortclearEmailMapping"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
......@@ -169,12 +167,12 @@
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true">
<generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />
</table>
<!-- <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
......@@ -193,12 +191,12 @@
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true">
<generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />
</table>
<!-- <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
<!-- selectByExampleQueryId="true">-->
<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />-->
<!-- </table>-->
<!-- <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"-->
<!-- enableCountByExample="true" enableUpdateByExample="true"-->
<!-- enableDeleteByExample="true" enableSelectByExample="true"-->
......
......@@ -2,6 +2,8 @@ package com.fedex.connect.common.dependencies.aspect;
import com.fedex.connect.common.dependencies.annotation.OperationMethodLog;
import com.fedex.connect.common.dependencies.contants.AnnotationConstants;
import com.fedex.connect.common.dependencies.contants.BaseConstants;
import com.fedex.connect.common.dependencies.contants.SystemDefaultUserConstants;
import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
import com.fedex.connect.common.dependencies.enums.BaseResponseCode;
import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
......@@ -10,6 +12,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
import com.fedex.connect.common.dependencies.util.CurrentUserInfo;
import com.fedex.connect.common.dependencies.util.JsonUtils;
import com.fedex.connect.common.model.log.Operation;
import com.fedex.connect.common.model.log.OperationWithBLOBs;
import com.fedex.connect.common.model.sys.User;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
......@@ -119,7 +122,7 @@ public class OperationLogAspect {
String describe = localeMessageUtil.getMessage(operationMethodLog.describe());
String method = request.getMethod();
Operation log = new Operation();
OperationWithBLOBs log = new OperationWithBLOBs();
log.setRequestParameters(requestParameters);
log.setUrl(url);
log.setDescribe(describe);
......@@ -128,6 +131,7 @@ public class OperationLogAspect {
//获取用户信息。 login,logout,oss登录特殊处理
User user = CurrentUserInfo.getUser();
log.setLoginName(user.getLoginName());
log.setUserId(user.getId());
log.setUserName(user.getUserName());
//请求时间
......@@ -172,7 +176,12 @@ public class OperationLogAspect {
log.setResult(resultJson);
}
//基础字段赋值
AssignmentFieldUtils.assignmentTableBaseField(log);
log.setCreateTime(new Date());
log.setCreateUserId(SystemDefaultUserConstants.SYSTEM_USER_KEYS.ID);
log.setCreateUserName(SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME);
log.setModifyTime(new Date());
log.setModifyUserId(SystemDefaultUserConstants.SYSTEM_USER_KEYS.ID);
log.setModifyUserName(SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME);
// 日志插入数据库
logger.info("插入日志:" + JsonUtils.objectToJson(log));
operationRepository.insert(log);
......
......@@ -129,7 +129,7 @@ public class JwtAuthorizationFilter extends BasicAuthenticationFilter {
response.setHeader("Token", newToken);*/
} catch (ExpiredJwtException ee) {
//已经过期了,直接踢
logger.error("CODE : {} requestURL:{},reason:{}",BaseResponseCode.MESSAGE_CODE_10004.getCode() , request.getRequestURL(),"ExpiredJwtException ",ee);
logger.error("CODE : {} requestURL:{},reason:{}",BaseResponseCode.MESSAGE_CODE_10005.getCode() , request.getRequestURL(),"ExpiredJwtException ",ee);
Claims claims = ee.getClaims();
String id = claims.getId();
Map<String, Object> result = new HashMap<>();
......
......@@ -20,7 +20,7 @@ public class BasicController {
throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10003.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10003.getMsg()),e);
}
if (user == null) {
throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10006.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10006.getMsg()));
throw new OpErrorException(BaseResponseCode.MESSAGE_CODE_10005.getCode(),localeMessageUtil.getMessage(BaseResponseCode.MESSAGE_CODE_10005.getMsg()));
}
return user;
}
......
......@@ -3,16 +3,19 @@ package com.fedex.connect.common.dependencies.config;
import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
import com.fedex.connect.common.dependencies.exception.BaseException;
import com.fedex.connect.common.dependencies.exception.OpErrorException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@ConditionalOnProperty(prefix = "common.exception-advice-webconfig", name = "enable", havingValue = "true")
@RestControllerAdvice
public class ControllerExceptionAdvice {
@ExceptionHandler(Exception.class)
public ResponseVo exceptionHandler(Exception ex) {
log.error(ex.getMessage(),ex);
ResponseVo res = new ResponseVo();
res.setSuccess(false);
res.setCode(599);
......@@ -22,6 +25,7 @@ public class ControllerExceptionAdvice {
@ExceptionHandler(BaseException.class)
public ResponseVo baseExceptionHandler(BaseException ex) {
log.error(ex.getMessage(),ex);
ResponseVo res = new ResponseVo();
res.setSuccess(false);
res.setCode(ex.getCode().intValue());
......@@ -31,6 +35,7 @@ public class ControllerExceptionAdvice {
@ExceptionHandler(OpErrorException.class)
public ResponseVo opErrorExceptionHandler(OpErrorException ex) {
log.error(ex.getMessage(),ex);
ResponseVo res = new ResponseVo();
res.setSuccess(false);
res.setCode(ex.getCode());
......
......@@ -70,7 +70,7 @@ public interface BaseSeparatorConstants {
String SEPARATOR_ASTERISK = "*";
/**
* @Description 星号
* @Description 反斜杠
* @Author mt
* @Date 2024-11-11
*/
......
package com.fedex.connect.common.dependencies.data.bo;
import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils;
import com.fedex.connect.common.dependencies.util.DateUtil;
import com.fedex.connect.common.model.sys.RedisSlab;
......@@ -13,11 +14,17 @@ public class RedisSlabBo {
dao.setRedisMsg(value);
dao.setValidDuration(validDuration != 0 ? Long.valueOf(validDuration) : 0L);
dao.setDisTime(DateUtil.getHoursAgoTime(validDuration));
dao.setCreateTime(new Date());
try {
/**
* 初始化表基础字段
*/
AssignmentFieldUtils.assignmentTableBaseField(dao);
}catch(Exception ex){
ex.printStackTrace();
}
return dao;
}
/**
* ID自增
*/
......
......@@ -12,7 +12,6 @@ public enum BaseResponseCode {
MESSAGE_CODE_10003(10003,"system_exception_10003"),
MESSAGE_CODE_10004(10004,"system_exception_10004"),
MESSAGE_CODE_10005(10005,"system_exception_10005"),
MESSAGE_CODE_10006(10006,"system_exception_10006"),
;
private Integer code;
private String msg;
......
......@@ -65,4 +65,14 @@ public enum AttachmentBizTypeEnum {
}
return null; // 如果没有找到匹配的 code,返回 null
}
public static String getCodeByExt1(String ext1) {
for (AttachmentBizTypeEnum type : AttachmentBizTypeEnum.values()) {
if (type.getExt1().equals(ext1)) {
return type.getCode();
}
}
return null; // 如果没有找到匹配的 ext1,返回 null
}
}
......
......@@ -12,6 +12,7 @@ public enum EmailTypeEnum {
PUSH_CON_FILE("emailType_01","Push Pre-Customs Clearance Files","推送预清关文件"),
NOTIFICATION_SENDER("emailType_02","Remind Sender","提醒发件人"),
SEND_FAILED_EMAIL("emailType_03", "Error Email Alert","错误邮件预警"),
SEND_OB("ob", "ob","推送ob"),
;
......@@ -31,10 +32,10 @@ public enum EmailTypeEnum {
}
// 获取 enMsg 根据 code
public static String getEnMsgByCode(String code) {
public static String getMsgByCode(String code) {
for (EmailTypeEnum emailType : EmailTypeEnum.values()) {
if (emailType.code.equals(code)) {
return emailType.enMsg;
return emailType.msg;
}
}
return null; // 如果找不到对应的 code,返回 null
......
......@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.enums.sys;
public enum UserTypeEnum {
LOCAL("userType_01","LOCAL","本地账号"),
FCL("userType_02","FCL","FCL账号");
FCL("userType_02","fedex.com User Account","FCL账号");
private String code;
private String enMsg;
......
......@@ -2,14 +2,13 @@ package com.fedex.connect.common.dependencies.repository.base;
import com.fedex.connect.common.dao.bi.DictionaryEntriesMapper;
import com.fedex.connect.common.dao.log.OperationMapper;
import com.fedex.connect.common.dao.sys.ParamConfigMapper;
import com.fedex.connect.common.dao.sys.RedisSlabMapper;
import com.fedex.connect.common.dependencies.repository.dao.UserMapperExt;
import com.fedex.connect.common.dependencies.repository.dao.UserBaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
public class BaseDao {
@Autowired
protected UserMapperExt userMapperExt;
protected UserBaseMapper userBaseMapper;
@Autowired
protected RedisSlabMapper redisSlabMapper;
@Autowired
......
......@@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface UserMapperExt {
public interface UserBaseMapper {
@Select( "<script>" +
"select * from T_SYS_USER where ID = #{id} AND STATUS = 1 " +
"</script>")
......
......@@ -5,6 +5,6 @@ import com.fedex.connect.common.model.bi.DictionaryEntriesExample;
import java.util.List;
public interface IDictionaryEntriesRepository {
public interface IDictionaryEntriesBaseRepository {
List<DictionaryEntries> findAll(DictionaryEntriesExample example);
}
......
......@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.repository.repo.bi.impl;
import com.fedex.connect.common.dependencies.contants.DatabaseConstants;
import com.fedex.connect.common.dependencies.repository.base.BaseDao;
import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesRepository;
import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesBaseRepository;
import com.fedex.connect.common.model.bi.DictionaryEntries;
import com.fedex.connect.common.model.bi.DictionaryEntriesExample;
import org.springframework.stereotype.Repository;
......@@ -10,7 +10,7 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class DictionaryEntriesImpl extends BaseDao implements IDictionaryEntriesRepository {
public class DictionaryEntriesBaseImpl extends BaseDao implements IDictionaryEntriesBaseRepository {
@Override
public List<DictionaryEntries> findAll(DictionaryEntriesExample example) {
......
package com.fedex.connect.common.dependencies.repository.repo.log;
import com.fedex.connect.common.model.log.Operation;
import com.fedex.connect.common.model.log.OperationWithBLOBs;
/**
* @Author mt
......@@ -8,5 +8,5 @@ import com.fedex.connect.common.model.log.Operation;
* @Date 2024/11/6
*/
public interface IOperationRepository {
void insert(Operation record);
void insert(OperationWithBLOBs record);
}
......
......@@ -2,7 +2,7 @@ package com.fedex.connect.common.dependencies.repository.repo.log.impl;
import com.fedex.connect.common.dependencies.repository.base.BaseDao;
import com.fedex.connect.common.dependencies.repository.repo.log.IOperationRepository;
import com.fedex.connect.common.model.log.Operation;
import com.fedex.connect.common.model.log.OperationWithBLOBs;
import org.springframework.stereotype.Repository;
/**
......@@ -12,7 +12,7 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public class OperationRepositoryImpl extends BaseDao implements IOperationRepository {
public void insert(Operation record){
public void insert(OperationWithBLOBs record){
operationMapper.insert(record);
}
}
......
......@@ -5,7 +5,7 @@ import com.fedex.connect.common.model.sys.RedisSlabExample;
import java.util.List;
public interface IRedisSlabRepository {
public interface IRedisSlabBaseRepository {
int insert(RedisSlab record);
List<RedisSlab> selectByExample(RedisSlabExample example);
......
......@@ -2,6 +2,6 @@ package com.fedex.connect.common.dependencies.repository.repo.sys;
import com.fedex.connect.common.model.sys.User;
public interface IUserRepository {
public interface IUserBaseRepository {
User findOne(Long id);
}
\ No newline at end of file
......
package com.fedex.connect.common.dependencies.repository.repo.sys.impl;
import com.fedex.connect.common.dependencies.repository.base.BaseDao;
import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository;
import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabBaseRepository;
import com.fedex.connect.common.model.sys.RedisSlab;
import com.fedex.connect.common.model.sys.RedisSlabExample;
import org.springframework.stereotype.Repository;
......@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class RedisSlabRepositoryImpl extends BaseDao implements IRedisSlabRepository {
public class RedisSlabBaseRepositoryImpl extends BaseDao implements IRedisSlabBaseRepository {
@Override
public int insert(RedisSlab record) {
......
package com.fedex.connect.common.dependencies.repository.repo.sys.impl;
import com.fedex.connect.common.dependencies.repository.base.BaseDao;
import com.fedex.connect.common.dependencies.repository.repo.sys.IUserRepository;
import com.fedex.connect.common.dependencies.repository.repo.sys.IUserBaseRepository;
import com.fedex.connect.common.model.sys.User;
import org.springframework.stereotype.Repository;
@Repository
public class UserRepositoryImpl extends BaseDao implements IUserRepository {
public class UserBaseRepositoryImpl extends BaseDao implements IUserBaseRepository {
@Override
public User findOne(Long id){
return this.userMapperExt.findOne(id);
return this.userBaseMapper.findOne(id);
}
}
......
package com.fedex.connect.common.dependencies.service.base;
import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository;
import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesRepository;
import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabBaseRepository;
import com.fedex.connect.common.dependencies.repository.repo.bi.IDictionaryEntriesBaseRepository;
import org.springframework.beans.factory.annotation.Autowired;
/**
......@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*/
public class BaseService {
@Autowired
protected IRedisSlabRepository redisSlabRepository;
protected IRedisSlabBaseRepository redisSlabRepository;
@Autowired
protected IDictionaryEntriesRepository dictionaryEntriesRepository;
protected IDictionaryEntriesBaseRepository dictionaryEntriesRepository;
}
\ No newline at end of file
......
......@@ -28,17 +28,18 @@ public class DuplicateEmailTemplate implements EmailTemplate {
}
interface CLEARANCE_TITLE{
String TITLE = "Sender Reminder:";
String TITLE = "Notification: declaration documents submitted ({0})";
}
interface CLEARANCE_BODY{
String DESCRIPTION = "<p>Sender Reminder: The task will poll every {0} minutes after the system starts.</p>\n";
String DESCRIPTION = "<p>This email is a reminder email, please do not reply!</p>\n";
String BODY = "<div><div style='margin-left:4%;'>" +
"<p align='center'><img src='{0}'></p>" +
"<p align='center'><img src='{1}'></p>" +
"<p>Import Pre-Clearance System Notification:</p>" +
"<p>&nbsp;&nbsp;&nbsp;&nbsp;{2}The consignment has been created and uploaded by another user.</p>" +
"</font><br/><br/>";
"<p>FedEx iClear Connect System Notification:</p>" +
"<p>&nbsp;&nbsp;&nbsp;&nbsp;Please note that the declaration documents of waybill with tracking number {0} has been submitted by someone else!</p>" +
"</font><br/><br/>" +
"<div style=color:#808080;font-style:Arial;font-size:14px;margin: auto;margin-bottom: 5px;>" +
"{1}\n" +
"</div>";
}
}
......
......@@ -32,28 +32,27 @@ public class SendFailedEmailTemplate implements EmailTemplate {
interface FAILED_EMAIL_TITLE{
String TITLE = "Failure Alert";
String TITLE = "接口调用失败详情";
}
interface FAILED_EMAIL_BODY{
String DESCRIPTION = "<p>1.[File Push] Task: The system performs a polling every {0} minutes after startup.</p>\n" +
" <p>2.[Push Pre-Clearance File] Task: The system performs a polling every {1} minutes after startup.</p>\n" +
" <p>3.[Remind Sender] Task: The system performs a polling every {2} minutes after startup.</p>\n" +
" <p>Note: Email Sending Mechanism:</p>\n" +
" <p>This alert email task is executed every {3} minutes after the system starts. If any of the three scheduled tasks mentioned above have a final determination of failed records exceeding {4} for the day, an email notification will be automatically sent to FedEx IT. Each interface will display the latest {5} failed tracking numbers, the total number of calls made during the day, and the total number of failed calls for the day.</p>\n" +
" <p style=\"font-size:10px;\">(Note: All task-related numbers can be adjusted in the system configuration interface.)</p>";
String DESCRIPTION = "<p>1.【文件推送】任务,系统启动后每{0}分钟轮巡一次。</p>\n" +
" <p>2.【推送预清关文件】任务,系统启动后每{1}分钟轮巡一次。</p>\n" +
" <p>3.【提醒发件人】任务,系统启动后每{2}分钟轮巡一次。</p>\n" +
" <p>备注:邮件发送机制:</p>\n" +
" <p>该预警邮件任务,系统启动后每30分钟执行一次,当日上述3个定时任务,有任何一个任务的最终判定为失败的记录数量大于5,则自动发送邮件通知FedEX IT,每个接口显示最新10条失败运单号、当日调用总次数、当日调用失败总次数。</p>\n" ;
String TABLE = "<table style=\"width: 100%;table-layout: fixed;padding: 20px;width: 100%;border-collapse: collapse;\">\n" +
"<tr>\n" +
"<td style=\"border: 0px;text-align: left;padding: 8px;\">\n" +
"<div style=\"margin: auto;padding: 20px;\">\n" +
"<h2 style=\"text-align: center;\">Task Push Failure Details</h2>\n" +
"<h2 style=\"text-align: center;\">接口调用失败详情</h2>\n" +
"<table style=\"width: 100%;border-collapse: collapse;\">\n" +
"<tr>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Task Name</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Failed Tracking Number</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Total Number</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">Failure Count</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">任务名称</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">失败的运单号</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">总数</th>\n" +
"<th style=\"border: 1px solid #dddddd;text-align: left;padding: 8px;background-color: #593BB7;color: white;\">失败数量</th>\n" +
"</tr>\n" +
"{0}\n" +
"</table>\n" +
......
package com.fedex.connect.common.dependencies.util;
import com.fedex.connect.common.dependencies.annotation.BaseNotBlank;
import com.fedex.connect.common.dependencies.exception.OpErrorException;
import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -54,8 +55,10 @@ public class BaseValidateUtils {
if(errorList.size() > 0){
responseUtils.fail(codeEnum,errorList);
}
}catch(OpErrorException ex){
throw ex;
}catch(Exception ex){
responseUtils.fail(codeEnum);
responseUtils.fail(codeEnum,ex);
}
}
}
\ No newline at end of file
......
......@@ -24,6 +24,7 @@ public class DateUtil {
public static final String PATTERN_DATE_TIME_ORACLE = "yyyy-MM-dd hh:mi:ss";
public static final String PATTERN_DATE_TIME_MS = "yyyy-mm-dd hh24:mi:ss";
public static final String PATTERN_yyyyMMddHHmmss = "yyyyMMddHHmmss";
public static final String YYYYMMDDHH24MMSSSSS = "yyyyMMddHHmmssSSS";
private static SimpleDateFormat dateFormat = new SimpleDateFormat();
......@@ -47,6 +48,19 @@ public class DateUtil {
dateFormat.applyPattern(PATTERN_DATE_TIME);
return dateFormat.format(date);
}
/**
* 用默认格式格式化日期
*
* @param date
* @return
*/
public static String yyyyMMddHH24mmssSSS(Date date) {
SimpleDateFormat dateFormat = new SimpleDateFormat();
dateFormat.applyPattern(YYYYMMDDHH24MMSSSSS);
return dateFormat.format(date);
}
/**
* 用指定格式格式化日期
*
......
......@@ -85,7 +85,7 @@ public class JsonToJava {
*/
public static boolean createJsonFile(String jsonString, String filePath, String fileName) {
boolean flag = true;
String fullPath = filePath + File.separator + fileName + ".json";
String fullPath = filePath + File.separator + fileName;
// 生成json格式文件
try {
......
......@@ -3,7 +3,7 @@ package com.fedex.connect.common.dependencies.util;
import com.fedex.connect.common.dependencies.authentication.SecurityConstants;
import com.fedex.connect.common.dependencies.contants.RedisConstants;
import com.fedex.connect.common.dependencies.date.dto.SecurityUserDetails;
import com.fedex.connect.common.dependencies.repository.repo.sys.IUserRepository;
import com.fedex.connect.common.dependencies.repository.repo.sys.IUserBaseRepository;
import com.fedex.connect.common.model.sys.User;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
......@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
*/
public class JwtTokenUtils {
private static final IUserRepository userRepository = SpringBeanUtil.getBean(IUserRepository.class);
private static final IUserBaseRepository userRepository = SpringBeanUtil.getBean(IUserBaseRepository.class);
/**
* 生成足够的安全随机密钥,以适合符合规范的签名
......
......@@ -262,4 +262,43 @@ public class NIOFileUtils {
}
return false;
}
/**
* @Author mt
* @Description 移动文件
* @Date 2024/5/30
* @param sourcePath
* @param targetPath
* @return void
*/
public void moveFile(String sourcePath,String targetPath) throws Exception{
//覆盖方式移动
Files.move(Paths.get(sourcePath),Paths.get(targetPath),StandardCopyOption.REPLACE_EXISTING);
}
/**
* @Author mt
* @Description 判断文件是否存在
* @Date 2024/9/10
* @param filePath
* @return boolean
*/
public boolean fileExists(String filePath){
return new File(filePath).exists();
}
/**
* @Author mt
* @Description 如果文件夹不存在则创建文件夹
* @Date 2024/5/29
* @param targetFolder
* @return void
*/
public void mkdirs(String targetFolder){
File folder = new File(targetFolder);
// 文件夹不存在,则创建文件夹
if (!folder.exists()) {
folder.mkdirs();
}
}
}
......
......@@ -82,11 +82,16 @@ public class ResponseUtils {
public <T> ResponseVo success(Object codeEnum,T data) {
ResponseCodeBo responseCodeBo = this.ref(codeEnum);
return new ResponseVo<>(responseCodeBo.getCode(),responseCodeBo.getErrMsg(),data);
return new ResponseVo<>(200,responseCodeBo.getErrMsg(),data);
}
public <T> ResponseVo success(T data) {
return new ResponseVo<>(data);
if (data instanceof Enum) {
ResponseCodeBo responseCodeBo = this.ref(data);
return new ResponseVo<>(200, responseCodeBo.getErrMsg(), null);
} else {
return new ResponseVo<>(data);
}
}
public String msg(String msg){
......