diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DebugController.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DebugController.java index 39a7e12..ce316c2 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DebugController.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DebugController.java @@ -1,5 +1,6 @@ package com.ccsens.ptos_diplomatist.api; +import cn.hutool.http.HttpUtil; import com.ccsens.util.JsonResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; @@ -25,7 +26,24 @@ public class DebugController { }) @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) public JsonResponse debug(HttpServletRequest request) throws Exception { - +// String ip = request.getHeader("x-forwarded-for"); +// System.out.println("/-/-/-/-/-/-/-/-/"+ip); +// if (ip != null && ip.indexOf(",") > 0) { +// final String[] ips = ip.trim().split(","); +// for (String subIp : ips) { +// if (subIp == null || "unknown".equalsIgnoreCase(subIp)) { +// ip = subIp; +// break; +// } +// } +// } +// System.out.println("多级代理/-/-/-/-/-/-/-/-/"+ip); +// +// String ip1 = request.getHeader("clientIp"); +// System.out.println("gateway/-/-/-/-/-/-/-/-/"+ip1); +// +// String clientIP = HttpUtil.getClientIP(request); +// System.out.println("糊涂/-/-/-/-/-/-/-/-/"+clientIP); return JsonResponse.newInstance().ok("测试"); } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java index d3ce94a..05f56ef 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java @@ -60,9 +60,13 @@ public class DomainService implements IDomainService { //验证ip白名单是否匹配 if(domainInfo == null || !domainInfo.getHost().equals(clientIp)){ log.info("白名单不匹配:{}---实际请求{}",domainInfo,clientIp); -// throw new BaseException(ptos_diplomatistCodeError.GET_DOMAIN_ERROR); + throw new BaseException(DiplomatistCodeError.IP_UNLAWFULNESS); } //TODO 验证通讯时间 + if(domainInfo.getTimestamp() + DiplomatistConstant.MESSAGE_OVERTIME < System.currentTimeMillis()){ + log.info("消息超时--发送时间:{}",domainInfo); + throw new BaseException(DiplomatistCodeError.IP_UNLAWFULNESS); + } //TODO 随机字符 //查询除了自身的所有域信息并返回 return domainDao.queryAllDomain(); @@ -265,7 +269,7 @@ public class DomainService implements IDomainService { //验证ip白名单是否匹配 if(!messageDomainInfo.getHost().equals(clientIp)){ log.info("白名单不匹配:{}---实际请求{}",messageDomainInfo,clientIp); -// throw new BaseException(ptos_diplomatistCodeError.GET_DOMAIN_ERROR); + throw new BaseException(DiplomatistCodeError.IP_UNLAWFULNESS); } FeignProjectDto.QueryProjectByPhone projectByPhone = new FeignProjectDto.QueryProjectByPhone(); if(ObjectUtil.isNotNull(messageDomainInfo.getProjectByPhone())){ diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java index 5bd85b2..c426426 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java @@ -12,6 +12,7 @@ import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; import com.ccsens.ptos_diplomatist.bean.po.IdcDomain; import com.ccsens.ptos_diplomatist.persist.dao.IdcDomainDao; import com.ccsens.ptos_diplomatist.util.DiplomatistCodeError; +import com.ccsens.ptos_diplomatist.util.DiplomatistConstant; import com.ccsens.ptos_diplomatist.util.RSAUtil; import com.ccsens.util.RestTemplateUtil; import com.ccsens.util.exception.BaseException; @@ -56,10 +57,15 @@ public class HeartbeatService implements IHeartbeatService { //验证ip白名单是否匹配 if(domainInfo == null || !domainInfo.getHost().equals(clientIp)){ log.info("白名单不匹配:{}---实际请求{}",domainInfo,clientIp); -// throw new BaseException(ptos_diplomatistCodeError.HEARTBEAT_ERROR); + throw new BaseException(DiplomatistCodeError.IP_UNLAWFULNESS); + } + //TODO 验证通讯时间 时间超过5分钟的则算作非法消息 + if(domainInfo.getTimestamp() + DiplomatistConstant.MESSAGE_OVERTIME < System.currentTimeMillis()){ + log.info("消息超时--发送时间:{}",domainInfo); + throw new BaseException(DiplomatistCodeError.IP_UNLAWFULNESS); } - //TODO 验证通讯时间 //TODO 随机字符 + } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistCodeError.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistCodeError.java index f462f92..8673196 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistCodeError.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistCodeError.java @@ -9,5 +9,6 @@ public class DiplomatistCodeError extends CodeError { public static final Code HEARTBEAT_ERROR = new Code(501,"心跳异常",true); public static final Code GET_DOMAIN_ERROR = new Code(502,"查询域列表失败",true); + public static final Code IP_UNLAWFULNESS = new Code(503,"非法ip访问",true); } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java index ad2a7c8..62e26f4 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java @@ -9,6 +9,8 @@ import java.util.Map; public class DiplomatistConstant { /**域离线时间 21分钟*/ public static final Long LAST_ANSWER_TIME = 21 * 60 * 1000L; + /**消息过期时间*/ + public static final Long MESSAGE_OVERTIME = 5 * 60 * 1000L; /**图片类型*/ public static final String FILE_TYPE_IMG = "bmp,jpg,jpeg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp"; diff --git a/ptos_diplomatist/src/main/resources/application.yml b/ptos_diplomatist/src/main/resources/application.yml index 5abf242..2fb38e5 100644 --- a/ptos_diplomatist/src/main/resources/application.yml +++ b/ptos_diplomatist/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod + active: dev + include: common, util-dev diff --git a/ptos_open/src/main/java/com/ccsens/ptos_open/api/PluginController.java b/ptos_open/src/main/java/com/ccsens/ptos_open/api/PluginController.java index 9fe5494..74451b2 100644 --- a/ptos_open/src/main/java/com/ccsens/ptos_open/api/PluginController.java +++ b/ptos_open/src/main/java/com/ccsens/ptos_open/api/PluginController.java @@ -57,7 +57,7 @@ public class PluginController { @MustLogin @ApiOperation(value = "删除插件", notes = "") @RequestMapping(value = "/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> deletePlugin(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + public JsonResponse deletePlugin(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ log.info("删除插件:{}",params); pluginService.deletePlugin(params.getParam(),params.getUserId()); log.info("删除插件成功"); @@ -79,7 +79,7 @@ public class PluginController { @RequestMapping(value = "/queryById", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse queryIdPlugin(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ log.info("根据id查询插件:{}",params); - PluginVo.PluginInfo pluginInfo = pluginService. queryIdPlugin(params.getParam(),params.getUserId()); + PluginVo.PluginInfo pluginInfo = pluginService.queryIdPlugin(params.getParam(),params.getUserId()); log.info("返回插件信息"); return JsonResponse.newInstance().ok(pluginInfo); } diff --git a/ptos_open/src/main/java/com/ccsens/ptos_open/persist/dao/PluginDao.java b/ptos_open/src/main/java/com/ccsens/ptos_open/persist/dao/PluginDao.java index c5844f6..3b96660 100644 --- a/ptos_open/src/main/java/com/ccsens/ptos_open/persist/dao/PluginDao.java +++ b/ptos_open/src/main/java/com/ccsens/ptos_open/persist/dao/PluginDao.java @@ -35,4 +35,12 @@ public interface PluginDao extends OpenPluginMapper { * @return 返回创建者id */ Long getPluginCreatorId(@Param("pluginId") Long pluginId); + + /** + * 根据id查找插件详情 + * @param id 插件id + * @param userId userId + * @return 返回插件信息 + */ + PluginVo.PluginInfo getByPluginId(@Param("id") Long id,@Param("userId") Long userId); } diff --git a/ptos_open/src/main/java/com/ccsens/ptos_open/service/BusinessService.java b/ptos_open/src/main/java/com/ccsens/ptos_open/service/BusinessService.java index 720abad..0b5cfc3 100644 --- a/ptos_open/src/main/java/com/ccsens/ptos_open/service/BusinessService.java +++ b/ptos_open/src/main/java/com/ccsens/ptos_open/service/BusinessService.java @@ -63,7 +63,6 @@ public class BusinessService implements IBusinessService { openBusiness.setPub(param.getPub()); openBusiness.setDebug(param.getDebug()); openBusiness.setCreatorId(userId); - //TODO 生成appId和secret GenerateAppIdUtil.AppIdAndSecret generate = GenerateAppIdUtil.generate(); openBusiness.setAppId(generate.getAppId()); openBusiness.setSecret(generate.getSecret()); diff --git a/ptos_open/src/main/java/com/ccsens/ptos_open/service/PluginService.java b/ptos_open/src/main/java/com/ccsens/ptos_open/service/PluginService.java index 146477c..c0c97db 100644 --- a/ptos_open/src/main/java/com/ccsens/ptos_open/service/PluginService.java +++ b/ptos_open/src/main/java/com/ccsens/ptos_open/service/PluginService.java @@ -3,13 +3,11 @@ package com.ccsens.ptos_open.service; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; -import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.ptos_open.bean.dto.PluginDto; import com.ccsens.ptos_open.bean.po.*; import com.ccsens.ptos_open.bean.vo.PluginVo; import com.ccsens.ptos_open.persist.dao.PluginDao; -import com.ccsens.ptos_open.persist.dao.UserDao; import com.ccsens.ptos_open.persist.mapper.OpenPluginImgMapper; import com.ccsens.ptos_open.util.OpenCodeError; import com.ccsens.util.CodeEnum; @@ -31,10 +29,6 @@ import java.util.List; @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class PluginService implements IPluginService { - @Resource - private OpenPluginImgMapper imgMapper; - @Resource - private UserDao userDao; @Resource private PluginDao pluginDao; @Resource @@ -130,15 +124,14 @@ public class PluginService implements IPluginService { plugin.setConfig(param.getConfig()); } plugin.setPublish(param.getPublish()); - //TODO 处理预览图和轮播图 + //处理预览图和轮播图 OpenPluginImgExample pluginImgExample = new OpenPluginImgExample(); - if(StrUtil.isNotBlank(param.getPreview())){ pluginImgExample.createCriteria().andPluginIdEqualTo(param.getId()).andTypeEqualTo((byte) 0); //删除之前的预览图 - List openPluginImgs = openPluginImgMapper.selectByExample(pluginImgExample); - if(CollectionUtil.isNotEmpty(openPluginImgs)){ - openPluginImgs.forEach(openPluginImg -> { + List openPluginImgList = openPluginImgMapper.selectByExample(pluginImgExample); + if(CollectionUtil.isNotEmpty(openPluginImgList)){ + openPluginImgList.forEach(openPluginImg -> { openPluginImg.setRecStatus((byte) 2); openPluginImgMapper.updateByPrimaryKeySelective(openPluginImg); }); @@ -153,13 +146,15 @@ public class PluginService implements IPluginService { openPluginImgMapper.insertSelective(pluginImg); } if(CollectionUtil.isNotEmpty(param.getCarousel())){ - pluginImgExample.createCriteria().andPluginIdEqualTo(param.getId()).andTypeEqualTo((byte) 1); - List openPluginImgs = openPluginImgMapper.selectByExample(pluginImgExample); - openPluginImgs.forEach(openPluginImg -> { - openPluginImg.setRecStatus((byte) 2); - openPluginImgMapper.updateByPrimaryKeySelective(openPluginImg); - }); //如果轮播图不为空,则删除旧数据,重新添加 + pluginImgExample.createCriteria().andPluginIdEqualTo(param.getId()).andTypeEqualTo((byte) 1); + List openPluginImgList = openPluginImgMapper.selectByExample(pluginImgExample); + if(CollectionUtil.isNotEmpty(openPluginImgList)) { + openPluginImgList.forEach(openPluginImg -> { + openPluginImg.setRecStatus((byte) 2); + openPluginImgMapper.updateByPrimaryKeySelective(openPluginImg); + }); + } param.getCarousel().forEach(carousel -> { OpenPluginImg pluginImg = new OpenPluginImg(); pluginImg.setId(snowflake.nextId()); @@ -175,46 +170,7 @@ public class PluginService implements IPluginService { @Override public PluginVo.PluginInfo queryIdPlugin(PluginDto.QueryPluginById param, Long userId) { - - //查询插件信息 - OpenPluginWithBLOBs openPlugin = pluginDao.selectByPrimaryKey(param.getId()); - if(ObjectUtil.isNull(openPlugin)){ - throw new BaseException(OpenCodeError.NOT_PLUGIN); - } - //返回插件信息 - PluginVo.PluginInfo pluginInfo = new PluginVo.PluginInfo(); - pluginInfo.setId(openPlugin.getId()); - pluginInfo.setName(openPlugin.getName()); - pluginInfo.setVersions(openPlugin.getVersions()); - pluginInfo.setIntro(openPlugin.getIntro()); - pluginInfo.setUpdateTime(openPlugin.getUpdatedAt().getTime()); - pluginInfo.setAuthorId(openPlugin.getCreatorId()); - //作者id查user表 - String userName = userDao.getUserNameById(openPlugin.getCreatorId()); - pluginInfo.setAuthorName(userName); - //通过id查询预览图 - OpenPluginImgExample imgExample = new OpenPluginImgExample(); - imgExample.createCriteria().andPluginIdEqualTo(openPlugin.getId()).andTypeEqualTo((byte)0); - List Img =imgMapper.selectByExample(imgExample); - String path = null; - if(Img != null && Img.size() != 0){ - Img.get(0); - path = Img.get(0).getFilePath(); - } - pluginInfo.setPreview(path); - - if(openPlugin.getCreatorId().equals(userId)) { - Byte main = 1; - pluginInfo.setMine(main); - } else { - Byte main = 0; - pluginInfo.setMine(main); - } - pluginInfo.setHtml(openPlugin.getHtml()); - pluginInfo.setCss(openPlugin.getCss()); - pluginInfo.setJs(openPlugin.getJs()); - pluginInfo.setConfig(openPlugin.getConfig()); - return pluginInfo; + return pluginDao.getByPluginId(param.getId(),userId); } @Override diff --git a/ptos_open/src/main/resources/mapper_dao/PluginDao.xml b/ptos_open/src/main/resources/mapper_dao/PluginDao.xml index fd0ce84..88d54ef 100644 --- a/ptos_open/src/main/resources/mapper_dao/PluginDao.xml +++ b/ptos_open/src/main/resources/mapper_dao/PluginDao.xml @@ -53,4 +53,27 @@ and rec_status = 0 limit 1 + \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java index 57a31aa..4712588 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/BusinessService.java @@ -3,14 +3,10 @@ package com.ccsens.ptos_tall.service; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpUtil; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.ccsens.ptos_tall.bean.dto.BusinessDto; -import com.ccsens.ptos_tall.bean.dto.ProjectDto; -import com.ccsens.ptos_tall.bean.po.OpenBusiness; import com.ccsens.ptos_tall.bean.vo.BusinessVo; import com.ccsens.ptos_tall.bean.vo.PluginVo; -import com.ccsens.ptos_tall.bean.vo.ProjectVo; import com.ccsens.ptos_tall.persist.dao.BusinessPluginDao; import com.ccsens.ptos_tall.util.PtOsConstant; import com.ccsens.util.*; @@ -20,10 +16,12 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.HashMap; import java.util.List; import java.util.Map; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java index d386e08..d8a343d 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java @@ -6,7 +6,9 @@ import com.alibaba.fastjson.JSONObject; import com.ccsens.ptos_tall.bean.po.OpenBusiness; import com.ccsens.ptos_tall.bean.po.OpenBusinessExample; import com.ccsens.ptos_tall.persist.mapper.OpenBusinessMapper; +import com.ccsens.ptos_tall.util.PtOsCodeError; import com.ccsens.util.RestTemplateUtil; +import com.ccsens.util.WebConstant; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; @@ -14,9 +16,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.HashMap; import java.util.List; -import java.util.Map; /** * @author 逗 @@ -56,7 +56,7 @@ public class HeartbeatService{ log.info("接口返回:{}", jsonObject); //请求正确返回则修改最后应答时间,否则无操作 Integer code = jsonObject.getInteger("code"); - if (code != null && code == 200) { + if (code != null && code.equals(PtOsCodeError.SUCCESS.getCode())) { business.setLastAnswerTime(System.currentTimeMillis()); businessMapper.updateByPrimaryKeySelective(business); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java index 808f762..977a81f 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java @@ -18,6 +18,7 @@ import com.ccsens.ptos_tall.bean.vo.ProjectVo; import com.ccsens.ptos_tall.bean.vo.UserVo; import com.ccsens.ptos_tall.persist.dao.SysAuthDao; import com.ccsens.ptos_tall.persist.mapper.OpenBusinessMapper; +import com.ccsens.ptos_tall.util.PtOsCodeError; import com.ccsens.ptos_tall.util.PtOsConstant; import com.ccsens.util.JsonResponse; import com.ccsens.util.RestTemplateUtil; @@ -60,7 +61,7 @@ public class ProjectService implements IProjectService { try { JsonResponse> response = diplomatistFeignClient.queryDomainProject(queryProjectByPhone); - if (response != null && response.getCode() == 200) { + if (response != null && response.getCode().equals(PtOsCodeError.SUCCESS.getCode())) { if(CollectionUtil.isNotEmpty(response.getData())){ response.getData().forEach(project -> { ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); @@ -74,20 +75,7 @@ public class ProjectService implements IProjectService { } //查询本域的项目信息 queryBusinessProject(token, projectInfoList,param.getStartTime(),param.getEndTime()); - //TODO 排序 - //添加测试数据 -// projectInfoList.add(new ProjectVo.ProjectInfo(1L,"测试项目1",1641799829000L,1644718446001L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); -// projectInfoList.add(new ProjectVo.ProjectInfo(2L,"测试项目2",1641799829001L,1644718446002L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); -// projectInfoList.add(new ProjectVo.ProjectInfo(3L,"测试项目3",1641799829002L,1644718446003L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); -// projectInfoList.add(new ProjectVo.ProjectInfo(4L,"测试项目4",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); -// -// ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(4L,"测试项目4",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall"); -// List p1 = new ArrayList<>(); -// p1.add(new ProjectVo.ProjectInfo(5L,"子项目1",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); -// p1.add(new ProjectVo.ProjectInfo(6L,"子项目2",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); -// projectInfo.setSonProjectList(p1); -// projectInfoList.add(projectInfo); return projectInfoList; } @@ -171,18 +159,14 @@ public class ProjectService implements IProjectService { Date endTimeParam = new Date(param.getEndTime()); long dayDifference = DateUtil.betweenDay(startTimeParam, endTimeParam, false) + 1; - Long realStartTime = null; - Long realEndTime = null; - Long realDifference = null; + long realStartTime; + long realEndTime; + long realDifference; List realDateList = new ArrayList<>(); //查询项目列表 List projectInfos = queryProjectByUser(token, phone, param); //获取项目的时间范围 if (CollectionUtil.isNotEmpty(projectInfos)) { -// List projectStartTimeList = projectInfos.stream().map(ProjectVo.ProjectInfo::getStartTime).collect(Collectors.toList()); -// List projectEndTimeList = projectInfos.stream().map(ProjectVo.ProjectInfo::getEndTime).collect(Collectors.toList()); -// Long maxStartTime = Collections.min(projectStartTimeList); -// Long maxEndTime = Collections.max(projectEndTimeList); long maxStartTime = 0L; long maxEndTime = 0L; for (ProjectVo.ProjectInfo projectInfo : projectInfos) { @@ -244,6 +228,7 @@ public class ProjectService implements IProjectService { return; } openBusinesses.forEach(openBusiness -> { + //TODO 调用服务内的接口修改项目顺序 }); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java index 6933e47..4392ee4 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java @@ -14,22 +14,17 @@ import com.ccsens.ptos_tall.persist.mapper.OpenBusinessMapper; import com.ccsens.ptos_tall.persist.mapper.SysSigninLogMapper; import com.ccsens.ptos_tall.persist.mapper.SysUserDeviceMapper; import com.ccsens.ptos_tall.util.PtOsCodeError; -import com.ccsens.ptos_tall.util.PtOsConstant; import com.ccsens.util.*; import com.ccsens.util.bean.wx.po.WxOauth2UserInfo; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxGzhUtil; import io.jsonwebtoken.Claims; -import lombok.Synchronized; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.lang.annotation.Annotation; -import java.security.NoSuchAlgorithmException; -import java.security.spec.InvalidKeySpecException; import java.util.List; import java.util.Map; import java.util.regex.Matcher; @@ -231,7 +226,6 @@ public class UserService implements IUserService { userSignVo = new UserVo.UserSign(); userSignVo.setUserId(theAuth.getUserId()); userSignVo.setAuthId(theAuth.getId()); - //TODO 给所有手机号一样的角色添加userId return userSignVo; } @@ -363,7 +357,7 @@ public class UserService implements IUserService { throw new BaseException(PtOsCodeError.ERROR_SEND_TOO_FAST); } //测试环境默认发送1111 - String verifyCode = "1111"; + String verifyCode; // if (PtOsConstant.SMS_CODE.equalsIgnoreCase(PropUtil.smsCode)) { verifyCode = RandomUtil.randomNumbers(4); // } diff --git a/tall_sdk/src/main/java/com/ccsensptos/tallsdk/bean/vo/TallTaskVo.java b/tall_sdk/src/main/java/com/ccsensptos/tallsdk/bean/vo/TallTaskVo.java index 8fe96e4..6675eda 100644 --- a/tall_sdk/src/main/java/com/ccsensptos/tallsdk/bean/vo/TallTaskVo.java +++ b/tall_sdk/src/main/java/com/ccsensptos/tallsdk/bean/vo/TallTaskVo.java @@ -4,9 +4,11 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import javax.validation.constraints.NotBlank; import java.util.List; +/** + * @author 逗 + */ @Data public class TallTaskVo {