Commit 4090b135c2ca156c77560ad664698b9797f5df3a
1 parent
56a3097eea
Exists in
master
and in
8 other branches
bug fix
基础设置排序 按编辑时间倒序
Showing 3 changed files with 4 additions and 1 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java
View file @
4090b13
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | import com.lyms.platform.common.enums.YnEnums; |
| 7 | 7 | import org.apache.commons.lang.StringUtils; |
| 8 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | +import org.springframework.data.domain.Sort; | |
| 9 | 10 | import org.springframework.data.domain.Sort.Direction; |
| 10 | 11 | import org.springframework.stereotype.Service; |
| 11 | 12 | |
| ... | ... | @@ -33,6 +34,7 @@ |
| 33 | 34 | |
| 34 | 35 | public List<BasicConfig> queryBasicConfig(BasicConfigQuery basicConfigQuery) { |
| 35 | 36 | MongoQuery query = basicConfigQuery.convertToQuery(); |
| 37 | + query.addOrder(Sort.Direction.DESC, "modifiedDate"); | |
| 36 | 38 | if (StringUtils.isNotEmpty(basicConfigQuery.getNeed())) { |
| 37 | 39 | basicConfigQuery.mysqlBuild(basicConfigDao.queryBasicConfigCount(basicConfigQuery.convertToQuery())); |
| 38 | 40 | query.start(basicConfigQuery.getOffset()).end(basicConfigQuery.getLimit()); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ReferConfigService.java
View file @
4090b13
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | mongoQuery.start(referConfigQuery.getOffset()).end(referConfigQuery.getLimit()).addOrder(Sort.Direction.ASC, "name"); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - return referConfigDao.queryRefer(mongoQuery.addOrder(Sort.Direction.DESC, "createDate")); | |
| 35 | + return referConfigDao.queryRefer(mongoQuery.addOrder(Sort.Direction.DESC, "modifiedDate")); | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public void addRefer(ReferValue referValue) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
4090b13
| ... | ... | @@ -77,6 +77,7 @@ |
| 77 | 77 | */ |
| 78 | 78 | public BaseResponse updateOneBasicConfig(BasicConfigUpdateRequest basicConfigUpdateRequest) { |
| 79 | 79 | BasicConfig obj = new BasicConfig(); |
| 80 | + obj.setModifiedDate(System.currentTimeMillis()); | |
| 80 | 81 | obj.setCode(basicConfigUpdateRequest.getCode()); |
| 81 | 82 | obj.setName(basicConfigUpdateRequest.getName()); |
| 82 | 83 | obj.setId(basicConfigUpdateRequest.getId()); |