Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zelong.shao
2024-11-01 17:50:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d241cbf60a450b3b355c621eefbb3199088e7bad
d241cbf6
1 parent
0d973b1d
customer|查询调整
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
21 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/CustomerApplication.java
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/impl/ConsignmentControllerImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/ConsignmentExtRepositoryImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
server/biz-customer/src/main/resources/application-dev.yml
server/biz-customer/src/main/resources/application-uat.yml
server/common-dao/src/main/java/com/fedex/connect/common/dao/log/UserLoginInfoMapper.java
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/i18n/MessageLocaleResolver.java
server/biz-customer/src/main/java/com/fedex/connect/customer/CustomerApplication.java
View file @
d241cbf
...
...
@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.WebApplicationInitializer
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
...
...
@@ -13,6 +14,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication
(
exclude
=
SecurityAutoConfiguration
.
class
)
@MapperScan
({
"com.fedex.connect.common.dao.*.**"
,
"com.fedex.connect.customer.repository.dao"
})
@EnableTransactionManagement
@ComponentScan
(
basePackages
=
{
"com.fedex.connect.common.dependencies.i18n"
,
"com.fedex.connect.customer"
})
@EnableSwagger2
public
class
CustomerApplication
extends
SpringBootServletInitializer
implements
WebApplicationInitializer
{
public
static
void
main
(
String
[]
args
)
{
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/controller/biz/impl/ConsignmentControllerImpl.java
View file @
d241cbf
...
...
@@ -34,6 +34,7 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I
Long
userId
=
null
;
try
{
userId
=
CurrentUserInfo
.
getUserId
();
//userId = 0L;
}
catch
(
Exception
e
)
{
logger
.
error
(
LogShowModel
.
showException
(
"Exception"
,
e
));
return
ResponseResultVo
.
fail
(
localeMessageUtil
.
getMessage
(
ResponseCode
.
TOKEN_FORMAT_ERROR
.
getMsg
()));
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/repo/impl/ConsignmentExtRepositoryImpl.java
View file @
d241cbf
...
...
@@ -18,6 +18,6 @@ public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmen
@Override
public
Long
findAllCount
(
ConsignmentQuery
query
)
{
return
null
;
return
consignmentExtMapper
.
findAllCount
(
query
)
;
}
}
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
View file @
d241cbf
...
...
@@ -33,7 +33,7 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig
pageResult
.
setTotal
(
total
);
pageResult
.
setPage
(
query
.
getPage
());
pageResult
.
setSize
(
query
.
getSize
());
if
(
total
>
0
)
{
if
(
total
!=
null
&&
total
>
0
)
{
List
<
Consignment
>
consignments
=
consignmentExtRepository
.
findConsignments
(
query
);
pageResult
.
setList
(
consignments
);
}
...
...
server/biz-customer/src/main/resources/application-dev.yml
View file @
d241cbf
spring
:
datasource
:
url
:
jdbc:oracle:thin:@192.168.1.250:1521:orcl
username
:
iclear
tw
password
:
iclear
tw
username
:
iclear
imp
password
:
iclear
imp
driver-class-name
:
oracle.jdbc.OracleDriver
profiles
:
#系统环境
...
...
@@ -40,7 +40,7 @@ export:
resetpwd
:
{
from
:
'
tao.mo@erry.com'
,
password
:
'
xiaozhen!1'
}
# propertyPath:
# redis: /opt/fedex/exporttw/redis/export-redis.properties
language
:
zh_TW
language
:
en_US
emailActiveTime
:
60
upload
:
...
...
server/biz-customer/src/main/resources/application-uat.yml
View file @
d241cbf
...
...
@@ -33,7 +33,7 @@ export:
mailAccountFlag
:
false
# propertyPath:
# redis: /opt/fedex/exporttw/redis/export-redis.properties
language
:
zh_TW
language
:
en_US
emailActiveTime
:
60
upload
:
...
...
server/common-dao/src/main/java/com/fedex/connect/common/dao/log/UserLoginInfoMapper.java
View file @
d241cbf
...
...
@@ -2,9 +2,10 @@ package com.fedex.connect.common.dao.log;
import
com.fedex.connect.common.model.log.UserLoginInfo
;
import
com.fedex.connect.common.model.log.UserLoginInfoExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
UserLoginInfoMapper
{
long
countByExample
(
UserLoginInfoExample
example
);
...
...
server/common-dependencies/src/main/java/com/fedex/connect/common/dependencies/i18n/MessageLocaleResolver.java
View file @
d241cbf
package
com
.
fedex
.
connect
.
common
.
dependencies
.
i18n
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.servlet.LocaleResolver
;
...
...
@@ -19,25 +17,13 @@ public class MessageLocaleResolver implements LocaleResolver {
@Value
(
"${export.language}"
)
private
String
exportTwLanguage
;
/*private static final String I18N_LANGUAGE = "i18n_language";
private static final String I18N_LANGUAGE_SESSION = "i18n_language_session";*/
private
Logger
logger
=
LoggerFactory
.
getLogger
(
MessageLocaleResolver
.
class
);
@Override
public
Locale
resolveLocale
(
HttpServletRequest
request
)
{
Locale
locale
;
// String language = request.getParameter("I18N_LANGUAGE");
if
(
StringUtils
.
isNotEmpty
(
exportTwLanguage
))
{
//获取知道配置文件中的语言为: exportTwLanguage;
locale
=
new
Locale
(
exportTwLanguage
);
/*//将国际化语言保存到session
HttpSession session = req.getSession();
session.setAttribute(I18N_LANGUAGE_SESSION, locale);*/
}
else
{
//如果没有带国际化参数,则判断session有没有保存,有保存,则使用保存的,也就是之前设置的,避免之后的请求不带国际化参数造成语言显示不对
/*HttpSession session = req.getSession();
Locale localeInSession = (Locale) session.getAttribute(I18N_LANGUAGE_SESSION);*/
//读取不到指定语言文件,采用默认中文。即默认的message.properties
locale
=
Locale
.
getDefault
();
}
...
...
Please
register
or
login
to post a comment