135 changed files with 4776 additions and 4773 deletions
@ -1,28 +1,28 @@ |
|||||
package com.ccsensptos.tallsdk.api; |
package com.ccsensptos.tallsdk.api; |
||||
|
|
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RestController; |
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Api(tags = "heartbeat" , description = "域信息相关接口") |
@Api(tags = "heartbeat" , description = "域信息相关接口") |
||||
@RestController |
@RestController |
||||
@RequestMapping("/tall") |
@RequestMapping("/tall") |
||||
@Slf4j |
@Slf4j |
||||
public class HeartbeatController { |
public class HeartbeatController { |
||||
|
|
||||
@ApiOperation(value = "接收私域的心跳", notes = "") |
@ApiOperation(value = "接收私域的心跳", notes = "") |
||||
@RequestMapping(value = "/heart", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/heart", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse receiveHeartbeat() throws Exception { |
public JsonResponse receiveHeartbeat() throws Exception { |
||||
log.info("接受PTOS_TALL心跳后正确返回"); |
log.info("接受PTOS_TALL心跳后正确返回"); |
||||
return JsonResponse.newInstance().ok(); |
return JsonResponse.newInstance().ok(); |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
@ -1,94 +1,94 @@ |
|||||
package com.ccsensptos.tallsdk.api; |
package com.ccsensptos.tallsdk.api; |
||||
|
|
||||
import com.ccsens.util.WebConstant; |
import com.ccsens.util.WebConstant; |
||||
import com.ccsens.util.bean.dto.QueryDto; |
import com.ccsens.util.bean.dto.QueryDto; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallProjectDto; |
import com.ccsensptos.tallsdk.bean.dto.TallProjectDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallWbsVo; |
import com.ccsensptos.tallsdk.bean.vo.TallWbsVo; |
||||
import com.ccsensptos.tallsdk.service.ITallService; |
import com.ccsensptos.tallsdk.service.ITallService; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; |
import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; |
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
import io.swagger.annotations.ApiParam; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.validation.annotation.Validated; |
import org.springframework.validation.annotation.Validated; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RestController; |
import org.springframework.web.bind.annotation.RestController; |
||||
import org.springframework.web.multipart.MultipartFile; |
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
import javax.annotation.Resource; |
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletRequest; |
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Api(tags = "project" , description = "项目相关接口") |
@Api(tags = "project" , description = "项目相关接口") |
||||
@RestController |
@RestController |
||||
@RequestMapping("/tall/project") |
@RequestMapping("/tall/project") |
||||
@Slf4j |
@Slf4j |
||||
public class ProjectController { |
public class ProjectController { |
||||
|
|
||||
@Resource |
@Resource |
||||
private ITallService tallService; |
private ITallService tallService; |
||||
|
|
||||
@ApiOperation(value = "日历页获取项目列表", notes = "") |
@ApiOperation(value = "日历页获取项目列表", notes = "") |
||||
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<List<TallProjectVo.ProjectInfo>> queryProjectByUser(HttpServletRequest request, @ApiParam @Validated @RequestBody TallProjectDto.QueryProjectDto params) throws Exception{ |
public JsonResponse<List<TallProjectVo.ProjectInfo>> queryProjectByUser(HttpServletRequest request, @ApiParam @Validated @RequestBody TallProjectDto.QueryProjectDto params) throws Exception{ |
||||
log.info("查询用户所有域下所有业务内的所有项目:{}",params); |
log.info("查询用户所有域下所有业务内的所有项目:{}",params); |
||||
List<TallProjectVo.ProjectInfo> projectInfoList = tallService.queryProjectByUser(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params); |
List<TallProjectVo.ProjectInfo> projectInfoList = tallService.queryProjectByUser(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params); |
||||
log.info("返回用户所有域下所有业务内的所有项目"); |
log.info("返回用户所有域下所有业务内的所有项目"); |
||||
return JsonResponse.newInstance().ok(projectInfoList); |
return JsonResponse.newInstance().ok(projectInfoList); |
||||
} |
} |
||||
|
|
||||
|
|
||||
@ApiOperation(value = "导入Wbs", notes = "") |
@ApiOperation(value = "导入Wbs", notes = "") |
||||
@RequestMapping(value = "/wbs", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/wbs", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<TallProjectVo.ProjectInfo> importWbs(HttpServletRequest request, QueryDto<MultipartFile> params,Long parentId) throws Exception{ |
public JsonResponse<TallProjectVo.ProjectInfo> importWbs(HttpServletRequest request, QueryDto<MultipartFile> params,Long parentId) throws Exception{ |
||||
log.info("导入Wbs:{}",params); |
log.info("导入Wbs:{}",params); |
||||
TallProjectVo.ProjectInfo projectInfoList = tallService.importWbs(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam(),parentId); |
TallProjectVo.ProjectInfo projectInfoList = tallService.importWbs(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam(),parentId); |
||||
log.info("导入Wbs"); |
log.info("导入Wbs"); |
||||
return JsonResponse.newInstance().ok(projectInfoList); |
return JsonResponse.newInstance().ok(projectInfoList); |
||||
} |
} |
||||
|
|
||||
|
|
||||
@ApiOperation(value = "导出Wbs", notes = "") |
@ApiOperation(value = "导出Wbs", notes = "") |
||||
@RequestMapping(value = "/exportWbs", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/exportWbs", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<TallWbsVo.WbsPath> exportWbs(HttpServletRequest request,@ApiParam @Validated @RequestBody QueryDto<TallProjectDto.ProjectById> params) throws Exception{ |
public JsonResponse<TallWbsVo.WbsPath> exportWbs(HttpServletRequest request,@ApiParam @Validated @RequestBody QueryDto<TallProjectDto.ProjectById> params) throws Exception{ |
||||
log.info("导出Wbs:{}",params); |
log.info("导出Wbs:{}",params); |
||||
TallWbsVo.WbsPath wbsPath = tallService.exportWbs(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
TallWbsVo.WbsPath wbsPath = tallService.exportWbs(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("Wbs的路径:{}",wbsPath); |
log.info("Wbs的路径:{}",wbsPath); |
||||
return JsonResponse.newInstance().ok(wbsPath); |
return JsonResponse.newInstance().ok(wbsPath); |
||||
} |
} |
||||
|
|
||||
@ApiOperation(value = "根据id查询项目信息", notes = "根据id查询项目信息") |
@ApiOperation(value = "根据id查询项目信息", notes = "根据id查询项目信息") |
||||
@RequestMapping(value = "/findProjectById", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/findProjectById", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<TallProjectVo.ProjectInfo> findProjectById(HttpServletRequest request,@ApiParam @Validated @RequestBody QueryDto<TallProjectDto.ProjectById> params) throws Exception{ |
public JsonResponse<TallProjectVo.ProjectInfo> findProjectById(HttpServletRequest request,@ApiParam @Validated @RequestBody QueryDto<TallProjectDto.ProjectById> params) throws Exception{ |
||||
TallProjectVo.ProjectInfo projectById = tallService.findProjectById(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
TallProjectVo.ProjectInfo projectById = tallService.findProjectById(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
return JsonResponse.newInstance().ok(projectById); |
return JsonResponse.newInstance().ok(projectById); |
||||
} |
} |
||||
|
|
||||
|
|
||||
|
|
||||
@ApiOperation(value = "删除项目", notes = "") |
@ApiOperation(value = "删除项目", notes = "") |
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<List<TallProjectVo.ProjectInfo>> deleteProject(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallProjectDto.ProjectById> params) throws Exception{ |
public JsonResponse<List<TallProjectVo.ProjectInfo>> deleteProject(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallProjectDto.ProjectById> params) throws Exception{ |
||||
log.info("删除项目:{}",params); |
log.info("删除项目:{}",params); |
||||
tallService.deleteProject(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
tallService.deleteProject(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("删除项目成功"); |
log.info("删除项目成功"); |
||||
return JsonResponse.newInstance().ok(); |
return JsonResponse.newInstance().ok(); |
||||
} |
} |
||||
|
|
||||
|
|
||||
@ApiOperation(value = "拖拽项目", notes = "") |
@ApiOperation(value = "拖拽项目", notes = "") |
||||
@RequestMapping(value = "/drag", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/drag", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse dragProject(HttpServletRequest request, @ApiParam @Validated @RequestBody TallProjectDto.MoveProject params) throws Exception{ |
public JsonResponse dragProject(HttpServletRequest request, @ApiParam @Validated @RequestBody TallProjectDto.MoveProject params) throws Exception{ |
||||
log.info("删除项目:{}",params); |
log.info("删除项目:{}",params); |
||||
tallService.dragProject(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params); |
tallService.dragProject(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params); |
||||
log.info("删除项目成功"); |
log.info("删除项目成功"); |
||||
return JsonResponse.newInstance().ok(); |
return JsonResponse.newInstance().ok(); |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,45 +1,45 @@ |
|||||
package com.ccsensptos.tallsdk.api; |
package com.ccsensptos.tallsdk.api; |
||||
|
|
||||
import com.ccsens.util.WebConstant; |
import com.ccsens.util.WebConstant; |
||||
import com.ccsens.util.bean.dto.QueryDto; |
import com.ccsens.util.bean.dto.QueryDto; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallRoleDto; |
import com.ccsensptos.tallsdk.bean.dto.TallRoleDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallRoleVo; |
import com.ccsensptos.tallsdk.bean.vo.TallRoleVo; |
||||
import com.ccsensptos.tallsdk.service.ITallService; |
import com.ccsensptos.tallsdk.service.ITallService; |
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
import io.swagger.annotations.ApiParam; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.validation.annotation.Validated; |
import org.springframework.validation.annotation.Validated; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RestController; |
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
import javax.annotation.Resource; |
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletRequest; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Api(tags = "角色相关" , description = "DebugController | ") |
@Api(tags = "角色相关" , description = "DebugController | ") |
||||
@RestController |
@RestController |
||||
@RequestMapping("/tall/role") |
@RequestMapping("/tall/role") |
||||
@Slf4j |
@Slf4j |
||||
public class RoleController { |
public class RoleController { |
||||
|
|
||||
@Resource |
@Resource |
||||
private ITallService tallService; |
private ITallService tallService; |
||||
|
|
||||
|
|
||||
|
|
||||
@ApiOperation(value = "根据项目id查找角色", notes = "") |
@ApiOperation(value = "根据项目id查找角色", notes = "") |
||||
@RequestMapping(value = "/show", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/show", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<TallRoleVo.QueryRole> queryByProjectId(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallRoleDto.QueryRoleById> params) { |
public JsonResponse<TallRoleVo.QueryRole> queryByProjectId(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallRoleDto.QueryRoleById> params) { |
||||
log.info("根据项目id查找角色{}",params); |
log.info("根据项目id查找角色{}",params); |
||||
TallRoleVo.QueryRole queryRole = tallService.queryShowRole(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
TallRoleVo.QueryRole queryRole = tallService.queryShowRole(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("项目id查找角色列表{}",queryRole); |
log.info("项目id查找角色列表{}",queryRole); |
||||
return JsonResponse.newInstance().ok(queryRole); |
return JsonResponse.newInstance().ok(queryRole); |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,93 +1,93 @@ |
|||||
package com.ccsensptos.tallsdk.api; |
package com.ccsensptos.tallsdk.api; |
||||
|
|
||||
import com.ccsens.util.WebConstant; |
import com.ccsens.util.WebConstant; |
||||
import com.ccsens.util.bean.dto.QueryDto; |
import com.ccsens.util.bean.dto.QueryDto; |
||||
import com.ccsensptos.tallsdk.service.ITallService; |
import com.ccsensptos.tallsdk.service.ITallService; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallTaskDto; |
import com.ccsensptos.tallsdk.bean.dto.TallTaskDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallTaskVo; |
import com.ccsensptos.tallsdk.bean.vo.TallTaskVo; |
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import com.github.pagehelper.PageHelper; |
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
import com.github.pagehelper.PageInfo; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
import io.swagger.annotations.ApiParam; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.validation.annotation.Validated; |
import org.springframework.validation.annotation.Validated; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RestController; |
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
import javax.annotation.Resource; |
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletRequest; |
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Api(tags = "任务相关" , description = "DebugController | ") |
@Api(tags = "任务相关" , description = "DebugController | ") |
||||
@RestController |
@RestController |
||||
@RequestMapping("/tall/task") |
@RequestMapping("/tall/task") |
||||
@Slf4j |
@Slf4j |
||||
public class TaskController { |
public class TaskController { |
||||
|
|
||||
@Resource |
@Resource |
||||
private ITallService tallService; |
private ITallService tallService; |
||||
|
|
||||
|
|
||||
@ApiOperation(value = "查找永久日常任务", notes = "") |
@ApiOperation(value = "查找永久日常任务", notes = "") |
||||
@RequestMapping(value = "/permanent", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/permanent", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<List<TallTaskVo.QueryTask>> queryPermanentGlobalTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryPermanentGlobalTask> params) { |
public JsonResponse<List<TallTaskVo.QueryTask>> queryPermanentGlobalTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryPermanentGlobalTask> params) { |
||||
log.info("查找永久日常任务:{}",params); |
log.info("查找永久日常任务:{}",params); |
||||
List<TallTaskVo.QueryTask> queryTasks = tallService.queryPermanentGlobalTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
List<TallTaskVo.QueryTask> queryTasks = tallService.queryPermanentGlobalTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("返回日常任务"); |
log.info("返回日常任务"); |
||||
return JsonResponse.newInstance().ok(queryTasks); |
return JsonResponse.newInstance().ok(queryTasks); |
||||
} |
} |
||||
|
|
||||
|
|
||||
@ApiOperation(value = "查找带时间的日常任务", notes = "") |
@ApiOperation(value = "查找带时间的日常任务", notes = "") |
||||
@RequestMapping(value = "/global", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/global", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<List<TallTaskVo.QueryTask>> queryGlobalTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryGlobalTask> params) { |
public JsonResponse<List<TallTaskVo.QueryTask>> queryGlobalTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryGlobalTask> params) { |
||||
log.info("查找带时间的日常任务:{}",params); |
log.info("查找带时间的日常任务:{}",params); |
||||
List<TallTaskVo.QueryTask> queryTasks = tallService.queryGlobalTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
List<TallTaskVo.QueryTask> queryTasks = tallService.queryGlobalTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("返回带时间的日常任务"); |
log.info("返回带时间的日常任务"); |
||||
return JsonResponse.newInstance().ok(queryTasks); |
return JsonResponse.newInstance().ok(queryTasks); |
||||
} |
} |
||||
|
|
||||
|
|
||||
@ApiOperation(value = "查找定期任务", notes = "") |
@ApiOperation(value = "查找定期任务", notes = "") |
||||
@RequestMapping(value = "/regular", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/regular", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<List<TallTaskVo.QueryTask>> queryRegularTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryRegularTask> params) { |
public JsonResponse<List<TallTaskVo.QueryTask>> queryRegularTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryRegularTask> params) { |
||||
log.info("查找定期任务:{}",params); |
log.info("查找定期任务:{}",params); |
||||
List<TallTaskVo.QueryTask> queryTasks = tallService.queryRegularTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
List<TallTaskVo.QueryTask> queryTasks = tallService.queryRegularTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("返回定期任务"); |
log.info("返回定期任务"); |
||||
return JsonResponse.newInstance().ok(queryTasks); |
return JsonResponse.newInstance().ok(queryTasks); |
||||
} |
} |
||||
|
|
||||
// @ApiOperation(value = "查找定期任务和相应的插件展示信息", notes = "")
|
// @ApiOperation(value = "查找定期任务和相应的插件展示信息", notes = "")
|
||||
// @RequestMapping(value = "/regular/plugin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/regular/plugin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse<List<TallTaskVo.QueryTask>> queryRegularTaskAndPlugin(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryRegularTask> params) {
|
// public JsonResponse<List<TallTaskVo.QueryTask>> queryRegularTaskAndPlugin(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.QueryRegularTask> params) {
|
||||
// log.info("查找定期任务和相应的插件展示信息:{}",params);
|
// log.info("查找定期任务和相应的插件展示信息:{}",params);
|
||||
// List<TallTaskVo.QueryTask> queryTasks = tallService.queryRegularTaskAndPlugin(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam());
|
// List<TallTaskVo.QueryTask> queryTasks = tallService.queryRegularTaskAndPlugin(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam());
|
||||
// log.info("返回定期任务和相应的插件展示信息");
|
// log.info("返回定期任务和相应的插件展示信息");
|
||||
// return JsonResponse.newInstance().ok(queryTasks);
|
// return JsonResponse.newInstance().ok(queryTasks);
|
||||
// }
|
// }
|
||||
|
|
||||
@ApiOperation(value = "分页查找定期任务", notes = "") |
@ApiOperation(value = "分页查找定期任务", notes = "") |
||||
@RequestMapping(value = "/regular/page", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/regular/page", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<PageInfo<TallTaskVo.QueryTask>> pageQueryRegularTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.PageQueryRegularTask> params) { |
public JsonResponse<PageInfo<TallTaskVo.QueryTask>> pageQueryRegularTask(HttpServletRequest request, @ApiParam @Validated @RequestBody QueryDto<TallTaskDto.PageQueryRegularTask> params) { |
||||
log.info("分页查找定期任务:{}",params); |
log.info("分页查找定期任务:{}",params); |
||||
PageInfo<TallTaskVo.QueryTask> queryTasks = tallService.pageQueryRegularTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
PageInfo<TallTaskVo.QueryTask> queryTasks = tallService.pageQueryRegularTask(request.getHeader(WebConstant.HEADER_KEY_TOKEN),params.getParam()); |
||||
log.info("返回分页查找定期任务"); |
log.info("返回分页查找定期任务"); |
||||
return JsonResponse.newInstance().ok(queryTasks); |
return JsonResponse.newInstance().ok(queryTasks); |
||||
} |
} |
||||
|
|
||||
@ApiOperation(value = "查看用户所有的任务", notes = "") |
@ApiOperation(value = "查看用户所有的任务", notes = "") |
||||
@RequestMapping(value = "/allTask", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
@RequestMapping(value = "/allTask", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
public JsonResponse<List<TallTaskVo.QueryTask>> queryAllTask(HttpServletRequest request, @ApiParam @Validated @RequestBody TallTaskDto.QueryAllTask params) { |
public JsonResponse<List<TallTaskVo.QueryTask>> queryAllTask(HttpServletRequest request, @ApiParam @Validated @RequestBody TallTaskDto.QueryAllTask params) { |
||||
log.info("查看用户所有的任务:{}",params); |
log.info("查看用户所有的任务:{}",params); |
||||
List<TallTaskVo.QueryTask> queryTasks = tallService.queryAllTask(params); |
List<TallTaskVo.QueryTask> queryTasks = tallService.queryAllTask(params); |
||||
log.info("返回用户所有的任务"); |
log.info("返回用户所有的任务"); |
||||
return JsonResponse.newInstance().ok(queryTasks); |
return JsonResponse.newInstance().ok(queryTasks); |
||||
} |
} |
||||
} |
} |
@ -1,29 +1,29 @@ |
|||||
package com.ccsensptos.tallsdk.bean.dto; |
package com.ccsensptos.tallsdk.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallPluginDto { |
public class TallPluginDto { |
||||
@Data |
@Data |
||||
@ApiModel("通过业务code和插件名查找插件信息") |
@ApiModel("通过业务code和插件名查找插件信息") |
||||
public static class BusinessPluginByName { |
public static class BusinessPluginByName { |
||||
@ApiModelProperty("业务插件关联id") |
@ApiModelProperty("业务插件关联id") |
||||
private String code; |
private String code; |
||||
@ApiModelProperty("业务插件关联id") |
@ApiModelProperty("业务插件关联id") |
||||
private String pluginName; |
private String pluginName; |
||||
|
|
||||
public BusinessPluginByName(String code, String pluginName) { |
public BusinessPluginByName(String code, String pluginName) { |
||||
this.code = code; |
this.code = code; |
||||
this.pluginName = pluginName; |
this.pluginName = pluginName; |
||||
} |
} |
||||
|
|
||||
public BusinessPluginByName() { |
public BusinessPluginByName() { |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,55 +1,55 @@ |
|||||
package com.ccsensptos.tallsdk.bean.dto; |
package com.ccsensptos.tallsdk.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import javax.validation.constraints.NotNull; |
import javax.validation.constraints.NotNull; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallProjectDto { |
public class TallProjectDto { |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("根据id查找项目信息") |
@ApiModel("根据id查找项目信息") |
||||
public static class ProjectById { |
public static class ProjectById { |
||||
@NotNull(message = "请选择项目") |
@NotNull(message = "请选择项目") |
||||
@ApiModelProperty("项目id") |
@ApiModelProperty("项目id") |
||||
private Long projectId; |
private Long projectId; |
||||
private Long userId; |
private Long userId; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("用户查询可见的项目") |
@ApiModel("用户查询可见的项目") |
||||
public static class QueryProjectDto{ |
public static class QueryProjectDto{ |
||||
@ApiModelProperty("开始时间") |
@ApiModelProperty("开始时间") |
||||
private Long startTime; |
private Long startTime; |
||||
@ApiModelProperty("结束时间") |
@ApiModelProperty("结束时间") |
||||
private Long endTime; |
private Long endTime; |
||||
} |
} |
||||
|
|
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查询日历是否有项目") |
@ApiModel("查询日历是否有项目") |
||||
public static class QueryHaveProject { |
public static class QueryHaveProject { |
||||
@NotNull(message = "开始时间不能为空") |
@NotNull(message = "开始时间不能为空") |
||||
@ApiModelProperty("开始时间") |
@ApiModelProperty("开始时间") |
||||
private Long startTime; |
private Long startTime; |
||||
@NotNull(message = "结束时间不能为空") |
@NotNull(message = "结束时间不能为空") |
||||
@ApiModelProperty("结束时间") |
@ApiModelProperty("结束时间") |
||||
private Long endTime; |
private Long endTime; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("移动项目位置(修改项目层级关系)") |
@ApiModel("移动项目位置(修改项目层级关系)") |
||||
public static class MoveProject{ |
public static class MoveProject{ |
||||
@ApiModelProperty("需要移动的项目id") |
@ApiModelProperty("需要移动的项目id") |
||||
private Long moveProjectId; |
private Long moveProjectId; |
||||
@ApiModelProperty("目标项目的id") |
@ApiModelProperty("目标项目的id") |
||||
private Long targetProjectId; |
private Long targetProjectId; |
||||
@ApiModelProperty("业务code") |
@ApiModelProperty("业务code") |
||||
private String businessCode; |
private String businessCode; |
||||
} |
} |
||||
} |
} |
@ -1,20 +1,20 @@ |
|||||
package com.ccsensptos.tallsdk.bean.dto; |
package com.ccsensptos.tallsdk.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import javax.validation.constraints.NotNull; |
import javax.validation.constraints.NotNull; |
||||
|
|
||||
@Data |
@Data |
||||
public class TallRoleDto { |
public class TallRoleDto { |
||||
@Data |
@Data |
||||
@ApiModel("查看角色栏展示") |
@ApiModel("查看角色栏展示") |
||||
public static class QueryRoleById{ |
public static class QueryRoleById{ |
||||
@NotNull(message = "项目id不能为空") |
@NotNull(message = "项目id不能为空") |
||||
@ApiModelProperty("项目id") |
@ApiModelProperty("项目id") |
||||
private Long projectId; |
private Long projectId; |
||||
@ApiModelProperty("展示的角色数量") |
@ApiModelProperty("展示的角色数量") |
||||
private int num = 5; |
private int num = 5; |
||||
} |
} |
||||
} |
} |
@ -1,102 +1,102 @@ |
|||||
package com.ccsensptos.tallsdk.bean.dto; |
package com.ccsensptos.tallsdk.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import javax.validation.constraints.NotNull; |
import javax.validation.constraints.NotNull; |
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
@Data |
@Data |
||||
public class TallTaskDto { |
public class TallTaskDto { |
||||
@Data |
@Data |
||||
@ApiModel("查看永久日常任务") |
@ApiModel("查看永久日常任务") |
||||
public static class QueryPermanentGlobalTask{ |
public static class QueryPermanentGlobalTask{ |
||||
@NotNull(message = "角色id不能为空") |
@NotNull(message = "角色id不能为空") |
||||
@ApiModelProperty("角色id") |
@ApiModelProperty("角色id") |
||||
private Long roleId; |
private Long roleId; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查看带时间的日常任务") |
@ApiModel("查看带时间的日常任务") |
||||
public static class QueryGlobalTask{ |
public static class QueryGlobalTask{ |
||||
@NotNull(message = "角色id不能为空") |
@NotNull(message = "角色id不能为空") |
||||
@ApiModelProperty("角色id") |
@ApiModelProperty("角色id") |
||||
private Long roleId; |
private Long roleId; |
||||
@ApiModelProperty("时间基准点 默认当前") |
@ApiModelProperty("时间基准点 默认当前") |
||||
private Long timeNode = System.currentTimeMillis(); |
private Long timeNode = System.currentTimeMillis(); |
||||
@ApiModelProperty("时间颗粒度单位 默认天") |
@ApiModelProperty("时间颗粒度单位 默认天") |
||||
private int timeUnit = 4; |
private int timeUnit = 4; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查看定期任务") |
@ApiModel("查看定期任务") |
||||
public static class QueryRegularTask{ |
public static class QueryRegularTask{ |
||||
@NotNull(message = "角色id不能为空") |
@NotNull(message = "角色id不能为空") |
||||
@ApiModelProperty("角色id") |
@ApiModelProperty("角色id") |
||||
private Long roleId; |
private Long roleId; |
||||
@ApiModelProperty("时间基准点 默认当前") |
@ApiModelProperty("时间基准点 默认当前") |
||||
private Long timeNode = System.currentTimeMillis(); |
private Long timeNode = System.currentTimeMillis(); |
||||
@ApiModelProperty("时间颗粒度 默认天") |
@ApiModelProperty("时间颗粒度 默认天") |
||||
private int timeUnit = 4; |
private int timeUnit = 4; |
||||
@ApiModelProperty("0向上查找 1向下查找(默认) 下查包含自己,上查不包含") |
@ApiModelProperty("0向上查找 1向下查找(默认) 下查包含自己,上查不包含") |
||||
private int queryType = 1; |
private int queryType = 1; |
||||
@ApiModelProperty("查找颗粒度数量 默认3个") |
@ApiModelProperty("查找颗粒度数量 默认3个") |
||||
private int queryNum = 3; |
private int queryNum = 3; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("分期查看定期任务") |
@ApiModel("分期查看定期任务") |
||||
public static class PageQueryRegularTask{ |
public static class PageQueryRegularTask{ |
||||
// @NotNull(message = "角色id不能为空")
|
// @NotNull(message = "角色id不能为空")
|
||||
@ApiModelProperty("角色id") |
@ApiModelProperty("角色id") |
||||
private Long roleId; |
private Long roleId; |
||||
@ApiModelProperty("项目id") |
@ApiModelProperty("项目id") |
||||
private Long projectId; |
private Long projectId; |
||||
@ApiModelProperty("任务id") |
@ApiModelProperty("任务id") |
||||
private Long taskId; |
private Long taskId; |
||||
@ApiModelProperty("时间基准点 默认当前") |
@ApiModelProperty("时间基准点 默认当前") |
||||
private Long timeNode = System.currentTimeMillis(); |
private Long timeNode = System.currentTimeMillis(); |
||||
@ApiModelProperty("时间颗粒度 默认天") |
@ApiModelProperty("时间颗粒度 默认天") |
||||
private int timeUnit = 4; |
private int timeUnit = 4; |
||||
@ApiModelProperty("0向上查找 1向下查找(默认) 下查包含自己,上查不包含") |
@ApiModelProperty("0向上查找 1向下查找(默认) 下查包含自己,上查不包含") |
||||
private int queryType = 1; |
private int queryType = 1; |
||||
@ApiModelProperty("第几页") |
@ApiModelProperty("第几页") |
||||
private Integer pageNum = 1; |
private Integer pageNum = 1; |
||||
@ApiModelProperty("每页几条信息") |
@ApiModelProperty("每页几条信息") |
||||
private Integer pageSize = 10; |
private Integer pageSize = 10; |
||||
|
|
||||
@ApiModelProperty("任务所属的服务code") |
@ApiModelProperty("任务所属的服务code") |
||||
private String businessCode; |
private String businessCode; |
||||
@ApiModelProperty("触发类型 0翻页查找 1双击小红点触发") |
@ApiModelProperty("触发类型 0翻页查找 1双击小红点触发") |
||||
private int triggerType = 0; |
private int triggerType = 0; |
||||
@ApiModelProperty("服务codes") |
@ApiModelProperty("服务codes") |
||||
private List<String> codes; |
private List<String> codes; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查找用户的所有任务") |
@ApiModel("查找用户的所有任务") |
||||
public static class QueryAllTask { |
public static class QueryAllTask { |
||||
@ApiModelProperty("userId") |
@ApiModelProperty("userId") |
||||
private Long userId; |
private Long userId; |
||||
@ApiModelProperty("手机号") |
@ApiModelProperty("手机号") |
||||
private String phone; |
private String phone; |
||||
@ApiModelProperty("服务codes") |
@ApiModelProperty("服务codes") |
||||
private List<String> codes; |
private List<String> codes; |
||||
@ApiModelProperty("时间基准点 默认当前") |
@ApiModelProperty("时间基准点 默认当前") |
||||
private Long timeNode = System.currentTimeMillis(); |
private Long timeNode = System.currentTimeMillis(); |
||||
@ApiModelProperty("时间颗粒度 默认天") |
@ApiModelProperty("时间颗粒度 默认天") |
||||
private int timeUnit = 4; |
private int timeUnit = 4; |
||||
@ApiModelProperty("0向上查找 1向下查找(默认) 下查包含自己,上查不包含") |
@ApiModelProperty("0向上查找 1向下查找(默认) 下查包含自己,上查不包含") |
||||
private int queryType = 1; |
private int queryType = 1; |
||||
@ApiModelProperty("第几页") |
@ApiModelProperty("第几页") |
||||
private Integer pageNum = 1; |
private Integer pageNum = 1; |
||||
@ApiModelProperty("每页几条信息") |
@ApiModelProperty("每页几条信息") |
||||
private Integer pageSize = 10; |
private Integer pageSize = 10; |
||||
|
|
||||
@ApiModelProperty("任务id") |
@ApiModelProperty("任务id") |
||||
private String taskId; |
private String taskId; |
||||
@ApiModelProperty("任务所属的服务code") |
@ApiModelProperty("任务所属的服务code") |
||||
private String businessCode; |
private String businessCode; |
||||
} |
} |
||||
} |
} |
@ -1,49 +1,49 @@ |
|||||
package com.ccsensptos.tallsdk.bean.dto; |
package com.ccsensptos.tallsdk.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallTokenDto { |
public class TallTokenDto { |
||||
|
|
||||
|
|
||||
@Data |
@Data |
||||
public static class GetAccessToken{ |
public static class GetAccessToken{ |
||||
//"appId"
|
//"appId"
|
||||
private String appId; |
private String appId; |
||||
//"secret"
|
//"secret"
|
||||
private String secret; |
private String secret; |
||||
|
|
||||
public GetAccessToken(String appId, String secret) { |
public GetAccessToken(String appId, String secret) { |
||||
this.appId = appId; |
this.appId = appId; |
||||
this.secret = secret; |
this.secret = secret; |
||||
} |
} |
||||
|
|
||||
public GetAccessToken() { |
public GetAccessToken() { |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
public static class GetUserByToken{ |
public static class GetUserByToken{ |
||||
//"token")
|
//"token")
|
||||
private String token; |
private String token; |
||||
//"appId")
|
//"appId")
|
||||
private String appId; |
private String appId; |
||||
//"secret")
|
//"secret")
|
||||
private String secret; |
private String secret; |
||||
|
|
||||
public GetUserByToken() { |
public GetUserByToken() { |
||||
} |
} |
||||
|
|
||||
public GetUserByToken(String token, String appId, String secret) { |
public GetUserByToken(String token, String appId, String secret) { |
||||
this.token = token; |
this.token = token; |
||||
this.appId = appId; |
this.appId = appId; |
||||
this.secret = secret; |
this.secret = secret; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,25 +1,25 @@ |
|||||
package com.ccsensptos.tallsdk.bean.vo; |
package com.ccsensptos.tallsdk.bean.vo; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallPluginVo { |
public class TallPluginVo { |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查找插件信息,通过服务code和插件名") |
@ApiModel("查找插件信息,通过服务code和插件名") |
||||
public static class BusinessPluginInfo{ |
public static class BusinessPluginInfo{ |
||||
@ApiModelProperty("插件id") |
@ApiModelProperty("插件id") |
||||
private Long pluginId; |
private Long pluginId; |
||||
@ApiModelProperty("业务插件关联id") |
@ApiModelProperty("业务插件关联id") |
||||
private Long businessPluginId; |
private Long businessPluginId; |
||||
@ApiModelProperty("插件在业务下的唯一code") |
@ApiModelProperty("插件在业务下的唯一code") |
||||
private String code; |
private String code; |
||||
@ApiModelProperty("是否是内置组件 0否 1是") |
@ApiModelProperty("是否是内置组件 0否 1是") |
||||
private Byte inner; |
private Byte inner; |
||||
} |
} |
||||
} |
} |
@ -1,103 +1,103 @@ |
|||||
package com.ccsensptos.tallsdk.bean.vo; |
package com.ccsensptos.tallsdk.bean.vo; |
||||
|
|
||||
import cn.hutool.core.util.ObjectUtil; |
import cn.hutool.core.util.ObjectUtil; |
||||
import com.ccsens.util.WebConstant; |
import com.ccsens.util.WebConstant; |
||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallProjectVo { |
public class TallProjectVo { |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("域信息") |
@ApiModel("域信息") |
||||
public static class DomainInfo{ |
public static class DomainInfo{ |
||||
@ApiModelProperty("id") |
@ApiModelProperty("id") |
||||
private Long id; |
private Long id; |
||||
@ApiModelProperty("域名") |
@ApiModelProperty("域名") |
||||
private String name; |
private String name; |
||||
@ApiModelProperty("域code") |
@ApiModelProperty("域code") |
||||
private String code; |
private String code; |
||||
@ApiModelProperty("域访问前缀") |
@ApiModelProperty("域访问前缀") |
||||
private String url; |
private String url; |
||||
@ApiModelProperty("是否是自身 0否 1是") |
@ApiModelProperty("是否是自身 0否 1是") |
||||
private byte self; |
private byte self; |
||||
@ApiModelProperty("业务列表") |
@ApiModelProperty("业务列表") |
||||
private List<BusinessInfo> businessList; |
private List<BusinessInfo> businessList; |
||||
} |
} |
||||
@Data |
@Data |
||||
@ApiModel("业务信息") |
@ApiModel("业务信息") |
||||
public static class BusinessInfo{ |
public static class BusinessInfo{ |
||||
@ApiModelProperty("业务id") |
@ApiModelProperty("业务id") |
||||
private Long businessId; |
private Long businessId; |
||||
@ApiModelProperty("业务名") |
@ApiModelProperty("业务名") |
||||
private String businessName; |
private String businessName; |
||||
@ApiModelProperty("业务code") |
@ApiModelProperty("业务code") |
||||
private String businessCode; |
private String businessCode; |
||||
@ApiModelProperty("业务访问前缀") |
@ApiModelProperty("业务访问前缀") |
||||
private String url; |
private String url; |
||||
@ApiModelProperty("项目列表") |
@ApiModelProperty("项目列表") |
||||
private List<ProjectInfo> projectList; |
private List<ProjectInfo> projectList; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("日历下项目列表信息") |
@ApiModel("日历下项目列表信息") |
||||
public static class ProjectInfo{ |
public static class ProjectInfo{ |
||||
@ApiModelProperty("id") |
@ApiModelProperty("id") |
||||
private Long id; |
private Long id; |
||||
@ApiModelProperty("项目名") |
@ApiModelProperty("项目名") |
||||
private String name; |
private String name; |
||||
@ApiModelProperty("开始时间") |
@ApiModelProperty("开始时间") |
||||
private Long startTime; |
private Long startTime; |
||||
@ApiModelProperty("结束时间") |
@ApiModelProperty("结束时间") |
||||
private Long endTime; |
private Long endTime; |
||||
@ApiModelProperty("项目完成状态(0-未开始,1-进行中,2-已完成,3-暂停)") |
@ApiModelProperty("项目完成状态(0-未开始,1-进行中,2-已完成,3-暂停)") |
||||
private byte status; |
private byte status; |
||||
@ApiModelProperty("访问路径)") |
@ApiModelProperty("访问路径)") |
||||
private String url; |
private String url; |
||||
@ApiModelProperty("所属域code") |
@ApiModelProperty("所属域code") |
||||
private String domainCode; |
private String domainCode; |
||||
@ApiModelProperty("所属业务code") |
@ApiModelProperty("所属业务code") |
||||
private String businessCode; |
private String businessCode; |
||||
@ApiModelProperty("子项目") |
@ApiModelProperty("子项目") |
||||
private List<ProjectInfo> sonProjectList; |
private List<ProjectInfo> sonProjectList; |
||||
@JsonIgnore |
@JsonIgnore |
||||
@ApiModelProperty("父级id") |
@ApiModelProperty("父级id") |
||||
private Long parentId; |
private Long parentId; |
||||
|
|
||||
public Byte getStatus() { |
public Byte getStatus() { |
||||
long current = System.currentTimeMillis(); |
long current = System.currentTimeMillis(); |
||||
if(ObjectUtil.isNull(getStartTime()) || ObjectUtil.isNull(getEndTime())) { |
if(ObjectUtil.isNull(getStartTime()) || ObjectUtil.isNull(getEndTime())) { |
||||
return null; |
return null; |
||||
} |
} |
||||
if(getStartTime() > current){ |
if(getStartTime() > current){ |
||||
this.status = (byte) WebConstant.EVENT_PROCESS.Pending.value; |
this.status = (byte) WebConstant.EVENT_PROCESS.Pending.value; |
||||
}else if(getEndTime() < current){ |
}else if(getEndTime() < current){ |
||||
this.status = (byte) WebConstant.EVENT_PROCESS.Expired.value; |
this.status = (byte) WebConstant.EVENT_PROCESS.Expired.value; |
||||
}else{ |
}else{ |
||||
this.status = (byte) WebConstant.EVENT_PROCESS.Processing.value; |
this.status = (byte) WebConstant.EVENT_PROCESS.Processing.value; |
||||
} |
} |
||||
return this.status; |
return this.status; |
||||
} |
} |
||||
|
|
||||
public ProjectInfo() { |
public ProjectInfo() { |
||||
} |
} |
||||
|
|
||||
public ProjectInfo(Long id, String name, Long startTime, Long endTime, String url, String domainCode, String businessCode) { |
public ProjectInfo(Long id, String name, Long startTime, Long endTime, String url, String domainCode, String businessCode) { |
||||
this.id = id; |
this.id = id; |
||||
this.name = name; |
this.name = name; |
||||
this.startTime = startTime; |
this.startTime = startTime; |
||||
this.endTime = endTime; |
this.endTime = endTime; |
||||
this.url = url; |
this.url = url; |
||||
this.domainCode = domainCode; |
this.domainCode = domainCode; |
||||
this.businessCode = businessCode; |
this.businessCode = businessCode; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,36 +1,36 @@ |
|||||
package com.ccsensptos.tallsdk.bean.vo; |
package com.ccsensptos.tallsdk.bean.vo; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
@Data |
@Data |
||||
public class TallRoleVo { |
public class TallRoleVo { |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查看角色栏展示的角色信息") |
@ApiModel("查看角色栏展示的角色信息") |
||||
public static class QueryRole { |
public static class QueryRole { |
||||
@ApiModelProperty("展示的角色信息") |
@ApiModelProperty("展示的角色信息") |
||||
private List<RoleInfo> visibleList; |
private List<RoleInfo> visibleList; |
||||
@ApiModelProperty("不展示的角色信息") |
@ApiModelProperty("不展示的角色信息") |
||||
private List<RoleInfo> invisibleList; |
private List<RoleInfo> invisibleList; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("角色信息") |
@ApiModel("角色信息") |
||||
public static class RoleInfo { |
public static class RoleInfo { |
||||
@ApiModelProperty("角色id") |
@ApiModelProperty("角色id") |
||||
private Long id; |
private Long id; |
||||
@ApiModelProperty("是否是项目经理 0否 1是") |
@ApiModelProperty("是否是项目经理 0否 1是") |
||||
private int pm; |
private int pm; |
||||
@ApiModelProperty("是否是自己所属的角色 0否 1是") |
@ApiModelProperty("是否是自己所属的角色 0否 1是") |
||||
private int mine; |
private int mine; |
||||
@ApiModelProperty("角色名") |
@ApiModelProperty("角色名") |
||||
private String name; |
private String name; |
||||
@ApiModelProperty("排序") |
@ApiModelProperty("排序") |
||||
private int sequence; |
private int sequence; |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,117 +1,117 @@ |
|||||
package com.ccsensptos.tallsdk.bean.vo; |
package com.ccsensptos.tallsdk.bean.vo; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallTaskVo { |
public class TallTaskVo { |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("查看定期任务返回值") |
@ApiModel("查看定期任务返回值") |
||||
public static class QueryTask{ |
public static class QueryTask{ |
||||
@ApiModelProperty("任务id(任务分解id)") |
@ApiModelProperty("任务id(任务分解id)") |
||||
private Long id; |
private Long id; |
||||
@ApiModelProperty("详情id") |
@ApiModelProperty("详情id") |
||||
private Long detailId; |
private Long detailId; |
||||
@ApiModelProperty("任务名") |
@ApiModelProperty("任务名") |
||||
private String name; |
private String name; |
||||
@ApiModelProperty("任务详情") |
@ApiModelProperty("任务详情") |
||||
private String description; |
private String description; |
||||
@ApiModelProperty("计划开始时间") |
@ApiModelProperty("计划开始时间") |
||||
private Long planStart; |
private Long planStart; |
||||
@ApiModelProperty("计划时长") |
@ApiModelProperty("计划时长") |
||||
private Long planDuration; |
private Long planDuration; |
||||
@ApiModelProperty("计划结束时长") |
@ApiModelProperty("计划结束时长") |
||||
private Long planEnd; |
private Long planEnd; |
||||
@ApiModelProperty("实际开始时间") |
@ApiModelProperty("实际开始时间") |
||||
private Long realStart; |
private Long realStart; |
||||
@ApiModelProperty("实际时长") |
@ApiModelProperty("实际时长") |
||||
private Long realDuration; |
private Long realDuration; |
||||
@ApiModelProperty("实际结束时长") |
@ApiModelProperty("实际结束时长") |
||||
private Long realEnd; |
private Long realEnd; |
||||
@ApiModelProperty("任务状态 0未开始 1进行中 2暂停中 3已完成") |
@ApiModelProperty("任务状态 0未开始 1进行中 2暂停中 3已完成") |
||||
private int process; |
private int process; |
||||
@ApiModelProperty("任务流转策略 -1不跳转 0直接跳转 如果是其他正整数 就是多少毫秒后跳转 ") |
@ApiModelProperty("任务流转策略 -1不跳转 0直接跳转 如果是其他正整数 就是多少毫秒后跳转 ") |
||||
private Long skip; |
private Long skip; |
||||
@ApiModelProperty("跳转的任务id") |
@ApiModelProperty("跳转的任务id") |
||||
private Long skipTaskId; |
private Long skipTaskId; |
||||
@ApiModelProperty("任务面板") |
@ApiModelProperty("任务面板") |
||||
private PanelInfo panel; |
private PanelInfo panel; |
||||
@ApiModelProperty("检查人列表") |
@ApiModelProperty("检查人列表") |
||||
private List<CheckerOfTask> checkerList; |
private List<CheckerOfTask> checkerList; |
||||
@ApiModelProperty("插件") |
@ApiModelProperty("插件") |
||||
private List<List<TaskPluginInfo>> plugins; |
private List<List<TaskPluginInfo>> plugins; |
||||
|
|
||||
@ApiModelProperty("项目id") |
@ApiModelProperty("项目id") |
||||
private Long projectId; |
private Long projectId; |
||||
@ApiModelProperty("负责人id") |
@ApiModelProperty("负责人id") |
||||
private Long executorRoleId; |
private Long executorRoleId; |
||||
@ApiModelProperty("所属服务的code") |
@ApiModelProperty("所属服务的code") |
||||
private String businessCode; |
private String businessCode; |
||||
@ApiModelProperty("服务的url") |
@ApiModelProperty("服务的url") |
||||
private String businessUrl; |
private String businessUrl; |
||||
} |
} |
||||
@Data |
@Data |
||||
@ApiModel("任务下的检查人") |
@ApiModel("任务下的检查人") |
||||
public static class CheckerOfTask { |
public static class CheckerOfTask { |
||||
@ApiModelProperty("角色id") |
@ApiModelProperty("角色id") |
||||
private Long roleId; |
private Long roleId; |
||||
@ApiModelProperty("名字") |
@ApiModelProperty("名字") |
||||
private String name; |
private String name; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("任务面板信息") |
@ApiModel("任务面板信息") |
||||
public static class PanelInfo{ |
public static class PanelInfo{ |
||||
@ApiModelProperty("背景色") |
@ApiModelProperty("背景色") |
||||
private String backgroundColor; |
private String backgroundColor; |
||||
@ApiModelProperty("圆角") |
@ApiModelProperty("圆角") |
||||
private String borderRadius; |
private String borderRadius; |
||||
@ApiModelProperty("边框") |
@ApiModelProperty("边框") |
||||
private String border; |
private String border; |
||||
@ApiModelProperty("阴影") |
@ApiModelProperty("阴影") |
||||
private String shadow; |
private String shadow; |
||||
@ApiModelProperty("宽") |
@ApiModelProperty("宽") |
||||
private String width; |
private String width; |
||||
@ApiModelProperty("高") |
@ApiModelProperty("高") |
||||
private String height; |
private String height; |
||||
@ApiModelProperty("行") |
@ApiModelProperty("行") |
||||
private int row; |
private int row; |
||||
@ApiModelProperty("列") |
@ApiModelProperty("列") |
||||
private int col; |
private int col; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("任务下的插件信息") |
@ApiModel("任务下的插件信息") |
||||
public static class TaskPluginInfo{ |
public static class TaskPluginInfo{ |
||||
@ApiModelProperty("插件任务关联id") |
@ApiModelProperty("插件任务关联id") |
||||
private Long pluginTaskId; |
private Long pluginTaskId; |
||||
@ApiModelProperty("插件id") |
@ApiModelProperty("插件id") |
||||
private Long pluginId; |
private Long pluginId; |
||||
@ApiModelProperty("插件和服务关联的id") |
@ApiModelProperty("插件和服务关联的id") |
||||
private Long businessPluginId; |
private Long businessPluginId; |
||||
@ApiModelProperty("插件code") |
@ApiModelProperty("插件code") |
||||
private String pluginCode; |
private String pluginCode; |
||||
@ApiModelProperty("是否是内置组件 0否 1是") |
@ApiModelProperty("是否是内置组件 0否 1是") |
||||
private Byte inner; |
private Byte inner; |
||||
@ApiModelProperty("参数") |
@ApiModelProperty("参数") |
||||
private String param; |
private String param; |
||||
@ApiModelProperty("行") |
@ApiModelProperty("行") |
||||
private int row; |
private int row; |
||||
@ApiModelProperty("列") |
@ApiModelProperty("列") |
||||
private int col; |
private int col; |
||||
@ApiModelProperty("跨行") |
@ApiModelProperty("跨行") |
||||
private int rowspan; |
private int rowspan; |
||||
@ApiModelProperty("跨列") |
@ApiModelProperty("跨列") |
||||
private int colspan; |
private int colspan; |
||||
@ApiModelProperty("插件在时间轴的展示信息") |
@ApiModelProperty("插件在时间轴的展示信息") |
||||
private String data; |
private String data; |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,40 +1,40 @@ |
|||||
package com.ccsensptos.tallsdk.bean.vo; |
package com.ccsensptos.tallsdk.bean.vo; |
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallTokenVo { |
public class TallTokenVo { |
||||
|
|
||||
@Data |
@Data |
||||
public static class UserIdByToken { |
public static class UserIdByToken { |
||||
//"用户id"
|
//"用户id"
|
||||
private Long id; |
private Long id; |
||||
//"用户名"
|
//"用户名"
|
||||
private String userName; |
private String userName; |
||||
//"头像"
|
//"头像"
|
||||
private String avatarUrl; |
private String avatarUrl; |
||||
//"手机号"
|
//"手机号"
|
||||
private String phone; |
private String phone; |
||||
//"用户类型 0未认证 1已认证"
|
//"用户类型 0未认证 1已认证"
|
||||
private byte authType; |
private byte authType; |
||||
//"token"
|
//"token"
|
||||
private String token; |
private String token; |
||||
//"刷新token"
|
//"刷新token"
|
||||
private String refreshToken; |
private String refreshToken; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
public static class AccessToken{ |
public static class AccessToken{ |
||||
//"accessToken"
|
//"accessToken"
|
||||
private String accessToken; |
private String accessToken; |
||||
//"存放时间"
|
//"存放时间"
|
||||
private Long time; |
private Long time; |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,145 +1,145 @@ |
|||||
package com.ccsensptos.tallsdk.bean.vo; |
package com.ccsensptos.tallsdk.bean.vo; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class TallWbsVo { |
public class TallWbsVo { |
||||
|
|
||||
@Data |
@Data |
||||
@ApiModel("wbs文件下载链接") |
@ApiModel("wbs文件下载链接") |
||||
public static class WbsPath{ |
public static class WbsPath{ |
||||
@ApiModelProperty("下载链接") |
@ApiModelProperty("下载链接") |
||||
private String url; |
private String url; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 项目信息 |
* 项目信息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WbsProjectInfo{ |
public static class WbsProjectInfo{ |
||||
//项目id
|
//项目id
|
||||
private String projectId; |
private String projectId; |
||||
//项目名称
|
//项目名称
|
||||
private String projectName; |
private String projectName; |
||||
//描述
|
//描述
|
||||
private String description; |
private String description; |
||||
//地点
|
//地点
|
||||
private String address; |
private String address; |
||||
//开始时间(yyyy/MM/dd HH:mm)
|
//开始时间(yyyy/MM/dd HH:mm)
|
||||
private String startTime; |
private String startTime; |
||||
//结束时间(yyyy/MM/dd HH:mm)
|
//结束时间(yyyy/MM/dd HH:mm)
|
||||
private String endTime; |
private String endTime; |
||||
//版本号
|
//版本号
|
||||
private String version; |
private String version; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 任务信息 |
* 任务信息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WbsTaskInfo{ |
public static class WbsTaskInfo{ |
||||
//一级任务id
|
//一级任务id
|
||||
private String firstId; |
private String firstId; |
||||
//一级任务名称
|
//一级任务名称
|
||||
private String firstName; |
private String firstName; |
||||
//二级任务信息
|
//二级任务信息
|
||||
private List<WbsSecondTask> secondTaskList; |
private List<WbsSecondTask> secondTaskList; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 二级任务信息 |
* 二级任务信息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WbsSecondTask{ |
public static class WbsSecondTask{ |
||||
//二级任务id
|
//二级任务id
|
||||
private String detailId; |
private String detailId; |
||||
//分解后的任务id
|
//分解后的任务id
|
||||
private String subId; |
private String subId; |
||||
//二级任务名称
|
//二级任务名称
|
||||
private String taskName; |
private String taskName; |
||||
//任务描述
|
//任务描述
|
||||
private String description; |
private String description; |
||||
//开始时间(yyyy/MM/dd HH:mm) 如果有实际时间则以实际时间为准
|
//开始时间(yyyy/MM/dd HH:mm) 如果有实际时间则以实际时间为准
|
||||
private String startTime; |
private String startTime; |
||||
//结束时间(yyyy/MM/dd HH:mm) 如果有实际时间则以实际时间为准
|
//结束时间(yyyy/MM/dd HH:mm) 如果有实际时间则以实际时间为准
|
||||
private String endTime; |
private String endTime; |
||||
//任务时长
|
//任务时长
|
||||
private String duration; |
private String duration; |
||||
//重要性标签
|
//重要性标签
|
||||
private String label; |
private String label; |
||||
//负责人
|
//负责人
|
||||
private String executor; |
private String executor; |
||||
//检查人
|
//检查人
|
||||
private String checker; |
private String checker; |
||||
//交付物id
|
//交付物id
|
||||
private String deliverId; |
private String deliverId; |
||||
//交付物名称
|
//交付物名称
|
||||
private String deliverName; |
private String deliverName; |
||||
//绩效/即使奖惩
|
//绩效/即使奖惩
|
||||
private String reward; |
private String reward; |
||||
//任务插件1关联id
|
//任务插件1关联id
|
||||
private String pluginOneId; |
private String pluginOneId; |
||||
//插件1名称
|
//插件1名称
|
||||
private String pluginOneName; |
private String pluginOneName; |
||||
//任务插件2关联id
|
//任务插件2关联id
|
||||
private String pluginTwoId; |
private String pluginTwoId; |
||||
//插件2名称
|
//插件2名称
|
||||
private String pluginTwoName; |
private String pluginTwoName; |
||||
//任务插件3关联id
|
//任务插件3关联id
|
||||
private String pluginThreeId; |
private String pluginThreeId; |
||||
//插件3名称
|
//插件3名称
|
||||
private String pluginThreeName; |
private String pluginThreeName; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 角色成员表信息 |
* 角色成员表信息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WbsRoleInfo{ |
public static class WbsRoleInfo{ |
||||
//项目经理
|
//项目经理
|
||||
private List<WbsRole> pmList; |
private List<WbsRole> pmList; |
||||
//项目成员
|
//项目成员
|
||||
private List<WbsRole> roleList; |
private List<WbsRole> roleList; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 角色信息 |
* 角色信息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WbsRole{ |
public static class WbsRole{ |
||||
//角色id
|
//角色id
|
||||
private String roleId; |
private String roleId; |
||||
//角色名
|
//角色名
|
||||
private String roleName; |
private String roleName; |
||||
//对谁不可见
|
//对谁不可见
|
||||
private String repulsion; |
private String repulsion; |
||||
//成员信息
|
//成员信息
|
||||
private List<WbsMember> memberList; |
private List<WbsMember> memberList; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 成员信息 |
* 成员信息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WbsMember{ |
public static class WbsMember{ |
||||
//成员id
|
//成员id
|
||||
private String memberId; |
private String memberId; |
||||
//成员名
|
//成员名
|
||||
private String memberName; |
private String memberName; |
||||
//成员手机号
|
//成员手机号
|
||||
private String memberPhone; |
private String memberPhone; |
||||
//奖惩干系人id
|
//奖惩干系人id
|
||||
private String stakeholderId; |
private String stakeholderId; |
||||
//奖惩干系人名
|
//奖惩干系人名
|
||||
private String stakeholderName; |
private String stakeholderName; |
||||
//奖惩干系人手机号
|
//奖惩干系人手机号
|
||||
private String stakeholderPhone; |
private String stakeholderPhone; |
||||
} |
} |
||||
} |
} |
@ -1,111 +1,111 @@ |
|||||
package com.ccsensptos.tallsdk.service; |
package com.ccsensptos.tallsdk.service; |
||||
|
|
||||
import com.ccsens.util.bean.dto.QueryDto; |
import com.ccsens.util.bean.dto.QueryDto; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallProjectDto; |
import com.ccsensptos.tallsdk.bean.dto.TallProjectDto; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallRoleDto; |
import com.ccsensptos.tallsdk.bean.dto.TallRoleDto; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallTaskDto; |
import com.ccsensptos.tallsdk.bean.dto.TallTaskDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; |
import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallRoleVo; |
import com.ccsensptos.tallsdk.bean.vo.TallRoleVo; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallTaskVo; |
import com.ccsensptos.tallsdk.bean.vo.TallTaskVo; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallWbsVo; |
import com.ccsensptos.tallsdk.bean.vo.TallWbsVo; |
||||
import com.github.pagehelper.PageInfo; |
import com.github.pagehelper.PageInfo; |
||||
import org.springframework.web.multipart.MultipartFile; |
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
public interface ITallService { |
public interface ITallService { |
||||
/** |
/** |
||||
* 查询用户可见的项目 |
* 查询用户可见的项目 |
||||
* @param param 开始结束时间 |
* @param param 开始结束时间 |
||||
* @return 返回项目列表 |
* @return 返回项目列表 |
||||
*/ |
*/ |
||||
List<TallProjectVo.ProjectInfo> queryProjectByUser(String token, TallProjectDto.QueryProjectDto param); |
List<TallProjectVo.ProjectInfo> queryProjectByUser(String token, TallProjectDto.QueryProjectDto param); |
||||
|
|
||||
/** |
/** |
||||
* 查询项目下的角色列表 |
* 查询项目下的角色列表 |
||||
* @param param 项目id |
* @param param 项目id |
||||
* @return 返回角色列表 |
* @return 返回角色列表 |
||||
*/ |
*/ |
||||
TallRoleVo.QueryRole queryShowRole(String token, TallRoleDto.QueryRoleById param); |
TallRoleVo.QueryRole queryShowRole(String token, TallRoleDto.QueryRoleById param); |
||||
|
|
||||
/** |
/** |
||||
* 查询没有时间的日常任务 |
* 查询没有时间的日常任务 |
||||
* @param param 角色id等。。。 |
* @param param 角色id等。。。 |
||||
* @return 返回任务列表 |
* @return 返回任务列表 |
||||
*/ |
*/ |
||||
List<TallTaskVo.QueryTask> queryPermanentGlobalTask(String token, TallTaskDto.QueryPermanentGlobalTask param); |
List<TallTaskVo.QueryTask> queryPermanentGlobalTask(String token, TallTaskDto.QueryPermanentGlobalTask param); |
||||
|
|
||||
/** |
/** |
||||
* 查询有时间的日常任务 |
* 查询有时间的日常任务 |
||||
* @param param 角色id和时间 |
* @param param 角色id和时间 |
||||
* @return 返回任务列表 |
* @return 返回任务列表 |
||||
*/ |
*/ |
||||
List<TallTaskVo.QueryTask> queryGlobalTask(String token, TallTaskDto.QueryGlobalTask param); |
List<TallTaskVo.QueryTask> queryGlobalTask(String token, TallTaskDto.QueryGlobalTask param); |
||||
|
|
||||
/** |
/** |
||||
* 查询定期任务 |
* 查询定期任务 |
||||
* @param param 角色id和时间 |
* @param param 角色id和时间 |
||||
* @return 返回任务列表 |
* @return 返回任务列表 |
||||
*/ |
*/ |
||||
List<TallTaskVo.QueryTask> queryRegularTask(String token, TallTaskDto.QueryRegularTask param); |
List<TallTaskVo.QueryTask> queryRegularTask(String token, TallTaskDto.QueryRegularTask param); |
||||
|
|
||||
/** |
/** |
||||
* 导入wbs |
* 导入wbs |
||||
* @param params wbs文件 |
* @param params wbs文件 |
||||
* @return 返回项目信息 |
* @return 返回项目信息 |
||||
*/ |
*/ |
||||
TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params,Long parentId); |
TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params,Long parentId); |
||||
|
|
||||
/** |
/** |
||||
* 根据id查询项目信息 |
* 根据id查询项目信息 |
||||
*/ |
*/ |
||||
TallProjectVo.ProjectInfo findProjectById(String token, TallProjectDto.ProjectById params); |
TallProjectVo.ProjectInfo findProjectById(String token, TallProjectDto.ProjectById params); |
||||
|
|
||||
// /**
|
// /**
|
||||
// * 查询定期任务包括插件展示的信息
|
// * 查询定期任务包括插件展示的信息
|
||||
// * @param token token
|
// * @param token token
|
||||
// * @param param 任务id信息
|
// * @param param 任务id信息
|
||||
// * @return 返回任务洗洗和插件展示的信息
|
// * @return 返回任务洗洗和插件展示的信息
|
||||
// */
|
// */
|
||||
// List<TallTaskVo.QueryTask> queryRegularTaskAndPlugin(String token, TallTaskDto.QueryRegularTask param);
|
// List<TallTaskVo.QueryTask> queryRegularTaskAndPlugin(String token, TallTaskDto.QueryRegularTask param);
|
||||
|
|
||||
/** |
/** |
||||
* 分页查找定期任务 |
* 分页查找定期任务 |
||||
* @param token token |
* @param token token |
||||
* @param param 角色时间分页等信息 |
* @param param 角色时间分页等信息 |
||||
* @return 任务列表 |
* @return 任务列表 |
||||
*/ |
*/ |
||||
PageInfo<TallTaskVo.QueryTask> pageQueryRegularTask(String token, TallTaskDto.PageQueryRegularTask param); |
PageInfo<TallTaskVo.QueryTask> pageQueryRegularTask(String token, TallTaskDto.PageQueryRegularTask param); |
||||
|
|
||||
/** |
/** |
||||
* 导出wbs |
* 导出wbs |
||||
* @param token token |
* @param token token |
||||
* @param param 项目id |
* @param param 项目id |
||||
* @return 返回wbs的下载路径 |
* @return 返回wbs的下载路径 |
||||
*/ |
*/ |
||||
TallWbsVo.WbsPath exportWbs(String token, TallProjectDto.ProjectById param); |
TallWbsVo.WbsPath exportWbs(String token, TallProjectDto.ProjectById param); |
||||
|
|
||||
/** |
/** |
||||
* 查找用户所有的任务 |
* 查找用户所有的任务 |
||||
* @param param 用户信息和查询条件 |
* @param param 用户信息和查询条件 |
||||
* @return 返回任务信息 |
* @return 返回任务信息 |
||||
*/ |
*/ |
||||
List<TallTaskVo.QueryTask> queryAllTask(TallTaskDto.QueryAllTask param); |
List<TallTaskVo.QueryTask> queryAllTask(TallTaskDto.QueryAllTask param); |
||||
|
|
||||
/** |
/** |
||||
* 删除项目 |
* 删除项目 |
||||
* @param token token |
* @param token token |
||||
* @param params 项目id |
* @param params 项目id |
||||
*/ |
*/ |
||||
void deleteProject(String token, TallProjectDto.ProjectById params); |
void deleteProject(String token, TallProjectDto.ProjectById params); |
||||
|
|
||||
/** |
/** |
||||
* 移动项目,修改项目层级关系 |
* 移动项目,修改项目层级关系 |
||||
* @param token token |
* @param token token |
||||
* @param params 项目id等信息 |
* @param params 项目id等信息 |
||||
*/ |
*/ |
||||
void dragProject(String token, TallProjectDto.MoveProject params); |
void dragProject(String token, TallProjectDto.MoveProject params); |
||||
} |
} |
@ -1,30 +1,30 @@ |
|||||
package com.ccsensptos.tallsdk.util; |
package com.ccsensptos.tallsdk.util; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
public class Constant { |
public class Constant { |
||||
|
|
||||
/**域内gateway请求前缀*/ |
/**域内gateway请求前缀*/ |
||||
public static final String GATEWAY_URL = "http://101.201.226.163/gateway/"; |
public static final String GATEWAY_URL = "http://101.201.226.163/gateway/"; |
||||
|
|
||||
/**tall-查询所有任务的接口路径*/ |
/**tall-查询所有任务的接口路径*/ |
||||
public static final String QUERY_ALL_TASK = "ptostall/task/allTask"; |
public static final String QUERY_ALL_TASK = "ptostall/task/allTask"; |
||||
/**tall-请求的用户信息的接口路径*/ |
/**tall-请求的用户信息的接口路径*/ |
||||
public static final String TALL_USER_TOKEN = "ptostall/users/businessToken"; |
public static final String TALL_USER_TOKEN = "ptostall/users/businessToken"; |
||||
/**tall-获取accessToken*/ |
/**tall-获取accessToken*/ |
||||
public static final String TALL_GET_ACCESS_TOKEN = "ptostall/business/accessToken"; |
public static final String TALL_GET_ACCESS_TOKEN = "ptostall/business/accessToken"; |
||||
/**tall-通过手机号获取userId*/ |
/**tall-通过手机号获取userId*/ |
||||
public static final String TALL_GET_USER_ID = "ptostall/users/userIdByPhone"; |
public static final String TALL_GET_USER_ID = "ptostall/users/userIdByPhone"; |
||||
/**开放平台-获取插件信息*/ |
/**开放平台-获取插件信息*/ |
||||
public static final String OPEN_GET_PLUGIN = "opt/business/businessPluginByName"; |
public static final String OPEN_GET_PLUGIN = "opt/business/businessPluginByName"; |
||||
/**消息系统-发送消息*/ |
/**消息系统-发送消息*/ |
||||
public static final String MESSAGE_SEND_TO = "http://101.201.226.163:8194/message/v4.0/message/send"; |
public static final String MESSAGE_SEND_TO = "http://101.201.226.163:8194/message/v4.0/message/send"; |
||||
|
|
||||
/**请求头--accessToken*/ |
/**请求头--accessToken*/ |
||||
public static final String ACCESS_TOKEN = "accessToken"; |
public static final String ACCESS_TOKEN = "accessToken"; |
||||
|
|
||||
/**token过期时间 100分钟*/ |
/**token过期时间 100分钟*/ |
||||
public static final Long EXPIRATION_TIME = 60 * 1000L * 100; |
public static final Long EXPIRATION_TIME = 60 * 1000L * 100; |
||||
|
|
||||
} |
} |
@ -1,94 +1,94 @@ |
|||||
package com.ccsensptos.tallsdk.util; |
package com.ccsensptos.tallsdk.util; |
||||
|
|
||||
import cn.hutool.core.collection.CollectionUtil; |
import cn.hutool.core.collection.CollectionUtil; |
||||
import cn.hutool.core.util.ObjectUtil; |
import cn.hutool.core.util.ObjectUtil; |
||||
import cn.hutool.core.util.StrUtil; |
import cn.hutool.core.util.StrUtil; |
||||
import cn.hutool.http.HttpUtil; |
import cn.hutool.http.HttpUtil; |
||||
import com.alibaba.fastjson.JSON; |
import com.alibaba.fastjson.JSON; |
||||
import com.alibaba.fastjson.JSONArray; |
import com.alibaba.fastjson.JSONArray; |
||||
import com.alibaba.fastjson.JSONObject; |
import com.alibaba.fastjson.JSONObject; |
||||
import com.ccsens.util.RestTemplateUtil; |
import com.ccsens.util.RestTemplateUtil; |
||||
import com.ccsens.util.bean.message.common.InMessage; |
import com.ccsens.util.bean.message.common.InMessage; |
||||
import com.ccsens.util.bean.message.common.MessageConstant; |
import com.ccsens.util.bean.message.common.MessageConstant; |
||||
import com.ccsens.util.bean.message.common.MessageRule; |
import com.ccsens.util.bean.message.common.MessageRule; |
||||
import com.ccsens.util.exception.BaseException; |
import com.ccsens.util.exception.BaseException; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
|
|
||||
import java.util.HashSet; |
import java.util.HashSet; |
||||
import java.util.List; |
import java.util.List; |
||||
import java.util.Set; |
import java.util.Set; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Component |
@Component |
||||
@Slf4j |
@Slf4j |
||||
public class MessageUtil { |
public class MessageUtil { |
||||
|
|
||||
public static void sendToUser(List<String> phoneList, Set<String> userIdSet,Object data,MessageConstant.DomainType toDomain,MessageRule rule){ |
public static void sendToUser(List<String> phoneList, Set<String> userIdSet,Object data,MessageConstant.DomainType toDomain,MessageRule rule){ |
||||
if(userIdSet == null){ |
if(userIdSet == null){ |
||||
userIdSet = new HashSet<>(); |
userIdSet = new HashSet<>(); |
||||
} |
} |
||||
//通过手机号获取接收者的userId
|
//通过手机号获取接收者的userId
|
||||
if(CollectionUtil.isNotEmpty(phoneList)) { |
if(CollectionUtil.isNotEmpty(phoneList)) { |
||||
String getUserIdByPhoneUrl = Constant.GATEWAY_URL + Constant.TALL_GET_USER_ID; |
String getUserIdByPhoneUrl = Constant.GATEWAY_URL + Constant.TALL_GET_USER_ID; |
||||
log.info("调用获取userId接口:{}--{}", getUserIdByPhoneUrl, phoneList); |
log.info("调用获取userId接口:{}--{}", getUserIdByPhoneUrl, phoneList); |
||||
String strBody = null; |
String strBody = null; |
||||
try { |
try { |
||||
strBody = HttpUtil.post(getUserIdByPhoneUrl, JSON.toJSONString(phoneList)); |
strBody = HttpUtil.post(getUserIdByPhoneUrl, JSON.toJSONString(phoneList)); |
||||
log.info("接口返回信息:{}",strBody); |
log.info("接口返回信息:{}",strBody); |
||||
} catch (Exception e) { |
} catch (Exception e) { |
||||
log.error("消息发送失败--" + e); |
log.error("消息发送失败--" + e); |
||||
} |
} |
||||
JSONObject jsonObject = JSONObject.parseObject(strBody); |
JSONObject jsonObject = JSONObject.parseObject(strBody); |
||||
if(ObjectUtil.isNotNull(jsonObject)){ |
if(ObjectUtil.isNotNull(jsonObject)){ |
||||
//请求正确返回则,否则无操作
|
//请求正确返回则,否则无操作
|
||||
Integer code = jsonObject.getInteger("code"); |
Integer code = jsonObject.getInteger("code"); |
||||
if (code == null || code != 200) { |
if (code == null || code != 200) { |
||||
throw new BaseException("返回参数异常"); |
throw new BaseException("返回参数异常"); |
||||
} |
} |
||||
//userId
|
//userId
|
||||
JSONArray dataArray = jsonObject.getJSONArray("data"); |
JSONArray dataArray = jsonObject.getJSONArray("data"); |
||||
if (CollectionUtil.isNotEmpty(dataArray)) { |
if (CollectionUtil.isNotEmpty(dataArray)) { |
||||
for (Object object : dataArray) { |
for (Object object : dataArray) { |
||||
userIdSet.add(object.toString()); |
userIdSet.add(object.toString()); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
//创建InMessage对象
|
//创建InMessage对象
|
||||
InMessage inMessage = new InMessage(); |
InMessage inMessage = new InMessage(); |
||||
if(ObjectUtil.isNull(toDomain)){ |
if(ObjectUtil.isNull(toDomain)){ |
||||
toDomain = MessageConstant.DomainType.User; |
toDomain = MessageConstant.DomainType.User; |
||||
} |
} |
||||
inMessage.setToDomain(toDomain); |
inMessage.setToDomain(toDomain); |
||||
inMessage.setTos(userIdSet); |
inMessage.setTos(userIdSet); |
||||
//如果
|
//如果
|
||||
if(ObjectUtil.isNull(rule)){ |
if(ObjectUtil.isNull(rule)){ |
||||
switch (toDomain){ |
switch (toDomain){ |
||||
case Server: |
case Server: |
||||
rule = new MessageRule((byte) 1, MessageRule.AckRule.ALWAYS, 10, (byte) 1,0L); |
rule = new MessageRule((byte) 1, MessageRule.AckRule.ALWAYS, 10, (byte) 1,0L); |
||||
break; |
break; |
||||
case User: |
case User: |
||||
rule = new MessageRule((byte)0, MessageRule.AckRule.ALWAYS,100,(byte)0,0L); |
rule = new MessageRule((byte)0, MessageRule.AckRule.ALWAYS,100,(byte)0,0L); |
||||
break; |
break; |
||||
default: |
default: |
||||
rule = new MessageRule((byte)0, MessageRule.AckRule.ALWAYS,10,(byte)1,0L); |
rule = new MessageRule((byte)0, MessageRule.AckRule.ALWAYS,10,(byte)1,0L); |
||||
break; |
break; |
||||
} |
} |
||||
} |
} |
||||
inMessage.setRule(rule); |
inMessage.setRule(rule); |
||||
inMessage.setData(JSONObject.toJSONString(data)); |
inMessage.setData(JSONObject.toJSONString(data)); |
||||
|
|
||||
String url = Constant.MESSAGE_SEND_TO; |
String url = Constant.MESSAGE_SEND_TO; |
||||
log.info("调用发送消息接口:{}--{}", url, inMessage); |
log.info("调用发送消息接口:{}--{}", url, inMessage); |
||||
try{ |
try{ |
||||
RestTemplateUtil.postBody(url,inMessage); |
RestTemplateUtil.postBody(url,inMessage); |
||||
}catch (Exception e){ |
}catch (Exception e){ |
||||
log.error("消息发送失败--" + e); |
log.error("消息发送失败--" + e); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
@ -1,61 +1,61 @@ |
|||||
package com.ccsensptos.tallsdk.util; |
package com.ccsensptos.tallsdk.util; |
||||
|
|
||||
import cn.hutool.core.util.ObjectUtil; |
import cn.hutool.core.util.ObjectUtil; |
||||
import cn.hutool.core.util.StrUtil; |
import cn.hutool.core.util.StrUtil; |
||||
import com.alibaba.fastjson.JSON; |
import com.alibaba.fastjson.JSON; |
||||
import com.alibaba.fastjson.JSONObject; |
import com.alibaba.fastjson.JSONObject; |
||||
import com.ccsens.util.RestTemplateUtil; |
import com.ccsens.util.RestTemplateUtil; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallPluginDto; |
import com.ccsensptos.tallsdk.bean.dto.TallPluginDto; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallPluginVo; |
import com.ccsensptos.tallsdk.bean.vo.TallPluginVo; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
|
|
||||
import java.util.HashMap; |
import java.util.HashMap; |
||||
import java.util.Map; |
import java.util.Map; |
||||
|
|
||||
@Component |
@Component |
||||
@Slf4j |
@Slf4j |
||||
public class PluginUtil { |
public class PluginUtil { |
||||
|
|
||||
/** |
/** |
||||
* 通过业务code和插件名获取插件信息 |
* 通过业务code和插件名获取插件信息 |
||||
* @return 返回accessToken |
* @return 返回accessToken |
||||
*/ |
*/ |
||||
public static TallPluginVo.BusinessPluginInfo getPluginByCodeAndName(String businessCode,String pluginName){ |
public static TallPluginVo.BusinessPluginInfo getPluginByCodeAndName(String businessCode,String pluginName){ |
||||
TallPluginVo.BusinessPluginInfo businessPluginInfo; |
TallPluginVo.BusinessPluginInfo businessPluginInfo; |
||||
TallPluginDto.BusinessPluginByName businessPluginByName = new TallPluginDto.BusinessPluginByName(businessCode,pluginName); |
TallPluginDto.BusinessPluginByName businessPluginByName = new TallPluginDto.BusinessPluginByName(businessCode,pluginName); |
||||
|
|
||||
//发送请求
|
//发送请求
|
||||
String url = Constant.GATEWAY_URL + Constant.OPEN_GET_PLUGIN; |
String url = Constant.GATEWAY_URL + Constant.OPEN_GET_PLUGIN; |
||||
log.info("调用接口:{}--{}", url, businessPluginByName); |
log.info("调用接口:{}--{}", url, businessPluginByName); |
||||
String postBody = null; |
String postBody = null; |
||||
try{ |
try{ |
||||
postBody = RestTemplateUtil.postBody(url, businessPluginByName); |
postBody = RestTemplateUtil.postBody(url, businessPluginByName); |
||||
}catch (Exception e){ |
}catch (Exception e){ |
||||
log.error("请求开放品台失败--" + e); |
log.error("请求开放品台失败--" + e); |
||||
} |
} |
||||
if(StrUtil.isBlank(postBody)){ |
if(StrUtil.isBlank(postBody)){ |
||||
return null; |
return null; |
||||
} |
} |
||||
JSONObject jsonObject = JSONObject.parseObject(postBody); |
JSONObject jsonObject = JSONObject.parseObject(postBody); |
||||
log.info("接口返回:{}", jsonObject); |
log.info("接口返回:{}", jsonObject); |
||||
//请求正确返回则,否则无操作
|
//请求正确返回则,否则无操作
|
||||
Integer code = jsonObject.getInteger("code"); |
Integer code = jsonObject.getInteger("code"); |
||||
if (code == null || code != 200) { |
if (code == null || code != 200) { |
||||
return null; |
return null; |
||||
} |
} |
||||
String data = jsonObject.getString("data"); |
String data = jsonObject.getString("data"); |
||||
if(ObjectUtil.isNull(data)){ |
if(ObjectUtil.isNull(data)){ |
||||
return null; |
return null; |
||||
} |
} |
||||
try { |
try { |
||||
businessPluginInfo = JSON.parseObject(data, TallPluginVo.BusinessPluginInfo.class); |
businessPluginInfo = JSON.parseObject(data, TallPluginVo.BusinessPluginInfo.class); |
||||
}catch (Exception e){ |
}catch (Exception e){ |
||||
log.info("返回值转换失败"); |
log.info("返回值转换失败"); |
||||
return null; |
return null; |
||||
} |
} |
||||
return businessPluginInfo; |
return businessPluginInfo; |
||||
} |
} |
||||
} |
} |
@ -1,158 +1,158 @@ |
|||||
package com.ccsensptos.tallsdk.util; |
package com.ccsensptos.tallsdk.util; |
||||
|
|
||||
import cn.hutool.core.util.ObjectUtil; |
import cn.hutool.core.util.ObjectUtil; |
||||
import cn.hutool.core.util.StrUtil; |
import cn.hutool.core.util.StrUtil; |
||||
import com.alibaba.fastjson.JSON; |
import com.alibaba.fastjson.JSON; |
||||
import com.alibaba.fastjson.JSONObject; |
import com.alibaba.fastjson.JSONObject; |
||||
import com.ccsens.util.RedisUtil; |
import com.ccsens.util.RedisUtil; |
||||
import com.ccsens.util.RestTemplateUtil; |
import com.ccsens.util.RestTemplateUtil; |
||||
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
||||
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.factory.annotation.Value; |
import org.springframework.beans.factory.annotation.Value; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
|
|
||||
import javax.annotation.PostConstruct; |
import javax.annotation.PostConstruct; |
||||
import javax.annotation.Resource; |
import javax.annotation.Resource; |
||||
import java.util.HashMap; |
import java.util.HashMap; |
||||
import java.util.Map; |
import java.util.Map; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Component |
@Component |
||||
@Slf4j |
@Slf4j |
||||
public class TokenUtil { |
public class TokenUtil { |
||||
/**缓存token或用户信息*/ |
/**缓存token或用户信息*/ |
||||
public static Map<String, Object> accessTokenMap = new HashMap<>(); |
public static Map<String, Object> accessTokenMap = new HashMap<>(); |
||||
|
|
||||
public static String openRedis; |
public static String openRedis; |
||||
@Value("${spring.application.sdk-cache-redis:}") |
@Value("${spring.application.sdk-cache-redis:}") |
||||
public void setApplication(String redis) { |
public void setApplication(String redis) { |
||||
openRedis = redis; |
openRedis = redis; |
||||
} |
} |
||||
|
|
||||
@Resource |
@Resource |
||||
private RedisUtil redisUtil; |
private RedisUtil redisUtil; |
||||
private static TokenUtil util; |
private static TokenUtil util; |
||||
|
|
||||
@PostConstruct |
@PostConstruct |
||||
public void init(){ |
public void init(){ |
||||
util = this; |
util = this; |
||||
util.redisUtil = this.redisUtil; |
util.redisUtil = this.redisUtil; |
||||
} |
} |
||||
|
|
||||
|
|
||||
/** |
/** |
||||
* 通过AppId获取accessToken |
* 通过AppId获取accessToken |
||||
* @return 返回accessToken |
* @return 返回accessToken |
||||
*/ |
*/ |
||||
public static String getAccessToken(String appId, String secret){ |
public static String getAccessToken(String appId, String secret){ |
||||
//查看业务是否开启redis缓存
|
//查看业务是否开启redis缓存
|
||||
// if(REDIS_IS_OPEN.equals(openRedis)){
|
// if(REDIS_IS_OPEN.equals(openRedis)){
|
||||
// //redis开启则通过appId去redis内查询
|
// //redis开启则通过appId去redis内查询
|
||||
// util.redisUtil.get(appId);
|
// util.redisUtil.get(appId);
|
||||
// }
|
// }
|
||||
|
|
||||
//否则查找Map内是否存在
|
//否则查找Map内是否存在
|
||||
//如果map内存在,则判断数据的时间是否到期,到期了就删掉
|
//如果map内存在,则判断数据的时间是否到期,到期了就删掉
|
||||
//如果redis内未查到,或map内未查到,或map内时间到期,则调用tall的接口获取accessToken
|
//如果redis内未查到,或map内未查到,或map内时间到期,则调用tall的接口获取accessToken
|
||||
//在redis内缓存,或存在map内
|
//在redis内缓存,或存在map内
|
||||
|
|
||||
//调用tall的接口生成accessToken
|
//调用tall的接口生成accessToken
|
||||
|
|
||||
//查找map内的数据
|
//查找map内的数据
|
||||
long now = System.currentTimeMillis(); |
long now = System.currentTimeMillis(); |
||||
TallTokenVo.AccessToken accessToken = (TallTokenVo.AccessToken) accessTokenMap.get(appId); |
TallTokenVo.AccessToken accessToken = (TallTokenVo.AccessToken) accessTokenMap.get(appId); |
||||
if(ObjectUtil.isNotNull(accessToken)){ |
if(ObjectUtil.isNotNull(accessToken)){ |
||||
if(accessToken.getTime() + Constant.EXPIRATION_TIME > now){ |
if(accessToken.getTime() + Constant.EXPIRATION_TIME > now){ |
||||
return accessToken.getAccessToken(); |
return accessToken.getAccessToken(); |
||||
}else { |
}else { |
||||
//如果过期,就删掉数据
|
//如果过期,就删掉数据
|
||||
accessTokenMap.remove(appId); |
accessTokenMap.remove(appId); |
||||
} |
} |
||||
} |
} |
||||
//map内查不到,则去请求tall获取新的accessToken
|
//map内查不到,则去请求tall获取新的accessToken
|
||||
// String url = "http://127.0.0.1:7290/" + Constant.TALL_GET_ACCESS_TOKEN;
|
// String url = "http://127.0.0.1:7290/" + Constant.TALL_GET_ACCESS_TOKEN;
|
||||
String url = Constant.GATEWAY_URL + Constant.TALL_GET_ACCESS_TOKEN; |
String url = Constant.GATEWAY_URL + Constant.TALL_GET_ACCESS_TOKEN; |
||||
TallTokenDto.GetAccessToken get = new TallTokenDto.GetAccessToken(appId,secret); |
TallTokenDto.GetAccessToken get = new TallTokenDto.GetAccessToken(appId,secret); |
||||
log.info("调用接口:{}--{}", url, get); |
log.info("调用接口:{}--{}", url, get); |
||||
String postBody = null; |
String postBody = null; |
||||
try{ |
try{ |
||||
postBody = RestTemplateUtil.postBody(url,get); |
postBody = RestTemplateUtil.postBody(url,get); |
||||
}catch (Exception e){ |
}catch (Exception e){ |
||||
log.error("获取accessToken异常--" + e); |
log.error("获取accessToken异常--" + e); |
||||
} |
} |
||||
if(StrUtil.isBlank(postBody)){ |
if(StrUtil.isBlank(postBody)){ |
||||
return null; |
return null; |
||||
} |
} |
||||
JSONObject jsonObject = JSONObject.parseObject(postBody); |
JSONObject jsonObject = JSONObject.parseObject(postBody); |
||||
log.info("接口返回:{}", jsonObject); |
log.info("接口返回:{}", jsonObject); |
||||
//请求正确返回则,否则无操作
|
//请求正确返回则,否则无操作
|
||||
Integer code = jsonObject.getInteger("code"); |
Integer code = jsonObject.getInteger("code"); |
||||
if (code == null || code != 200) { |
if (code == null || code != 200) { |
||||
return null; |
return null; |
||||
} |
} |
||||
String data = jsonObject.getString("data"); |
String data = jsonObject.getString("data"); |
||||
if(ObjectUtil.isNull(data)){ |
if(ObjectUtil.isNull(data)){ |
||||
return null; |
return null; |
||||
} |
} |
||||
TallTokenVo.AccessToken t = new TallTokenVo.AccessToken(); |
TallTokenVo.AccessToken t = new TallTokenVo.AccessToken(); |
||||
t.setAccessToken(data); |
t.setAccessToken(data); |
||||
t.setTime(System.currentTimeMillis()); |
t.setTime(System.currentTimeMillis()); |
||||
accessTokenMap.put(get.getAppId(),t); |
accessTokenMap.put(get.getAppId(),t); |
||||
return data; |
return data; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 通过token获取用户信息 |
* 通过token获取用户信息 |
||||
* @return 返回accessToken |
* @return 返回accessToken |
||||
*/ |
*/ |
||||
public static TallTokenVo.UserIdByToken getUserByToken(TallTokenDto.GetUserByToken getUserByToken){ |
public static TallTokenVo.UserIdByToken getUserByToken(TallTokenDto.GetUserByToken getUserByToken){ |
||||
//查看业务是否开启redis缓存
|
//查看业务是否开启redis缓存
|
||||
// if(REDIS_IS_OPEN.equals(openRedis)){
|
// if(REDIS_IS_OPEN.equals(openRedis)){
|
||||
// //查询token是否存在
|
// //查询token是否存在
|
||||
// util.redisUtil.get(token);
|
// util.redisUtil.get(token);
|
||||
// }
|
// }
|
||||
//没开启redis则去map内查找,如果
|
//没开启redis则去map内查找,如果
|
||||
|
|
||||
//调用tall的接口生成查询项目信息
|
//调用tall的接口生成查询项目信息
|
||||
|
|
||||
//发送请求
|
//发送请求
|
||||
String url = Constant.GATEWAY_URL + Constant.TALL_USER_TOKEN; |
String url = Constant.GATEWAY_URL + Constant.TALL_USER_TOKEN; |
||||
// String url = "http://127.0.0.1:7290/" + Constant.TALL_USER_TOKEN;
|
// String url = "http://127.0.0.1:7290/" + Constant.TALL_USER_TOKEN;
|
||||
log.info("调用接口:{}--{}", url, getUserByToken); |
log.info("调用接口:{}--{}", url, getUserByToken); |
||||
String postBody = null; |
String postBody = null; |
||||
try{ |
try{ |
||||
Map<String,String> map = new HashMap<>(); |
Map<String,String> map = new HashMap<>(); |
||||
map.put(Constant.ACCESS_TOKEN,getAccessToken(getUserByToken.getAppId(),getUserByToken.getSecret())); |
map.put(Constant.ACCESS_TOKEN,getAccessToken(getUserByToken.getAppId(),getUserByToken.getSecret())); |
||||
postBody = RestTemplateUtil.postBodySpecialHeader(url, getUserByToken,map); |
postBody = RestTemplateUtil.postBodySpecialHeader(url, getUserByToken,map); |
||||
}catch (Exception e){ |
}catch (Exception e){ |
||||
log.error("获取accessToken异常--" + e); |
log.error("获取accessToken异常--" + e); |
||||
} |
} |
||||
if(StrUtil.isBlank(postBody)){ |
if(StrUtil.isBlank(postBody)){ |
||||
return null; |
return null; |
||||
} |
} |
||||
JSONObject jsonObject = JSONObject.parseObject(postBody); |
JSONObject jsonObject = JSONObject.parseObject(postBody); |
||||
log.info("接口返回:{}", jsonObject); |
log.info("接口返回:{}", jsonObject); |
||||
//请求正确返回则,否则无操作
|
//请求正确返回则,否则无操作
|
||||
Integer code = jsonObject.getInteger("code"); |
Integer code = jsonObject.getInteger("code"); |
||||
if (code == null || code != 200) { |
if (code == null || code != 200) { |
||||
return null; |
return null; |
||||
} |
} |
||||
String data = jsonObject.getString("data"); |
String data = jsonObject.getString("data"); |
||||
if(ObjectUtil.isNull(data)){ |
if(ObjectUtil.isNull(data)){ |
||||
return null; |
return null; |
||||
} |
} |
||||
TallTokenVo.UserIdByToken userIdByToken; |
TallTokenVo.UserIdByToken userIdByToken; |
||||
try { |
try { |
||||
userIdByToken = JSON.parseObject(data, TallTokenVo.UserIdByToken.class); |
userIdByToken = JSON.parseObject(data, TallTokenVo.UserIdByToken.class); |
||||
}catch (Exception e){ |
}catch (Exception e){ |
||||
log.info("返回值转换失败"); |
log.info("返回值转换失败"); |
||||
return null; |
return null; |
||||
} |
} |
||||
|
|
||||
return userIdByToken; |
return userIdByToken; |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,34 +1,34 @@ |
|||||
package com.ccsens.cloudutil.bean.ptos.dto; |
package com.ccsens.cloudutil.bean.ptos.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class FeignUserDto { |
public class FeignUserDto { |
||||
@Data |
@Data |
||||
@ApiModel("通过token获取用户信息") |
@ApiModel("通过token获取用户信息") |
||||
public static class UserInfoByToken{ |
public static class UserInfoByToken{ |
||||
@ApiModelProperty("token") |
@ApiModelProperty("token") |
||||
private String token; |
private String token; |
||||
@ApiModelProperty("设备id") |
@ApiModelProperty("设备id") |
||||
private String deviceId; |
private String deviceId; |
||||
@ApiModelProperty("ip地址") |
@ApiModelProperty("ip地址") |
||||
private String clientIp; |
private String clientIp; |
||||
@ApiModelProperty("客户端类型 0-H5 1-App") |
@ApiModelProperty("客户端类型 0-H5 1-App") |
||||
private Byte clientType; |
private Byte clientType; |
||||
|
|
||||
public UserInfoByToken() { |
public UserInfoByToken() { |
||||
} |
} |
||||
|
|
||||
public UserInfoByToken(String token, String deviceId, String clientIp, Byte clientType) { |
public UserInfoByToken(String token, String deviceId, String clientIp, Byte clientType) { |
||||
this.token = token; |
this.token = token; |
||||
this.deviceId = deviceId; |
this.deviceId = deviceId; |
||||
this.clientIp = clientIp; |
this.clientIp = clientIp; |
||||
this.clientType = clientType; |
this.clientType = clientType; |
||||
} |
} |
||||
} |
} |
||||
} |
} |
@ -1,45 +1,45 @@ |
|||||
package com.ccsens.cloudutil.config; |
package com.ccsens.cloudutil.config; |
||||
|
|
||||
import cn.hutool.json.JSONObject; |
import cn.hutool.json.JSONObject; |
||||
import cn.hutool.json.JSONUtil; |
import cn.hutool.json.JSONUtil; |
||||
import feign.RequestInterceptor; |
import feign.RequestInterceptor; |
||||
import feign.RequestTemplate; |
import feign.RequestTemplate; |
||||
import org.springframework.context.annotation.Configuration; |
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.http.HttpHeaders; |
import org.springframework.http.HttpHeaders; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.context.request.RequestContextHolder; |
import org.springframework.web.context.request.RequestContextHolder; |
||||
import org.springframework.web.context.request.ServletRequestAttributes; |
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletRequest; |
||||
|
|
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Configuration |
@Configuration |
||||
public class FeignTokenConfig implements RequestInterceptor { |
public class FeignTokenConfig implements RequestInterceptor { |
||||
@Override |
@Override |
||||
public void apply(RequestTemplate template) { |
public void apply(RequestTemplate template) { |
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
||||
System.out.println("attributes:"+attributes); |
System.out.println("attributes:"+attributes); |
||||
if (attributes != null) { |
if (attributes != null) { |
||||
HttpServletRequest request = attributes.getRequest(); |
HttpServletRequest request = attributes.getRequest(); |
||||
System.out.println("token:" + request.getHeader(HttpHeaders.AUTHORIZATION)); |
System.out.println("token:" + request.getHeader(HttpHeaders.AUTHORIZATION)); |
||||
//添加token
|
//添加token
|
||||
template.header(HttpHeaders.AUTHORIZATION, request.getHeader(HttpHeaders.AUTHORIZATION)); |
template.header(HttpHeaders.AUTHORIZATION, request.getHeader(HttpHeaders.AUTHORIZATION)); |
||||
return; |
return; |
||||
} |
} |
||||
|
|
||||
byte[] body = template.body(); |
byte[] body = template.body(); |
||||
if (body == null) { |
if (body == null) { |
||||
return; |
return; |
||||
} |
} |
||||
String json = new String(body); |
String json = new String(body); |
||||
JSONObject jsonObject = JSONUtil.parseObj(json); |
JSONObject jsonObject = JSONUtil.parseObj(json); |
||||
|
|
||||
//添加token
|
//添加token
|
||||
template.header("Authorization", jsonObject.getStr("token")); |
template.header("Authorization", jsonObject.getStr("token")); |
||||
|
|
||||
|
|
||||
} |
} |
||||
} |
} |
@ -1,44 +1,44 @@ |
|||||
package com.ccsens.cloudutil.feign; |
package com.ccsens.cloudutil.feign; |
||||
|
|
||||
|
|
||||
import com.ccsens.cloudutil.bean.ptos.dto.FeignProjectDto; |
import com.ccsens.cloudutil.bean.ptos.dto.FeignProjectDto; |
||||
import com.ccsens.cloudutil.bean.ptos.vo.FeignProjectVo; |
import com.ccsens.cloudutil.bean.ptos.vo.FeignProjectVo; |
||||
import com.ccsens.cloudutil.config.FeignTokenConfig; |
import com.ccsens.cloudutil.config.FeignTokenConfig; |
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import feign.hystrix.FallbackFactory; |
import feign.hystrix.FallbackFactory; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@FeignClient(name = "diplomatist", path = "",fallbackFactory = DiplomatistFeignClientFallBack.class,configuration = FeignTokenConfig.class) |
@FeignClient(name = "diplomatist", path = "",fallbackFactory = DiplomatistFeignClientFallBack.class,configuration = FeignTokenConfig.class) |
||||
public interface DiplomatistFeignClient { |
public interface DiplomatistFeignClient { |
||||
/** |
/** |
||||
* 查询用户关联的其他域的项目信息 |
* 查询用户关联的其他域的项目信息 |
||||
*/ |
*/ |
||||
@GetMapping("domain/ptDomainProject") |
@GetMapping("domain/ptDomainProject") |
||||
JsonResponse<List<FeignProjectVo.ProjectInfo>> queryDomainProject(FeignProjectDto.QueryProjectByPhone params); |
JsonResponse<List<FeignProjectVo.ProjectInfo>> queryDomainProject(FeignProjectDto.QueryProjectByPhone params); |
||||
|
|
||||
} |
} |
||||
|
|
||||
@Slf4j |
@Slf4j |
||||
@Component |
@Component |
||||
class DiplomatistFeignClientFallBack implements FallbackFactory<DiplomatistFeignClient> { |
class DiplomatistFeignClientFallBack implements FallbackFactory<DiplomatistFeignClient> { |
||||
|
|
||||
@Override |
@Override |
||||
public DiplomatistFeignClient create(Throwable cause) { |
public DiplomatistFeignClient create(Throwable cause) { |
||||
log.error("访问传达室异常", cause); |
log.error("访问传达室异常", cause); |
||||
return new DiplomatistFeignClient() { |
return new DiplomatistFeignClient() { |
||||
@Override |
@Override |
||||
public JsonResponse<List<FeignProjectVo.ProjectInfo>> queryDomainProject(FeignProjectDto.QueryProjectByPhone params) { |
public JsonResponse<List<FeignProjectVo.ProjectInfo>> queryDomainProject(FeignProjectDto.QueryProjectByPhone params) { |
||||
return null; |
return null; |
||||
} |
} |
||||
|
|
||||
}; |
}; |
||||
} |
} |
||||
} |
} |
@ -1,60 +1,60 @@ |
|||||
package com.ccsens.cloudutil.feign; |
package com.ccsens.cloudutil.feign; |
||||
|
|
||||
|
|
||||
import com.ccsens.cloudutil.bean.ptos.dto.FeignProjectDto; |
import com.ccsens.cloudutil.bean.ptos.dto.FeignProjectDto; |
||||
import com.ccsens.cloudutil.bean.ptos.dto.FeignUserDto; |
import com.ccsens.cloudutil.bean.ptos.dto.FeignUserDto; |
||||
import com.ccsens.cloudutil.bean.ptos.vo.FeignProjectVo; |
import com.ccsens.cloudutil.bean.ptos.vo.FeignProjectVo; |
||||
import com.ccsens.cloudutil.bean.ptos.vo.FeignUserVo; |
import com.ccsens.cloudutil.bean.ptos.vo.FeignUserVo; |
||||
import com.ccsens.cloudutil.config.FeignTokenConfig; |
import com.ccsens.cloudutil.config.FeignTokenConfig; |
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import feign.hystrix.FallbackFactory; |
import feign.hystrix.FallbackFactory; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@FeignClient(name = "ptostall", path = "",fallbackFactory = PtosTallFeignClientFallBack.class,configuration = FeignTokenConfig.class) |
@FeignClient(name = "ptostall", path = "",fallbackFactory = PtosTallFeignClientFallBack.class,configuration = FeignTokenConfig.class) |
||||
public interface PtosTallFeignClient { |
public interface PtosTallFeignClient { |
||||
|
|
||||
/** |
/** |
||||
* 根据token获取userId |
* 根据token获取userId |
||||
*/ |
*/ |
||||
@PostMapping("users/token") |
@PostMapping("users/token") |
||||
JsonResponse<FeignUserVo.TokenToUserId> getUserIdByToken(FeignUserDto.UserInfoByToken params); |
JsonResponse<FeignUserVo.TokenToUserId> getUserIdByToken(FeignUserDto.UserInfoByToken params); |
||||
|
|
||||
/** |
/** |
||||
* 根据手机号获取用户在本域的业务项目列表 |
* 根据手机号获取用户在本域的业务项目列表 |
||||
*/ |
*/ |
||||
@PostMapping("project/byPhone") |
@PostMapping("project/byPhone") |
||||
JsonResponse<List<FeignProjectVo.ProjectInfo>> queryProjectByPhone(FeignProjectDto.QueryProjectByPhone params); |
JsonResponse<List<FeignProjectVo.ProjectInfo>> queryProjectByPhone(FeignProjectDto.QueryProjectByPhone params); |
||||
|
|
||||
} |
} |
||||
|
|
||||
@Slf4j |
@Slf4j |
||||
@Component |
@Component |
||||
class PtosTallFeignClientFallBack implements FallbackFactory<PtosTallFeignClient> { |
class PtosTallFeignClientFallBack implements FallbackFactory<PtosTallFeignClient> { |
||||
|
|
||||
@Override |
@Override |
||||
public PtosTallFeignClient create(Throwable cause) { |
public PtosTallFeignClient create(Throwable cause) { |
||||
log.error("访问ptosTall异常", cause); |
log.error("访问ptosTall异常", cause); |
||||
return new PtosTallFeignClient() { |
return new PtosTallFeignClient() { |
||||
@Override |
@Override |
||||
public JsonResponse<FeignUserVo.TokenToUserId> getUserIdByToken(FeignUserDto.UserInfoByToken params) { |
public JsonResponse<FeignUserVo.TokenToUserId> getUserIdByToken(FeignUserDto.UserInfoByToken params) { |
||||
return null; |
return null; |
||||
} |
} |
||||
|
|
||||
@Override |
@Override |
||||
public JsonResponse<List<FeignProjectVo.ProjectInfo>> queryProjectByPhone(FeignProjectDto.QueryProjectByPhone params) { |
public JsonResponse<List<FeignProjectVo.ProjectInfo>> queryProjectByPhone(FeignProjectDto.QueryProjectByPhone params) { |
||||
return null; |
return null; |
||||
} |
} |
||||
|
|
||||
}; |
}; |
||||
} |
} |
||||
} |
} |
@ -1,28 +1,28 @@ |
|||||
//package com.ccsens.cloudutil.ribbon;
|
//package com.ccsens.cloudutil.ribbon;
|
||||
//
|
//
|
||||
//import com.netflix.client.config.IClientConfig;
|
//import com.netflix.client.config.IClientConfig;
|
||||
//import com.netflix.loadbalancer.AbstractLoadBalancerRule;
|
//import com.netflix.loadbalancer.AbstractLoadBalancerRule;
|
||||
//import com.netflix.loadbalancer.ILoadBalancer;
|
//import com.netflix.loadbalancer.ILoadBalancer;
|
||||
//import com.netflix.loadbalancer.Server;
|
//import com.netflix.loadbalancer.Server;
|
||||
//import org.springframework.context.annotation.Primary;
|
//import org.springframework.context.annotation.Primary;
|
||||
//
|
//
|
||||
////@Primary
|
////@Primary
|
||||
//public class WpsBalanceRule extends AbstractLoadBalancerRule {
|
//public class WpsBalanceRule extends AbstractLoadBalancerRule {
|
||||
//
|
//
|
||||
// @Override
|
// @Override
|
||||
// public void initWithNiwsConfig(IClientConfig clientConfig) {
|
// public void initWithNiwsConfig(IClientConfig clientConfig) {
|
||||
//
|
//
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @Override
|
// @Override
|
||||
// public Server choose(Object key) {
|
// public Server choose(Object key) {
|
||||
// return choose(getLoadBalancer(), key);
|
// return choose(getLoadBalancer(), key);
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// private Server choose(ILoadBalancer loadBalancer, Object key) {
|
// private Server choose(ILoadBalancer loadBalancer, Object key) {
|
||||
// System.out.println(key);
|
// System.out.println(key);
|
||||
// return null;
|
// return null;
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
//
|
//
|
||||
//}
|
//}
|
@ -1,68 +1,68 @@ |
|||||
//package com.ccsens.wechatutil.api;
|
//package com.ccsens.wechatutil.api;
|
||||
//
|
//
|
||||
//import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||
//import com.ccsens.util.JsonResponse;
|
//import com.ccsens.util.JsonResponse;
|
||||
//import com.ccsens.util.PropUtil;
|
//import com.ccsens.util.PropUtil;
|
||||
//import com.ccsens.util.WebConstant;
|
//import com.ccsens.util.WebConstant;
|
||||
//import com.ccsens.util.wx.WxXcxUtil;
|
//import com.ccsens.util.wx.WxXcxUtil;
|
||||
//import com.ccsens.wechatutil.bean.dto.WechatCode;
|
//import com.ccsens.wechatutil.bean.dto.WechatCode;
|
||||
//import com.ccsens.wechatutil.wxmini.MiniCodeUtil;
|
//import com.ccsens.wechatutil.wxmini.MiniCodeUtil;
|
||||
//import com.ccsens.wechatutil.wxofficial.OfficialAccountMessageUtil;
|
//import com.ccsens.wechatutil.wxofficial.OfficialAccountMessageUtil;
|
||||
//import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiImplicitParams;
|
//import io.swagger.annotations.ApiImplicitParams;
|
||||
//import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMethod;
|
//import org.springframework.web.bind.annotation.RequestMethod;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
//import javax.servlet.http.HttpServletRequest;
|
||||
//
|
//
|
||||
//@Api(tags = "DEBUG" , description = "DebugController | ")
|
//@Api(tags = "DEBUG" , description = "DebugController | ")
|
||||
//@RestController
|
//@RestController
|
||||
//@RequestMapping("/debug")
|
//@RequestMapping("/debug")
|
||||
//@Slf4j
|
//@Slf4j
|
||||
//public class DebugController {
|
//public class DebugController {
|
||||
//
|
//
|
||||
//
|
//
|
||||
//
|
//
|
||||
// @ApiOperation(value = "/测试",notes = "")
|
// @ApiOperation(value = "/测试",notes = "")
|
||||
// @ApiImplicitParams({
|
// @ApiImplicitParams({
|
||||
// })
|
// })
|
||||
// @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse debug(HttpServletRequest request) throws Exception {
|
// public JsonResponse debug(HttpServletRequest request) throws Exception {
|
||||
//
|
//
|
||||
// return JsonResponse.newInstance().ok("测试");
|
// return JsonResponse.newInstance().ok("测试");
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @ApiOperation(value = "/测试",notes = "")
|
// @ApiOperation(value = "/测试",notes = "")
|
||||
// @ApiImplicitParams({
|
// @ApiImplicitParams({
|
||||
// })
|
// })
|
||||
// @RequestMapping(value="code",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value="code",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse debugWxCode(HttpServletRequest request) throws Exception {
|
// public JsonResponse debugWxCode(HttpServletRequest request) throws Exception {
|
||||
// //生成二维码
|
// //生成二维码
|
||||
// String fileName = "/gameQrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png";
|
// String fileName = "/gameQrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png";
|
||||
// String path = WebConstant.UPLOAD_PATH_BASE + fileName;
|
// String path = WebConstant.UPLOAD_PATH_BASE + fileName;
|
||||
//
|
//
|
||||
// WechatCode.WechatCodeB wechatCodeB = new WechatCode.WechatCodeB();
|
// WechatCode.WechatCodeB wechatCodeB = new WechatCode.WechatCodeB();
|
||||
// wechatCodeB.setPage(WebConstant.QRCODE_GAME);
|
// wechatCodeB.setPage(WebConstant.QRCODE_GAME);
|
||||
// wechatCodeB.setScene("id=1&type=SQ");
|
// wechatCodeB.setScene("id=1&type=SQ");
|
||||
// MiniCodeUtil.getWxCodeB(wechatCodeB, path);
|
// MiniCodeUtil.getWxCodeB(wechatCodeB, path);
|
||||
//// WxXcxUtil.getWxCodeC(WebConstant.QRCODE_GAME+"?id=" + gameRecord.getId() + "&type=" + gameType.getCode(), path, gameType.getCode());
|
//// WxXcxUtil.getWxCodeC(WebConstant.QRCODE_GAME+"?id=" + gameRecord.getId() + "&type=" + gameType.getCode(), path, gameType.getCode());
|
||||
//
|
//
|
||||
//// gameRecord.setQrCodeUrl(PropUtil.qrCode + fileName);
|
//// gameRecord.setQrCodeUrl(PropUtil.qrCode + fileName);
|
||||
// log.info("调用微信生成二维码");
|
// log.info("调用微信生成二维码");
|
||||
// return JsonResponse.newInstance().ok("测试");
|
// return JsonResponse.newInstance().ok("测试");
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @ApiOperation(value = "/测试公众号消息",notes = "")
|
// @ApiOperation(value = "/测试公众号消息",notes = "")
|
||||
// @ApiImplicitParams({
|
// @ApiImplicitParams({
|
||||
// })
|
// })
|
||||
// @RequestMapping(value="message",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value="message",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse debugWxMessage(HttpServletRequest request) throws Exception {
|
// public JsonResponse debugWxMessage(HttpServletRequest request) throws Exception {
|
||||
//// OfficialAccountMessageUtil.officialMessage();
|
//// OfficialAccountMessageUtil.officialMessage();
|
||||
// log.info("发送公众号消息");
|
// log.info("发送公众号消息");
|
||||
// return JsonResponse.newInstance().ok("测试");
|
// return JsonResponse.newInstance().ok("测试");
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
//}
|
//}
|
@ -1,80 +1,80 @@ |
|||||
//package com.ccsens.wechatutil.api;
|
//package com.ccsens.wechatutil.api;
|
||||
//
|
//
|
||||
//import com.ccsens.util.JsonResponse;
|
//import com.ccsens.util.JsonResponse;
|
||||
//import com.ccsens.wechatutil.bean.dto.WxMessageDto;
|
//import com.ccsens.wechatutil.bean.dto.WxMessageDto;
|
||||
//import com.ccsens.wechatutil.service.IWxMessageService;
|
//import com.ccsens.wechatutil.service.IWxMessageService;
|
||||
//import com.ccsens.wechatutil.service.IWxService;
|
//import com.ccsens.wechatutil.service.IWxService;
|
||||
//import com.ccsens.wechatutil.bean.po.MiniProgramUser;
|
//import com.ccsens.wechatutil.bean.po.MiniProgramUser;
|
||||
//import com.ccsens.wechatutil.bean.po.WxOauth2UserInfo;
|
//import com.ccsens.wechatutil.bean.po.WxOauth2UserInfo;
|
||||
//import com.ccsens.wechatutil.bean.dto.WechatCode;
|
//import com.ccsens.wechatutil.bean.dto.WechatCode;
|
||||
//import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||
//import io.swagger.annotations.ApiParam;
|
//import io.swagger.annotations.ApiParam;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.validation.annotation.Validated;
|
//import org.springframework.validation.annotation.Validated;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMethod;
|
//import org.springframework.web.bind.annotation.RequestMethod;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
//
|
||||
//import javax.annotation.Resource;
|
//import javax.annotation.Resource;
|
||||
//
|
//
|
||||
///**
|
///**
|
||||
// * @author 逗
|
// * @author 逗
|
||||
// */
|
// */
|
||||
//@Api(tags = "DEBUG" , description = "DebugController | ")
|
//@Api(tags = "DEBUG" , description = "DebugController | ")
|
||||
//@RestController
|
//@RestController
|
||||
//@RequestMapping("/wx")
|
//@RequestMapping("/wx")
|
||||
//@Slf4j
|
//@Slf4j
|
||||
//public class WxController {
|
//public class WxController {
|
||||
//
|
//
|
||||
// @Resource
|
// @Resource
|
||||
// private IWxService miniProgramService;
|
// private IWxService miniProgramService;
|
||||
// @Resource
|
// @Resource
|
||||
// private IWxMessageService wxMessageService;
|
// private IWxMessageService wxMessageService;
|
||||
//
|
//
|
||||
// @ApiOperation(value = "小程序根据code获取appId", notes = "小程序")
|
// @ApiOperation(value = "小程序根据code获取appId", notes = "小程序")
|
||||
// @RequestMapping(value = "/signinByMini", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/signinByMini", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse signinByMini(@ApiParam @Validated String code) throws Exception{
|
// public JsonResponse signinByMini(@ApiParam @Validated String code) throws Exception{
|
||||
// MiniProgramUser wxUser = miniProgramService.signinByMini(code);
|
// MiniProgramUser wxUser = miniProgramService.signinByMini(code);
|
||||
// return JsonResponse.newInstance().ok();
|
// return JsonResponse.newInstance().ok();
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @ApiOperation(value = "公众号/网页二维码登录", notes = "公众号/网页二维码")
|
// @ApiOperation(value = "公众号/网页二维码登录", notes = "公众号/网页二维码")
|
||||
// @RequestMapping(value = "/signinByH5", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/signinByH5", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse signinByH5(@ApiParam @Validated String code) throws Exception{
|
// public JsonResponse signinByH5(@ApiParam @Validated String code) throws Exception{
|
||||
// WxOauth2UserInfo wxUser = miniProgramService.signinByH5(code);
|
// WxOauth2UserInfo wxUser = miniProgramService.signinByH5(code);
|
||||
// return JsonResponse.newInstance().ok();
|
// return JsonResponse.newInstance().ok();
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @ApiOperation(value = "生成小程序码-方案A", notes = "")
|
// @ApiOperation(value = "生成小程序码-方案A", notes = "")
|
||||
// @RequestMapping(value = "/getWxCodeA", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/getWxCodeA", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse getWxCodeA(@ApiParam @Validated WechatCode.WechatCodeA wechatCodeA, String path) throws Exception{
|
// public JsonResponse getWxCodeA(@ApiParam @Validated WechatCode.WechatCodeA wechatCodeA, String path) throws Exception{
|
||||
// miniProgramService.getWxCodeA(wechatCodeA, path);
|
// miniProgramService.getWxCodeA(wechatCodeA, path);
|
||||
// return JsonResponse.newInstance().ok();
|
// return JsonResponse.newInstance().ok();
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
//
|
//
|
||||
// @ApiOperation(value = "生成小程序码-方案B", notes = "")
|
// @ApiOperation(value = "生成小程序码-方案B", notes = "")
|
||||
// @RequestMapping(value = "/getWxCodeB", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/getWxCodeB", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse getWxCodeB(@ApiParam @Validated WechatCode.WechatCodeB wechatCodeB,String path) throws Exception{
|
// public JsonResponse getWxCodeB(@ApiParam @Validated WechatCode.WechatCodeB wechatCodeB,String path) throws Exception{
|
||||
// wechatCodeB = new WechatCode.WechatCodeB();
|
// wechatCodeB = new WechatCode.WechatCodeB();
|
||||
// wechatCodeB.setScene("id=1&type=SQ");
|
// wechatCodeB.setScene("id=1&type=SQ");
|
||||
// wechatCodeB.setPage("pages/index/index");
|
// wechatCodeB.setPage("pages/index/index");
|
||||
// miniProgramService.getWxCodeB(wechatCodeB,path);
|
// miniProgramService.getWxCodeB(wechatCodeB,path);
|
||||
// return JsonResponse.newInstance().ok();
|
// return JsonResponse.newInstance().ok();
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @ApiOperation(value = "生成小程序码-方案B", notes = "")
|
// @ApiOperation(value = "生成小程序码-方案B", notes = "")
|
||||
// @RequestMapping(value = "/getWxCodeC", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/getWxCodeC", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse getWxCodeC(@ApiParam @Validated WechatCode.WechatCodeC wechatCodeC,String path) throws Exception{
|
// public JsonResponse getWxCodeC(@ApiParam @Validated WechatCode.WechatCodeC wechatCodeC,String path) throws Exception{
|
||||
// miniProgramService.getWxCodeC(wechatCodeC,path);
|
// miniProgramService.getWxCodeC(wechatCodeC,path);
|
||||
// return JsonResponse.newInstance().ok();
|
// return JsonResponse.newInstance().ok();
|
||||
// }
|
// }
|
||||
//
|
//
|
||||
// @ApiOperation(value = "群机器人发送消息", notes = "")
|
// @ApiOperation(value = "群机器人发送消息", notes = "")
|
||||
// @RequestMapping(value = "/robotMessage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
// @RequestMapping(value = "/robotMessage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
// public JsonResponse robotMessage(@ApiParam @Validated WxMessageDto.RobotMessage robotMessage) throws Exception{
|
// public JsonResponse robotMessage(@ApiParam @Validated WxMessageDto.RobotMessage robotMessage) throws Exception{
|
||||
// wxMessageService.sendRobotInfo(robotMessage);
|
// wxMessageService.sendRobotInfo(robotMessage);
|
||||
// return JsonResponse.newInstance().ok();
|
// return JsonResponse.newInstance().ok();
|
||||
// }
|
// }
|
||||
//}
|
//}
|
@ -1,67 +1,67 @@ |
|||||
package com.ccsens.wechatutil.bean.dto; |
package com.ccsens.wechatutil.bean.dto; |
||||
|
|
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class WechatCode { |
public class WechatCode { |
||||
/** |
/** |
||||
* 获取小程序码--方案A |
* 获取小程序码--方案A |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WechatCodeA{ |
public static class WechatCodeA{ |
||||
// 扫码进入的小程序页面路径,最大长度 128 字节,不能为空;
|
// 扫码进入的小程序页面路径,最大长度 128 字节,不能为空;
|
||||
public String path; |
public String path; |
||||
//二维码的宽度,单位 px,最小 280px,最大 1280px 默认430
|
//二维码的宽度,单位 px,最小 280px,最大 1280px 默认430
|
||||
public Integer width; |
public Integer width; |
||||
//默认false 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 false
|
//默认false 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 false
|
||||
public Boolean auto_color; |
public Boolean auto_color; |
||||
//auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示
|
//auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示
|
||||
public LineColor line_color; |
public LineColor line_color; |
||||
//默认false 是否需要透明底色,为 true 时,生成透明底色的小程序
|
//默认false 是否需要透明底色,为 true 时,生成透明底色的小程序
|
||||
public Boolean is_hyaline; |
public Boolean is_hyaline; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 获取小程序码--方案B |
* 获取小程序码--方案B |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WechatCodeB{ |
public static class WechatCodeB{ |
||||
//参数 --最大32个可见字符
|
//参数 --最大32个可见字符
|
||||
public String scene; |
public String scene; |
||||
//小程序地址
|
//小程序地址
|
||||
public String page; |
public String page; |
||||
//二维码的宽度,单位 px,最小 280px,最大 1280px 默认430
|
//二维码的宽度,单位 px,最小 280px,最大 1280px 默认430
|
||||
public Integer width; |
public Integer width; |
||||
//默认false 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 false
|
//默认false 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 false
|
||||
public Boolean auto_color; |
public Boolean auto_color; |
||||
//auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示
|
//auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示
|
||||
public LineColor line_color; |
public LineColor line_color; |
||||
//默认false 是否需要透明底色,为 true 时,生成透明底色的小程序
|
//默认false 是否需要透明底色,为 true 时,生成透明底色的小程序
|
||||
public Boolean is_hyaline; |
public Boolean is_hyaline; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* rgb颜色 |
* rgb颜色 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class LineColor{ |
public static class LineColor{ |
||||
public String r; |
public String r; |
||||
public String g; |
public String g; |
||||
public String b; |
public String b; |
||||
} |
} |
||||
|
|
||||
/** |
/** |
||||
* 获取小程序码--方案C |
* 获取小程序码--方案C |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class WechatCodeC{ |
public static class WechatCodeC{ |
||||
// 扫码进入的小程序页面路径,最大长度 128 字节,不能为空;
|
// 扫码进入的小程序页面路径,最大长度 128 字节,不能为空;
|
||||
public String path; |
public String path; |
||||
//二维码的宽度,单位 px,最小 280px,最大 1280px 默认430
|
//二维码的宽度,单位 px,最小 280px,最大 1280px 默认430
|
||||
public Integer width; |
public Integer width; |
||||
} |
} |
||||
|
|
||||
} |
} |
@ -1,115 +1,115 @@ |
|||||
package com.ccsens.wechatutil.bean.dto; |
package com.ccsens.wechatutil.bean.dto; |
||||
|
|
||||
import cn.hutool.core.collection.CollectionUtil; |
import cn.hutool.core.collection.CollectionUtil; |
||||
import com.ccsens.wechatutil.payutil.WxMessageUtil; |
import com.ccsens.wechatutil.payutil.WxMessageUtil; |
||||
import lombok.Data; |
import lombok.Data; |
||||
import lombok.Getter; |
import lombok.Getter; |
||||
import lombok.Setter; |
import lombok.Setter; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class WxMessageDto { |
public class WxMessageDto { |
||||
/** |
/** |
||||
* 微信机器人发送消息 |
* 微信机器人发送消息 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public static class RobotMessage{ |
public static class RobotMessage{ |
||||
//机器人地址
|
//机器人地址
|
||||
public String webHook; |
public String webHook; |
||||
//消息的内容
|
//消息的内容
|
||||
public String content; |
public String content; |
||||
//消息格式
|
//消息格式
|
||||
public String msgType; |
public String msgType; |
||||
//通过id@群内人员
|
//通过id@群内人员
|
||||
public List<String> mentionedList; |
public List<String> mentionedList; |
||||
//通过手机号@群内人员
|
//通过手机号@群内人员
|
||||
public List<String> mentionedMobileList; |
public List<String> mentionedMobileList; |
||||
} |
} |
||||
|
|
||||
@Data |
@Data |
||||
public static class WxRobotVo{ |
public static class WxRobotVo{ |
||||
private String msgtype; |
private String msgtype; |
||||
private WxRobotText text; |
private WxRobotText text; |
||||
private WxRobotMarkdown markdown; |
private WxRobotMarkdown markdown; |
||||
} |
} |
||||
@Data |
@Data |
||||
public static class WxRobotText{ |
public static class WxRobotText{ |
||||
private String content; |
private String content; |
||||
private List<String> mentioned_list; |
private List<String> mentioned_list; |
||||
private List<String> mentioned_mobile_list; |
private List<String> mentioned_mobile_list; |
||||
} |
} |
||||
@Data |
@Data |
||||
public static class WxRobotMarkdown{ |
public static class WxRobotMarkdown{ |
||||
private String content; |
private String content; |
||||
} |
} |
||||
|
|
||||
/*** -----------------小程序订阅消息相关---------------------- */ |
/*** -----------------小程序订阅消息相关---------------------- */ |
||||
@Getter |
@Getter |
||||
@Setter |
@Setter |
||||
private static class CommonEntity { |
private static class CommonEntity { |
||||
private String value; |
private String value; |
||||
} |
} |
||||
|
|
||||
@Getter |
@Getter |
||||
@Setter |
@Setter |
||||
public static class SubscribeEntity<T> { |
public static class SubscribeEntity<T> { |
||||
private String touser; |
private String touser; |
||||
private String template_id; |
private String template_id; |
||||
private String page; |
private String page; |
||||
private T data; |
private T data; |
||||
} |
} |
||||
|
|
||||
@Getter |
@Getter |
||||
@Setter |
@Setter |
||||
public static class ReceiveSubscriBuyData { |
public static class ReceiveSubscriBuyData { |
||||
public ReceiveSubscriBuyData(List<String> params) { |
public ReceiveSubscriBuyData(List<String> params) { |
||||
if (CollectionUtil.isNotEmpty(params) && params.size() >= 2) { |
if (CollectionUtil.isNotEmpty(params) && params.size() >= 2) { |
||||
character_string1 = new CommonEntity(); |
character_string1 = new CommonEntity(); |
||||
amount3 = new CommonEntity(); |
amount3 = new CommonEntity(); |
||||
thing4 = new CommonEntity(); |
thing4 = new CommonEntity(); |
||||
time2 = new CommonEntity(); |
time2 = new CommonEntity(); |
||||
number11 = new CommonEntity(); |
number11 = new CommonEntity(); |
||||
character_string1.setValue(params.get(0)); |
character_string1.setValue(params.get(0)); |
||||
amount3.setValue(params.get(1)); |
amount3.setValue(params.get(1)); |
||||
thing4.setValue(params.get(2)); |
thing4.setValue(params.get(2)); |
||||
time2.setValue(params.get(3)); |
time2.setValue(params.get(3)); |
||||
number11.setValue(params.get(4)); |
number11.setValue(params.get(4)); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
private CommonEntity character_string1;//订单编号
|
private CommonEntity character_string1;//订单编号
|
||||
private CommonEntity amount3;//订单金额
|
private CommonEntity amount3;//订单金额
|
||||
private CommonEntity thing4;//商品名称
|
private CommonEntity thing4;//商品名称
|
||||
private CommonEntity time2;//支付时间
|
private CommonEntity time2;//支付时间
|
||||
private CommonEntity number11;//购买数量
|
private CommonEntity number11;//购买数量
|
||||
} |
} |
||||
|
|
||||
@Getter |
@Getter |
||||
@Setter |
@Setter |
||||
public static class ReceiveSubscriOrderSendData { |
public static class ReceiveSubscriOrderSendData { |
||||
public ReceiveSubscriOrderSendData(List<String> params) { |
public ReceiveSubscriOrderSendData(List<String> params) { |
||||
if (CollectionUtil.isNotEmpty(params) && params.size() >= 2) { |
if (CollectionUtil.isNotEmpty(params) && params.size() >= 2) { |
||||
thing1 = new CommonEntity(); |
thing1 = new CommonEntity(); |
||||
character_string2 = new CommonEntity(); |
character_string2 = new CommonEntity(); |
||||
date3 = new CommonEntity(); |
date3 = new CommonEntity(); |
||||
thing4 = new CommonEntity(); |
thing4 = new CommonEntity(); |
||||
character_string5 = new CommonEntity(); |
character_string5 = new CommonEntity(); |
||||
thing1.setValue(params.get(0)); |
thing1.setValue(params.get(0)); |
||||
character_string2.setValue(params.get(1)); |
character_string2.setValue(params.get(1)); |
||||
date3.setValue(params.get(2)); |
date3.setValue(params.get(2)); |
||||
thing4.setValue(params.get(3)); |
thing4.setValue(params.get(3)); |
||||
character_string5.setValue(params.get(4)); |
character_string5.setValue(params.get(4)); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
private CommonEntity thing1;//商品名称
|
private CommonEntity thing1;//商品名称
|
||||
private CommonEntity character_string2;//订单号
|
private CommonEntity character_string2;//订单号
|
||||
private CommonEntity date3;//发货时间
|
private CommonEntity date3;//发货时间
|
||||
private CommonEntity thing4;//快递公司
|
private CommonEntity thing4;//快递公司
|
||||
private CommonEntity character_string5;//快递单号
|
private CommonEntity character_string5;//快递单号
|
||||
} |
} |
||||
} |
} |
@ -1,14 +1,14 @@ |
|||||
package com.ccsens.wechatutil.bean.po; |
package com.ccsens.wechatutil.bean.po; |
||||
|
|
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
||||
*/ |
*/ |
||||
@Data |
@Data |
||||
public class MiniProgramUser extends WxBaseEntity { |
public class MiniProgramUser extends WxBaseEntity { |
||||
|
|
||||
public String openid; |
public String openid; |
||||
public String session_key; |
public String session_key; |
||||
public String unionid; |
public String unionid; |
||||
} |
} |
@ -1,14 +1,14 @@ |
|||||
package com.ccsens.wechatutil.exception; |
package com.ccsens.wechatutil.exception; |
||||
|
|
||||
public class PayException extends RuntimeException{ |
public class PayException extends RuntimeException{ |
||||
private int code; |
private int code; |
||||
public PayException(int code,String message){ |
public PayException(int code,String message){ |
||||
super(message); |
super(message); |
||||
this.code = code; |
this.code = code; |
||||
} |
} |
||||
|
|
||||
public PayException(String message){ |
public PayException(String message){ |
||||
super(message); |
super(message); |
||||
this.code = -1; |
this.code = -1; |
||||
} |
} |
||||
} |
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue