zelong.shao

customer|查询调整

...@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
6 import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; 6 import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
7 import org.springframework.boot.builder.SpringApplicationBuilder; 7 import org.springframework.boot.builder.SpringApplicationBuilder;
8 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 8 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
9 +import org.springframework.context.annotation.ComponentScan;
9 import org.springframework.transaction.annotation.EnableTransactionManagement; 10 import org.springframework.transaction.annotation.EnableTransactionManagement;
10 import org.springframework.web.WebApplicationInitializer; 11 import org.springframework.web.WebApplicationInitializer;
11 import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 import springfox.documentation.swagger2.annotations.EnableSwagger2;
...@@ -13,6 +14,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -13,6 +14,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
13 @SpringBootApplication(exclude = SecurityAutoConfiguration.class) 14 @SpringBootApplication(exclude = SecurityAutoConfiguration.class)
14 @MapperScan({"com.fedex.connect.common.dao.*.**","com.fedex.connect.customer.repository.dao"}) 15 @MapperScan({"com.fedex.connect.common.dao.*.**","com.fedex.connect.customer.repository.dao"})
15 @EnableTransactionManagement 16 @EnableTransactionManagement
17 +@ComponentScan(basePackages = {"com.fedex.connect.common.dependencies.i18n", "com.fedex.connect.customer"})
16 @EnableSwagger2 18 @EnableSwagger2
17 public class CustomerApplication extends SpringBootServletInitializer implements WebApplicationInitializer { 19 public class CustomerApplication extends SpringBootServletInitializer implements WebApplicationInitializer {
18 public static void main(String[] args) { 20 public static void main(String[] args) {
......
...@@ -34,6 +34,7 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I ...@@ -34,6 +34,7 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I
34 Long userId = null; 34 Long userId = null;
35 try { 35 try {
36 userId = CurrentUserInfo.getUserId(); 36 userId = CurrentUserInfo.getUserId();
37 + //userId = 0L;
37 } catch (Exception e) { 38 } catch (Exception e) {
38 logger.error(LogShowModel.showException("Exception", e)); 39 logger.error(LogShowModel.showException("Exception", e));
39 return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); 40 return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg()));
......
...@@ -18,6 +18,6 @@ public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmen ...@@ -18,6 +18,6 @@ public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmen
18 18
19 @Override 19 @Override
20 public Long findAllCount(ConsignmentQuery query) { 20 public Long findAllCount(ConsignmentQuery query) {
21 - return null; 21 + return consignmentExtMapper.findAllCount(query);
22 } 22 }
23 } 23 }
......
...@@ -33,7 +33,7 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig ...@@ -33,7 +33,7 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig
33 pageResult.setTotal(total); 33 pageResult.setTotal(total);
34 pageResult.setPage(query.getPage()); 34 pageResult.setPage(query.getPage());
35 pageResult.setSize(query.getSize()); 35 pageResult.setSize(query.getSize());
36 - if (total > 0) { 36 + if (total != null && total > 0) {
37 List<Consignment> consignments = consignmentExtRepository.findConsignments(query); 37 List<Consignment> consignments = consignmentExtRepository.findConsignments(query);
38 pageResult.setList(consignments); 38 pageResult.setList(consignments);
39 } 39 }
......
1 spring: 1 spring:
2 datasource: 2 datasource:
3 url: jdbc:oracle:thin:@192.168.1.250:1521:orcl 3 url: jdbc:oracle:thin:@192.168.1.250:1521:orcl
4 - username: icleartw 4 + username: iclearimp
5 - password: icleartw 5 + password: iclearimp
6 driver-class-name: oracle.jdbc.OracleDriver 6 driver-class-name: oracle.jdbc.OracleDriver
7 profiles: 7 profiles:
8 #系统环境 8 #系统环境
...@@ -40,7 +40,7 @@ export: ...@@ -40,7 +40,7 @@ export:
40 resetpwd: { from: 'tao.mo@erry.com',password: 'xiaozhen!1'} 40 resetpwd: { from: 'tao.mo@erry.com',password: 'xiaozhen!1'}
41 # propertyPath: 41 # propertyPath:
42 # redis: /opt/fedex/exporttw/redis/export-redis.properties 42 # redis: /opt/fedex/exporttw/redis/export-redis.properties
43 - language: zh_TW 43 + language: en_US
44 emailActiveTime: 60 44 emailActiveTime: 60
45 45
46 upload: 46 upload:
......
...@@ -33,7 +33,7 @@ export: ...@@ -33,7 +33,7 @@ export:
33 mailAccountFlag: false 33 mailAccountFlag: false
34 # propertyPath: 34 # propertyPath:
35 # redis: /opt/fedex/exporttw/redis/export-redis.properties 35 # redis: /opt/fedex/exporttw/redis/export-redis.properties
36 - language: zh_TW 36 + language: en_US
37 emailActiveTime: 60 37 emailActiveTime: 60
38 38
39 upload: 39 upload:
......
...@@ -2,9 +2,10 @@ package com.fedex.connect.common.dao.log; ...@@ -2,9 +2,10 @@ package com.fedex.connect.common.dao.log;
2 2
3 import com.fedex.connect.common.model.log.UserLoginInfo; 3 import com.fedex.connect.common.model.log.UserLoginInfo;
4 import com.fedex.connect.common.model.log.UserLoginInfoExample; 4 import com.fedex.connect.common.model.log.UserLoginInfoExample;
5 -import java.util.List;
6 import org.apache.ibatis.annotations.Param; 5 import org.apache.ibatis.annotations.Param;
7 6
7 +import java.util.List;
8 +
8 public interface UserLoginInfoMapper { 9 public interface UserLoginInfoMapper {
9 long countByExample(UserLoginInfoExample example); 10 long countByExample(UserLoginInfoExample example);
10 11
......
1 package com.fedex.connect.common.dependencies.i18n; 1 package com.fedex.connect.common.dependencies.i18n;
2 2
3 import org.apache.commons.lang3.StringUtils; 3 import org.apache.commons.lang3.StringUtils;
4 -import org.slf4j.Logger;
5 -import org.slf4j.LoggerFactory;
6 import org.springframework.beans.factory.annotation.Value; 4 import org.springframework.beans.factory.annotation.Value;
7 import org.springframework.web.servlet.LocaleResolver; 5 import org.springframework.web.servlet.LocaleResolver;
8 6
...@@ -19,25 +17,13 @@ public class MessageLocaleResolver implements LocaleResolver { ...@@ -19,25 +17,13 @@ public class MessageLocaleResolver implements LocaleResolver {
19 @Value("${export.language}") 17 @Value("${export.language}")
20 private String exportTwLanguage; 18 private String exportTwLanguage;
21 19
22 - /*private static final String I18N_LANGUAGE = "i18n_language";
23 - private static final String I18N_LANGUAGE_SESSION = "i18n_language_session";*/
24 -
25 - private Logger logger = LoggerFactory.getLogger(MessageLocaleResolver.class);
26 -
27 @Override 20 @Override
28 public Locale resolveLocale(HttpServletRequest request) { 21 public Locale resolveLocale(HttpServletRequest request) {
29 Locale locale; 22 Locale locale;
30 - // String language = request.getParameter("I18N_LANGUAGE");
31 if (StringUtils.isNotEmpty(exportTwLanguage)) { 23 if (StringUtils.isNotEmpty(exportTwLanguage)) {
32 //获取知道配置文件中的语言为: exportTwLanguage; 24 //获取知道配置文件中的语言为: exportTwLanguage;
33 locale = new Locale(exportTwLanguage); 25 locale = new Locale(exportTwLanguage);
34 - /*//将国际化语言保存到session
35 - HttpSession session = req.getSession();
36 - session.setAttribute(I18N_LANGUAGE_SESSION, locale);*/
37 } else { 26 } else {
38 - //如果没有带国际化参数,则判断session有没有保存,有保存,则使用保存的,也就是之前设置的,避免之后的请求不带国际化参数造成语言显示不对
39 - /*HttpSession session = req.getSession();
40 - Locale localeInSession = (Locale) session.getAttribute(I18N_LANGUAGE_SESSION);*/
41 //读取不到指定语言文件,采用默认中文。即默认的message.properties 27 //读取不到指定语言文件,采用默认中文。即默认的message.properties
42 locale = Locale.getDefault(); 28 locale = Locale.getDefault();
43 } 29 }
......