Browse Source

20220126不连接gateway

ptos
zy_Java 4 years ago
parent
commit
16a5d02e07
  1. 52
      pom.xml
  2. 11
      src/main/java/com/ccsens/ptccsens/PtCcsensApplication.java
  3. 24
      src/main/java/com/ccsens/ptccsens/annotation/MustLogin.java
  4. 6
      src/main/java/com/ccsens/ptccsens/api/DebugController.java
  5. 2
      src/main/java/com/ccsens/ptccsens/api/MemberController.java
  6. 1
      src/main/java/com/ccsens/ptccsens/api/OcrController.java
  7. 2
      src/main/java/com/ccsens/ptccsens/api/ProjectFinanceController.java
  8. 2
      src/main/java/com/ccsens/ptccsens/api/finance/FinanceController.java
  9. 138
      src/main/java/com/ccsens/ptccsens/aspect/MustLoginAspect.java
  10. 320
      src/main/java/com/ccsens/ptccsens/bean/po/ProTaskPlugin.java
  11. 2000
      src/main/java/com/ccsens/ptccsens/bean/po/ProTaskPluginExample.java
  12. 58
      src/main/java/com/ccsens/ptccsens/persist/mapper/ProTaskPluginMapper.java
  13. 11
      src/main/java/com/ccsens/ptccsens/service/ImportService.java
  14. 3
      src/main/java/com/ccsens/ptccsens/service/OcrService.java
  15. 2
      src/main/java/com/ccsens/ptccsens/service/TallService.java
  16. 9
      src/main/java/com/ccsens/ptccsens/util/Constant.java
  17. 2
      src/main/resources/mapper_dao/ProTaskPluginDao.xml
  18. 674
      src/main/resources/mapper_raw/ProTaskPluginMapper.xml
  19. 6
      src/main/resources/mbg.xml

52
pom.xml

@ -21,37 +21,13 @@
</parent> </parent>
<dependencies> <dependencies>
<!--cloud 工具类-->
<dependency>
<artifactId>cloudutil</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--TALL_SDK--> <!--TALL_SDK-->
<dependency> <dependency>
<artifactId>tallsdk</artifactId> <artifactId>tallsdk</artifactId>
<groupId>com.ccsensptos</groupId> <groupId>com.ccsensptos</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<!--公用接口-->
<!--<dependency>
<artifactId>common</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
<!--util 工具类-->
<dependency>
<groupId>com.ccsens</groupId>
<artifactId>util</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!--微信工具包-->
<dependency>
<artifactId>wechatutil</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.netty/netty-all --> <!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
@ -92,12 +68,6 @@
<artifactId>spring-boot-starter-jetty</artifactId> <artifactId>spring-boot-starter-jetty</artifactId>
</dependency> </dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId> <artifactId>spring-boot-configuration-processor</artifactId>
@ -263,6 +233,10 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin> <plugin>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId> <artifactId>mybatis-generator-maven-plugin</artifactId>
@ -279,22 +253,6 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.ccsens.ptccsens.PtCcsensApplication</mainClass>
<!--<skip>true</skip>-->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

11
src/main/java/com/ccsens/ptccsens/PtCcsensApplication.java

@ -1,12 +1,9 @@
package com.ccsens.ptccsens; package com.ccsens.ptccsens;
import com.ccsens.cloudutil.ribbon.RibbonConfiguration;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
@ -14,14 +11,14 @@ import org.springframework.scheduling.annotation.EnableAsync;
/** /**
* @author whj * @author whj
*/ */
@MapperScan(basePackages = {"com.ccsens.ptccsens.persist.*","com.ccsens.common.persist.*"}) @MapperScan(basePackages = {"com.ccsens.ptccsens.persist.*"})
@ServletComponentScan @ServletComponentScan
@EnableAsync @EnableAsync
//开启断路器功能 //开启断路器功能
@EnableCircuitBreaker //@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") //@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
@SpringBootApplication @SpringBootApplication
@ComponentScan(basePackages = {"com.ccsens","com.ccsensptos"}, excludeFilters = { @ComponentScan.Filter(type= FilterType.ASSIGNABLE_TYPE, value = RibbonConfiguration.class)}) @ComponentScan(basePackages = {"com.ccsens","com.ccsensptos"})
public class PtCcsensApplication { public class PtCcsensApplication {
public static void main(String[] args) { public static void main(String[] args) {

24
src/main/java/com/ccsens/ptccsens/annotation/MustLogin.java

@ -0,0 +1,24 @@
package com.ccsens.ptccsens.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: 数组
* 1List
* 2Set
* 3: Map
* */
byte type() default -1;
}

6
src/main/java/com/ccsens/ptccsens/api/DebugController.java

@ -1,6 +1,9 @@
package com.ccsens.ptccsens.api; package com.ccsens.ptccsens.api;
import com.ccsens.ptccsens.util.Constant;
import com.ccsens.util.JsonResponse; import com.ccsens.util.JsonResponse;
import com.ccsensptos.tallsdk.bean.vo.TallPluginVo;
import com.ccsensptos.tallsdk.util.PluginUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -22,7 +25,8 @@ public class DebugController {
}) })
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse debug(HttpServletRequest request) throws Exception { public JsonResponse debug(HttpServletRequest request) throws Exception {
// TallPluginVo.BusinessPluginInfo pluginByCodeAndName = PluginUtil.getPluginByCodeAndName(Constant.BUSINESS_CODE, "MP-TALL任务名a1");
// System.out.println(pluginByCodeAndName);
return JsonResponse.newInstance().ok("测试"); return JsonResponse.newInstance().ok("测试");
} }

2
src/main/java/com/ccsens/ptccsens/api/MemberController.java

@ -1,6 +1,6 @@
package com.ccsens.ptccsens.api; package com.ccsens.ptccsens.api;
import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.ptccsens.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.DeliverDto; import com.ccsens.ptccsens.bean.dto.DeliverDto;
import com.ccsens.ptccsens.bean.vo.DeliverVo; import com.ccsens.ptccsens.bean.vo.DeliverVo;
import com.ccsens.ptccsens.service.IDeliverService; import com.ccsens.ptccsens.service.IDeliverService;

1
src/main/java/com/ccsens/ptccsens/api/OcrController.java

@ -2,7 +2,6 @@ package com.ccsens.ptccsens.api;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.ImageUtil; import cn.hutool.core.util.ImageUtil;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.ProjectFinanceDto; import com.ccsens.ptccsens.bean.dto.ProjectFinanceDto;
import com.ccsens.ptccsens.bean.vo.OcrVo; import com.ccsens.ptccsens.bean.vo.OcrVo;
import com.ccsens.ptccsens.bean.vo.ProjectFinanceVo; import com.ccsens.ptccsens.bean.vo.ProjectFinanceVo;

2
src/main/java/com/ccsens/ptccsens/api/ProjectFinanceController.java

@ -1,6 +1,6 @@
package com.ccsens.ptccsens.api; package com.ccsens.ptccsens.api;
import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.ptccsens.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.ProjectFinanceDto; import com.ccsens.ptccsens.bean.dto.ProjectFinanceDto;
import com.ccsens.ptccsens.bean.vo.ProjectFinanceVo; import com.ccsens.ptccsens.bean.vo.ProjectFinanceVo;
import com.ccsens.ptccsens.service.IProjectFinanceService; import com.ccsens.ptccsens.service.IProjectFinanceService;

2
src/main/java/com/ccsens/ptccsens/api/finance/FinanceController.java

@ -1,6 +1,6 @@
package com.ccsens.ptccsens.api.finance; package com.ccsens.ptccsens.api.finance;
import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.ptccsens.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.FinanceDto; import com.ccsens.ptccsens.bean.dto.FinanceDto;
import com.ccsens.ptccsens.bean.vo.FinanceVo; import com.ccsens.ptccsens.bean.vo.FinanceVo;
import com.ccsens.ptccsens.service.IFinanceService; import com.ccsens.ptccsens.service.IFinanceService;

138
src/main/java/com/ccsens/ptccsens/aspect/MustLoginAspect.java

@ -0,0 +1,138 @@
package com.ccsens.ptccsens.aspect;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.ptccsens.annotation.MustLogin;
import com.ccsens.ptccsens.bean.po.ProUser;
import com.ccsens.ptccsens.persist.dao.UserDao;
import com.ccsens.ptccsens.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.ptccsens.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;
}
}
}
}

320
src/main/java/com/ccsens/ptccsens/bean/po/ProTaskPlugin.java

@ -1,150 +1,172 @@
package com.ccsens.ptccsens.bean.po; package com.ccsens.ptccsens.bean.po;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class ProTaskPlugin implements Serializable { public class ProTaskPlugin implements Serializable {
private Long id; private Long id;
private String param; private String param;
private Integer plginRow; private Integer plginRow;
private Integer plginCol; private Integer plginCol;
private Long taskDetailId; private Long taskDetailId;
private Long pluginId; private Long pluginId;
private Date createdAt; private Long businessPluginId;
private Date updatedAt; private String code;
private Byte recStatus; private Byte pluginInner;
private Integer colspan; private Date createdAt;
private Integer rowspan; private Date updatedAt;
private String code; private Byte recStatus;
private static final long serialVersionUID = 1L; private Integer colspan;
public Long getId() { private Integer rowspan;
return id;
} private static final long serialVersionUID = 1L;
public void setId(Long id) { public Long getId() {
this.id = id; return id;
} }
public String getParam() { public void setId(Long id) {
return param; this.id = id;
} }
public void setParam(String param) { public String getParam() {
this.param = param == null ? null : param.trim(); return param;
} }
public Integer getPlginRow() { public void setParam(String param) {
return plginRow; this.param = param == null ? null : param.trim();
} }
public void setPlginRow(Integer plginRow) { public Integer getPlginRow() {
this.plginRow = plginRow; return plginRow;
} }
public Integer getPlginCol() { public void setPlginRow(Integer plginRow) {
return plginCol; this.plginRow = plginRow;
} }
public void setPlginCol(Integer plginCol) { public Integer getPlginCol() {
this.plginCol = plginCol; return plginCol;
} }
public Long getTaskDetailId() { public void setPlginCol(Integer plginCol) {
return taskDetailId; this.plginCol = plginCol;
} }
public void setTaskDetailId(Long taskDetailId) { public Long getTaskDetailId() {
this.taskDetailId = taskDetailId; return taskDetailId;
} }
public Long getPluginId() { public void setTaskDetailId(Long taskDetailId) {
return pluginId; this.taskDetailId = taskDetailId;
} }
public void setPluginId(Long pluginId) { public Long getPluginId() {
this.pluginId = pluginId; return pluginId;
} }
public Date getCreatedAt() { public void setPluginId(Long pluginId) {
return createdAt; this.pluginId = pluginId;
} }
public void setCreatedAt(Date createdAt) { public Long getBusinessPluginId() {
this.createdAt = createdAt; return businessPluginId;
} }
public Date getUpdatedAt() { public void setBusinessPluginId(Long businessPluginId) {
return updatedAt; this.businessPluginId = businessPluginId;
} }
public void setUpdatedAt(Date updatedAt) { public String getCode() {
this.updatedAt = updatedAt; return code;
} }
public Byte getRecStatus() { public void setCode(String code) {
return recStatus; this.code = code == null ? null : code.trim();
} }
public void setRecStatus(Byte recStatus) { public Byte getPluginInner() {
this.recStatus = recStatus; return pluginInner;
} }
public Integer getColspan() { public void setPluginInner(Byte pluginInner) {
return colspan; this.pluginInner = pluginInner;
} }
public void setColspan(Integer colspan) { public Date getCreatedAt() {
this.colspan = colspan; return createdAt;
} }
public Integer getRowspan() { public void setCreatedAt(Date createdAt) {
return rowspan; this.createdAt = createdAt;
} }
public void setRowspan(Integer rowspan) { public Date getUpdatedAt() {
this.rowspan = rowspan; return updatedAt;
} }
public String getCode() { public void setUpdatedAt(Date updatedAt) {
return code; this.updatedAt = updatedAt;
} }
public void setCode(String code) { public Byte getRecStatus() {
this.code = code == null ? null : code.trim(); return recStatus;
} }
@Override public void setRecStatus(Byte recStatus) {
public String toString() { this.recStatus = recStatus;
StringBuilder sb = new StringBuilder(); }
sb.append(getClass().getSimpleName());
sb.append(" ["); public Integer getColspan() {
sb.append("Hash = ").append(hashCode()); return colspan;
sb.append(", id=").append(id); }
sb.append(", param=").append(param);
sb.append(", plginRow=").append(plginRow); public void setColspan(Integer colspan) {
sb.append(", plginCol=").append(plginCol); this.colspan = colspan;
sb.append(", taskDetailId=").append(taskDetailId); }
sb.append(", pluginId=").append(pluginId);
sb.append(", createdAt=").append(createdAt); public Integer getRowspan() {
sb.append(", updatedAt=").append(updatedAt); return rowspan;
sb.append(", recStatus=").append(recStatus); }
sb.append(", colspan=").append(colspan);
sb.append(", rowspan=").append(rowspan); public void setRowspan(Integer rowspan) {
sb.append(", code=").append(code); this.rowspan = rowspan;
sb.append("]"); }
return sb.toString();
} @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", param=").append(param);
sb.append(", plginRow=").append(plginRow);
sb.append(", plginCol=").append(plginCol);
sb.append(", taskDetailId=").append(taskDetailId);
sb.append(", pluginId=").append(pluginId);
sb.append(", businessPluginId=").append(businessPluginId);
sb.append(", code=").append(code);
sb.append(", pluginInner=").append(pluginInner);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", colspan=").append(colspan);
sb.append(", rowspan=").append(rowspan);
sb.append("]");
return sb.toString();
}
} }

2000
src/main/java/com/ccsens/ptccsens/bean/po/ProTaskPluginExample.java

File diff suppressed because it is too large

58
src/main/java/com/ccsens/ptccsens/persist/mapper/ProTaskPluginMapper.java

@ -1,30 +1,30 @@
package com.ccsens.ptccsens.persist.mapper; package com.ccsens.ptccsens.persist.mapper;
import com.ccsens.ptccsens.bean.po.ProTaskPlugin; import com.ccsens.ptccsens.bean.po.ProTaskPlugin;
import com.ccsens.ptccsens.bean.po.ProTaskPluginExample; import com.ccsens.ptccsens.bean.po.ProTaskPluginExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface ProTaskPluginMapper { public interface ProTaskPluginMapper {
long countByExample(ProTaskPluginExample example); long countByExample(ProTaskPluginExample example);
int deleteByExample(ProTaskPluginExample example); int deleteByExample(ProTaskPluginExample example);
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
int insert(ProTaskPlugin record); int insert(ProTaskPlugin record);
int insertSelective(ProTaskPlugin record); int insertSelective(ProTaskPlugin record);
List<ProTaskPlugin> selectByExample(ProTaskPluginExample example); List<ProTaskPlugin> selectByExample(ProTaskPluginExample example);
ProTaskPlugin selectByPrimaryKey(Long id); ProTaskPlugin selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example); int updateByExampleSelective(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example);
int updateByExample(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example); int updateByExample(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example);
int updateByPrimaryKeySelective(ProTaskPlugin record); int updateByPrimaryKeySelective(ProTaskPlugin record);
int updateByPrimaryKey(ProTaskPlugin record); int updateByPrimaryKey(ProTaskPlugin record);
} }

11
src/main/java/com/ccsens/ptccsens/service/ImportService.java

@ -18,7 +18,9 @@ import com.ccsens.util.StringUtil;
import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.CronConstant;
import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.cron.NatureToDate;
import com.ccsens.util.exception.BaseException; import com.ccsens.util.exception.BaseException;
import com.ccsensptos.tallsdk.bean.vo.TallPluginVo;
import com.ccsensptos.tallsdk.bean.vo.TallProjectVo; import com.ccsensptos.tallsdk.bean.vo.TallProjectVo;
import com.ccsensptos.tallsdk.util.PluginUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
@ -753,11 +755,18 @@ public class ImportService implements IImportService {
// if(ObjectUtil.isNull(pluginId)){ // if(ObjectUtil.isNull(pluginId)){
// throw new BaseException(BasicsCodeError.PLUGIN_NAME_ERROR.addMsg(wbsSheet.getSheetName(),errorRow,plugin)); // throw new BaseException(BasicsCodeError.PLUGIN_NAME_ERROR.addMsg(wbsSheet.getSheetName(),errorRow,plugin));
// } // }
TallPluginVo.BusinessPluginInfo pluginByCodeAndName = PluginUtil.getPluginByCodeAndName(Constant.BUSINESS_CODE, plugin);
if(ObjectUtil.isNull(pluginByCodeAndName)){
throw new BaseException(BasicsCodeError.PLUGIN_NAME_ERROR.addMsg(wbsSheet.getSheetName(),errorRow,plugin));
}
//添加插件 //添加插件
ProTaskPlugin proTaskPlugin = new ProTaskPlugin(); ProTaskPlugin proTaskPlugin = new ProTaskPlugin();
proTaskPlugin.setId(snowflake.nextId()); proTaskPlugin.setId(snowflake.nextId());
proTaskPlugin.setTaskDetailId(taskId); 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.setPlginRow(row);
proTaskPlugin.setPlginCol(1); proTaskPlugin.setPlginCol(1);
proTaskPlugin.setRowspan(1); proTaskPlugin.setRowspan(1);

3
src/main/java/com/ccsens/ptccsens/service/OcrService.java

@ -2,11 +2,8 @@ package com.ccsens.ptccsens.service;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.druid.sql.visitor.functions.If;
import com.ccsens.ptccsens.bean.vo.OcrVo; import com.ccsens.ptccsens.bean.vo.OcrVo;
import com.ccsens.ptccsens.util.BasicsConstant; import com.ccsens.ptccsens.util.BasicsConstant;
import com.ccsens.util.RestTemplateUtil;
import com.ccsens.util.baidu.BaiDuDto; import com.ccsens.util.baidu.BaiDuDto;
import com.ccsens.util.baidu.BaiDuUtil; import com.ccsens.util.baidu.BaiDuUtil;
import com.ccsens.util.baidu.BaiDuVo; import com.ccsens.util.baidu.BaiDuVo;

2
src/main/java/com/ccsens/ptccsens/service/TallService.java

@ -210,7 +210,7 @@ public class TallService implements ITallService {
@SneakyThrows @SneakyThrows
@Override @Override
public TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params) { public TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params) {
// //TODO 根据token获取用户信息 //TODO 根据token获取用户信息
TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, Constant.APP_ID, Constant.APP_SECRET)); TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, Constant.APP_ID, Constant.APP_SECRET));
//通过手机号获取用户在服务内的userId //通过手机号获取用户在服务内的userId

9
src/main/java/com/ccsens/ptccsens/util/Constant.java

@ -12,13 +12,8 @@ public class Constant {
public static String APP_ID = "1485881608842252289"; public static String APP_ID = "1485881608842252289";
/**secret*/ /**secret*/
public static String APP_SECRET = "UzCCJfmKfVueCPw8w7ymbIc9vxZaRih4ndPmH38TnM9Wz54C"; public static String APP_SECRET = "UzCCJfmKfVueCPw8w7ymbIc9vxZaRih4ndPmH38TnM9Wz54C";
/**服务code*/
/**零号项目Id*/ public static String BUSINESS_CODE = "PT";
public static Long ZERO_PROJECT_ID = 1484800783814889472L;
/**引导页任务名*/
public static String ZERO_GUIDE = "引导页";
/**广告页任务名*/
public static String ZERO_ADVERTISING = "广告页";
public static Map<Integer, String> timeUnit = new HashMap<>(); public static Map<Integer, String> timeUnit = new HashMap<>();
public static Map<Integer, String> timeFormat = new HashMap<>(); public static Map<Integer, String> timeFormat = new HashMap<>();

2
src/main/resources/mapper_dao/ProTaskPluginDao.xml

@ -31,7 +31,9 @@
<select id="queryTaskOfPlugin" resultType="com.ccsensptos.tallsdk.bean.vo.TallTaskVo$TaskPluginInfo"> <select id="queryTaskOfPlugin" resultType="com.ccsensptos.tallsdk.bean.vo.TallTaskVo$TaskPluginInfo">
SELECT SELECT
tp.plugin_id AS pluginId, tp.plugin_id AS pluginId,
tp.business_plugin_id AS businessPluginId,
tp.code AS pluginCode, tp.code AS pluginCode,
tp.plugin_inner AS `inner`,
tp.param As param, tp.param As param,
tp.plgin_row AS `row`, tp.plgin_row AS `row`,
tp.plgin_col AS col, tp.plgin_col AS col,

674
src/main/resources/mapper_raw/ProTaskPluginMapper.xml

@ -1,323 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.ptccsens.persist.mapper.ProTaskPluginMapper"> <mapper namespace="com.ccsens.ptccsens.persist.mapper.ProTaskPluginMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> <resultMap id="BaseResultMap" type="com.ccsens.ptccsens.bean.po.ProTaskPlugin">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="param" jdbcType="VARCHAR" property="param" /> <result column="param" jdbcType="VARCHAR" property="param" />
<result column="plgin_row" jdbcType="INTEGER" property="plginRow" /> <result column="plgin_row" jdbcType="INTEGER" property="plginRow" />
<result column="plgin_col" jdbcType="INTEGER" property="plginCol" /> <result column="plgin_col" jdbcType="INTEGER" property="plginCol" />
<result column="task_detail_id" jdbcType="BIGINT" property="taskDetailId" /> <result column="task_detail_id" jdbcType="BIGINT" property="taskDetailId" />
<result column="plugin_id" jdbcType="BIGINT" property="pluginId" /> <result column="plugin_id" jdbcType="BIGINT" property="pluginId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> <result column="business_plugin_id" jdbcType="BIGINT" property="businessPluginId" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> <result column="code" jdbcType="VARCHAR" property="code" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> <result column="plugin_inner" jdbcType="TINYINT" property="pluginInner" />
<result column="colspan" jdbcType="INTEGER" property="colspan" /> <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="rowspan" jdbcType="INTEGER" property="rowspan" /> <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="code" jdbcType="VARCHAR" property="code" /> <result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap> <result column="colspan" jdbcType="INTEGER" property="colspan" />
<sql id="Example_Where_Clause"> <result column="rowspan" jdbcType="INTEGER" property="rowspan" />
<where> </resultMap>
<foreach collection="oredCriteria" item="criteria" separator="or"> <sql id="Example_Where_Clause">
<if test="criteria.valid"> <where>
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="oredCriteria" item="criteria" separator="or">
<foreach collection="criteria.criteria" item="criterion"> <if test="criteria.valid">
<choose> <trim prefix="(" prefixOverrides="and" suffix=")">
<when test="criterion.noValue"> <foreach collection="criteria.criteria" item="criterion">
and ${criterion.condition} <choose>
</when> <when test="criterion.noValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.listValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <when test="criterion.listValue">
#{listItem} and ${criterion.condition}
</foreach> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
</choose> </foreach>
</foreach> </when>
</trim> </choose>
</if> </foreach>
</foreach> </trim>
</where> </if>
</sql> </foreach>
<sql id="Update_By_Example_Where_Clause"> </where>
<where> </sql>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <sql id="Update_By_Example_Where_Clause">
<if test="criteria.valid"> <where>
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<foreach collection="criteria.criteria" item="criterion"> <if test="criteria.valid">
<choose> <trim prefix="(" prefixOverrides="and" suffix=")">
<when test="criterion.noValue"> <foreach collection="criteria.criteria" item="criterion">
and ${criterion.condition} <choose>
</when> <when test="criterion.noValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.listValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <when test="criterion.listValue">
#{listItem} and ${criterion.condition}
</foreach> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
</choose> </foreach>
</foreach> </when>
</trim> </choose>
</if> </foreach>
</foreach> </trim>
</where> </if>
</sql> </foreach>
<sql id="Base_Column_List"> </where>
id, param, plgin_row, plgin_col, task_detail_id, plugin_id, created_at, updated_at, </sql>
rec_status, colspan, rowspan, code <sql id="Base_Column_List">
</sql> id, param, plgin_row, plgin_col, task_detail_id, plugin_id, business_plugin_id, code,
<select id="selectByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultMap="BaseResultMap"> plugin_inner, created_at, updated_at, rec_status, colspan, rowspan
select </sql>
<if test="distinct"> <select id="selectByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultMap="BaseResultMap">
distinct select
</if> <if test="distinct">
<include refid="Base_Column_List" /> distinct
from t_pro_task_plugin </if>
<if test="_parameter != null"> <include refid="Base_Column_List" />
<include refid="Example_Where_Clause" /> from t_pro_task_plugin
</if> <if test="_parameter != null">
<if test="orderByClause != null"> <include refid="Example_Where_Clause" />
order by ${orderByClause} </if>
</if> <if test="orderByClause != null">
</select> order by ${orderByClause}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </if>
select </select>
<include refid="Base_Column_List" /> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from t_pro_task_plugin select
where id = #{id,jdbcType=BIGINT} <include refid="Base_Column_List" />
</select> from t_pro_task_plugin
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> where id = #{id,jdbcType=BIGINT}
delete from t_pro_task_plugin </select>
where id = #{id,jdbcType=BIGINT} <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
</delete> delete from t_pro_task_plugin
<delete id="deleteByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample"> where id = #{id,jdbcType=BIGINT}
delete from t_pro_task_plugin </delete>
<if test="_parameter != null"> <delete id="deleteByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample">
<include refid="Example_Where_Clause" /> delete from t_pro_task_plugin
</if> <if test="_parameter != null">
</delete> <include refid="Example_Where_Clause" />
<insert id="insert" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> </if>
insert into t_pro_task_plugin (id, param, plgin_row, </delete>
plgin_col, task_detail_id, plugin_id, <insert id="insert" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin">
created_at, updated_at, rec_status, insert into t_pro_task_plugin (id, param, plgin_row,
colspan, rowspan, code plgin_col, task_detail_id, plugin_id,
) business_plugin_id, code, plugin_inner,
values (#{id,jdbcType=BIGINT}, #{param,jdbcType=VARCHAR}, #{plginRow,jdbcType=INTEGER}, created_at, updated_at, rec_status,
#{plginCol,jdbcType=INTEGER}, #{taskDetailId,jdbcType=BIGINT}, #{pluginId,jdbcType=BIGINT}, colspan, rowspan)
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, values (#{id,jdbcType=BIGINT}, #{param,jdbcType=VARCHAR}, #{plginRow,jdbcType=INTEGER},
#{colspan,jdbcType=INTEGER}, #{rowspan,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR} #{plginCol,jdbcType=INTEGER}, #{taskDetailId,jdbcType=BIGINT}, #{pluginId,jdbcType=BIGINT},
) #{businessPluginId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{pluginInner,jdbcType=TINYINT},
</insert> #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT},
<insert id="insertSelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> #{colspan,jdbcType=INTEGER}, #{rowspan,jdbcType=INTEGER})
insert into t_pro_task_plugin </insert>
<trim prefix="(" suffix=")" suffixOverrides=","> <insert id="insertSelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin">
<if test="id != null"> insert into t_pro_task_plugin
id, <trim prefix="(" suffix=")" suffixOverrides=",">
</if> <if test="id != null">
<if test="param != null"> id,
param, </if>
</if> <if test="param != null">
<if test="plginRow != null"> param,
plgin_row, </if>
</if> <if test="plginRow != null">
<if test="plginCol != null"> plgin_row,
plgin_col, </if>
</if> <if test="plginCol != null">
<if test="taskDetailId != null"> plgin_col,
task_detail_id, </if>
</if> <if test="taskDetailId != null">
<if test="pluginId != null"> task_detail_id,
plugin_id, </if>
</if> <if test="pluginId != null">
<if test="createdAt != null"> plugin_id,
created_at, </if>
</if> <if test="businessPluginId != null">
<if test="updatedAt != null"> business_plugin_id,
updated_at, </if>
</if> <if test="code != null">
<if test="recStatus != null"> code,
rec_status, </if>
</if> <if test="pluginInner != null">
<if test="colspan != null"> plugin_inner,
colspan, </if>
</if> <if test="createdAt != null">
<if test="rowspan != null"> created_at,
rowspan, </if>
</if> <if test="updatedAt != null">
<if test="code != null"> updated_at,
code, </if>
</if> <if test="recStatus != null">
</trim> rec_status,
<trim prefix="values (" suffix=")" suffixOverrides=","> </if>
<if test="id != null"> <if test="colspan != null">
#{id,jdbcType=BIGINT}, colspan,
</if> </if>
<if test="param != null"> <if test="rowspan != null">
#{param,jdbcType=VARCHAR}, rowspan,
</if> </if>
<if test="plginRow != null"> </trim>
#{plginRow,jdbcType=INTEGER}, <trim prefix="values (" suffix=")" suffixOverrides=",">
</if> <if test="id != null">
<if test="plginCol != null"> #{id,jdbcType=BIGINT},
#{plginCol,jdbcType=INTEGER}, </if>
</if> <if test="param != null">
<if test="taskDetailId != null"> #{param,jdbcType=VARCHAR},
#{taskDetailId,jdbcType=BIGINT}, </if>
</if> <if test="plginRow != null">
<if test="pluginId != null"> #{plginRow,jdbcType=INTEGER},
#{pluginId,jdbcType=BIGINT}, </if>
</if> <if test="plginCol != null">
<if test="createdAt != null"> #{plginCol,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, </if>
</if> <if test="taskDetailId != null">
<if test="updatedAt != null"> #{taskDetailId,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, </if>
</if> <if test="pluginId != null">
<if test="recStatus != null"> #{pluginId,jdbcType=BIGINT},
#{recStatus,jdbcType=TINYINT}, </if>
</if> <if test="businessPluginId != null">
<if test="colspan != null"> #{businessPluginId,jdbcType=BIGINT},
#{colspan,jdbcType=INTEGER}, </if>
</if> <if test="code != null">
<if test="rowspan != null"> #{code,jdbcType=VARCHAR},
#{rowspan,jdbcType=INTEGER}, </if>
</if> <if test="pluginInner != null">
<if test="code != null"> #{pluginInner,jdbcType=TINYINT},
#{code,jdbcType=VARCHAR}, </if>
</if> <if test="createdAt != null">
</trim> #{createdAt,jdbcType=TIMESTAMP},
</insert> </if>
<select id="countByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultType="java.lang.Long"> <if test="updatedAt != null">
select count(*) from t_pro_task_plugin #{updatedAt,jdbcType=TIMESTAMP},
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> <if test="recStatus != null">
</if> #{recStatus,jdbcType=TINYINT},
</select> </if>
<update id="updateByExampleSelective" parameterType="map"> <if test="colspan != null">
update t_pro_task_plugin #{colspan,jdbcType=INTEGER},
<set> </if>
<if test="record.id != null"> <if test="rowspan != null">
id = #{record.id,jdbcType=BIGINT}, #{rowspan,jdbcType=INTEGER},
</if> </if>
<if test="record.param != null"> </trim>
param = #{record.param,jdbcType=VARCHAR}, </insert>
</if> <select id="countByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultType="java.lang.Long">
<if test="record.plginRow != null"> select count(*) from t_pro_task_plugin
plgin_row = #{record.plginRow,jdbcType=INTEGER}, <if test="_parameter != null">
</if> <include refid="Example_Where_Clause" />
<if test="record.plginCol != null"> </if>
plgin_col = #{record.plginCol,jdbcType=INTEGER}, </select>
</if> <update id="updateByExampleSelective" parameterType="map">
<if test="record.taskDetailId != null"> update t_pro_task_plugin
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, <set>
</if> <if test="record.id != null">
<if test="record.pluginId != null"> id = #{record.id,jdbcType=BIGINT},
plugin_id = #{record.pluginId,jdbcType=BIGINT}, </if>
</if> <if test="record.param != null">
<if test="record.createdAt != null"> param = #{record.param,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, </if>
</if> <if test="record.plginRow != null">
<if test="record.updatedAt != null"> plgin_row = #{record.plginRow,jdbcType=INTEGER},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, </if>
</if> <if test="record.plginCol != null">
<if test="record.recStatus != null"> plgin_col = #{record.plginCol,jdbcType=INTEGER},
rec_status = #{record.recStatus,jdbcType=TINYINT}, </if>
</if> <if test="record.taskDetailId != null">
<if test="record.colspan != null"> task_detail_id = #{record.taskDetailId,jdbcType=BIGINT},
colspan = #{record.colspan,jdbcType=INTEGER}, </if>
</if> <if test="record.pluginId != null">
<if test="record.rowspan != null"> plugin_id = #{record.pluginId,jdbcType=BIGINT},
rowspan = #{record.rowspan,jdbcType=INTEGER}, </if>
</if> <if test="record.businessPluginId != null">
<if test="record.code != null"> business_plugin_id = #{record.businessPluginId,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR}, </if>
</if> <if test="record.code != null">
</set> code = #{record.code,jdbcType=VARCHAR},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> <if test="record.pluginInner != null">
</if> plugin_inner = #{record.pluginInner,jdbcType=TINYINT},
</update> </if>
<update id="updateByExample" parameterType="map"> <if test="record.createdAt != null">
update t_pro_task_plugin created_at = #{record.createdAt,jdbcType=TIMESTAMP},
set id = #{record.id,jdbcType=BIGINT}, </if>
param = #{record.param,jdbcType=VARCHAR}, <if test="record.updatedAt != null">
plgin_row = #{record.plginRow,jdbcType=INTEGER}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
plgin_col = #{record.plginCol,jdbcType=INTEGER}, </if>
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, <if test="record.recStatus != null">
plugin_id = #{record.pluginId,jdbcType=BIGINT}, rec_status = #{record.recStatus,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, </if>
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, <if test="record.colspan != null">
rec_status = #{record.recStatus,jdbcType=TINYINT}, colspan = #{record.colspan,jdbcType=INTEGER},
colspan = #{record.colspan,jdbcType=INTEGER}, </if>
rowspan = #{record.rowspan,jdbcType=INTEGER}, <if test="record.rowspan != null">
code = #{record.code,jdbcType=VARCHAR} rowspan = #{record.rowspan,jdbcType=INTEGER},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> </set>
</if> <if test="_parameter != null">
</update> <include refid="Update_By_Example_Where_Clause" />
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> </if>
update t_pro_task_plugin </update>
<set> <update id="updateByExample" parameterType="map">
<if test="param != null"> update t_pro_task_plugin
param = #{param,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=BIGINT},
</if> param = #{record.param,jdbcType=VARCHAR},
<if test="plginRow != null"> plgin_row = #{record.plginRow,jdbcType=INTEGER},
plgin_row = #{plginRow,jdbcType=INTEGER}, plgin_col = #{record.plginCol,jdbcType=INTEGER},
</if> task_detail_id = #{record.taskDetailId,jdbcType=BIGINT},
<if test="plginCol != null"> plugin_id = #{record.pluginId,jdbcType=BIGINT},
plgin_col = #{plginCol,jdbcType=INTEGER}, business_plugin_id = #{record.businessPluginId,jdbcType=BIGINT},
</if> code = #{record.code,jdbcType=VARCHAR},
<if test="taskDetailId != null"> plugin_inner = #{record.pluginInner,jdbcType=TINYINT},
task_detail_id = #{taskDetailId,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if> updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
<if test="pluginId != null"> rec_status = #{record.recStatus,jdbcType=TINYINT},
plugin_id = #{pluginId,jdbcType=BIGINT}, colspan = #{record.colspan,jdbcType=INTEGER},
</if> rowspan = #{record.rowspan,jdbcType=INTEGER}
<if test="createdAt != null"> <if test="_parameter != null">
created_at = #{createdAt,jdbcType=TIMESTAMP}, <include refid="Update_By_Example_Where_Clause" />
</if> </if>
<if test="updatedAt != null"> </update>
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, <update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin">
</if> update t_pro_task_plugin
<if test="recStatus != null"> <set>
rec_status = #{recStatus,jdbcType=TINYINT}, <if test="param != null">
</if> param = #{param,jdbcType=VARCHAR},
<if test="colspan != null"> </if>
colspan = #{colspan,jdbcType=INTEGER}, <if test="plginRow != null">
</if> plgin_row = #{plginRow,jdbcType=INTEGER},
<if test="rowspan != null"> </if>
rowspan = #{rowspan,jdbcType=INTEGER}, <if test="plginCol != null">
</if> plgin_col = #{plginCol,jdbcType=INTEGER},
<if test="code != null"> </if>
code = #{code,jdbcType=VARCHAR}, <if test="taskDetailId != null">
</if> task_detail_id = #{taskDetailId,jdbcType=BIGINT},
</set> </if>
where id = #{id,jdbcType=BIGINT} <if test="pluginId != null">
</update> plugin_id = #{pluginId,jdbcType=BIGINT},
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> </if>
update t_pro_task_plugin <if test="businessPluginId != null">
set param = #{param,jdbcType=VARCHAR}, business_plugin_id = #{businessPluginId,jdbcType=BIGINT},
plgin_row = #{plginRow,jdbcType=INTEGER}, </if>
plgin_col = #{plginCol,jdbcType=INTEGER}, <if test="code != null">
task_detail_id = #{taskDetailId,jdbcType=BIGINT}, code = #{code,jdbcType=VARCHAR},
plugin_id = #{pluginId,jdbcType=BIGINT}, </if>
created_at = #{createdAt,jdbcType=TIMESTAMP}, <if test="pluginInner != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, plugin_inner = #{pluginInner,jdbcType=TINYINT},
rec_status = #{recStatus,jdbcType=TINYINT}, </if>
colspan = #{colspan,jdbcType=INTEGER}, <if test="createdAt != null">
rowspan = #{rowspan,jdbcType=INTEGER}, created_at = #{createdAt,jdbcType=TIMESTAMP},
code = #{code,jdbcType=VARCHAR} </if>
where id = #{id,jdbcType=BIGINT} <if test="updatedAt != null">
</update> updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
<if test="colspan != null">
colspan = #{colspan,jdbcType=INTEGER},
</if>
<if test="rowspan != null">
rowspan = #{rowspan,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin">
update t_pro_task_plugin
set param = #{param,jdbcType=VARCHAR},
plgin_row = #{plginRow,jdbcType=INTEGER},
plgin_col = #{plginCol,jdbcType=INTEGER},
task_detail_id = #{taskDetailId,jdbcType=BIGINT},
plugin_id = #{pluginId,jdbcType=BIGINT},
business_plugin_id = #{businessPluginId,jdbcType=BIGINT},
code = #{code,jdbcType=VARCHAR},
plugin_inner = #{pluginInner,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT},
colspan = #{colspan,jdbcType=INTEGER},
rowspan = #{rowspan,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>

6
src/main/resources/mbg.xml

@ -21,7 +21,7 @@
<!--数据库连接的信息:驱动类、连接地址、用户名、密码 --> <!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" <jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://test.tall.wiki:3306/pt_ccsens?useUnicode=true&amp;characterEncoding=UTF-8&amp;tinyInt1isBit=false" connectionURL="jdbc:mysql://101.201.226.163:3306/pt_ccsens?useUnicode=true&amp;characterEncoding=UTF-8&amp;tinyInt1isBit=false"
userId="root" userId="root"
password="po3OynBO[M3579p6L7)o"> password="po3OynBO[M3579p6L7)o">
</jdbcConnection> </jdbcConnection>
@ -82,8 +82,8 @@
<!-- <table tableName="t_pro_task_flow" domainObjectName="ProTaskFlow"></table>--> <!-- <table tableName="t_pro_task_flow" domainObjectName="ProTaskFlow"></table>-->
<!-- <table tableName="t_pro_task_notify" domainObjectName="ProTaskNotify"></table>--> <!-- <table tableName="t_pro_task_notify" domainObjectName="ProTaskNotify"></table>-->
<!-- <table tableName="t_pro_task_panel_info" domainObjectName="ProTaskPanelInfo"></table>--> <!-- <table tableName="t_pro_task_panel_info" domainObjectName="ProTaskPanelInfo"></table>-->
<table tableName="t_pro_user" domainObjectName="ProUser"> </table> <!-- <table tableName="t_pro_user" domainObjectName="ProUser"> </table>-->
<!-- <table tableName="t_pro_task_plugin" domainObjectName="ProTaskPlugin"> </table>--> <table tableName="t_pro_task_plugin" domainObjectName="ProTaskPlugin"> </table>
<!-- <table tableName="t_pro_task_process" domainObjectName="ProTaskProcess"></table>--> <!-- <table tableName="t_pro_task_process" domainObjectName="ProTaskProcess"></table>-->
<!-- <table tableName="t_pro_task_share" domainObjectName="ProTaskShare"></table>--> <!-- <table tableName="t_pro_task_share" domainObjectName="ProTaskShare"></table>-->
<!-- <table tableName="t_pro_task_status_record" domainObjectName="ProTaskStatusRecord"></table>--> <!-- <table tableName="t_pro_task_status_record" domainObjectName="ProTaskStatusRecord"></table>-->

Loading…
Cancel
Save