From a363a148bbde03e3862bd34bf728663ebd4aa56d Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Fri, 28 Jan 2022 16:44:47 +0800 Subject: [PATCH] =?UTF-8?q?20220128=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=92=8C=E9=A1=B9=E7=9B=AE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 359 +++++- .../ptos_zero/annotation/MustLogin.java | 24 + .../ptos_zero/api/DeliverController.java | 102 ++ .../ptos_zero/aspect/MustLoginAspect.java | 136 +++ .../ccsens/ptos_zero/bean/dto/DeliverDto.java | 163 +++ .../ptos_zero/bean/po/ProTaskPlugin.java | 33 + .../bean/po/ProTaskPluginExample.java | 190 +++ .../ccsens/ptos_zero/bean/vo/DeliverVo.java | 150 +++ .../ptos_zero/persist/dao/PluDeliverDao.java | 53 + .../ptos_zero/persist/dao/ProRoleTaskDao.java | 14 +- .../persist/dao/ProTaskDetailDao.java | 20 + .../ptos_zero/service/DeliverService.java | 217 ++++ .../ptos_zero/service/IDeliverService.java | 66 + .../ptos_zero/service/ImportService.java | 63 +- .../ccsens/ptos_zero/service/TallService.java | 75 +- .../com/ccsens/ptos_zero/util/CodeEnum.java | 318 ----- .../com/ccsens/ptos_zero/util/CodeError.java | 54 - .../com/ccsens/ptos_zero/util/Constant.java | 8 +- .../ccsens/ptos_zero/util/JsonResponse.java | 227 ---- .../com/ccsens/ptos_zero/util/JwtUtil.java | 125 -- .../util/MyPropertySourceFactory.java | 24 - .../ccsens/ptos_zero/util/WebConstant.java | 1086 ----------------- .../ccsens/ptos_zero/util/ZeroCodeError.java | 2 + src/main/resources/application-dev.yml | 1 + .../resources/mapper_dao/PluDeliverDao.xml | 203 +++ .../resources/mapper_dao/ProRoleTaskDao.xml | 24 +- .../resources/mapper_dao/ProTaskDetailDao.xml | 45 +- .../mapper_raw/ProTaskPluginMapper.xml | 57 +- src/main/resources/mbg.xml | 4 +- 29 files changed, 1908 insertions(+), 1935 deletions(-) create mode 100644 src/main/java/com/ccsens/ptos_zero/annotation/MustLogin.java create mode 100644 src/main/java/com/ccsens/ptos_zero/api/DeliverController.java create mode 100644 src/main/java/com/ccsens/ptos_zero/aspect/MustLoginAspect.java create mode 100644 src/main/java/com/ccsens/ptos_zero/bean/dto/DeliverDto.java create mode 100644 src/main/java/com/ccsens/ptos_zero/bean/vo/DeliverVo.java create mode 100644 src/main/java/com/ccsens/ptos_zero/persist/dao/PluDeliverDao.java create mode 100644 src/main/java/com/ccsens/ptos_zero/service/DeliverService.java create mode 100644 src/main/java/com/ccsens/ptos_zero/service/IDeliverService.java delete mode 100644 src/main/java/com/ccsens/ptos_zero/util/CodeEnum.java delete mode 100644 src/main/java/com/ccsens/ptos_zero/util/CodeError.java delete mode 100644 src/main/java/com/ccsens/ptos_zero/util/JsonResponse.java delete mode 100644 src/main/java/com/ccsens/ptos_zero/util/JwtUtil.java delete mode 100644 src/main/java/com/ccsens/ptos_zero/util/MyPropertySourceFactory.java delete mode 100644 src/main/java/com/ccsens/ptos_zero/util/WebConstant.java create mode 100644 src/main/resources/mapper_dao/PluDeliverDao.xml diff --git a/pom.xml b/pom.xml index 10760f7..8509777 100644 --- a/pom.xml +++ b/pom.xml @@ -1,50 +1,73 @@ - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.1.8.RELEASE - - + + com.ccsens ptos_zero 0.0.1-SNAPSHOT ptos_zero - Demo project for Spring Boot + Demo project for Spring Boot 1.8 + + org.springframework.boot + spring-boot-starter-parent + 2.1.8.RELEASE + + - + tallsdk com.ccsensptos 0.0.1-SNAPSHOT + - org.springframework.boot - spring-boot-starter + io.netty + netty-all + 4.1.32.Final - - io.jsonwebtoken - jjwt - 0.7.0 + org.springframework.boot + spring-boot-starter-data-redis - + org.springframework.boot - spring-boot-devtools - runtime - true + spring-boot-starter-cache + + + + redis.clients + jedis + + + org.springframework.boot + spring-boot-starter-jdbc + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + org.springframework.boot + spring-boot-starter-jetty + + org.springframework.boot spring-boot-configuration-processor @@ -58,22 +81,46 @@ org.springframework.boot spring-boot-starter-test - test - + - org.junit.vintage - junit-vintage-engine - - com.vaadin.external.google android-json + test + + + org.springframework.boot + spring-boot-starter-actuator + + + + + cn.hutool + hutool-all + 4.1.21 + + + + + org.apache.poi + poi + 3.17 - javax.validation - validation-api - 1.1.0.Final + org.apache.poi + poi-ooxml + 3.17 + + + + org.springframework.boot + spring-boot-starter-websocket + + + + org.springframework.boot + spring-boot-starter-amqp @@ -98,36 +145,41 @@ druid 1.1.10 - - + - cn.hutool - hutool-all - 4.1.21 + io.jsonwebtoken + jjwt + 0.7.0 + + - org.springframework.boot - spring-boot-starter-data-redis + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + 2.9.0 + + - org.springframework.boot - spring-boot-starter-jdbc + org.apache.shiro + shiro-spring + 1.4.0 + - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-tomcat - - + net.sourceforge.htmlcleaner + htmlcleaner + 2.22 + - org.springframework.boot - spring-boot-starter-jetty + org.apache.commons + commons-lang3 + 3.8.1 + + io.springfox @@ -146,21 +198,37 @@ mybatis-generator-core 1.3.7 + + + + org.beanshell + bsh + 2.0b5 + + org.apache.httpcomponents httpclient - 4.3.1 + 4.5.1 + org.apache.httpcomponents httpcore - 4.3.1 + 4.4.3 + + + + com.github.qcloudsms + qcloudsms + 1.0.5 com.alibaba fastjson 1.2.62 + @@ -188,6 +256,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/ccsens/ptos_zero/annotation/MustLogin.java b/src/main/java/com/ccsens/ptos_zero/annotation/MustLogin.java new file mode 100644 index 0000000..a82948f --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/annotation/MustLogin.java @@ -0,0 +1,24 @@ +package com.ccsens.ptos_zero.annotation; + +import java.lang.annotation.*; + +/** + * @description: 用于标识方法需要登录,获取userId + * 如果未登录,直接返回用户未登录 + * @author: wuHuiJuan + * @create: 2019/12/09 09:48 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface MustLogin { + /** + * -1 不处理 + * 0: 数组 + * 1:List + * 2:Set + * 3: Map + * */ + byte type() default -1; + +} diff --git a/src/main/java/com/ccsens/ptos_zero/api/DeliverController.java b/src/main/java/com/ccsens/ptos_zero/api/DeliverController.java new file mode 100644 index 0000000..433be51 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/api/DeliverController.java @@ -0,0 +1,102 @@ +package com.ccsens.ptos_zero.api; + +import com.ccsens.ptos_zero.annotation.MustLogin; +import com.ccsens.ptos_zero.bean.dto.DeliverDto; +import com.ccsens.ptos_zero.bean.vo.DeliverVo; +import com.ccsens.ptos_zero.service.IDeliverService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + + +/** + * @author AUSU + */ +@Api(tags = "交付物相关" ) +@RestController +@RequestMapping("/deliver") +@Slf4j +public class DeliverController { + + @Resource + private IDeliverService deliverService; + + @MustLogin + @ApiOperation(value = "查询所有成员", notes = "") + @RequestMapping(value = "/queryChecker", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryChecker(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("查询所有成员--{}",params); + List checkers = deliverService.queryChecker(params.getParam(), params.getUserId()); + log.info("返回所有成员--{}",checkers); + return JsonResponse.newInstance().ok(checkers); + } + + @MustLogin + @ApiOperation(value = "修改交付物标题名称(给任务添加交付物)", notes = "") + @RequestMapping(value = "/saveDeliver", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveDeliver(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("给任务添加交付物--{}",params); + deliverService.saveDeliver(params.getParam(), params.getUserId()); + return JsonResponse.newInstance().ok(); + } + + @MustLogin + @ApiOperation(value = "查看任务下的交付物", notes = "") + @RequestMapping(value = "/getDeliver", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getDeliver(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("查看任务下的交付物--{}",params); + DeliverVo.DeliverOfTask deliverOfTask = deliverService.getDeliver(params.getParam(), params.getUserId()); + log.info("任务下的交付物信息--{}",deliverOfTask); + return JsonResponse.newInstance().ok(deliverOfTask); + } + + @MustLogin + @ApiOperation(value = "提交交付物信息", notes = "") + @RequestMapping(value = "/submitDeliver", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse submitDeliver(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("查看任务下的交付物--{}",params); + deliverService.submitDeliver(params.getParam(), params.getUserId()); + return JsonResponse.newInstance().ok(); + } + + @MustLogin + @ApiOperation(value = "检查交付物", notes = "") + @RequestMapping(value = "/checkDeliver", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse checkDeliver(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("查看任务下的交付物--{}",params); + deliverService.checkDeliver(params.getParam(), params.getUserId()); + return JsonResponse.newInstance().ok(); + } + + @MustLogin + @ApiOperation(value = "查看交付物上传记录", notes = "查看所有记录倒叙查看") + @RequestMapping(value = "/queryRecord", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryRecord(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("查看交付物上传记录--{}",params); + DeliverVo.QueryDeliverRecord queryDeliverRecord = deliverService.queryRecord(params.getParam(), params.getUserId()); + log.info("返回交付物上传记录"); + return JsonResponse.newInstance().ok(queryDeliverRecord); + } + + @MustLogin + @ApiOperation(value = "查看本次提交的交付物的所有审核记录", notes = "查看所有记录倒叙查看") + @RequestMapping(value = "/queryCheckLog", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryCheckLog(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("查看交付物上传记录--{}",params); + List checkerInfos = deliverService.queryCheckLog(params.getParam(), params.getUserId()); + log.info("交付物上传记录--{}",checkerInfos); + return JsonResponse.newInstance().ok(checkerInfos); + } + +} diff --git a/src/main/java/com/ccsens/ptos_zero/aspect/MustLoginAspect.java b/src/main/java/com/ccsens/ptos_zero/aspect/MustLoginAspect.java new file mode 100644 index 0000000..fd3af88 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/aspect/MustLoginAspect.java @@ -0,0 +1,136 @@ +package com.ccsens.ptos_zero.aspect; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.ptos_zero.annotation.MustLogin; +import com.ccsens.ptos_zero.bean.po.ProUser; +import com.ccsens.ptos_zero.persist.dao.UserDao; +import com.ccsens.ptos_zero.util.Constant; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import com.ccsens.util.bean.dto.QueryDto; +import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; +import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; +import com.ccsensptos.tallsdk.util.TokenUtil; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Array; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: wuHuiJuan + * @create: 2019/12/09 09:54 + */ +@Order(0) +@Slf4j +@Aspect +@Component +public class MustLoginAspect { + @Resource + private UserDao userDao; + + @Pointcut("@annotation(com.ccsens.ptos_zero.annotation.MustLogin)") + public void loginAdvice(){} + + @Around("loginAdvice()") + public Object around(ProceedingJoinPoint pjp) throws Throwable { + + HttpServletRequest request = ((ServletRequestAttributes) + RequestContextHolder.getRequestAttributes()).getRequest(); + + final String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + + Object[] args = pjp.getArgs(); + QueryDto dto = args == null || args.length < 1 ? null : (QueryDto) args[0]; + + //获取userId + ProUser user = null; + if(StrUtil.isNotEmpty(authHeader)){ + log.info("MustLogin————token:{}", authHeader); + //通过token查找用户信息 + //TODO 根据token获取用户信息 + TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(authHeader, Constant.APP_ID, Constant.APP_SECRET)); + if(ObjectUtil.isNull(userByToken)){ + return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); + } + //通过手机号获取用户在服务内的userId + if(StrUtil.isNotBlank(userByToken.getPhone())){ + user = userDao.getUserIdByPhone(userByToken.getPhone()); + log.info("{}获取user:{}", authHeader, user); + } + } + Signature signature = pjp.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method targetMethod = methodSignature.getMethod(); + + MustLogin mustLoginAnnotation = targetMethod.getAnnotation(MustLogin.class); + fillSpecial(dto, mustLoginAnnotation); + + //必须登录,未登录直接返回未登录相关信息 + if (user == null) { + return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); + } +// JSONObject json = JSONObject.parseObject(JSON.toJSONString(response.getData())); +// Long userId = json.getLong("id"); +// String userName = json.getString("userName"); +// String avatarUrl = json.getString("avatarUrl"); +// String phone = json.getString("phone"); +// if (userId == null || userId == 0) { +// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); +// } + + if (dto != null) { + dto.setUserId(user.getId()); + dto.setPhone(user.getPhone()); + } + + Object result = pjp.proceed(); + return result; + } + + private void fillSpecial(QueryDto dto, MustLogin mustLoginAnnotation) { + if (mustLoginAnnotation == null) { + return; + } + if (dto != null && mustLoginAnnotation.type() > -1) { + switch (mustLoginAnnotation.type()) { + case 0: + Object obj = dto.getParam(); + if (obj!= null && !obj.getClass().isArray()) { + Class aClass = dto.getParam().getClass(); + Object o = Array.newInstance(aClass, 1); + Array.set(o, 0, dto.getParam()); + dto.setParam(o); + } + break; + case 1: + Object obj1 = dto.getParam(); + if (obj1!= null && !(obj1 instanceof List)) { + ArrayList arrayList = new ArrayList(); + arrayList.add(dto.getParam()); + dto.setParam(arrayList); + } + break; + } + + } + } + +} diff --git a/src/main/java/com/ccsens/ptos_zero/bean/dto/DeliverDto.java b/src/main/java/com/ccsens/ptos_zero/bean/dto/DeliverDto.java new file mode 100644 index 0000000..5614584 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/bean/dto/DeliverDto.java @@ -0,0 +1,163 @@ +package com.ccsens.ptos_zero.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.util.List; + +@Data +public class DeliverDto { + + @Data + @ApiModel("查询所有检查人") + public static class QueryChecker{ + @NotNull(message = "请选择项目") + @ApiModelProperty("项目id") + private Long projectId; + } + + @Data + @ApiModel("查询任务下的交付物信息") + public static class GetTaskDeliver{ + @NotNull(message = "请选择任务") + @ApiModelProperty("任务id(分解id)") + private Long taskId; + } + + @Data + @ApiModel("查询交付物的上传记录") + public static class QueryRecord{ + @NotNull(message = "请选择交付物信息") + @ApiModelProperty("交付物Id") + private Long deliverId; + } + + @Data + @ApiModel("查询交付物的检查记录") + public static class QueryCheckLog{ + @NotNull(message = "请选择交付物") + @ApiModelProperty("提交记录id") + private Long deliverRecordId; + } + + @Data + @ApiModel("添加交付物") + public static class SaveDeliver{ + @NotNull(message = "请选择项目") + @ApiModelProperty("项目id") + private Long projectId; + @NotNull(message = "请选择任务") + @ApiModelProperty("任务id(分解id)") + private Long taskId; + @NotBlank(message = "交付物名称不能为空") + @ApiModelProperty("交付物名称") + private String deliverName; + } + + @Data + @ApiModel("提交交付物信息") + public static class SubmitDeliver{ + @NotNull(message = "请选择项目") + @ApiModelProperty("项目id") + private Long projectId; + @NotNull(message = "请选择交付物") + @ApiModelProperty("交付物id") + private Long deliverId; + @NotNull(message = "请传入文件信息") + @ApiModelProperty("文件信息") + private List fileList; + @NotNull(message = "请选择检查人") + @ApiModelProperty("检查人id") + private List checkerList; + } + + @Data + @ApiModel("检查交付物信息") + public static class CheckDeliver{ + @NotNull(message = "请选择项目") + @ApiModelProperty("项目id") + private Long projectId; + @NotNull(message = "请选择要审核交付物") + @ApiModelProperty("交付物提交记录id") + private Long deliverRecordId; + @ApiModelProperty("审核状态 0未检查,1已通过,2驳回 默认1已通过") + private byte type = 1; + @ApiModelProperty("备注信息") + private String remark; + @ApiModelProperty("分数") + private BigDecimal score; + + } + + +// @Data +// @ApiModel("检查交付物") +// public static class CheckDeliver{ +// @NotNull(message = "检查信息错误") +// @ApiModelProperty("检查记录id") +// private Long checkId; +// @NotNull(message = "项目信息错误") +// @ApiModelProperty("项目id") +// private Long projectId; +// @ApiModelProperty("检查状态(1-通过,2-驳回)") +// private Byte status; +// @ApiModelProperty("分数") +// private String score; +// @ApiModelProperty("评论") +// private String remark; +// } +// +// @Data +// @ApiModel("提交交付物") +// public static class SaveDeliver{ +// @NotNull(message = "请选择项目") +// @ApiModelProperty("项目id") +// private Long projectId; +// @NotNull(message = "请选择任务") +// @ApiModelProperty("分解任务id") +// private Long taskSubId; +// @ApiModelProperty("文本内容") +// private String content; +// @ApiModelProperty("文件信息") +// private List fileInfoList; +//// @ApiModelProperty("文件id") +//// private Long fileId; +//// @ApiModelProperty("文件路径") +//// private String filePath; +// @NotEmpty(message = "请选择检查人") +// @ApiModelProperty("检查人列表") +// private List checkerList; +// } +// +// @Data +// @ApiModel("查询任务的交付物历史") +// public static class QueryDeliverOfTask{ +// @NotNull(message = "请选择项目信息") +// @ApiModelProperty("项目id") +// private Long projectId; +// @NotNull(message = "请选择任务") +// @ApiModelProperty("任务分解id") +// private Long taskSubId; +// } +// +// @Data +// @ApiModel("查询项目的交付物历史") +// public static class QueryDeliverOfProject { +// @NotNull(message = "请选择项目信息") +// @ApiModelProperty("项目id") +// private Long projectId; +// @ApiModelProperty("第几页") +// @Min(value = 1) +// private int pageNum = 1; +// @ApiModelProperty("每页多少条") +// @Min(value = 1) +// @Max(value=100) +// private int pageSize = 10; +// } + + +} diff --git a/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPlugin.java b/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPlugin.java index e5ef843..eeb184f 100644 --- a/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPlugin.java +++ b/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPlugin.java @@ -26,6 +26,12 @@ public class ProTaskPlugin implements Serializable { private Integer rowspan; + private Long businessPluginId; + + private String code; + + private Byte pluginInner; + private static final long serialVersionUID = 1L; public Long getId() { @@ -116,6 +122,30 @@ public class ProTaskPlugin implements Serializable { this.rowspan = rowspan; } + public Long getBusinessPluginId() { + return businessPluginId; + } + + public void setBusinessPluginId(Long businessPluginId) { + this.businessPluginId = businessPluginId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public Byte getPluginInner() { + return pluginInner; + } + + public void setPluginInner(Byte pluginInner) { + this.pluginInner = pluginInner; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -133,6 +163,9 @@ public class ProTaskPlugin implements Serializable { sb.append(", recStatus=").append(recStatus); sb.append(", colspan=").append(colspan); sb.append(", rowspan=").append(rowspan); + sb.append(", businessPluginId=").append(businessPluginId); + sb.append(", code=").append(code); + sb.append(", pluginInner=").append(pluginInner); sb.append("]"); return sb.toString(); } diff --git a/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPluginExample.java b/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPluginExample.java index 1ff3952..e42a5fd 100644 --- a/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPluginExample.java +++ b/src/main/java/com/ccsens/ptos_zero/bean/po/ProTaskPluginExample.java @@ -774,6 +774,196 @@ public class ProTaskPluginExample { addCriterion("rowspan not between", value1, value2, "rowspan"); return (Criteria) this; } + + public Criteria andBusinessPluginIdIsNull() { + addCriterion("business_plugin_id is null"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdIsNotNull() { + addCriterion("business_plugin_id is not null"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdEqualTo(Long value) { + addCriterion("business_plugin_id =", value, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdNotEqualTo(Long value) { + addCriterion("business_plugin_id <>", value, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdGreaterThan(Long value) { + addCriterion("business_plugin_id >", value, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdGreaterThanOrEqualTo(Long value) { + addCriterion("business_plugin_id >=", value, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdLessThan(Long value) { + addCriterion("business_plugin_id <", value, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdLessThanOrEqualTo(Long value) { + addCriterion("business_plugin_id <=", value, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdIn(List values) { + addCriterion("business_plugin_id in", values, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdNotIn(List values) { + addCriterion("business_plugin_id not in", values, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdBetween(Long value1, Long value2) { + addCriterion("business_plugin_id between", value1, value2, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andBusinessPluginIdNotBetween(Long value1, Long value2) { + addCriterion("business_plugin_id not between", value1, value2, "businessPluginId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andPluginInnerIsNull() { + addCriterion("plugin_inner is null"); + return (Criteria) this; + } + + public Criteria andPluginInnerIsNotNull() { + addCriterion("plugin_inner is not null"); + return (Criteria) this; + } + + public Criteria andPluginInnerEqualTo(Byte value) { + addCriterion("plugin_inner =", value, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerNotEqualTo(Byte value) { + addCriterion("plugin_inner <>", value, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerGreaterThan(Byte value) { + addCriterion("plugin_inner >", value, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerGreaterThanOrEqualTo(Byte value) { + addCriterion("plugin_inner >=", value, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerLessThan(Byte value) { + addCriterion("plugin_inner <", value, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerLessThanOrEqualTo(Byte value) { + addCriterion("plugin_inner <=", value, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerIn(List values) { + addCriterion("plugin_inner in", values, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerNotIn(List values) { + addCriterion("plugin_inner not in", values, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerBetween(Byte value1, Byte value2) { + addCriterion("plugin_inner between", value1, value2, "pluginInner"); + return (Criteria) this; + } + + public Criteria andPluginInnerNotBetween(Byte value1, Byte value2) { + addCriterion("plugin_inner not between", value1, value2, "pluginInner"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/ccsens/ptos_zero/bean/vo/DeliverVo.java b/src/main/java/com/ccsens/ptos_zero/bean/vo/DeliverVo.java new file mode 100644 index 0000000..1edfeed --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/bean/vo/DeliverVo.java @@ -0,0 +1,150 @@ +package com.ccsens.ptos_zero.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class DeliverVo { + + @Data + @ApiModel("查询任务下的交付物信息") + public static class DeliverOfTask{ + @ApiModelProperty("交付物id") + private Long deliverId; + @ApiModelProperty("交付物名字") + private String deliverName; + @ApiModelProperty("交付物提交记录id") + private Long deliverRecordId; + @ApiModelProperty("文件路径") + private List details; + @ApiModelProperty("提交时间") + private Long submitTime; + @ApiModelProperty("提交人Id") + private Long submitMemberId; + @ApiModelProperty("提交人名称") + private String submitMemberName; + @ApiModelProperty("检查人列表") + private List checkerList; + } + + @Data + @ApiModel("检查人信息") + public static class CheckerInfo{ + @ApiModelProperty("检查记录id") + private Long checkId; + @ApiModelProperty("检查人id") + private Long checkerId; + @ApiModelProperty("检查人名字") + private String checkerName; + @ApiModelProperty("检查状态(0-未审核,1-通过,2-驳回)") + private Byte status; + @ApiModelProperty("分数") + private BigDecimal score; + @ApiModelProperty("备注") + private String remark; + @ApiModelProperty("是不是我(0-否,1-是)") + private Byte isMine; + @ApiModelProperty("检查时间") + private Long checkTime; + } + + @Data + @ApiModel("查询交付物提交记录") + public static class QueryDeliverRecord{ + @ApiModelProperty("交付物id") + private Long deliverId; + @ApiModelProperty("交付物名字") + private String deliverName; + @ApiModelProperty("交付物提交id") + private List deliverRecordList; + } + @Data + @ApiModel("交付物提交记录") + public static class DeliverRecord{ + @ApiModelProperty("交付物提交记录id") + private Long deliverRecordId; + @ApiModelProperty("文件路径") + private List details; + @ApiModelProperty("提交时间") + private Long submitTime; + @ApiModelProperty("检查人列表") + private List checkerList; + } + + +// @Data +// @ApiModel("检查人信息") +// public static class CheckerInfo{ +// @ApiModelProperty("检查记录id") +// private String checkId; +// @ApiModelProperty("检查人id") +// private Long checkerId; +// @ApiModelProperty("检查人名字") +// private String checkerName; +// @ApiModelProperty("检查状态(0-未审核,1-通过,2-驳回)") +// private Byte status; +// @ApiModelProperty("分数") +// private String score; +// @ApiModelProperty("备注") +// private String remark; +// @ApiModelProperty("是不是我(0-否,1-是)") +// private Byte isMine; +// +// } +// + @Data + @ApiModel("所有检查人信息") + public static class Checker{ + @ApiModelProperty("检查人id") + private Long memberId; + @ApiModelProperty("检查人名字") + private String name; + @ApiModelProperty("用户id") + private Long userId; + @ApiModelProperty("是不是我(0-否,1-是)") + private Byte isMine = 0; + } +// +// +// @Data +// @ApiModel("项目下的交付物记录") +// public static class DeliverOfProject{ +// @ApiModelProperty("项目名称") +// private String projectName; +// @ApiModelProperty("任务列表") +// private List deliverOfTaskList; +// } +// +// @Data +// @ApiModel("任务的交付物历史") +// public static class DeliverOfTask{ +// @ApiModelProperty("交付物id") +// private String id; +// @ApiModelProperty("上传人名字") +// private String name; +// @ApiModelProperty("任务名称") +// private String taskName; +// @ApiModelProperty("上传时间") +// private Long time; +// @ApiModelProperty("文本内容") +// private String content; +// @ApiModelProperty("文件信息") +// private List fileInfoList; +//// @ApiModelProperty("文件id") +//// private Long fileId; +//// @ApiModelProperty("文件路径") +//// private String filePath; +// @ApiModelProperty("检查人列表") +// private List checkerList; +// } + + + +} diff --git a/src/main/java/com/ccsens/ptos_zero/persist/dao/PluDeliverDao.java b/src/main/java/com/ccsens/ptos_zero/persist/dao/PluDeliverDao.java new file mode 100644 index 0000000..c4cbf73 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/persist/dao/PluDeliverDao.java @@ -0,0 +1,53 @@ +package com.ccsens.ptos_zero.persist.dao; + +import com.ccsens.ptos_zero.bean.po.PluDeliver; +import com.ccsens.ptos_zero.bean.vo.DeliverVo; +import com.ccsens.ptos_zero.persist.mapper.PluDeliverMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author 逗 + */ +public interface PluDeliverDao extends PluDeliverMapper { + + /** + * 查询任务下的交付物信息 + * @param taskId 任务id + * @param userId userId + * @return 返回最后一条提交记录 + */ + DeliverVo.DeliverOfTask getDeliverByTask(@Param("taskId") Long taskId, @Param("userId") Long userId); + + /** + * 查询交付物所有的提交记录 + * @param deliverId 交付物id + * @param userId userId + * @return 返回所有记录 + */ + DeliverVo.QueryDeliverRecord queryDeliverRecord(@Param("deliverId") Long deliverId, @Param("userId") Long userId); + + /** + * 查找交付物的所有检查记录 + * @param deliverRecordId 交付物提交记录 + * @param userId userId + * @return 返回所有检查记录 + */ + List queryCheckLog(@Param("deliverRecordId") Long deliverRecordId, @Param("userId") Long userId); + + /** + * 批量添加 + * @param deliverList + */ + void insertSelectiveList(@Param("deliverList") List deliverList); + + /** + * 查询所有检查人 + * @param projectId 项目id + * @param userId userId + * @return 检查人列表 + */ + List queryChecker(@Param("projectId") Long projectId, @Param("userId") Long userId); + +} diff --git a/src/main/java/com/ccsens/ptos_zero/persist/dao/ProRoleTaskDao.java b/src/main/java/com/ccsens/ptos_zero/persist/dao/ProRoleTaskDao.java index ecd8103..c9cba58 100644 --- a/src/main/java/com/ccsens/ptos_zero/persist/dao/ProRoleTaskDao.java +++ b/src/main/java/com/ccsens/ptos_zero/persist/dao/ProRoleTaskDao.java @@ -27,13 +27,13 @@ public interface ProRoleTaskDao extends ProRoleTaskMapper { // */ // void insertAllRoleTask(@Param("roleTaskList") List newRoleTaskList); // -// /** -// * 查询我负责的任务 -// * @param taskDetailId 任务详情id -// * @param userOfRoles 角色id列表 -// * @return 角色任务id -// */ -// List isMyTask(@Param("taskDetailId") Long taskDetailId, @Param("roleIdList") List userOfRoles); + /** + * 查询我负责的任务 + * @param taskDetailId 任务详情id + * @param userOfRoles 角色id列表 + * @return 角色任务id + */ + List isMyTask(@Param("taskDetailId") Long taskDetailId, @Param("roleIdList") List userOfRoles); /** * 根据任务id查找任务下的检查人 diff --git a/src/main/java/com/ccsens/ptos_zero/persist/dao/ProTaskDetailDao.java b/src/main/java/com/ccsens/ptos_zero/persist/dao/ProTaskDetailDao.java index 932af42..f2e8632 100644 --- a/src/main/java/com/ccsens/ptos_zero/persist/dao/ProTaskDetailDao.java +++ b/src/main/java/com/ccsens/ptos_zero/persist/dao/ProTaskDetailDao.java @@ -6,6 +6,7 @@ import com.ccsens.ptos_zero.bean.po.ProTaskSub; import com.ccsens.ptos_zero.bean.vo.TaskVo; import com.ccsens.ptos_zero.persist.mapper.ProTaskDetailMapper; import com.ccsensptos.tallsdk.bean.dto.TallTaskDto; +import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; import com.ccsensptos.tallsdk.bean.vo.TallTaskVo; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -71,6 +72,25 @@ public interface ProTaskDetailDao extends ProTaskDetailMapper { */ Long getNowTask(@Param("taskName") String taskName, @Param("projectId") Long projectId, @Param("now") long now); + /** + * 查找服务下的mwbs + * @param startTime 开始时间 + * @param endTime 结束时间 + * @param userId userId + * @return 返回mwbs + */ + List queryMwbs(@Param("startTime")Long startTime, @Param("endTime")Long endTime, @Param("userId")Long userId); + /** + * 查找MWBS下的pwbs + * @param startTime 开始时间 + * @param endTime 结束时间 + * @param userId userId + * @param parentId 上级id + * @return 返回pwbs + */ + List queryPwbs( @Param("startTime")Long startTime, @Param("endTime")Long endTime, @Param("userId")Long userId, @Param("parentId")Long parentId); + + // /** // * 根据任务详情id查找项目id // */ diff --git a/src/main/java/com/ccsens/ptos_zero/service/DeliverService.java b/src/main/java/com/ccsens/ptos_zero/service/DeliverService.java new file mode 100644 index 0000000..c2b2340 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/service/DeliverService.java @@ -0,0 +1,217 @@ +package com.ccsens.ptos_zero.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.ptos_zero.bean.dto.DeliverDto; +import com.ccsens.ptos_zero.bean.po.*; +import com.ccsens.ptos_zero.bean.vo.DeliverVo; +import com.ccsens.ptos_zero.persist.dao.*; +import com.ccsens.ptos_zero.persist.mapper.PluDeliverRecordCheckLogMapper; +import com.ccsens.ptos_zero.persist.mapper.PluDeliverRecordCheckMapper; +import com.ccsens.ptos_zero.persist.mapper.PluDeliverRecordFileMapper; +import com.ccsens.ptos_zero.persist.mapper.PluDeliverRecordMapper; +import com.ccsens.ptos_zero.util.ZeroCodeError; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author AUSU + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) +public class DeliverService implements IDeliverService { + + @Resource + private ProMemberDao memberDao; + @Resource + private ProTaskSubDao taskSubDao; +// @Resource +// private ProDeliverDao deliverDao; + @Resource + private ProRoleTaskDao roleTaskDao; + @Resource + private ProRoleMemberDao roleMemberDao; + @Resource + private Snowflake snowflake; + @Resource + private PluDeliverDao pluDeliverDao; + @Resource + private PluDeliverRecordMapper deliverRecordMapper; + @Resource + private PluDeliverRecordFileMapper deliverRecordFileMapper; + @Resource + private PluDeliverRecordCheckMapper deliverRecordCheckMapper; + @Resource + private PluDeliverRecordCheckLogMapper checkLogMapper; + + @Override + public List queryChecker(DeliverDto.QueryChecker params, Long userId) { + return pluDeliverDao.queryChecker(params.getProjectId(),userId); + } + + @Override + public void saveDeliver(DeliverDto.SaveDeliver param, Long userId) { + verifyTaskAndUserId(param.getTaskId(), param.getProjectId(), userId); + //查找任务关联的交付物信息 + PluDeliverExample deliverExample = new PluDeliverExample(); + deliverExample.createCriteria().andTaskSubIdEqualTo(param.getTaskId()); + List pluDelivers = pluDeliverDao.selectByExample(deliverExample); + if(CollectionUtil.isNotEmpty(pluDelivers)){ + PluDeliver pluDeliver = pluDelivers.get(0); + pluDeliver.setName(param.getDeliverName()); + pluDeliverDao.updateByPrimaryKeySelective(pluDeliver); + }else { + //添加交付物信息 + PluDeliver pluDeliver = new PluDeliver(); + pluDeliver.setId(snowflake.nextId()); + pluDeliver.setTaskSubId(param.getTaskId()); + pluDeliver.setName(param.getDeliverName()); + pluDeliverDao.insertSelective(pluDeliver); + } + } + + + @Override + public DeliverVo.DeliverOfTask getDeliver(DeliverDto.GetTaskDeliver param, Long userId) { + //验证任务是否存在 + verifyTaskAndUserId(param.getTaskId(),null,null); + //查询任务的交付物信息 + return pluDeliverDao.getDeliverByTask(param.getTaskId(),userId); + } + + @Override + public void submitDeliver(DeliverDto.SubmitDeliver param, Long userId) { + //检查交付物是否存在 + PluDeliver pluDeliver = pluDeliverDao.selectByPrimaryKey(param.getDeliverId()); + if(ObjectUtil.isNull(pluDeliver)){ + throw new BaseException(ZeroCodeError.NOT_DELIVER); + } + //检查当前用户是否是任务负责人 + Long memberIdByUserId = verifyTaskAndUserId(pluDeliver.getTaskSubId(), param.getProjectId(), userId); + //添加交付物提交记录 + PluDeliverRecord deliverRecord = new PluDeliverRecord(); + deliverRecord.setId(snowflake.nextId()); + deliverRecord.setDeliverId(pluDeliver.getId()); + deliverRecord.setMemberId(memberIdByUserId); + deliverRecord.setSubmitTime(System.currentTimeMillis()); + deliverRecordMapper.insertSelective(deliverRecord); + //添加提交的文件信息 + if(CollectionUtil.isNotEmpty(param.getFileList())){ + param.getFileList().forEach(filePath ->{ + PluDeliverRecordFile deliverRecordFile = new PluDeliverRecordFile(); + deliverRecordFile.setId(snowflake.nextId()); + deliverRecordFile.setDeliverRecordId(deliverRecord.getId()); + deliverRecordFile.setFilePath(filePath); + deliverRecordFileMapper.insertSelective(deliverRecordFile); + }); + } + //添加检查人信息 + if(CollectionUtil.isNotEmpty(param.getCheckerList())){ + param.getCheckerList().forEach(checkerId ->{ + PluDeliverRecordCheck recordCheck = new PluDeliverRecordCheck(); + recordCheck.setId(snowflake.nextId()); + recordCheck.setCheckerId(checkerId); + recordCheck.setDeliverRecordId(deliverRecord.getId()); + deliverRecordCheckMapper.insertSelective(recordCheck); + }); + } + } + + @Override + public void checkDeliver(DeliverDto.CheckDeliver param, Long userId) { + //检查交付物提交记录是否存在 + PluDeliverRecord deliverRecord = deliverRecordMapper.selectByPrimaryKey(param.getDeliverRecordId()); + if(ObjectUtil.isNull(deliverRecord)){ + throw new BaseException(ZeroCodeError.NOT_DELIVER); + } + //查找当前用户的成员id + Long userOfMemberId = memberDao.findUserOfMemberId(param.getProjectId(), userId); + if (ObjectUtil.isNull(userOfMemberId)) { + throw new BaseException(ZeroCodeError.NO_POWER); + } + //检查当前用户是否是交付物的检查人 + PluDeliverRecordCheckExample recordCheckExample = new PluDeliverRecordCheckExample(); + recordCheckExample.createCriteria().andCheckerIdEqualTo(userOfMemberId).andDeliverRecordIdEqualTo(param.getDeliverRecordId()); + List pluDeliverRecordChecks = deliverRecordCheckMapper.selectByExample(recordCheckExample); + if(CollectionUtil.isEmpty(pluDeliverRecordChecks)){ + throw new BaseException(ZeroCodeError.NO_POWER); + } + PluDeliverRecordCheck deliverRecordCheck = pluDeliverRecordChecks.get(0); + //添加检查记录 + PluDeliverRecordCheckLog checkLog = new PluDeliverRecordCheckLog(); + checkLog.setId(snowflake.nextId()); + checkLog.setRecordCheckId(deliverRecordCheck.getId()); + checkLog.setCheckStatus(param.getType()); + checkLog.setRemark(param.getRemark()); + checkLog.setScore(param.getScore()); + checkLog.setTime(System.currentTimeMillis()); + checkLogMapper.insertSelective(checkLog); + } + + @Override + public DeliverVo.QueryDeliverRecord queryRecord(DeliverDto.QueryRecord param, Long userId) { + //验证交付物是否存在 + PluDeliver pluDeliver = pluDeliverDao.selectByPrimaryKey(param.getDeliverId()); + if(ObjectUtil.isNull(pluDeliver)){ + throw new BaseException(ZeroCodeError.NOT_DELIVER); + } + //查询交付物信息 + return pluDeliverDao.queryDeliverRecord(param.getDeliverId(),userId); + } + + @Override + public List queryCheckLog(DeliverDto.QueryCheckLog param, Long userId) { + //验证提交记录是否存在 + PluDeliverRecord deliverRecord = deliverRecordMapper.selectByPrimaryKey(param.getDeliverRecordId()); + if(ObjectUtil.isNull(deliverRecord)){ + throw new BaseException(ZeroCodeError.NOT_DELIVER); + } + //查找检查人的所有检查记录 倒叙排列 + return pluDeliverDao.queryCheckLog(param.getDeliverRecordId(),userId); + } + + /** + * 验证任务是否存在, + * 如果userId和projectId不为空,则校验该用户是否是任务的负责人 + * @param taskId 任务分解id + * @param projectId 项目id + * @param userId userId + * @return 返回成员id + */ + private Long verifyTaskAndUserId(Long taskId, Long projectId, Long userId) { + Long memberId = null; + //验证任务是否存在 + ProTaskSub taskSub = taskSubDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNull(taskSub)) { + throw new BaseException(ZeroCodeError.NOT_TASK); + } + if(ObjectUtil.isNotNull(userId) && ObjectUtil.isNotNull(projectId)){ + //查找当前用户的成员id + Long userOfMemberId = memberDao.findUserOfMemberId(projectId, userId); + if (ObjectUtil.isNull(userOfMemberId)) { + throw new BaseException(ZeroCodeError.NO_POWER); + } + memberId = userOfMemberId; + //查找当前用户所属的角色 + List userOfRoles = roleMemberDao.findMemberOfRoleIds(userOfMemberId); + //查看是否是我负责的任务 + if (CollectionUtil.isNotEmpty(userOfRoles)) { + List isMyTask = roleTaskDao.isMyTask(taskSub.getTaskDetailId(), userOfRoles); + if (CollectionUtil.isEmpty(isMyTask)) { + throw new BaseException(ZeroCodeError.NO_POWER); + } + }else { + throw new BaseException(ZeroCodeError.NO_POWER); + } + } + return memberId; + } +} diff --git a/src/main/java/com/ccsens/ptos_zero/service/IDeliverService.java b/src/main/java/com/ccsens/ptos_zero/service/IDeliverService.java new file mode 100644 index 0000000..bea63b3 --- /dev/null +++ b/src/main/java/com/ccsens/ptos_zero/service/IDeliverService.java @@ -0,0 +1,66 @@ +package com.ccsens.ptos_zero.service; + +import com.ccsens.ptos_zero.bean.dto.DeliverDto; +import com.ccsens.ptos_zero.bean.vo.DeliverVo; + +import java.util.List; + +/** + * @author AUSU + */ +public interface IDeliverService { + + /** + * 查询所有检查人 + * @param params 项目id + * @param userId 用户id + * @return 检查人列表 + */ + List queryChecker(DeliverDto.QueryChecker params, Long userId); + + /** + * 添加交付物 + * @param param 交付物名称和任务id + * @param userId userID + */ + void saveDeliver(DeliverDto.SaveDeliver param, Long userId); + + /** + * 查看任务下的交付物信息 + * @param param 任务id + * @param userId userId + * @return 返回交付物信息 + */ + DeliverVo.DeliverOfTask getDeliver(DeliverDto.GetTaskDeliver param, Long userId); + + /** + * 提交交付物内容 + * @param param 文件检查人等 + * @param userId userId + */ + void submitDeliver(DeliverDto.SubmitDeliver param, Long userId); + + /** + * 检查交付物提交记录 + * @param param 检查信息 + * @param userId userId + */ + void checkDeliver(DeliverDto.CheckDeliver param, Long userId); + + /** + * 查看交付物提交记录 + * @param param 交付物id + * @param userId userId + * @return 返回提交记录 + */ + DeliverVo.QueryDeliverRecord queryRecord(DeliverDto.QueryRecord param, Long userId); + + /** + * 查看交付物的检查记录 + * @param param 交付物提交记录id + * @param userId userId + * @return 返回所有检查记录倒叙排列 + */ + List queryCheckLog(DeliverDto.QueryCheckLog param, Long userId); + +} diff --git a/src/main/java/com/ccsens/ptos_zero/service/ImportService.java b/src/main/java/com/ccsens/ptos_zero/service/ImportService.java index f61315f..5b109af 100644 --- a/src/main/java/com/ccsens/ptos_zero/service/ImportService.java +++ b/src/main/java/com/ccsens/ptos_zero/service/ImportService.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.ptos_zero.bean.dto.RoleDto; import com.ccsens.ptos_zero.bean.dto.TaskDto; + import com.ccsens.ptos_zero.bean.po.*; import com.ccsens.ptos_zero.bean.vo.ProjectVo; import com.ccsens.ptos_zero.persist.dao.*; @@ -17,7 +18,9 @@ import com.ccsens.util.StringUtil; import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.exception.BaseException; +import com.ccsensptos.tallsdk.bean.vo.TallPluginVo; import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; +import com.ccsensptos.tallsdk.util.PluginUtil; import lombok.extern.slf4j.Slf4j; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; @@ -78,6 +81,7 @@ public class ImportService implements IImportService { private ProTaskPluginDao proTaskPluginDao; + /** * 读取wbs文件 * @param path 路径 @@ -392,7 +396,7 @@ public class ImportService implements IImportService { /** * 添加任务标签关联 */ - private void saveLabelTask(Long taskDetailId,Long labelId) { + private void saveLabelTask(Long taskDetailId, Long labelId) { //添加标签 LabelBusiness labelBusiness = new LabelBusiness(); labelBusiness.setId(snowflake.nextId()); @@ -405,7 +409,7 @@ public class ImportService implements IImportService { /** * 读取项目成员表 */ - private void readMemberSheet(XSSFSheet memberSheet,ProjectVo.SysProject project, Map roleMap, Map memberMap) { + private void readMemberSheet(XSSFSheet memberSheet, ProjectVo.SysProject project, Map roleMap, Map memberMap) { //系统角色id Long sysRoleId = null; //项目角色id @@ -680,6 +684,8 @@ public class ImportService implements IImportService { String endTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(5))); //时长 String duration = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(6))); + //交付物 + String deliver = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(10))); //插件 String plugin1 = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(12))); String plugin2 = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(13))); @@ -726,7 +732,7 @@ public class ImportService implements IImportService { } //处理时间、添加任务分解、添加任务标签 - taskStartTime = taskSaveTime(taskStartTime, project, beginTime, endTime, duration, taskDetail.getId(),wbsSheet,i+1); + taskStartTime = taskSaveTime(taskStartTime, project, beginTime, endTime, duration, taskDetail.getId(),wbsSheet,i+1,deliver); //添加时间颗粒度标签并关联 Long timeLabel = labelDao.getLabelByTypeAndLevel(0, 4); saveLabelTask(taskDetail.getId(),timeLabel); @@ -740,23 +746,31 @@ public class ImportService implements IImportService { //TODO 检查人 //TODO 及时奖惩 //TODO 交付物 + //TODO 添加默认插件 } } - private Long plugin(String plugin,Long taskId,int row,XSSFSheet wbsSheet,int errorRow) { + private Long plugin(String plugin, Long taskId, int row, XSSFSheet wbsSheet, int errorRow) { Long taskPlugin = null; if(StrUtil.isNotEmpty(plugin)){ //根据插件名称查找插件id // Long pluginId = taskPluginDao.getPluginIdByName(plugin); - Long pluginId = 1L; - if(ObjectUtil.isNull(pluginId)){ +// Long pluginId = 1L; +// if(ObjectUtil.isNull(pluginId)){ +// throw new BaseException(ZeroCodeError.PLUGIN_NAME_ERROR.addMsg(wbsSheet.getSheetName(),errorRow,plugin)); +// } + TallPluginVo.BusinessPluginInfo pluginByCodeAndName = PluginUtil.getPluginByCodeAndName(Constant.BUSINESS_CODE, plugin); + if(ObjectUtil.isNull(pluginByCodeAndName)){ throw new BaseException(ZeroCodeError.PLUGIN_NAME_ERROR.addMsg(wbsSheet.getSheetName(),errorRow,plugin)); } //添加插件 ProTaskPlugin proTaskPlugin = new ProTaskPlugin(); proTaskPlugin.setId(snowflake.nextId()); proTaskPlugin.setTaskDetailId(taskId); - proTaskPlugin.setPluginId(pluginId); + proTaskPlugin.setPluginId(pluginByCodeAndName.getPluginId()); + proTaskPlugin.setBusinessPluginId(pluginByCodeAndName.getBusinessPluginId()); + proTaskPlugin.setCode(pluginByCodeAndName.getCode()); + proTaskPlugin.setPluginInner(pluginByCodeAndName.getInner()); proTaskPlugin.setPlginRow(row); proTaskPlugin.setPlginCol(1); proTaskPlugin.setRowspan(1); @@ -767,7 +781,7 @@ public class ImportService implements IImportService { return taskPlugin; } - private Long taskSaveTime(Long taskStartTime,ProjectVo.SysProject project, String beginTime, String endTime, String duration, Long taskDetailId,XSSFSheet wbsSheet,int row) { + private Long taskSaveTime(Long taskStartTime, ProjectVo.SysProject project, String beginTime, String endTime, String duration, Long taskDetailId, XSSFSheet wbsSheet, int row,String deliver) { if(StrUtil.isEmpty(beginTime) || "日常".equalsIgnoreCase(beginTime)){ if(StrUtil.isEmpty(beginTime) && StrUtil.isNotEmpty(duration)){ @@ -796,6 +810,11 @@ public class ImportService implements IImportService { taskStartTime += durationTime; taskSub.setPlanEndTime(taskStartTime); taskSubDao.insertSelective(taskSub); + //TODO 添加交付物信息 + //添加交付物信息 +// if(StrUtil.isNotBlank(deliver)) { +// saveDeliver(deliver, taskSub); +// } //查找定期任务标签并关联任务 Long taskLabel = labelDao.getLabelByTypeAndLevel(1, 3); saveLabelTask(taskDetailId,taskLabel); @@ -806,6 +825,10 @@ public class ImportService implements IImportService { taskSub.setId(snowflake.nextId()); taskSub.setTaskDetailId(taskDetailId); taskSubDao.insertSelective(taskSub); + //添加交付物信息 +// if(StrUtil.isNotBlank(deliver)) { +// saveDeliver(deliver, taskSub); +// } //查找日常任务标签并关联信息 Long label = labelDao.getLabelByTypeAndLevel(1, 2); saveLabelTask(taskDetailId,label); @@ -824,6 +847,10 @@ public class ImportService implements IImportService { taskSub.setPlanStartTime(bTime); taskSub.setPlanDuration(eTime - bTime); taskSubDao.insertSelective(taskSub); + //添加交付物信息 +// if(StrUtil.isNotBlank(deliver)) { +// saveDeliver(deliver, taskSub); +// } //查找定期任务标签并关联任务 Long taskLabel = labelDao.getLabelByTypeAndLevel(1, 3); saveLabelTask(taskDetailId,taskLabel); @@ -840,6 +867,7 @@ public class ImportService implements IImportService { return taskStartTime; } List proTaskSubList = new ArrayList<>(); + List deliverList = new ArrayList<>(); for (CronConstant.TaskDate taskDate : taskDateList) { ProTaskSub proTaskSub = new ProTaskSub(); @@ -849,9 +877,18 @@ public class ImportService implements IImportService { proTaskSub.setPlanEndTime(taskDate.getEndDate().getTime()); proTaskSub.setPlanDuration(proTaskSub.getPlanEndTime() - proTaskSub.getPlanStartTime()); proTaskSubList.add(proTaskSub); + //交付物 + PluDeliver pluDeliver = new PluDeliver(); + pluDeliver.setId(snowflake.nextId()); + pluDeliver.setTaskSubId(proTaskSub.getId()); + pluDeliver.setName(deliver); + deliverList.add(pluDeliver); } if(CollectionUtil.isNotEmpty(proTaskSubList)){ taskDetailDao.insertSelectiveList(proTaskSubList); +// if(StrUtil.isNotBlank(deliver)) { +// pluDeliverDao.insertSelectiveList(deliverList); +// } } //查找定期任务标签并关联任务 Long taskLabel = labelDao.getLabelByTypeAndLevel(1, 3); @@ -865,6 +902,14 @@ public class ImportService implements IImportService { return taskStartTime; } +// private void saveDeliver(String deliver, ProTaskSub taskSub) { +// PluDeliver pluDeliver = new PluDeliver(); +// pluDeliver.setId(snowflake.nextId()); +// pluDeliver.setTaskSubId(taskSub.getId()); +// pluDeliver.setName(deliver); +// pluDeliverDao.insertSelective(pluDeliver); +// } + /** * 添加一级任务 @@ -898,5 +943,3 @@ public class ImportService implements IImportService { return firstTaskId; } } - - diff --git a/src/main/java/com/ccsens/ptos_zero/service/TallService.java b/src/main/java/com/ccsens/ptos_zero/service/TallService.java index a4d68fe..e0caec2 100644 --- a/src/main/java/com/ccsens/ptos_zero/service/TallService.java +++ b/src/main/java/com/ccsens/ptos_zero/service/TallService.java @@ -150,6 +150,7 @@ import com.ccsens.ptos_zero.persist.dao.*; import com.ccsens.ptos_zero.util.Constant; import com.ccsens.ptos_zero.util.ZeroCodeError; import com.ccsens.util.CodeEnum; +import com.ccsens.util.PropUtil; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; import com.ccsensptos.tallsdk.bean.dto.TallProjectDto; @@ -217,7 +218,7 @@ public class TallService implements ITallService { @Override public TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params) { //TODO 根据token获取用户信息 - TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, "appId", "secret")); + TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, Constant.APP_ID, Constant.APP_SECRET)); //通过手机号获取用户在服务内的userId ProUser user = null; if(ObjectUtil.isNotNull(userByToken) && StrUtil.isNotBlank(userByToken.getPhone())){ @@ -252,23 +253,56 @@ public class TallService implements ITallService { @Override public List queryProjectByUser(String token,TallProjectDto.QueryProjectDto param) { - TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, "appId", "secret")); + TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, Constant.APP_ID, Constant.APP_SECRET)); - List projectInfos = new ArrayList<>(); - TallProjectVo.ProjectInfo projectInfo = new TallProjectVo.ProjectInfo(); - projectInfo.setId(1485932638408675328L); - projectInfo.setName("零号项目"); - projectInfo.setUrl("http://101.201.226.163:7310"); - projectInfo.setBusinessCode("zero"); - projectInfo.setDomainCode("tall_dh"); - projectInfos.add(projectInfo); - return projectInfos; +// List projectInfos = new ArrayList<>(); +// TallProjectVo.ProjectInfo projectInfo = new TallProjectVo.ProjectInfo(); +// projectInfo.setId(1485932638408675328L); +// projectInfo.setName("我的"); +// projectInfo.setUrl("http://101.201.226.163:7310"); +// projectInfo.setBusinessCode("ZERO"); +// projectInfo.setDomainCode("tall_dh"); +// projectInfos.add(projectInfo); + +// TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, Constant.APP_ID, Constant.APP_SECRET)); + if(ObjectUtil.isNull(userByToken)){ + return null; + } + //通过手机号获取用户在服务内的userId + ProUser user = null; + if(StrUtil.isNotBlank(userByToken.getPhone())){ + user = userDao.getUserIdByPhone(userByToken.getPhone()); + } + + //TODO 暂时查询全部,无论是否查到user +// List projectInfos = new ArrayList<>(); + //查找所有没有上级的项目,作为MWBS + List mWbs = taskDetailDao.queryMwbs(param.getStartTime(),param.getEndTime(),null); + if(CollectionUtil.isNotEmpty(mWbs)){ + mWbs.forEach(m -> { + //给下项目添加域信息和url + m.setUrl(PropUtil.notGatewayUrl); + m.setBusinessCode(Constant.BUSINESS_CODE); + //分别查找mwbs下的子pwbs + List pWbs = taskDetailDao.queryPwbs(param.getStartTime(),param.getEndTime(),null,m.getId()); + if(CollectionUtil.isNotEmpty(pWbs)){ + pWbs.forEach(p -> { + //给下项目添加域信息和url + p.setUrl(PropUtil.notGatewayUrl); + p.setBusinessCode(Constant.BUSINESS_CODE); + }); + } + m.setSonProjectList(pWbs); + }); + } + + return mWbs; } @Override public TallRoleVo.QueryRole queryShowRole(String token,TallRoleDto.QueryRoleById param) { //TODO 通过token向tall获取用户信息, - TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, "appId", "secret")); + TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, Constant.APP_ID, Constant.APP_SECRET)); if(ObjectUtil.isNull(userByToken)){ throw new BaseException(CodeEnum.NOT_LOGIN); } @@ -286,9 +320,17 @@ public class TallService implements ITallService { List userRoleList = proRoleDao.queryRoleByUserId(param.getProjectId(),user == null ? null : user.getId()); //查询用户可见的角色 List roleInfoList = new ArrayList<>(); + if(CollectionUtil.isNotEmpty(userRoleList)){ //不是关注者,查询可见的角色(完全屏蔽才不可见) roleInfoList = proRoleDao.notAttentionQueryRole(param.getProjectId(),userRoleList); + if(CollectionUtil.isNotEmpty(roleInfoList)){ + roleInfoList.forEach(roleInfo -> { + if("我".equals(roleInfo.getName())){ + roleInfo.setMine(1); + } + }); + } }else { // //是关注者查询可见的角色(未设置过对谁不可见信息的角色) // roleInfoList = proRoleDao.attentionQueryRole(param.getProjectId()); @@ -298,14 +340,19 @@ public class TallService implements ITallService { List proRoles = proRoleDao.selectByExample(proRoleExample); if(CollectionUtil.isNotEmpty(proRoles)){ for (ProRole proRole : proRoles) { - if("管理员".equals(proRole.getName())){ + if("我".equals(proRole.getName())){ + TallRoleVo.RoleInfo roleInfo = new TallRoleVo.RoleInfo(); + roleInfo.setId(proRole.getId()); + roleInfo.setName(proRole.getName()); + roleInfo.setMine(1); + roleInfoList.add(roleInfo); + }else if("管理员".equals(proRole.getName())){ TallRoleVo.RoleInfo roleInfo = new TallRoleVo.RoleInfo(); roleInfo.setId(proRole.getId()); roleInfo.setName(proRole.getName()); roleInfo.setMine(1); roleInfoList.add(roleInfo); } - } } } diff --git a/src/main/java/com/ccsens/ptos_zero/util/CodeEnum.java b/src/main/java/com/ccsens/ptos_zero/util/CodeEnum.java deleted file mode 100644 index 8c44f93..0000000 --- a/src/main/java/com/ccsens/ptos_zero/util/CodeEnum.java +++ /dev/null @@ -1,318 +0,0 @@ -//package com.ccsens.ptos_zero.util; -// -//import lombok.Getter; -// -//@Getter -//public enum CodeEnum { -// /** -// * 异常 -// */ -// SUCCESS(200, "ok", true), -// SYS_ERROR(500, "网络繁忙,请您稍后重试", false), -// THIRD_ERROR(-1, "调用第三方刚接口异常", false), -// -// FILE_FORMAT_ERROR(1, "文件格式错误", true), -// AUDITED(2, "已经审核通过,不重复提交。", true), -// POSITION_NO_FOUND(3, "未找到对应职务,请重新选择职务。", true), -// TITLE_NO_FOUND(4, "未找到对应职称,请重新选择职称。", true), -// ADMIN_DEAL(5,"由于您的资格太高,请联系管理员进行审核。", true), -// PARAM_NULL(6, "请检查您的参数是否填写完整。", true), -// ROLE_NOT_FOUND(7, "未找到相关角色,请确认项目和角色信息。", true), -// AUDIT_NOT_PASS (8, "对不起,您尚未审核通过,暂时没有操作权限。", true), -// PARAM_ERROR(9,"请求参数错误,请确认操作是否正确。", true), -// ID_CARD_ERROR(10,"身份证格式错误,请检查身份证填写是否正确。", true), -// QUESTION_NOT_FOUND(11,"试题未找到。", true), -// -// WSB_NOT_PROJECT_HEADER(12,"没有项目信息的表头",true), -// WSB_NOT_MEMBER_HEADER(13,"没有项目成员的表头",true), -// WSB_NOT_TASK_HEADER(14,"没有项目任务分解的表头",true), -// WBS_PROJECT_TIME_ERROR(15,"时间格式异常",true), -// WBS_NOT_PROJECT_TIME(16,"项目时间不能为空",true), -// WBS_NOT_PROJECT_NAME(17,"项目名称不能为空",true), -// WBS_NOT_PROJECT(17,"找不到项目信息",true), -// WBS_NOT_MEMBER_SHEET(18,"未找到项目成员表",true), -// WBS_NOT_PHONE(19,"手机号为空",true), -// WBS_PHONE_ERROR(19,"手机号格式错误",true), -// WBS_STAKEHOLDER_PHONE(20,"奖惩干系人和手机号不匹配",true), -// WBS_STAKEHOLDER_PHONE_NOT_FOUND(20,"请填写奖惩干系人手机号",true), -// WBS_REPEAT_MEMBER_PHONE(21,"成员名或手机号与其他人重复",true), -// WBS_NOT_FIRST_ROLE(22,"系统角色名称错误",true), -// WBS_REPEAT_ROLE_NAME(23,"角色名称重复",true), -// WSB_NOT_MEMBER(24,"未找到对应成员", true), -// WBS_NOT_FIND_ROLE(25,"未找到对应的角色,请检查对谁不可见一列的名字与格式",true), -// WBS_NOT_TASK_NAME(26,"任务名不能为空",true), -// WBS_NOT_FIND_EXECUTOR_ROLE(27,"找不到负责人,请检查负责人的名称",true), -// WBS_NOT_FIND_CHECKER_ROLE(28,"找不到检查人,请检查检查人的名称",true), -// WBS_DELAY_ERROR(29,"任务切换模式填写错误",true), -// WBS_SUB_TASK_ANALYSIS(30,"无法解析此子日程表",true), -// WBS_NOT_SUB_TASK(31,"找不到对应的子表,请检查子表的名字是否正确",true), -// WBS_NOT_PLUGIN_SHEET(32,"未找到插件表",true), -// WBS_NOT_PLUGIN(33,"未找到对应的插件,请确认是否填写正确",true), -// PROJECT_DATE_FORMAT_ERROR(34,"输入的日期格式错误,有效日期格式 例:2019-01-01或2019-01",true), -// TASK_NOT_UPLOAD_DELIVER(35,"交付物未上传,无法完成任务",true), -// NOT_PROJECT(36,"对不起,找不到该项目",true), -// NOT_ROLE(37,"对不起,找不到该角色",true), -// NOT_DELIVER(38,"对不起,找不到对应的交付物",true), -// NOT_TASK(39,"找不到对应的任务",true), -// NOT_DELIVER_FILE(40,"文件信息错误,请重试",true), -// IS_NOT_EXECUTOR(41,"对不起,您不是该任务负责人",true), -// NOT_CHECKER(42,"请选择检查人",true), -// SUB_TASK_IS_NOT_FINISH(43,"分组内任务未全部完成,无法完成任务",true), -// IS_NOT_CHECKER(44,"您不是该交付物的检查人",true), -// NOT_POWER(45,"对不起,您的权限不足,无法进行此操作",true), -// SMS_CODE_CORRECT(46,"请输入正确验证码",true), -// -// QUESTION_RULE_NOT_FOUND(47,"该评测规则未知,请联系开发人员。", true), -// REPORT_DOCTOR_ERROR(48, "对不起,您没有修改报告单结果的权限。", true), -// NOT_LOGIN(49, "对不起,您尚未登录或登录已失效,请重新登录。", true), -// POSITION_NOT_3(50, "对不起,您尚未选择职务,请重新选择。", true), -// -// REPEAT_PROJECT_NAME(51,"项目名不能重复,请修改后重试",true), -// TIME_ERROR_BEGIN(52,"时间异常,开始时间不能大于结束时间",true), -// TIME_ERROR_PROJECT(53,"时间异常,任务的时间不能超出项目的时间",true), -// HAS_GROUP_TIME_CHANGE(54,"分组任务不能直接修改时间,请修改其子任务时间",true), -// DOCTOR_NOT_SUBMIT(55,"尚未进行资格认证",true), -// REPORT_NOT_FOUND(56,"对不起,没有找到您查询的报告单,请确认报告单是否存在。",true), -// PATIENT_NOT_CHOICE(57,"没有选择病人,不进行保存答案。", true), -// -// NOT_GAME_TYPE(58,"对不起,未找到对应的游戏",true), -// SIGNIN_REPEAT(59,"请勿重复签到",true), -// SCORE_REPEAT(60,"您已经评分,请勿重复提交",true), -// NOT_MEMBER(61,"对不起,找不到对应的成员信息",true), -// NOT_GAME_RECORD(62,"对不起,找不到对应的游戏场次",true), -// NOT_JOIN_GAME(63,"您还未加入游戏,请参加游戏后再试",true), -// -// GAME_NO_END(64,"您的上一场游戏尚未结束,请勿重复开启",true), -// GAME_NOT_TIMES(65,"游戏可玩次数不足,请充值后重试",true), -// -// GAME_PENDING(66, "游戏尚未开始,请等待主持人开始", true), -// GAME_PREPARATION(67, "游戏已经开始倒计时了", true), -// GAME_PROCESSING (68, "游戏已经在火热进行啦", true), -// GAME_COMPLETED(69, "抱歉,您来晚了,游戏已结束", true), -// NOT_REGISTER(70,"该手机号尚未注册账号",true), -// PHONE_ERR(71,"请输入正确的手机号",true), -// NOT_SELECT_WX(72,"未查到对应的微信信息",true), -// ALREADY_EXIST_PHONE(73,"手机号已存在",true), -// ALREADY_BINDING_PHONE(74,"您已绑定过手机号,请勿重复绑定",true), -// MERGE_WX_PHONE(75,"该手机号已经注册过账号,是否将账号合并",true), -// ALREADY_EXIST_ACCOUNT(76,"该账号已存在",true), -// NOT_SIGN_FIELD(77,"签到的字段不可用",true), -// ALREADY_SIGN(78,"您已经签到过了,请勿重复签到",true), -// ALREADY_ATTENTION(79,"您已经关注了这个项目",true), -// NOT_EMPLOYEE(80,"未找到成员信息",true), -// NOT_SITE(81,"未找到该场所",true), -// ALREADY_REAL_AUTH(82,"您已经完成认证",true), -// LACK_CONFIG(83,"缺少配置",true), -// ANIMAL_HEAT_ERROR(84,"体温异常,请选择正确的健康状态",true), -// NOT_BUSINESS(85,"未找到商户信息",true), -// SITE_EXCEED(86,"您所添加的场所数量已超出上限,请联系客服提高场所上限",true), -// SITE_NAME_REPETITION(86,"场所名重复",true), -// LOCATION_LONG(87,"对不起,您的距离太远了,请靠近目的地或打开定位后重试。",true), -// NO_IMPORT_DATA(88,"没有有效的数据,请检查您的导入文件。",true), -// FILL_ERROR(89,"您的信息填写有误,请检查您的信息。",true), -// ACCOUNT_BIND(90,"您的帐号已经绑定了,请重新进入小程序。",true), -// RECORDER_NOT(91, "对不起,您不是该信息的录入者,不能修改信息。", true), -// REPORT_HAD_COMPLETED(92, "报告单已经完成,不能再修改答题记录。", true), -// NOT_REAL_AUTH(93,"您尚未填写基本信息,请补全信息后再试。",true), -// HEALTH_TYPE_ERROR(94,"您的健康状态异常,打卡失败。",true), -// NOT_HEALTH_RECORD(95,"您今天还未上报健康信息,请上报后再试。",true), -// SELECT_TIME_ERROR(96,"请输入正确的查询时间",true), -// -// TASK_PREPARATION(97,"任务已经开始了,请勿重复操作",true), -// NOT_COMMENT(98,"该评论不存在",true), -// NOT_MESSAGE_TYPE(99,"找不到消息类型,请检查名称是否正确",true), -// -// NOT_LABEL(100,"标签不存在,请检查后操作",true), -// REPEAT_LABEL(101,"标签已存在,请勿重复添加",true), -// -// NICKNAME_REPEAT(102,"该名字已经存在,请换一个再试",true), -// NEW_PASSWORD_REPEAT_OLD(103,"新密码不能和旧密码相同",true), -// PASSWORD_ERROR(104,"用户名或密码错误",true), -// NOT_ACCOUNT(105,"未找到该账号",true), -// -// FILE_NOT_FOUND(106,"未找到对应的文件,请检查后操作",true), -// SIGNATURE_FAIL(107,"签名验证失败",true), -// -// NOT_UNIT(108,"时间单位不能为空",true), -// NOT_USER(109,"用户不存在",true), -// VERIFICATION_CODE_PAST(110,"验证码失效,请刷新重试",true), -// VERIFICATION_CODE_PAST_IMG(110,"图形验证码失效,请刷新重试",true), -// VERIFICATION_CODE_ERROR(111,"验证码错误",true), -// VERIFICATION_CODE_ERROR_IMG(111,"图形验证码错误",true), -// NOT_ROW(112,"该行不存在",true), -// VOTED(113,"对不起,您已经支持过看好的队伍了",true), -// -// NOT_TOPIC(114,"找不到该题目",true), -// NOT_GROUP(115,"找不到该组信息",true), -// VOTE_COMPLETED(116,"投票已结束",true), -// VOTE_NOT_START(117,"投票未开始",true), -// NOT_CONFIG_OR_ERR(118,"缺少配置信息,或配置信息异常",true), -// GROUP_MEMBER_LIMIT(119,"当前组内人员已满,请选择其他组",true), -// GROUP_NOT_CHOICE(120,"请选择要加入的队伍",true), -// JOINED_TEAM(121,"您已经加入队伍,无需重复加入",true), -// TEAM_MEMBER_MORE(122,"加入队伍的人数已经达到上限,请选择其他队伍",true), -// TEAM_COMPANY_NOT_SAME(123,"对不起,您和团队其他人不是同一个单位的", true), -// TEAM_GROUP_NOT_SAME(124,"对不起,您和团队其他人不是同一个组别的", true), -// BASE_INFO_LACK(125,"请先填写您的基本信息", true), -// JOINED_MORE(126,"该类型比赛您参赛的数目已达上限", true), -// JOINED_SAME(127,"您已经参加同类型的比赛了,不能再重复参加参赛", true), -// PLAYER_INFO_ALREADY(127,"您已经有了报名信息,请不要重复提交", true), -// -// GAME_TIME_DUE(128,"您的游戏已到期,请重新购买", true), -// TEAM_MEMBER_ERROR(129,"参赛人数不符合,请重新填写", true), -// SIGN_UP_TIME_NOT_START(130,"报名未开始", true), -// SIGN_UP_TIME_FINISHED(131,"报名已结束", true), -// -// PROJECT_IMITATION_NO(132,"该项目未开启变身系统", true), -// PROJECT_IMITATION_CODE_ERROR(131,"秘钥错误", true), -// -// DINGDING_EXCEPTION(132,"钉钉接口调用异常。",true), -// URL_ERROR(133, "请求路径转换异常", true), -// -// JOIN_PROJECT_NUM_FULL(134, "可参赛次数已满", true), -// PHOTO_FILE_EXCEED_2M(135, "图片大小不能超过2M", true), -// COACH_NUM_FULL(136,"教练人数已达上限",true), -// LEADER_NUM_FULL(137,"领队人数已达上限",true), -// AUTHORIZATION_AGREE(138,"请阅读并同意安全责任书",true), -// NAME_EMPTY(139,"单位名称不能为空",true), -// PHOTO_IS_EMPTY(140,"请上传证件照",true), -// ID_CARD_ALREADY(141,"此身份证已注册",true), -// NOT_COMPANY(142,"请先填写基础信息",true), -// MT_NOT_GROUP(143,"请选择正确的组别信息",true), -// CONTACTS_NAME_EMPTY(144,"联系人名称不能为空",true), -// MEMBER_NUM_ERROR(145,"参赛人数不满足比赛人数要求",true), -// GENDER_ERROR(146,"请选择正确的性别",true), -// JOIN_AUTH_GROUP(147,"已参加了其他组别,无法再次报名",true), -// ALREADY_JOIN_PROJECT(148,"该选手已经参加了比赛,不可修改身份证组别等信息",true), -// ALREADY_JOIN_PROJECT_DEL(149,"取消报名后可删除",true), -// ALREADY_UPLOAD_VIDEO(150,"您已经上传了视频,请勿重复提交",true), -// ALREADY_UPLOAD_FORM(151,"请勿重复提交信息",true), -// MESSAGEISNULL(152,"数据为空",true), -// QUANTITYERROR(153,"住院号不正确",true), -// NOT_HOSPITAL(154,"未找到医院信息",true), -// ZHUYUANIDCHONGFU(155,"患者研究编号重复",true), -// MEIYOUGAIYISHENG(156,"该医生信息查询不正确",true), -// QINGTIJIAOSHITI(157,"未做出修改答案,修改后再提交",true), -// DOC_REPEAT(158,"输入文档已存在",true), -// DOC_NONE(161,"输入文档不存在",true), -// NOTNAME(159,"未找到该列",true), -// CHONGFU(160,"该成员在项目下有多个成员角色",true), -// CHAOGUOSHI(161,"角色展示不能超过10个",true), -// BAOHANJINLI(162,"不能删除包含经理得角色",true), -// CHONGFUTIJIAO(163,"不要重复提交",true), -// ZUISHAOCHUANLIANGE(164,"排序最少需要传入两个",true), -// HOSPITAL_NOT_FOUND(165,"没有找到医院",true), -// NOT_FOUND_PM(166,"系统角色缺少项目经理",true), -// NOT_FOUND_MEMBER(167,"系统角色缺少项目成员",true), -// NOT_SUPPORT_CYCLE(168,"重复规则文本格式暂不支持",true), -// WBS_TASK_START_TIME_ERROR(168,"任务开始时间格式错误,请检查后操作",true), -// WBS_TASK_END_TIME_ERROR(169,"任务结束时间格式错误,请检查后操作",true), -// CANNOT_DELETE_PM(170,"无法删除项目经理",true), -// LABEL_TOO_LONG(171,"标签长度过长,请不要超过六个字",true), -// WBS_PROJECT_NAME_REPEAT(172,"项目名称不能重复",true), -// DELIVER_REPEAT(173,"交付物已存在",true), -// PARENT_PROJECT_NOT_MATCHING(174,"父任务与项目不匹配",true), -// PM_NOT_MEMBER(175,"项目经理下必须有一个成员",true), -// WisdomCar_NOT_Found(176,"没有找到绑定的平车信息",true), -// WISDOM_CAR_RUNNED(177,"这段时间内平车正在运行,请结束平车运行或重新选择平车",true), -// WISDOM_CAR_IS_EXIST(178,"平车不存在,请检查后操作",true), -// TASK_IS_EXIST(179,"任务不存在,请检查后操作",true), -// PATIENT_PROJECT_REPEAT(180,"已创建该患者的病例,请不要重复操作",true), -// //TALL3 -// PROJECT_REGION_NO_SAME(181,"项目域不同无法进行操作",true), -// NO_POWER(182,"权限不足",true), -// DATA_DECRYPTION(183,"解密失败,数据可能遭受到破坏,操作取消。",true), -// NOT_TEMPLATE(183,"找不到对应的模板信息",true), -// DELETE_PROJECT_ERROR(184,"删除项目失败",true), -// ; -// -// -// public CodeEnum mtMsgPhoto(String msg){ -// this.msg = "请上传"+msg; -// return this; -// } -// public static String mtJoinAuthGroup(String msg){ -// msg = msg+"已参加了其他组别,无法再次报名"; -// return msg; -// } -// public static String mtCertificate(String msg){ -// msg = msg+"未同时报名“30秒单摇跳”和“3分钟单摇跳”"; -// return msg; -// } -// public static String mtCertificateJoin(String msg){ -// msg = msg+"已报名“速度通级赛”无法取消当前项目"; -// return msg; -// } -// public CodeEnum mtProjectMsg(String msg){ -// this.msg = msg+"项目参赛次数已满"; -// return this; -// } -// public CodeEnum mtProjectMsg1(String msg){ -// this.msg = msg+"报名人数已满"; -// return this; -// } -// -// -// public CodeEnum addMsg(String msg){ -// if(this.msg.contains("错误:")){ -// this.msg = this.msg.substring(this.msg.indexOf("错误:") + 3); -// } -// this.msg = msg+"--错误:"+this.msg; -// return this; -// } -// -// -// public CodeEnum addMsg(String sheetName,Integer rowNum){ -// if(this.msg.contains("错误:")){ -// this.msg = this.msg.substring(this.msg.indexOf("错误:") + 3); -// } -// this.msg = sheetName+"第"+rowNum+"行--错误:"+this.msg; -// return this; -// } -// public CodeEnum addMsg(String sheetName,Integer rowNum,String value){ -// if(this.msg.contains("错误:")){ -// this.msg = this.msg.substring(this.msg.indexOf("错误:") + 3); -// } -// this.msg = sheetName+"第"+rowNum+"行["+value+"]--错误:"+this.msg; -// return this; -// } -// -// -// -// public CodeEnum addMsgAndMemberName(String msg,String memberName){ -// this.msg = msg+"行:成员["+memberName+"]"+this.msg; -// return this; -// } -// public CodeEnum addMsgAndNoLookName(String msg,String noLookName){ -// this.msg = msg+"行:对谁不可见成员["+noLookName+"]"+this.msg; -// return this; -// } -// -// -// public CodeEnum addMsgLwb(String msg) { -// this.msg = "未找到名为“"+msg+"”的列,请检查列名称是否正确"; -// return this; -// } -// public static CodeEnum getByCode(int code) { -// for (CodeEnum codeEnum: CodeEnum.values()) { -// if (codeEnum.getCode() == code) { -// return codeEnum; -// } -// } -// return null; -// } -// -// private CodeEnum(Integer code, String msg, boolean success) { -// this.code = code; -// this.msg = msg; -// this.success = success; -// } -// private Integer code; -// private String msg; -// private boolean success; -// -// public void setMsg(String msg) { -// this.msg = msg; -// } -//} -// diff --git a/src/main/java/com/ccsens/ptos_zero/util/CodeError.java b/src/main/java/com/ccsens/ptos_zero/util/CodeError.java deleted file mode 100644 index 35904f3..0000000 --- a/src/main/java/com/ccsens/ptos_zero/util/CodeError.java +++ /dev/null @@ -1,54 +0,0 @@ -//package com.ccsens.ptos_zero.util; -// -//import lombok.Getter; -// -///** -// * @author 逗 -// */ -//public class CodeError { -// -// public static final Code SUCCESS = new Code(200, "ok", true); -// public static final Code SYS_ERROR = new Code(500, "网络繁忙,请您稍后重试", false); -// public static final Code THIRD_ERROR = new Code(-1, "调用第三方刚接口异常", false); -// public static final Code PARAM_ERROR = new Code(1, "参数异常", false); -// public static final Code PARAM_LOCK = new Code(2, "必填参数为空", false); -// -// @Getter -// public static class Code{ -// private Integer code; -// private String msg; -// private boolean success; -// -// public Code(Integer code, String msg, boolean success) { -// this.code = code; -// this.msg = msg; -// this.success = success; -// } -// -// -// public Code addMsg(String msg){ -// if(this.msg.contains("错误:")){ -// this.msg = this.msg.substring(this.msg.indexOf("错误:") + 3); -// } -// this.msg = msg+"--错误:"+this.msg; -// return this; -// } -// -// public Code addMsg(String sheetName,Integer rowNum){ -// if(this.msg.contains("错误:")){ -// this.msg = this.msg.substring(this.msg.indexOf("错误:") + 3); -// } -// this.msg = sheetName+"第"+rowNum+"行--错误:"+this.msg; -// return this; -// } -// -// public Code addMsg(String sheetName,Integer rowNum,String value){ -// if(this.msg.contains("错误:")){ -// this.msg = this.msg.substring(this.msg.indexOf("错误:") + 3); -// } -// this.msg = sheetName+"第"+rowNum+"行["+value+"]--错误:"+this.msg; -// return this; -// } -// } -// -//} diff --git a/src/main/java/com/ccsens/ptos_zero/util/Constant.java b/src/main/java/com/ccsens/ptos_zero/util/Constant.java index eec7494..fb004ba 100644 --- a/src/main/java/com/ccsens/ptos_zero/util/Constant.java +++ b/src/main/java/com/ccsens/ptos_zero/util/Constant.java @@ -9,12 +9,18 @@ import java.util.Map; */ public class Constant { + /**服务code*/ + public static String BUSINESS_CODE = "ZERO"; /**零号项目Id*/ - public static Long ZERO_PROJECT_ID = 1485932638408675328L; + public static Long ZERO_PROJECT_ID = 1486942101999587328L; /**引导页任务名*/ public static String ZERO_GUIDE = "引导页"; /**广告页任务名*/ public static String ZERO_ADVERTISING = "广告页"; + /**appId*/ + public static String APP_ID = "appId"; + /**secret*/ + public static String APP_SECRET = "secret"; public static Map timeUnit = new HashMap<>(); public static Map timeFormat = new HashMap<>(); diff --git a/src/main/java/com/ccsens/ptos_zero/util/JsonResponse.java b/src/main/java/com/ccsens/ptos_zero/util/JsonResponse.java deleted file mode 100644 index 75fe40c..0000000 --- a/src/main/java/com/ccsens/ptos_zero/util/JsonResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -//package com.ccsens.ptos_zero.util; -// -//import com.ccsens.util.CodeEnum; -//import com.ccsens.util.CodeError; -//import io.swagger.annotations.ApiModel; -//import io.swagger.annotations.ApiModelProperty; -//import lombok.Data; -// -//@Data -//@ApiModel -//public class JsonResponse { -// -// /** -// * Common Error Constant -// */ -// public static class RegularError { -// public static final int ERRCODE_SUCCESS = 200; -// public static final String ERRCODE_SUCCESS_PHASE = "ok"; -// public static final int ERRCODE_FAIL = -1; -// public static final String ERRCODE_FAIL_PHASE = "error"; -// } -// -// /** -// * Jwt Error Constant -// */ -// public static class TokenError{ -// public static final int TOKEN_ERRCODE_OK = JwtUtil.JwtError.TOKEN_ERRCODE_OK; -// public static final String TOKEN_ERRCODE_OK_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_OK_PHASE; -// public static final int TOKEN_ERRCODE_NOTFOUND = JwtUtil.JwtError.TOKEN_ERRCODE_NOTFOUND; -// public static final String TOKEN_ERRCODE_NOTFOUND_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_NOTFOUND_PHASE; -// public static final int TOKEN_ERRCODE_SIGNATURE_INVALIDATE = JwtUtil.JwtError.TOKEN_ERRCODE_SIGNATURE_INVALIDATE; -// public static final String TOKEN_ERRCODE_SIGNATURE_INVALIDATE_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_SIGNATURE_INVALIDATE_PHASE; -// public static final int TOKEN_ERRCODE_EXPIRE = JwtUtil.JwtError.TOKEN_ERRCODE_EXPIRE; -// public static final String TOKEN_ERRCODE_EXPIRE_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_EXPIRE_PHASE; -// public static final int TOKEN_ERRCODE_STUB_NOT_FOUND = JwtUtil.JwtError.TOKEN_ERRCODE_STUB_NOT_FOUND; -// public static final String TOKEN_ERRCODE_STUB_NOT_FOUND_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_STUB_NOT_FOUND_PHASE; -// public static final int TOKEN_ERRCODE_USER_DISABLED = JwtUtil.JwtError.TOKEN_ERRCODE_USER_DISABLED; -// public static final String TOKEN_ERRCODE_USER_DISABLED_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_USER_DISABLED_PHASE; -// public static final int TOKEN_ERRCODE_FAILED = JwtUtil.JwtError.TOKEN_ERRCODE_FAILED; -// public static final String TOKEN_ERRCODE_FAILED_PHASE = JwtUtil.JwtError.TOKEN_ERRCODE_FAILED_PHASE; -// } -// -// @ApiModelProperty(value="状态码") -// private Integer code; -// @ApiModelProperty(value="数据") -// private T data; -// @ApiModelProperty(value="消息") -// private String msg; -// @ApiModelProperty(value="成功与否") -// private boolean success; -// @ApiModelProperty(value = "md5校验状态 0:未校验 1:校验一致 2:校验不一致") -// private byte md5Status = 0; -// @ApiModelProperty(value = "token信息") -// private TokenObj tokenObj = new TokenObj(); -// -// public void setTokenObj(String token, String refreshToken) { -// this.tokenObj.setToken(token); -// this.tokenObj.setRefreshToken(refreshToken); -// } -// -// @Data -// @ApiModel("token信息") -// public static class TokenObj{ -// @ApiModelProperty(value = "token") -// private String token; -// @ApiModelProperty(value = "refreshToken") -// private String refreshToken; -// -//// public TokenObj(String token, String refreshToken) { -//// this.token = token; -//// this.refreshToken = refreshToken; -//// } -// -//// public TokenObj() { -//// } -// } -// -// public static class MD5Status{ -// public final static byte UNCHECK = 0; -// public final static byte CHECK_SAME_YES = 1; -// public final static byte CHECK_SAME_NO = 2; -// } -// -// private JsonResponse() { -// } -// -// public static JsonResponse newInstance(){ -// return new JsonResponse(); -// } -//// public static JsonResponse newInstance(Class T){ -//// return new JsonResponse(); -//// } -// -// -// -// public JsonResponse ok(){ -// this.code = CodeEnum.SUCCESS.getCode(); -// this.msg = CodeEnum.SUCCESS.getMsg(); -// this.success = CodeEnum.SUCCESS.isSuccess(); -// return this; -// } -// -// public JsonResponse ok(T data, String token, String refreshToken){ -// ok(); -// this.data = data; -// this.tokenObj.token = token; -// this.tokenObj.refreshToken = refreshToken; -// return this; -// } -// -// public JsonResponse ok(T data){ -// ok(); -// this.data = data; -// return this; -// } -// -// public JsonResponse ok(CodeEnum codeEnum){ -// this.code = codeEnum.getCode(); -// this.msg = codeEnum.getMsg(); -// this.success = codeEnum.isSuccess(); -// return this; -// } -// -// public JsonResponse ok(CodeEnum codeEnum, T data){ -// this.code = codeEnum.getCode(); -// this.msg = codeEnum.getMsg(); -// this.success = codeEnum.isSuccess(); -// this.data = data; -// return this; -// } -// -// public JsonResponse ok(CodeError.Code code){ -// this.code = code.getCode(); -// this.msg = code.getMsg(); -// this.success = code.isSuccess(); -// return this; -// } -// -// public JsonResponse fail(){ -// this.code = RegularError.ERRCODE_FAIL; -// this.msg = RegularError.ERRCODE_FAIL_PHASE; -// this.success = false; -// return this; -// } -// -// public JsonResponse fail(String error){ -// fail(); -// this.msg = error; -// return this; -// } -// -// public JsonResponse fail(int code){ -// fail(); -// this.code = code; -// return this; -// } -// -// public JsonResponse fail(int code, String error){ -// fail(); -// this.code = code; -// this.msg = error; -// return this; -// } -// -// public JsonResponse fail(int code, String error, T obj){ -// fail(); -// this.code = code; -// this.msg = error; -// this.data = obj; -// return this; -// } -// -// //Token null -// public JsonResponse tokenNotFound(){ -// fail(TokenError.TOKEN_ERRCODE_NOTFOUND, TokenError.TOKEN_ERRCODE_NOTFOUND_PHASE); -// return this; -// } -// -// //Token expire -// public JsonResponse tokenExpire(){ -// fail(TokenError.TOKEN_ERRCODE_EXPIRE, TokenError.TOKEN_ERRCODE_EXPIRE_PHASE); -// return this; -// } -// public JsonResponse tokenExpire(String phase){ -// fail(TokenError.TOKEN_ERRCODE_EXPIRE,phase); -// return this; -// } -// -// public JsonResponse tokenSignatureFail(){ -// fail(TokenError.TOKEN_ERRCODE_SIGNATURE_INVALIDATE, TokenError.TOKEN_ERRCODE_SIGNATURE_INVALIDATE_PHASE); -// return this; -// } -// public JsonResponse tokenSignatureFail(String phase){ -// fail(TokenError.TOKEN_ERRCODE_SIGNATURE_INVALIDATE,phase); -// return this; -// } -// -// //Token Stub Not Found -// public JsonResponse tokenStubNotFound(){ -// fail(TokenError.TOKEN_ERRCODE_STUB_NOT_FOUND, TokenError.TOKEN_ERRCODE_STUB_NOT_FOUND_PHASE); -// return this; -// } -// public JsonResponse tokenDisabled(String phase){ -// fail(TokenError.TOKEN_ERRCODE_STUB_NOT_FOUND,phase); -// return this; -// } -// -// //User Disabled -// public JsonResponse userDisabled(){ -// fail(TokenError.TOKEN_ERRCODE_USER_DISABLED, TokenError.TOKEN_ERRCODE_USER_DISABLED_PHASE); -// return this; -// } -// public JsonResponse userDisabled(String phase){ -// fail(TokenError.TOKEN_ERRCODE_USER_DISABLED,phase); -// return this; -// } -// -// //Token Failed -// public JsonResponse tokenFailed(){ -// fail(TokenError.TOKEN_ERRCODE_FAILED, TokenError.TOKEN_ERRCODE_FAILED_PHASE); -// return this; -// } -// public JsonResponse tokenFailed(String phase){ -// fail(TokenError.TOKEN_ERRCODE_FAILED,phase); -// return this; -// } -//} diff --git a/src/main/java/com/ccsens/ptos_zero/util/JwtUtil.java b/src/main/java/com/ccsens/ptos_zero/util/JwtUtil.java deleted file mode 100644 index f2cdc7e..0000000 --- a/src/main/java/com/ccsens/ptos_zero/util/JwtUtil.java +++ /dev/null @@ -1,125 +0,0 @@ -//package com.ccsens.ptos_zero.util; -// -//import cn.hutool.core.codec.Base64; -//import cn.hutool.core.util.StrUtil; -//import io.jsonwebtoken.*; -//import lombok.extern.slf4j.Slf4j; -// -//import javax.crypto.SecretKey; -//import javax.crypto.spec.SecretKeySpec; -//import java.security.SignatureException; -//import java.util.Date; -//import java.util.Map; -//import java.util.Set; -// -///** -// * @Author: __zHangSan -// * @Description: -// * @Date: Created in 17:40 2018/2/1 -// */ -//@Slf4j -//public class JwtUtil { -// /** -// * Jwt Error Constant -// */ -// public static class JwtError{ -// public static final int TOKEN_ERRCODE_OK = 200; -// public static final String TOKEN_ERRCODE_OK_PHASE = "Token ok."; -// public static final int TOKEN_ERRCODE_NOTFOUND = 401; -// public static final String TOKEN_ERRCODE_NOTFOUND_PHASE = "Missing or invalid Authorization header."; -// public static final int TOKEN_ERRCODE_SIGNATURE_INVALIDATE = 400; -// public static final String TOKEN_ERRCODE_SIGNATURE_INVALIDATE_PHASE = "Token signature encoding error."; -// public static final int TOKEN_ERRCODE_EXPIRE = 402; -// public static final String TOKEN_ERRCODE_EXPIRE_PHASE = "Token Expire."; -// public static final int TOKEN_ERRCODE_STUB_NOT_FOUND = 403; -// public static final String TOKEN_ERRCODE_STUB_NOT_FOUND_PHASE = "Token stub not found."; -// public static final int TOKEN_ERRCODE_USER_DISABLED = 405; -// public static final String TOKEN_ERRCODE_USER_DISABLED_PHASE = "User disabled,Please concact the System Administrator."; -// public static final int TOKEN_ERRCODE_FAILED = 406; -// public static final String TOKEN_ERRCODE_FAILED_PHASE = "Token failed."; -// } -// -// public static SecretKey generalKey(String secret) { -// byte[] encodedKey = Base64.decode(secret); -// SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES"); -// return key; -// } -// -// /** -// * 签发JWT -// * -// * @param subject -// * @param ttlMillis -// * @return -// * @throws Exception -// */ -// public static String createJWT(String subject, Map extraClaimMap, long ttlMillis,String secret) { -// SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; -// long nowMillis = System.currentTimeMillis(); -// Date now = new Date(nowMillis); -// SecretKey secretKey = generalKey(secret); -// JwtBuilder builder = Jwts.builder() -// .setIssuedAt(now) -// .signWith(signatureAlgorithm, secretKey); -// if(!StrUtil.isEmpty(subject)) { -// builder.setSubject(subject); -// } -// if(extraClaimMap != null){ -// Set> entrys = extraClaimMap.entrySet(); -// for(Map.Entry entry:entrys){ -// builder.claim(entry.getKey(),entry.getValue()); -// } -// } -// if (ttlMillis >= 0) { -// long expMillis = nowMillis + ttlMillis; -// Date expDate = new Date(expMillis); -// builder.setExpiration(expDate); -// } -// return builder.compact(); -// } -// -// /** -// * 签发JWT -// * -// * @param ttlMillis -// * @return -// * @throws Exception -// */ -// public static String createJWT(Claims claims, long ttlMillis, String secret) { -// SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; -// long nowMillis = System.currentTimeMillis(); -// Date now = new Date(nowMillis); -// SecretKey secretKey = generalKey(secret); -// JwtBuilder builder = Jwts.builder() -// .setClaims(claims) -// .setIssuedAt(now) -// .signWith(signatureAlgorithm, secretKey); -// if (ttlMillis >= 0) { -// long expMillis = nowMillis + ttlMillis; -// Date expDate = new Date(expMillis); -// builder.setExpiration(expDate); -// } -// return builder.compact(); -// } -// -// /** -// * 解析JWT字符串 -// * -// * @param jwt -// * @return -// * @throws Exception -// */ -// public static Claims parseJWT(String jwt, String secret)throws ExpiredJwtException,SignatureException,Exception{ -// SecretKey secretKey = generalKey(secret); -// log.info("JWT解析token:{},,,{}",jwt,secretKey); -// return Jwts.parser() -// .setSigningKey(secretKey) -// .parseClaimsJws(jwt) -// .getBody(); -// } -// -// public static void main(String[] args) throws Exception { -// String a = "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDczMDY4ODYsInN1YiI6IjEyMTc2NTEzNTQ5MTk2MzY5OTIiLCJhdXRoSWQiOiIxMTc3Mzk0MTQ5NzIxMjQ3NzQ0IiwiZXhwIjoxNjA3MzkzMjg2fQ.HSwJca28I2sddgyYf2dzNtn5M-mrPcVmbzvjn9dGZvE"; -// parseJWT(a,WebConstant.JWT_ACCESS_TOKEN_SECERT); -// } -//} diff --git a/src/main/java/com/ccsens/ptos_zero/util/MyPropertySourceFactory.java b/src/main/java/com/ccsens/ptos_zero/util/MyPropertySourceFactory.java deleted file mode 100644 index 603032e..0000000 --- a/src/main/java/com/ccsens/ptos_zero/util/MyPropertySourceFactory.java +++ /dev/null @@ -1,24 +0,0 @@ -//package com.ccsens.ptos_zero.util; -// -//import org.springframework.boot.env.YamlPropertySourceLoader; -//import org.springframework.core.env.PropertySource; -//import org.springframework.core.io.support.EncodedResource; -//import org.springframework.core.io.support.PropertySourceFactory; -// -//import java.io.IOException; -// -///** -// * @description: -// * @author: wuHuiJuan -// * @create: 2019/12/02 10:35 -// */ -//public class MyPropertySourceFactory implements PropertySourceFactory { -// public MyPropertySourceFactory() { -// super(); -// } -// -// @Override -// public PropertySource createPropertySource(String name, EncodedResource encodedResource) throws IOException { -// return new YamlPropertySourceLoader().load(name, encodedResource.getResource()).get(0); -// } -//} diff --git a/src/main/java/com/ccsens/ptos_zero/util/WebConstant.java b/src/main/java/com/ccsens/ptos_zero/util/WebConstant.java deleted file mode 100644 index 8cdf1fd..0000000 --- a/src/main/java/com/ccsens/ptos_zero/util/WebConstant.java +++ /dev/null @@ -1,1086 +0,0 @@ -//package com.ccsens.ptos_zero.util; -// -//import cn.hutool.core.codec.Base64; -//import cn.hutool.core.util.URLUtil; -//import lombok.Getter; -//import lombok.Setter; -// -//import java.io.File; -// -//public class WebConstant { -// -// /**cell内容不赋值*/ -// public static final String CELL_NULL = "cell_null"; -// /**数据存在*/ -// public static final byte STATUS_EXIT = 0; -// /**数据已删除*/ -// public static final byte STATUS_DELETE = 1; -// public static final String IMG_TYPE = "bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,jpeg"; -// /**手机号正则*/ -//// public static final String REGEX_PHONE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,1-9]))\\d{8}$"; -// public static final String REGEX_PHONE = "^[1]([3-9])[0-9]{9}$"; -// -// /* 导入WBS ,规定标签长度 */ -// public static final Integer LABEL_LENGTH = 6; -// -// public static class Time { -// public static final long DAY = 24 * 3600 * 1000; -// } -// -// /**属性名*/ -// public static class Field{ -// public static final String CODE = "code"; -// -// } -// -// -// public static class Wx{ -// public static final String ACCESS_TOKEN = "tall_wx_access_token_"; -// public static final long EXPIRE_TIME = 1 * 60 * 60; -// public static final String DOMAIN = ZeroPropUtil.wxPrefix; -// public static final String TEMPLATE_SEND = DOMAIN + "template/send"; -// -// public static final String GZH_AUTH_URL -// = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%1$s&redirect_uri=%2$s&response_type=code&scope=%3$s&state=STATE#wechat_redirect"; -// public static final String ACCOUNT_WX_APPID = "account_wx_appId"; -// -// public static String getAuthedUrl(String url, WxGzhAuthType wxGzhAuthType,String appId){ -// return String.format(GZH_AUTH_URL,appId, URLUtil.encode(url),wxGzhAuthType.getText()); -// } -// -// public static final String SESSION_KEY = "{}_{}_session_key"; -// public static final String OPEN_KEY = "{}_{}_openid_key"; -// -// } -// -// public enum WxGzhAuthType { -// //基本授权类型,静默,只能获取openId -// SNSAPI_BASE("snsapi_base"), -// //信息授权类型,弹出提示框,可以获取openId,unionId,nickanme,city等用户信息 -// SNSAPI_USERINFO("snsapi_userinfo"); -// -// @Getter -// @Setter -// private String text; -// -// private WxGzhAuthType(String text){ -// this.text = text; -// } -// } -// -// public static enum TemplateParam { -// -// Operator("{{operator}}", "操作者"), -// ProjectName("{{projectName}}", "项目名"), -// TaskName("{{taskName}}", "任务名"), -// Deliverable("{{deliverable}}", "交付物"), -// Operate("{{operate}}", "操作"), -// Principal("{{principal}}", "负责人"), -// RoleName("{{roleName}}", "角色名"), -// MemberName("{{memberName}}", "成员名"), -// ; -// -// public String value; -// public String phase; -// -// private TemplateParam(String value, String phase) { -// this.value = value; -// this.phase = phase; -// } -// } -// -// public static final class Wps{ -//// public static final String APPID = "09d77d2eb919438e8ae4f2a9ec6ec8dd"; -//// public static final String APPKEY = "1b52d9ef8b1c4019be49f211b84c4f90"; -// public static final String APPID = "wps_tall_appId"; -// public static final String APPKEY = "wps_tall_appKey"; -// public static final String PERMISSION_READ = "read"; -// public static final String PERMISSION_WRITE = "write"; -// public static final String FILE_TYPE_ALL = "doc, dot, wps, wpt, docx, dotx, docm, dotm, xls, xlt, et, xlsx, xltx, csv, xlsm, xltm, ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps, pdf"; -// public static final String FILE_TYPE_WORD = "doc, dot, wps, wpt, docx, dotx, docm, dotm"; -// public static final String FILE_TYPE_TABLE = "xls, xlt, et, xlsx, xltx, csv, xlsm, xltm"; -// public static final String FILE_TYPE_DEMO = " ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps"; -// public static final String FILE_TYPE_PDF = "pdf"; -// public static final String _W_URL = "_w_url"; -// -// -// /**新建*/ -// public static final byte USER_OPERATION_NEW = 0; -// /**读权限*/ -// public static final byte USER_OPERATION_READ = 1; -// /**写权限*/ -// public static final byte USER_OPERATION_WRITE = 2; -// /**编辑保存*/ -// public static final byte USER_OPERATION_SAVE = 3; -// /**打开旧版本号*/ -// public static final byte USER_OPERATION_OLD = 4; -// /**重命名*/ -// public static final byte USER_OPERATION_RENAME = 5; -// -// /**业务权限:只读*/ -// public static final byte PROJECT_PRIVILEGE_READ = 0; -// /**业务权限:可写*/ -// public static final byte PROJECT_PRIVILEGE_WRITE = 1; -// /**业务权限:查询接口决定*/ -// public static final byte PROJECT_PRIVILEGE_QUERY = 2; -// -// /** -// * 获取文件类型 -// * @param suffix -// * @return -// */ -// public static String getFileType(String suffix) { -// if (FILE_TYPE_WORD.contains(suffix)) { -// return "w"; -// }else if (FILE_TYPE_TABLE.contains(suffix)) { -// return "s"; -// } else if (FILE_TYPE_DEMO.contains(suffix)) { -// return "p"; -// } else if (FILE_TYPE_PDF.contains(suffix)) { -// return "f"; -// } -// return null; -// } -// -// } -// -// public static final class Message{ -// public static final byte TYPE_TEXT = 0; -// public static final byte TYPE_LINK = 1; -// public static final byte SEND_WS = 0; -// public static final byte SEND_WX_OFFICIAL = 1; -// public static final byte SEND_SUCCESS = 1; -// public static final byte SEND_FAIL = 0; -// } -// -// public static final class Project{ -// public static final String PROJECT_ID = "projectId"; -// public static final byte TASK_COMPLETE_YES = 2; -// -// -// public static final String getTaskCompleteStatus(byte completedStatus) { -// return completedStatus == WebConstant.Project.TASK_COMPLETE_YES ? "完成" : "取消完成"; -// } -// } -// -// -// /**注册来源*/ -// public static final class Regist { -// public final static byte SOURCE = 0; -// public final static byte SOURCE_HT = 1; -// public final static String PASSWORD = "123456"; -// } -// -// public enum APP_SCENE { -// BTPRO(0,"btpro"), MTPRO(1,"mtpro"),PTPRO(2,"ptpro"); -// -// public int value; -// public String phase; -// APP_SCENE(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// public static final APP_SCENE CURRENT_APP_SCENE = APP_SCENE.BTPRO; -// public static final String DYNAMIC_DATASOURCE_SCHEMA_KEY = "${schema}"; -// public static final String JWT_ACCESS_TOKEN_SECERT = Base64.encode("v%R5jNdmouCN?"); -// public static final String JWT_REFRESH_TOKEN_SECRET = Base64.encode("GPYTu,tHA\"|/~"); -// -// public static final String PARAMETER_KEY_TOKEN = "token"; -// public static final String PARAMETER_KEY_TOKEN_AUTH_ID = "authId"; -// public static final String HEADER_KEY_TOKEN = "Authorization"; -// public static final String HEADER_KEY_MD5 = "md5"; -// public static final String HEADER_KEY_TOKEN_PREFIX = "Bearer "; -// public static final String REQUEST_KEY_CLAIMS = "claims"; -// public static final String REQUEST_KEY_TOKEN_USERS = "Token_User"; -// public static final String RANDOM_STR = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -// public static final String IMAGE_CODE = "image_code_"; -// -// -// public static final long JWT_ACCESS_TOKEN_EXPIRED_TLLMILLS = 3600 * 24 * 365 * 1000; //20 hours -// public static final long JWT_REFRESH_TOKEN_EXPIRED_TLLMILLS = 3600 * 17 * 30 * 1000; //17 days -// public static final long JWT_ACCESS_TOKEN_EXPIRED_TLLMILLS_TEST = 3600 * 24 * 365 * 1000; //2 hours -// -// public static final String IMG_PATH_PREFIX = "/home/ptpro/images"; -// public static final String IMG_PATH_PREFIX_AVATAR = IMG_PATH_PREFIX + File.separator + "avatar"; -// public static final String IMG_PATH_PREFIX_SHARE_QR = IMG_PATH_PREFIX + File.separator + "qrcode"; -// public static final String IMG_PATH_PREFIX_SHARE_IMG = IMG_PATH_PREFIX + File.separator + "shareimg"; -// public static final String IMG_PATH_SHARE_IMG = "/shareimg"; -// -// -// public static final String PATH_WX_CRET = "/home/packet/1513955071_20181128_cert.p12"; -// //public static final String WX_CRET_PWD = xxx; -// -// public static final String DEFAULT_NICKNAME = "普通用户"; -// public static final String DEFAULT_DESCRIPTION = "这个人很懒,什么都没有留下"; -// public static final String DEFAULT_AVATAR = ""; -// -// public static final String KEY_WEBSOCKET_GROUPID = "WebScoket_groupId"; -// public static final String PREFIX_WEBSOCKET_GROUPID = "groupId="; -// -// public static final String UPLOAD_PATH_BASE = "/home/cloud/tall/uploads"; -// public static final String UPLOAD_PATH_BASE_HEALTH = "/home/cloud/health/uploads"; -// public static final String UPLOAD_PATH_BASE_PIMS = "/home/cloud/pims/uploads"; -// public static final String UPLOAD_PATH_BASE_MT_JUDGE = "mt"; -// public static final String UPLOAD_PATH_BASE_WBS = "wbs"; -// public static final String HOME_STATICREC = "/home/staticrec/"; -// -// public static final String UPLOAD_PATH_DELIVER = UPLOAD_PATH_BASE + File.separator + "delivers"; -// public static final String UPLOAD_PATH_DELIVER1 ="delivers"; -// public static final String UPLOAD_PATH_PROJECT ="project"; -// -// public static final String UPLOAD_PATH_WPS ="wps"; -// public static final String UPLOAD_PATH_AVATAR_URL ="avatarUrl"; -// public static final String UPLOAD_PATH_REMARK ="remarks"; -// public static final String UPLOAD_PROJECT_WBS = UPLOAD_PATH_BASE + File.separator + "project"; -// public static final String UPLOAD_AVATAR_URL = UPLOAD_PATH_BASE + File.separator + "avatarUrl/"; -//// public static final String URL_BASE = "https://api.ccsens.com/ptpro/uploads/"; -// -// public static final String TEST_URL = "https://test.tall.wiki/"; -// public static final String TEST_URL_GAME_SQ = "game-dev/"; -// public static final String TEST_URL_GAME_SP = "game-sp/"; -// public static final String TEST_URL_GAME_BH = "game-bh/"; -// public static final String TALL_UPLOADS = "tall/v1.0/uploads/"; -// public static final String TEST_URL_BASE = TEST_URL + "gateway/" + TALL_UPLOADS; -// -// public static final String TEST_URL_BASE_MT = TEST_URL + "gateway/mt/uploads/"; -// public static final String TEST_URL_BASE_HEALTH = TEST_URL + "gateway/health/uploads/"; -// public static final String TEST_URL_BASE_CT = TEST_URL + "gateway/ct/uploads/"; -// -// public static final String QRCODE_HEALTH = "pages/user-code/user-code"; -// public static final String QRCODE_SITE = "pages/sign/sign"; -// public static final String QRCODE_GAME = "pages/index/index"; -// -// public static final Integer Expired_Verify_Code_In_Seconds = 120; -// public static final Integer Exist_Verify_Code_In_Seconds = 60; -// -// public static final String NOTUPLOAD = "未上传"; -// public static final String UPLOAD = "已上传"; -// -// public enum ROLE_NAME { -// God("God","上帝"),ManageRepresent("ManageRepresent","管代"),Stakeholder("Stakeholder","干系人"), -// PM("PM","项目经理"),Member("Member","项目成员"),MVP("MVP","MVP") -// ,Attention("Attention","关注者"),Creator("Creator","创建者") -// ,MoneyStakeholder("MoneyStakeholder","奖惩干系人"),AllMember("AllMember","全体成员") -// ,ProjectVirtualRole("ProjectVirtualRole","角色项目"); -// -// public String value; -// public String phase; -// ROLE_NAME(String value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// public enum ROLE_POWER { -// NOT_POWER((byte) 0,"只能查看"), LOOK_POWER((byte) 1,"只能查看"), -// OPERATION_POWER((byte) 2,"操作权限"),ADMIN_POWER((byte)3,"管理权限"),MAX_POWER((byte)4,"最高权限"); -// -// public byte value; -// public String phase; -// ROLE_POWER(byte value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// -// public enum TASK_VIRTUAL { -// Normal(0,"普通任务"), Virtual(1,"虚拟任务"); -// public int value; -// public String phase; -// TASK_VIRTUAL(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// public enum TASK_DELAY { -// SelfMotion(0,"立即切换"),DelayManual(1,"延迟自动切换"), Manual(2,"手动切换"); -// public int value; -// public String phase; -// TASK_DELAY(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// public static TASK_DELAY valueOf(int value) { -// switch (value) { -// case 0: return SelfMotion; -// case 1: return DelayManual; -// case 2: return Manual; -// default: return null; -// } -// } -// -// } -// public enum TASK_LEVEL { -// Virtual(0,"虚拟任务"),FirstTask(1,"一级任务"),SecondTask(2,"二级任务"), SubTask(3,"子任务"); -// public int value; -// public String phase; -// TASK_LEVEL(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// public enum REC_STATUS { -// Normal((byte) 0,"正常"), Disabled((byte) 1,"已禁用"),Deleted((byte) 2,"已删除"); -// -// public byte value; -// public String phase; -// REC_STATUS(byte value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// -// -// public enum CLIENT_TYPE { -// Wxmp(0,"微信小程序"), H5(1,"网页"),Android(2 -// ,"安卓客户端"),IOS(3,"苹果客户端"), -// WxEnterprise(4, "企业微信"); -// -// public int value; -// public String phase; -// CLIENT_TYPE(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// -// public static CLIENT_TYPE valueOf(int value) { -// switch (value) { -// case 0: return Wxmp; -// case 1: return H5; -// case 2: return Android; -// case 3: return IOS; -// case 4: return WxEnterprise; -// default: return null; -// } -// } -// } -// -// public enum IDENTIFY_TYPE { -// Wxmp(0,"微信小程序"), Phone(1,"电话") -// , Email(2,"Email"), Account(3,"账号") -// ,OAUTH2_Wx(4,"微信公众号网页授权登录"),Wx_H5(5,"网页微信登陆") -// ,OAUTH2_WeiBo(6,"微博"),WxEnterprise(7, "企业微信"), -// OFFICIAL_ACCOUNT_WX(9,"微信公众号登录"),Wx_H5_TEST(10,"网页微信登陆测试"); -// // 钉钉是11 -// -// public int value; -// public String phase; -// IDENTIFY_TYPE(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// -// public static IDENTIFY_TYPE valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Wxmp; -// case 1: return Phone; -// case 2: return Email; -// case 3: return Account; -// case 4: return OAUTH2_Wx; -// case 5: return Wx_H5; -// case 6: return OAUTH2_WeiBo; -// case 7: return WxEnterprise; -// default: return null; -// } -// } -// } -// -// -// public enum EVENT_PROCESS { -// Pending(0,"未开始"), Processing(1,"进行中"), Expired(2,"已完成"); -// -// public int value; -// public String phase; -// EVENT_PROCESS(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// -// public static EVENT_PROCESS valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Pending; -// case 1: return Processing; -// case 2: return Expired; -// default: return null; -// } -// } -// } -// public enum NODE_USER_ROLE_TYPE { -// Add(0,"添加"),Delete(1,"删除"); -// -// public int value; -// public String phase; -// NODE_USER_ROLE_TYPE(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// -// public static NODE_USER_ROLE_TYPE valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Add; -// case 1: return Delete; -// default: return null; -// } -// } -// } -// -// public enum Role { -// Tourist(-1,"游客"),Creator(0,"创建者"), Judger(1,"评委"), Player(2,"选手"),Host(3,"主持人"),Audience(4,"观众"); -// -// public int value; -// public String phase; -// Role(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// -// public enum PARTI_DEVICE_TYPE { -// Wxmp(0,"微信小程序"), H5(1,"H5"), App(2,"App"); -// -// public int value; -// public String phase; -// PARTI_DEVICE_TYPE(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// public static PARTI_DEVICE_TYPE valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Wxmp; -// case 1: return H5; -// case 2: return App; -// default: return null; -// } -// } -// } -// -// public enum PARTI_LOGIN_STATUS { -// SUCCESS(0,"登陆成功"), ToStep2(1,"进入下一步"); -// -// public int value; -// public String phase; -// PARTI_LOGIN_STATUS(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// -// public enum Gender{ -// Unknown(0,"未知"),Male(1,"男"),Female(2,"女"); -// -// public int value; -// public String phase; -// Gender(int value,String thePhase){ -// this.value =value; -// this.phase = thePhase; -// } -// } -// -// public enum Parti_Verify_Type{ -// Phone(0,"手机"),Email(1,"邮件"),Account(2,"账号"); -// public int value; -// public String phase; -// Parti_Verify_Type(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Parti_Verify_Type valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Phone; -// case 1: return Email; -// case 2: return Account; -// default: return null; -// } -// } -// } -// -// public enum PartiVerify{ -// None(0,"无验证"),Verify(1,"验证"); -// public int value; -// public String phase; -// PartiVerify(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// } -// -// public enum TASK_Execute_Type { -// Start(0,"开始"),Complete(1,"完成"); -// -// public int value; -// public String phase; -// TASK_Execute_Type(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// } -// -//// public enum Message_Type{ -//// Ack(0,"Ack"),Sync(1,"Sync"),Node(2,"Node"),User(3,"User"),Heart(4,"Heart"),Auth(5,"Auth"),Channel(6,"Channel") -//// ,Error(0x99,"Error") -//// ,MasterStatus(0x10,"MasterStatus") -//// ,BatchSetting(0x11,"BatchSetting"); -//// public int value; -//// public String phase; -//// Message_Type(int value,String thePhase){ -//// this.value = value; -//// this.phase = thePhase; -//// } -//// public static Message_Type valueOf(int value) { // 手写的从int到enum的转换函数 -//// switch (value) { -//// case 0: return Ack; -//// case 1: return Sync; -//// case 2: return Node; -//// case 3: return User; -//// case 4: return Heart; -//// case 5: return Auth; -//// case 6: return Channel; -//// default: return null; -//// } -//// } -//// -//// public static Message_Type phaseOf(String phase) { // 手写的从String到enum的转换函数 -//// if(phase.equalsIgnoreCase("Sync")) -//// return Sync; -//// if(phase.equalsIgnoreCase("Ack")) -//// return Ack; -//// if(phase.equalsIgnoreCase("Node")) -//// return Node; -//// if(phase.equalsIgnoreCase("User")) -//// return User; -//// if(phase.equalsIgnoreCase("Heart")) -//// return Heart; -//// if(phase.equalsIgnoreCase("Auth")) -//// return Auth; -//// if(phase.equalsIgnoreCase("Channel")) -//// return Channel; -//// else -//// return null; -//// } -//// } -// -// public enum Message_Type{ -// Heart(0x00,"Heart"),Ack(0x01,"Ack"),Auth(0x02,"Auth"),Channel(0x03,"Channel") -// ,Sync(0x04,"Sync") -// ,Node(0x05,"Node"),User(0x06,"User"), Timer(0x07,"Timer") -// ,Error(0x99,"Error") -// ,MasterStatus(0x10,"MasterStatus") -// ,BatchSetting(0x11,"BatchSetting") -// ,Admin(0x12,"Admin") -// ,Ring(0x13,"Ring") -// ,Deliver(0x14,"Deliver") -// ,Game(0x15,"Game") -// ,Chrome(0x15,"Chrome") -// ,PPTCtl(0x15,"PPTCtl") -// ,Count(0x16,"Count") -// ,ChangeStatus(0x17,"ChangeStatus") -// ,PROJECT_MESSAGE(0x18, "ProjectMessage") -// ,CAR_RECORD(0x19, "CarRecord"); -// public int value; -// public String phase; -// Message_Type(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Type valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0x00: return Heart; -// case 0x01: return Ack; -// case 0x02: return Auth; -// case 0x03: return Channel; -// case 0x04: return Sync; -// case 0x05: return Node; -// case 0x06: return User; -// case 0x07: return Timer; -// case 0x10: return MasterStatus; -// case 0x11: return BatchSetting; -// case 0x12: return Admin; -// case 0x13: return Ring; -// case 0x14: return Deliver; -// case 0x15: return Game; -// case 0x16: return Count; -// case 0x17: return ChangeStatus; -// case 0x19: return CAR_RECORD; -// default: return null; -// } -// } -// -// public static Message_Type phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if("Sync".equalsIgnoreCase(phase)) { -// return Sync; -// } -// if("Ack".equalsIgnoreCase(phase)) { -// return Ack; -// } -// if("Node".equalsIgnoreCase(phase)) { -// return Node; -// } -// if("User".equalsIgnoreCase(phase)) { -// return User; -// } -// if("Heart".equalsIgnoreCase(phase)) { -// return Heart; -// } -// if("Auth".equalsIgnoreCase(phase)) { -// return Auth; -// } -// if("Channel".equalsIgnoreCase(phase)) { -// return Channel; -// } -// if("Timer".equalsIgnoreCase(phase)) { -// return Timer; -// } -// if("MasterStatus".equalsIgnoreCase(phase)) { -// return MasterStatus; -// } -// if("BatchSetting".equalsIgnoreCase(phase)) { -// return BatchSetting; -// } -// if("Admin".equalsIgnoreCase(phase)) { -// return Admin; -// } -// if("Ring".equalsIgnoreCase(phase)) { -// return Ring; -// } -// if("Deliver".equalsIgnoreCase(phase)) { -// return Deliver; -// } -// if("Game".equalsIgnoreCase(phase)) { -// return Game; -// } -// if("Count".equalsIgnoreCase(phase)) { -// return Count; -// } -// if("ChangeStatus".equalsIgnoreCase(phase)) { -// return ChangeStatus; -// } -// if("CarRecord".equalsIgnoreCase(phase)) { -// return CAR_RECORD; -// } -// return null; -// -// } -// } -// public enum Message_Ack_Event{ -// Ack(0,"Ack"); -// public int value; -// public String phase; -// Message_Ack_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Ack_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Ack; -// default: return null; -// } -// } -// public static Message_Ack_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if("Ack".equalsIgnoreCase(phase)) { -// return Ack; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_Sync_Event{ -// ChangeDuration(0,"ChangeDuration"),Move(1,"Move"), -// Remove(2,"Remove"),Add(3,"Add"),Start(4,"Start"),ChangeBeginTime(5,"ChangeBeginTime"),Show(6,"Show"); -// public int value; -// public String phase; -// Message_Sync_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Sync_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return ChangeDuration; -// case 1: return Move; -// case 2: return Remove; -// case 3: return Add; -// case 4: return Start; -// case 5: return ChangeBeginTime; -// case 6: return Show; -// default: return null; -// } -// } -// public static Message_Sync_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Start")) { -// return Start; -// } -// if(phase.equalsIgnoreCase("ChangeDuration")) { -// return ChangeDuration; -// } -// if(phase.equalsIgnoreCase("Move")) { -// return Move; -// } -// if(phase.equalsIgnoreCase("Remove")) { -// return Remove; -// } -// if(phase.equalsIgnoreCase("Add")) { -// return Add; -// } -// if(phase.equalsIgnoreCase("ChangeBeginTime")) { -// return ChangeBeginTime; -// } -// if(phase.equalsIgnoreCase("Show")) { -// return Show; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_Node_Event{ -// ChangeStatus(0,"ChangeStatus"),PostComment(1,"PostComment"),UploadDeliver(2,"UploadDeliver"); -// public int value; -// public String phase; -// Message_Node_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Node_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return ChangeStatus; -// case 1: return PostComment; -// case 2: return UploadDeliver; -// default: return null; -// } -// } -// public static Message_Node_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("ChangeStatus")) { -// return ChangeStatus; -// } -// if(phase.equalsIgnoreCase("PostComment")) { -// return PostComment; -// } -// if(phase.equalsIgnoreCase("UploadDeliver")) { -// return UploadDeliver; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_User_Event{ -// HasRead(0,"HasRead"),User(1,"User"); -// public int value; -// public String phase; -// Message_User_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_User_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return HasRead; -// case 1: return User; -// default: return null; -// } -// } -// public static Message_User_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("HasRead")) { -// return HasRead; -// } -// if(phase.equalsIgnoreCase("User")) { -// return User; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_Heart_Event{ -// Heart(0,"Heart"); -// public int value; -// public String phase; -// Message_Heart_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Heart_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Heart; -// default: return null; -// } -// } -// public static Message_Heart_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Heart")) { -// return Heart; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_Auth_Event{ -// Auth(0,"Auth"), -// Answer(1,"Answer"); -// public int value; -// public String phase; -// Message_Auth_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Auth_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Auth; -// case 1: return Answer; -// default: return null; -// } -// } -// public static Message_Auth_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Auth")) { -// return Auth; -// } -// if(phase.equalsIgnoreCase("Answer")) { -// return Answer; -// }else { -// return null; -// } -// } -// } -// -// public enum Message_Channel_Event{ -// Channel(0,"Channel"); -// public int value; -// public String phase; -// Message_Channel_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Channel_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Channel; -// default: return null; -// } -// } -// public static Message_Channel_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Channel")) { -// return Channel; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_MasterStatus_Event{ -// Report(0,"Report"),Query(1,"Query"),Answer(2,"Answer"); -// public int value; -// public String phase; -// Message_MasterStatus_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_MasterStatus_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Report; -// case 1: return Query; -// case 2: return Answer; -// default: return null; -// } -// } -// public static Message_MasterStatus_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Report")) { -// return Report; -// } -// if(phase.equalsIgnoreCase("Query")) { -// return Query; -// } -// if(phase.equalsIgnoreCase("Answer")) { -// return Answer; -// } else { -// return null; -// } -// } -// } -// -// @SuppressWarnings("all") -// public enum Task_Check_Status{ -// PENDING(0,"未审核"),FAILURE(1,"审核未通过"),SUCCESS(2,"审核已通过"); -// public int value; -// public String phase; -// Task_Check_Status(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Task_Check_Status valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return PENDING; -// case 1: return FAILURE; -// case 2: return SUCCESS; -// default: return null; -// } -// } -// public static Task_Check_Status phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("PENDING")) { -// return PENDING; -// }else if(phase.equalsIgnoreCase("FAILURE")) { -// return FAILURE; -// } else if(phase.equalsIgnoreCase("SUCCESS")) { -// return SUCCESS; -// } else { -// return null; -// } -// } -// } -// -// -// public enum Message_BatchSetting_Event{ -// Apply(0,"Apply"),Answer(1,"Answer"); -// public int value; -// public String phase; -// Message_BatchSetting_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_BatchSetting_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Apply; -// case 1: return Answer; -// default: return null; -// } -// } -// public static Message_BatchSetting_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Apply")) { -// return Apply; -// } -// if(phase.equalsIgnoreCase("Answer")) { -// return Answer; -// } -// return null; -// } -// } -// -// public enum Message_Admin_Event{ -// FindAll(0,"FindAll"); -// public int value; -// public String phase; -// Message_Admin_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Admin_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return FindAll; -// default: return null; -// } -// } -// public static Message_Admin_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("FindAll")) { -// return FindAll; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_Ring_Event{ -// Send(0,"Send") -// ,Read(1,"Read"); -// public int value; -// public String phase; -// Message_Ring_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Ring_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Send; -// case 1: return Read; -// default: return null; -// } -// } -// public static Message_Ring_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Send")) { -// return Send; -// } -// if(phase.equalsIgnoreCase("Read")) { -// return Read; -// } else { -// return null; -// } -// } -// } -// public enum Message_Deliver_Event{ -// Upload(0,"Upload") -// ,Checker(1,"Checker") -// ,Delete(2,"Delete"); -// public int value; -// public String phase; -// Message_Deliver_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Deliver_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Upload; -// case 1: return Checker; -// case 2: return Delete; -// default: return null; -// } -// } -// public static Message_Deliver_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Upload")) { -// return Upload; -// } -// if(phase.equalsIgnoreCase("Checker")) { -// return Checker; -// } -// if(phase.equalsIgnoreCase("Delete")) { -// return Delete; -// } else { -// return null; -// } -// } -// } -// -// public enum Message_Url_Event{ -// Url(0,"Url"); -// public int value; -// public String phase; -// Message_Url_Event(int value,String thePhase){ -// this.value = value; -// this.phase = thePhase; -// } -// public static Message_Url_Event valueOf(int value) { // 手写的从int到enum的转换函数 -// switch (value) { -// case 0: return Url; -// default: return null; -// } -// } -// public static Message_Url_Event phaseOf(String phase) { // 手写的从String到enum的转换函数 -// if(phase.equalsIgnoreCase("Url")) { -// return Url; -// } -// return null; -// } -// } -// //wbs表时间类型==================================================================/ -// -// /** -// * redis类型 -// */ -// public enum RedisType{ -// /**redis类型**/ -// STRING(0,"字符串类型"), -// LIST_INDEX(1,"列表-某一个"), -// LIST_RANGE(2,"列表-范围"), -// SET(3,"集合"), -// SORT_SET_RANGE(4,"有序集合-index"), -// SORT_SET_SCORE(5,"有序集合-分数"), -// HASH_ITEM(6, "哈希-某一项"), -// HASH(7, "哈希-全部"), -// ; -// /**类型code*/ -// public int type; -// /**类型*/ -// public String message; -// RedisType(int type, String message) { -// this.type = type; -// this.message = message; -// } -// } -// -// -//} diff --git a/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java b/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java index 66d1d65..75e4bde 100644 --- a/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java +++ b/src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java @@ -34,4 +34,6 @@ public class ZeroCodeError extends CodeError { public static final Code NOT_PERMISSION = new Code(524,"没有权限!", true); public static final Code ROLE_ERROR = new Code(525,"角色信息错误!", true); public static final Code PROJECT_NOT_FOUND = new Code(526,"项目不存在,请检查后再试!", true); + public static final Code NOT_TASK = new Code(527,"未找到对应任务", true); + public static final Code NO_POWER = new Code(528,"权限不足", true); } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 113d78b..0d82006 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -23,6 +23,7 @@ spring: swagger: enable: true +notGatewayUrl: http://101.201.226.163:7310 wx: prefixUrl: https://test.tall.wiki/wxconfigurer-api/ file: diff --git a/src/main/resources/mapper_dao/PluDeliverDao.xml b/src/main/resources/mapper_dao/PluDeliverDao.xml new file mode 100644 index 0000000..8215858 --- /dev/null +++ b/src/main/resources/mapper_dao/PluDeliverDao.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO t_plu_deliver + ( + id, + task_sub_id, + `name` + ) + VALUES + + (#{item.id},#{item.taskSubId},#{item.name}) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper_dao/ProRoleTaskDao.xml b/src/main/resources/mapper_dao/ProRoleTaskDao.xml index e1ef4d9..2a7e933 100644 --- a/src/main/resources/mapper_dao/ProRoleTaskDao.xml +++ b/src/main/resources/mapper_dao/ProRoleTaskDao.xml @@ -40,19 +40,19 @@ - - - - - - - - - - - + - + + diff --git a/src/main/resources/mapper_raw/ProTaskPluginMapper.xml b/src/main/resources/mapper_raw/ProTaskPluginMapper.xml index 76e5260..7299842 100644 --- a/src/main/resources/mapper_raw/ProTaskPluginMapper.xml +++ b/src/main/resources/mapper_raw/ProTaskPluginMapper.xml @@ -13,6 +13,9 @@ + + + @@ -74,7 +77,7 @@ id, param, plgin_row, plgin_col, task_detail_id, plugin_id, created_at, updated_at, - rec_status, colspan, rowspan + rec_status, colspan, rowspan, business_plugin_id, code, plugin_inner @@ -231,6 +254,15 @@ rowspan = #{record.rowspan,jdbcType=INTEGER}, + + business_plugin_id = #{record.businessPluginId,jdbcType=BIGINT}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + plugin_inner = #{record.pluginInner,jdbcType=TINYINT}, + @@ -248,7 +280,10 @@ updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, rec_status = #{record.recStatus,jdbcType=TINYINT}, colspan = #{record.colspan,jdbcType=INTEGER}, - rowspan = #{record.rowspan,jdbcType=INTEGER} + rowspan = #{record.rowspan,jdbcType=INTEGER}, + business_plugin_id = #{record.businessPluginId,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + plugin_inner = #{record.pluginInner,jdbcType=TINYINT} @@ -286,6 +321,15 @@ rowspan = #{rowspan,jdbcType=INTEGER}, + + business_plugin_id = #{businessPluginId,jdbcType=BIGINT}, + + + code = #{code,jdbcType=VARCHAR}, + + + plugin_inner = #{pluginInner,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -300,7 +344,10 @@ updated_at = #{updatedAt,jdbcType=TIMESTAMP}, rec_status = #{recStatus,jdbcType=TINYINT}, colspan = #{colspan,jdbcType=INTEGER}, - rowspan = #{rowspan,jdbcType=INTEGER} + rowspan = #{rowspan,jdbcType=INTEGER}, + business_plugin_id = #{businessPluginId,jdbcType=BIGINT}, + code = #{code,jdbcType=VARCHAR}, + plugin_inner = #{pluginInner,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/src/main/resources/mbg.xml b/src/main/resources/mbg.xml index ba79617..4dc6b2e 100644 --- a/src/main/resources/mbg.xml +++ b/src/main/resources/mbg.xml @@ -72,14 +72,14 @@ - +
-
+