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>
<dependencies>
<!--cloud 工具类-->
<dependency>
<artifactId>cloudutil</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--TALL_SDK-->
<dependency>
<artifactId>tallsdk</artifactId>
<groupId>com.ccsensptos</groupId>
<version>0.0.1-SNAPSHOT</version>
</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 -->
<dependency>
<groupId>io.netty</groupId>
@ -92,12 +68,6 @@
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
@ -263,6 +233,10 @@
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
@ -279,22 +253,6 @@
</dependency>
</dependencies>
</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>
</build>

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

@ -1,12 +1,9 @@
package com.ccsens.ptccsens;
import com.ccsens.cloudutil.ribbon.RibbonConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
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.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;
@ -14,14 +11,14 @@ import org.springframework.scheduling.annotation.EnableAsync;
/**
* @author whj
*/
@MapperScan(basePackages = {"com.ccsens.ptccsens.persist.*","com.ccsens.common.persist.*"})
@MapperScan(basePackages = {"com.ccsens.ptccsens.persist.*"})
@ServletComponentScan
@EnableAsync
//开启断路器功能
@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
//@EnableCircuitBreaker
//@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
@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 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;
import com.ccsens.ptccsens.util.Constant;
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.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@ -22,7 +25,8 @@ public class DebugController {
})
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
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("测试");
}

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

@ -1,6 +1,6 @@
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.vo.DeliverVo;
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.util.ImageUtil;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.ProjectFinanceDto;
import com.ccsens.ptccsens.bean.vo.OcrVo;
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;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ptccsens.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.ProjectFinanceDto;
import com.ccsens.ptccsens.bean.vo.ProjectFinanceVo;
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;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ptccsens.annotation.MustLogin;
import com.ccsens.ptccsens.bean.dto.FinanceDto;
import com.ccsens.ptccsens.bean.vo.FinanceVo;
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;
import java.io.Serializable;
import java.util.Date;
public class ProTaskPlugin implements Serializable {
private Long id;
private String param;
private Integer plginRow;
private Integer plginCol;
private Long taskDetailId;
private Long pluginId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private Integer colspan;
private Integer rowspan;
private String code;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param == null ? null : param.trim();
}
public Integer getPlginRow() {
return plginRow;
}
public void setPlginRow(Integer plginRow) {
this.plginRow = plginRow;
}
public Integer getPlginCol() {
return plginCol;
}
public void setPlginCol(Integer plginCol) {
this.plginCol = plginCol;
}
public Long getTaskDetailId() {
return taskDetailId;
}
public void setTaskDetailId(Long taskDetailId) {
this.taskDetailId = taskDetailId;
}
public Long getPluginId() {
return pluginId;
}
public void setPluginId(Long pluginId) {
this.pluginId = pluginId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
public Integer getColspan() {
return colspan;
}
public void setColspan(Integer colspan) {
this.colspan = colspan;
}
public Integer getRowspan() {
return rowspan;
}
public void setRowspan(Integer rowspan) {
this.rowspan = rowspan;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
@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(", 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(", code=").append(code);
sb.append("]");
return sb.toString();
}
package com.ccsens.ptccsens.bean.po;
import java.io.Serializable;
import java.util.Date;
public class ProTaskPlugin implements Serializable {
private Long id;
private String param;
private Integer plginRow;
private Integer plginCol;
private Long taskDetailId;
private Long pluginId;
private Long businessPluginId;
private String code;
private Byte pluginInner;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private Integer colspan;
private Integer rowspan;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param == null ? null : param.trim();
}
public Integer getPlginRow() {
return plginRow;
}
public void setPlginRow(Integer plginRow) {
this.plginRow = plginRow;
}
public Integer getPlginCol() {
return plginCol;
}
public void setPlginCol(Integer plginCol) {
this.plginCol = plginCol;
}
public Long getTaskDetailId() {
return taskDetailId;
}
public void setTaskDetailId(Long taskDetailId) {
this.taskDetailId = taskDetailId;
}
public Long getPluginId() {
return pluginId;
}
public void setPluginId(Long pluginId) {
this.pluginId = pluginId;
}
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;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
public Integer getColspan() {
return colspan;
}
public void setColspan(Integer colspan) {
this.colspan = colspan;
}
public Integer getRowspan() {
return rowspan;
}
public void setRowspan(Integer rowspan) {
this.rowspan = rowspan;
}
@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;
import com.ccsens.ptccsens.bean.po.ProTaskPlugin;
import com.ccsens.ptccsens.bean.po.ProTaskPluginExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProTaskPluginMapper {
long countByExample(ProTaskPluginExample example);
int deleteByExample(ProTaskPluginExample example);
int deleteByPrimaryKey(Long id);
int insert(ProTaskPlugin record);
int insertSelective(ProTaskPlugin record);
List<ProTaskPlugin> selectByExample(ProTaskPluginExample example);
ProTaskPlugin selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example);
int updateByExample(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example);
int updateByPrimaryKeySelective(ProTaskPlugin record);
int updateByPrimaryKey(ProTaskPlugin record);
package com.ccsens.ptccsens.persist.mapper;
import com.ccsens.ptccsens.bean.po.ProTaskPlugin;
import com.ccsens.ptccsens.bean.po.ProTaskPluginExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProTaskPluginMapper {
long countByExample(ProTaskPluginExample example);
int deleteByExample(ProTaskPluginExample example);
int deleteByPrimaryKey(Long id);
int insert(ProTaskPlugin record);
int insertSelective(ProTaskPlugin record);
List<ProTaskPlugin> selectByExample(ProTaskPluginExample example);
ProTaskPlugin selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example);
int updateByExample(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example);
int updateByPrimaryKeySelective(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.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;
@ -753,11 +755,18 @@ public class ImportService implements IImportService {
// if(ObjectUtil.isNull(pluginId)){
// 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.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);

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.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.util.BasicsConstant;
import com.ccsens.util.RestTemplateUtil;
import com.ccsens.util.baidu.BaiDuDto;
import com.ccsens.util.baidu.BaiDuUtil;
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
@Override
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));
//通过手机号获取用户在服务内的userId

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

@ -12,13 +12,8 @@ public class Constant {
public static String APP_ID = "1485881608842252289";
/**secret*/
public static String APP_SECRET = "UzCCJfmKfVueCPw8w7ymbIc9vxZaRih4ndPmH38TnM9Wz54C";
/**零号项目Id*/
public static Long ZERO_PROJECT_ID = 1484800783814889472L;
/**引导页任务名*/
public static String ZERO_GUIDE = "引导页";
/**广告页任务名*/
public static String ZERO_ADVERTISING = "广告页";
/**服务code*/
public static String BUSINESS_CODE = "PT";
public static Map<Integer, String> timeUnit = 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
tp.plugin_id AS pluginId,
tp.business_plugin_id AS businessPluginId,
tp.code AS pluginCode,
tp.plugin_inner AS `inner`,
tp.param As param,
tp.plgin_row AS `row`,
tp.plgin_col AS col,

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

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

6
src/main/resources/mbg.xml

@ -21,7 +21,7 @@
<!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
<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"
password="po3OynBO[M3579p6L7)o">
</jdbcConnection>
@ -82,8 +82,8 @@
<!-- <table tableName="t_pro_task_flow" domainObjectName="ProTaskFlow"></table>-->
<!-- <table tableName="t_pro_task_notify" domainObjectName="ProTaskNotify"></table>-->
<!-- <table tableName="t_pro_task_panel_info" domainObjectName="ProTaskPanelInfo"></table>-->
<table tableName="t_pro_user" domainObjectName="ProUser"> </table>
<!-- <table tableName="t_pro_task_plugin" domainObjectName="ProTaskPlugin"> </table>-->
<!-- <table tableName="t_pro_user" domainObjectName="ProUser"> </table>-->
<table tableName="t_pro_task_plugin" domainObjectName="ProTaskPlugin"> </table>
<!-- <table tableName="t_pro_task_process" domainObjectName="ProTaskProcess"></table>-->
<!-- <table tableName="t_pro_task_share" domainObjectName="ProTaskShare"></table>-->
<!-- <table tableName="t_pro_task_status_record" domainObjectName="ProTaskStatusRecord"></table>-->

Loading…
Cancel
Save