Commit e0c2df321cc00f5f53ca31f3725e91e76051dd8b
1 parent
9d76c359
fix(config): 更新配置文件和修复分页计算问题
- 在.gitignore中添加.mcp.json文件忽略 - 更新application-dev.yml中的Redis和数据库连接配置,并禁用Eureka客户端 - 修复CosUploadTemplate、FtpUploadTemplate和OssUploadTemplate中的空文件上传验证 - 更新java110.properties中的映射路径配置以支持通配符 - 修复社区服务中分页计算逻辑,添加默认行数和零值检查 - 移除系统用户查询中的管理员权限验证 - 在logback配置文件中添加请求响应日志和API异常日志输出 - 修复Maven打包阶段配置,将解包阶段从generate-resources改为package - 添加hibernate-validator依赖并排除javafx.base冲突 - 扩展文件上传组件以支持multipart文件上传和IP地址获取功能
Showing
1 changed file
with
53 additions
and
0 deletions
service-user/src/main/java/com/java110/user/cmd/property/QueryAllLatestLocationsCmd.java
0 → 100644
| 1 | +/* | |
| 2 | + * Copyright 2017-2020 吴学文 and java110 team. | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + */ | |
| 16 | +package com.java110.user.cmd.property; | |
| 17 | + | |
| 18 | +import com.alibaba.fastjson.JSONObject; | |
| 19 | +import com.java110.core.annotation.Java110Cmd; | |
| 20 | +import com.java110.core.context.ICmdDataFlowContext; | |
| 21 | +import com.java110.core.event.cmd.Cmd; | |
| 22 | +import com.java110.core.event.cmd.CmdEvent; | |
| 23 | +import com.java110.user.dao.property.ILocationTrackV1ServiceDao; | |
| 24 | +import com.java110.vo.ResultVo; | |
| 25 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 26 | + | |
| 27 | +import java.util.HashMap; | |
| 28 | +import java.util.List; | |
| 29 | +import java.util.Map; | |
| 30 | + | |
| 31 | +/** | |
| 32 | + * 批量查询所有在职员工的最新位置(首页地图用) | |
| 33 | + */ | |
| 34 | +@Java110Cmd(serviceCode = "property.queryAllLatestLocations") | |
| 35 | +public class QueryAllLatestLocationsCmd extends Cmd { | |
| 36 | + | |
| 37 | + @Autowired | |
| 38 | + private ILocationTrackV1ServiceDao locationTrackV1ServiceDao; | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) { | |
| 42 | + } | |
| 43 | + | |
| 44 | + @Override | |
| 45 | + public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) { | |
| 46 | + Map params = new HashMap<>(); | |
| 47 | + if (reqJson.containsKey("workType")) { | |
| 48 | + params.put("workType", reqJson.getString("workType")); | |
| 49 | + } | |
| 50 | + List<Map> list = locationTrackV1ServiceDao.queryAllLatestLocations(params); | |
| 51 | + context.setResponseEntity(ResultVo.createResponseEntity(list.size(), list.size(), list)); | |
| 52 | + } | |
| 53 | +} | ... | ... |