Selaa lähdekoodia

增加应用指定机器人功能

dev-lcr
lcr 4 kuukautta sitten
vanhempi
commit
9b002d60f5
11 muutettua tiedostoa jossa 459 lisäystä ja 17 poistoa
  1. +4
    -0
      ruoyi-business/pom.xml
  2. +64
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/controller/ApplyRebotController.java
  3. +9
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/controller/RebotController.java
  4. +56
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/domain/ApplyRebot.java
  5. +54
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/UpdateApplyRebotBO.java
  6. +29
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/mapper/ApplyRebotMapper.java
  7. +40
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/service/IApplyRebotService.java
  8. +56
    -13
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyPlanServiceImpl.java
  9. +87
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyRebotServiceImpl.java
  10. +8
    -4
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyServiceImpl.java
  11. +52
    -0
      ruoyi-business/src/main/resources/mapper/business/ApplyRebotMapper.xml

+ 4
- 0
ruoyi-business/pom.xml Näytä tiedosto

@@ -50,6 +50,10 @@
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>

</dependencies>


+ 64
- 0
ruoyi-business/src/main/java/com/ruoyi/business/controller/ApplyRebotController.java Näytä tiedosto

@@ -0,0 +1,64 @@
package com.ruoyi.business.controller;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.business.domain.*;
import com.ruoyi.business.domain.bo.UpdateApplyRebotBO;
import com.ruoyi.business.domain.vo.ListApplyVO;
import com.ruoyi.business.service.IApplyPlanLogService;
import com.ruoyi.business.service.IApplyPlanService;
import com.ruoyi.business.service.IApplyRebotService;
import com.ruoyi.business.service.IApplyService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.PlanRunStatus;
import com.ruoyi.common.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
* 应用信息管理Controller
*
* @author LiuChengRan
* @date 2024-06-13
*/
@Api(tags = "应用和机器人关系管理接口")
@RestController
@RequestMapping("/business/ctApplyRebot")
public class ApplyRebotController extends BaseController {
@Autowired
private IApplyRebotService applyRebotService;


/**
* 查询应用信息管理列表
*/
@ApiOperation(value = "配置应用机器人绑定关系", httpMethod = "GET", response = Apply.class)
@PostMapping("/updateApplyRebot")
public AjaxResult updateApplyRebot(@RequestBody UpdateApplyRebotBO updateApplyRebotBO) {

return toAjax(applyRebotService.updateApplyRebot( updateApplyRebotBO));
}

/**
* 查询应用信息管理列表
*/
@ApiOperation(value = "查询所有应用和机器人绑定列表", httpMethod = "GET", response = Apply.class)
@GetMapping("/listAll")
public AjaxResult listAll(ApplyRebot applyRebot) {
List<ApplyRebot> applyRebotList = applyRebotService.list(applyRebot);
return AjaxResult.success(applyRebotList);
}


}

+ 9
- 0
ruoyi-business/src/main/java/com/ruoyi/business/controller/RebotController.java Näytä tiedosto

@@ -62,6 +62,15 @@ public class RebotController extends BaseController {
List<Rebot> list = rebotService.list(rebot);
return AjaxResult.success(list);
}
/**
* 查询所有机器人
*/
@ApiOperation(value = "查询所有机器人", httpMethod = "GET", response = Rebot.class)
@GetMapping("/listRebotAll")
public AjaxResult listRebotAll(Rebot rebot) {
List<Rebot> list = rebotService.list(rebot);
return AjaxResult.success(list);
}

/**
* 查询机器人管理列表


+ 56
- 0
ruoyi-business/src/main/java/com/ruoyi/business/domain/ApplyRebot.java Näytä tiedosto

@@ -0,0 +1,56 @@
package com.ruoyi.business.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
* 应用信息管理对象 ct_apply
*
* @author LiuChengRan
* @date 2024-06-13
*/
@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="ApplyRebot",description = "应用和机器人关系绑定")
@TableName(value = "ct_apply_rebot")
public class ApplyRebot extends BaseEntity
{
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/** 应用id */
@Excel(name = "应用id")
@ApiModelProperty(name="applyId",value = "应用id")
private String applyId;
/** 机器人名称 */
@Excel(name = "机器人名称")
@ApiModelProperty(name="rebotName",value = "机器人名称")
private String rebotName;

@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("deleted", getDeleted())
.toString();
}
}

+ 54
- 0
ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/UpdateApplyRebotBO.java Näytä tiedosto

@@ -0,0 +1,54 @@
package com.ruoyi.business.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
* 应用信息管理对象 ct_apply
*
* @author LiuChengRan
* @date 2024-06-13
*/
@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="UpdateApplyRebotBO",description = "应用和机器人关系绑定")
public class UpdateApplyRebotBO extends BaseEntity
{
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/** 应用id */
@Excel(name = "应用id")
@ApiModelProperty(name="applyId",value = "应用id")
private String applyId;
/** 机器人名称 */
@Excel(name = "机器人名称列表")
@ApiModelProperty(name="optRebot",value = "机器人名称列表")
private List<String> optRebot;

@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("deleted", getDeleted())
.toString();
}
}

+ 29
- 0
ruoyi-business/src/main/java/com/ruoyi/business/mapper/ApplyRebotMapper.java Näytä tiedosto

@@ -0,0 +1,29 @@
package com.ruoyi.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.business.domain.Apply;
import com.ruoyi.business.domain.ApplyRebot;
import com.ruoyi.business.domain.vo.ListApplyVO;

import java.util.List;

/**
* 应用机器人关联关系
*
* @author LiuChengRan
* @date 2024-06-13
*/
public interface ApplyRebotMapper extends BaseMapper<ApplyRebot>
{

/**
* 查询应用信息管理列表
*
* @param applyRebot 应用信息管理
* @return 应用信息管理集合
*/
List<ApplyRebot> selectApplyRebotList(ApplyRebot applyRebot);



}

+ 40
- 0
ruoyi-business/src/main/java/com/ruoyi/business/service/IApplyRebotService.java Näytä tiedosto

@@ -0,0 +1,40 @@
package com.ruoyi.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.business.domain.Apply;
import com.ruoyi.business.domain.ApplyPlan;
import com.ruoyi.business.domain.ApplyPlanLog;
import com.ruoyi.business.domain.ApplyRebot;
import com.ruoyi.business.domain.bo.ApplyStartBO;
import com.ruoyi.business.domain.bo.JobQueryBO;
import com.ruoyi.business.domain.bo.UpdateApplyRebotBO;
import com.ruoyi.business.domain.vo.JobQueryVO;
import com.ruoyi.business.domain.vo.JobStartVO;
import com.ruoyi.business.domain.vo.ListApplyVO;

import java.util.List;

/**
* 应用信息管理Service接口
*
* @author LiuChengRan
* @date 2024-06-13
*/
public interface IApplyRebotService extends IService<ApplyRebot>
{

/**
* 查询应用机器人关系列表
*
* @param applyRebot 应用机器人关系
* @return 应用信息管理集合
*/
List<ApplyRebot> list(ApplyRebot applyRebot);

/**
* 绑定机器人关系
* @param updateApplyRebotBO
* @return
*/
boolean updateApplyRebot(UpdateApplyRebotBO updateApplyRebotBO);
}

+ 56
- 13
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyPlanServiceImpl.java Näytä tiedosto

@@ -3,8 +3,6 @@ package com.ruoyi.business.service.impl;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -12,10 +10,9 @@ import java.util.stream.Collectors;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.business.domain.*;
import com.ruoyi.business.domain.bo.*;
import com.ruoyi.business.domain.vo.JobQueryLogVO;
import com.ruoyi.business.domain.vo.JobQueryVO;
import com.ruoyi.business.domain.vo.JobStartVO;
import com.ruoyi.business.domain.vo.ListRebotVO;
@@ -23,7 +20,6 @@ import com.ruoyi.business.service.*;
import com.ruoyi.business.util.YinDaoHttpUtils;
import com.ruoyi.business.yddoman.BaseDTO;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.ExcTypeStatus;
import com.ruoyi.common.enums.PlanRunStatus;
import com.ruoyi.common.enums.RebotStatus;
@@ -36,8 +32,6 @@ import org.quartz.*;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.support.CronSequenceGenerator;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.ApplyPlanMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -69,6 +63,9 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
@Autowired
private IApplyPlanService applyPlanService;

@Autowired
private IApplyRebotService applyRebotService;

/**
* 修改运行时间
*
@@ -241,8 +238,15 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
// rebotService.syn(new Rebot());
return false;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos);
if(null == runRebotList){
log.debug("暂无可用空闲机器人");
return false;
}

List<String> ids = new ArrayList<>();
listRebotVos.forEach(rebot -> {
runRebotList.forEach(rebot -> {
applyPlanList.forEach(e -> {
log.debug("指定时间执行 执行时间:" + e.getExcTime());
if (ids.contains(e.getId())) {
@@ -341,17 +345,21 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
if (listRebotVos.isEmpty()) {
log.debug("暂无空闲机器人");
// 刷新机器人数据
// rebotService.syn(new Rebot());
return false;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos);
if(null == runRebotList){
log.debug("暂无可用空闲机器人");
return false;
}

List<String> ids = new ArrayList<>();
execApplyPlan.forEach(e -> {
if (listRebotVos.isEmpty()) {
// 刷新机器人数据
// rebotService.syn(new Rebot());
return;
}
ListRebotVO rebot = listRebotVos.get(0);
ListRebotVO rebot = runRebotList.get(0);
log.debug("机器人表达式执行调度日志" + rebot.getRobotClientName() + "调度" + e.getAppName() + "应用,排除的应用id为" + ids.toString());
if (ids.contains(e.getId())) {
return;
@@ -599,6 +607,12 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
return false;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos);
if(null == runRebotList){
log.debug("暂无可用空闲机器人");
return false;
}

// 获取每个部门优先级最高的计划
List<ApplyPlan> applyPlans = new ArrayList<>();
applyPlanMap.forEach((k, v) -> {
@@ -611,7 +625,7 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
}
applyPlans.sort((Comparator.comparingInt(ApplyPlan::getPriority)));

for (ListRebotVO listRebotVO : listRebotVos) {
for (ListRebotVO listRebotVO : runRebotList) {
if (applyPlans.isEmpty()) {
log.debug("没有等待执行的计划!");
continue;
@@ -673,6 +687,35 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
return i > 0;
}

/**
* 获取可执行机器人
* @return bool 是否可继续执行
*/
private List<ListRebotVO> getRunRebot(List<ListRebotVO> listRebotVos){
// 查询应用是否有指定机器人,没有则随机指派
List<String> rebotList = applyRebotService.list(new LambdaQueryWrapper<ApplyRebot>().eq(ApplyRebot::getApplyId, applyStartBO.getRobotUuid())).stream().map(ApplyRebot::getRebotName).collect(Collectors.toList());
// 是否继续执行
List<ListRebotVO> runRebotList = new ArrayList<>();
// 如果查到关系,则该应用指定了机器人
if(!rebotList.isEmpty()){
// 遍历可用机器人
listRebotVos.forEach(e->{
// 如果有指定可用
if(rebotList.contains(e.getRobotClientName())){
runRebotList.add(e);
}
});
}else{
runRebotList.addAll(listRebotVos);
}
if(runRebotList.isEmpty()){
return runRebotList;
}else{
return null;
}
}



@Override
@Transactional


+ 87
- 0
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyRebotServiceImpl.java Näytä tiedosto

@@ -0,0 +1,87 @@
package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.*;
import com.ruoyi.business.domain.bo.ApplyStartBO;
import com.ruoyi.business.domain.bo.JobQueryBO;
import com.ruoyi.business.domain.bo.ListApplyBO;
import com.ruoyi.business.domain.bo.UpdateApplyRebotBO;
import com.ruoyi.business.domain.vo.JobQueryVO;
import com.ruoyi.business.domain.vo.JobStartVO;
import com.ruoyi.business.domain.vo.ListApplyVO;
import com.ruoyi.business.mapper.ApplyMapper;
import com.ruoyi.business.mapper.ApplyRebotMapper;
import com.ruoyi.business.service.IApplyPlanService;
import com.ruoyi.business.service.IApplyRebotService;
import com.ruoyi.business.service.IApplyService;
import com.ruoyi.business.service.IResourceLibraryService;
import com.ruoyi.business.util.YinDaoHttpUtils;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.enums.PlanRunStatus;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;

/**
* 应用信息管理Service业务层处理
*
* @author LiuChengRan
* @date 2024-06-13
*/
@Service
public class ApplyRebotServiceImpl extends ServiceImpl<ApplyRebotMapper, ApplyRebot> implements IApplyRebotService {




/**
* 查询应用信息管理列表
*
* @param applyRebot 应用信息管理
* @return 应用信息管理
*/
@Override
public List<ApplyRebot> list(ApplyRebot applyRebot) {
LambdaQueryWrapper<ApplyRebot> eq = new LambdaQueryWrapper<ApplyRebot>().eq(ApplyRebot::getApplyId, applyRebot.getApplyId());
return super.list(eq);
}

/**
* 绑定机器人
* @param updateApplyRebotBO
* @return
*/
@Override
@Transactional
public boolean updateApplyRebot(UpdateApplyRebotBO updateApplyRebotBO) {
this.remove(new LambdaQueryWrapper<ApplyRebot>().eq(ApplyRebot::getApplyId,updateApplyRebotBO.getApplyId()));
if(updateApplyRebotBO.getOptRebot().isEmpty()){
return true;
}
List<ApplyRebot> applyRebots = new ArrayList<>();
updateApplyRebotBO.getOptRebot().forEach(e->{
ApplyRebot applyRebot = new ApplyRebot();
applyRebot.setRebotName(e);
applyRebot.setApplyId(updateApplyRebotBO.getApplyId());
applyRebots.add(applyRebot);
});
return this.saveBatch(applyRebots);
}


}

+ 8
- 4
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyServiceImpl.java Näytä tiedosto

@@ -158,7 +158,7 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
*/
@Override
@DataScope(deptAlias = "apply")
public List<ListApplyVO> list(Apply apply,List<ApplyPlan> planList, List<ApplyPlanLog> planLogList) {
public List<ListApplyVO> list(Apply apply, List<ApplyPlan> planList, List<ApplyPlanLog> planLogList) {
// 按照appId分组
Map<String, List<ApplyPlan>> planMap = planList.stream().collect(Collectors.groupingBy(ApplyPlan::getAppId));
// 日志按照app分组
@@ -172,6 +172,10 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
if (null == applyPlans) {
return;
}
// 未设置人工用时则不统计节约时间
if (null == e.getManualTime()) {
return;
}
// 总计节约时间 (分钟)
AtomicReference<BigDecimal> planTime = new AtomicReference<>(BigDecimal.ZERO);
applyPlans.forEach(plan -> {
@@ -186,12 +190,12 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
long runDate = log.getUpdateTime().getTime() - log.getCreateTime().getTime();
// 转为分钟
BigDecimal min = new BigDecimal((double) runDate / (1000 * 60)).setScale(2, RoundingMode.HALF_UP);
logPlanTime.set(logPlanTime.get().add(min));
// 人工耗时减去实际运行等于节约时间
logPlanTime.set(logPlanTime.get().add(new BigDecimal(e.getManualTime()).subtract(min)));
});
planTime.set(planTime.get().add(logPlanTime.get()));
// planTime.set(planTime.get() + logPlanTime.get());
} else {
planTime.set(planTime.get().add(new BigDecimal(Long.parseLong(plan.getTimeSaving()))));
planTime.set(planTime.get().add(new BigDecimal(e.getManualTime()).subtract(new BigDecimal(plan.getPlanTime()))));
}
});
e.setTimeSaving(planTime.get() + "");


+ 52
- 0
ruoyi-business/src/main/resources/mapper/business/ApplyRebotMapper.xml Näytä tiedosto

@@ -0,0 +1,52 @@
<?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.ruoyi.business.mapper.ApplyRebotMapper">
<!--应用信息管理对象 ct_apply-->
<resultMap type="ApplyRebot" id="ApplyRebotResult">
<!-- 主键 -->
<result property="id" column="id" />
<!-- 应用id -->
<result property="applyId" column="apply_id" />
<!-- 机器人名称 -->
<result property="rebotName" column="rebot_name" />
<!-- 创建者 -->
<result property="createBy" column="create_by" />
<!-- 创建时间 -->
<result property="createTime" column="create_time" />
<!-- 更新者 -->
<result property="updateBy" column="update_by" />
<!-- 更新时间 -->
<result property="updateTime" column="update_time" />
<!-- 备注 -->
<result property="remark" column="remark" />
<!-- 是否删除 -->
<result property="deleted" column="deleted" />
</resultMap>


<sql id="selectApplyRebotVo">
select
ar.id,<!-- 主键 -->
ar.apply_id,<!-- 应用id -->
ar.rebot_name,<!-- 机器人名称 -->
ar.create_by,<!-- 创建者 -->
ar.create_time,<!-- 创建时间 -->
ar.update_by,<!-- 更新者 -->
ar.update_time,<!-- 更新时间 -->
ar.remark,<!-- 备注 -->
ar.deleted
</sql>

<select id="selectApplyRebotList" parameterType="Apply" resultMap="ApplyRebotResult">
<include refid="selectApplyRebotVo"/>
from ct_apply_rebot ar
<where>
deleted = 0
<if test="applyId != null and applyId != ''"> and version = #{applyId}</if>
<if test="rebotName != null and rebotName != ''"> and rebot_name = #{rebotName}</if>
</where>
</select>

</mapper>

Loading…
Peruuta
Tallenna