From 5e8d9026b50aa2bc73f21dcbdaba46ba9343611e Mon Sep 17 00:00:00 2001 From: wangfs <15029758498@163.com> Date: Thu, 2 Aug 2018 11:07:55 +0800 Subject: [PATCH] 提交 --- src/main/java/com/zteits/oa/api/dto/asradaily/AsraProjectAndPersonNumDTO.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/zteits/oa/api/dto/asraop/AsraOpDTO.java | 15 ++++++++++++++- src/main/java/com/zteits/oa/api/dto/asraop/LoginOathRes.java | 13 +++++++++++++ src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java | 7 +++---- src/main/java/com/zteits/oa/report/dao/AsraOpRelationsDao.java | 30 ------------------------------ src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java | 35 +++++++++++++++++------------------ src/main/java/com/zteits/oa/report/dao/impl/AsraOpRelationsDaoImpl.java | 37 ------------------------------------- src/main/java/com/zteits/oa/report/domain/AsraOp.java | 13 +++++++++++++ src/main/java/com/zteits/oa/report/domain/AsraOpExample.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/zteits/oa/report/mapper/AsraOpRelationsMapper.java | 30 ------------------------------ src/main/java/com/zteits/oa/report/web/OAuthController.java | 37 ++++++++++++++++++++++++++++++++++++- src/main/resources/generator/generatorConfig.xml | 17 +---------------- src/main/resources/mybatis/mapper/AsraOpMapper.xml | 25 ++++++++++++++++++++----- src/main/resources/mybatis/mapper/AsraOpRelationsMapper.xml | 196 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 14 files changed, 208 insertions(+), 338 deletions(-) delete mode 100644 src/main/java/com/zteits/oa/report/dao/AsraOpRelationsDao.java delete mode 100644 src/main/java/com/zteits/oa/report/dao/impl/AsraOpRelationsDaoImpl.java delete mode 100644 src/main/java/com/zteits/oa/report/mapper/AsraOpRelationsMapper.java delete mode 100644 src/main/resources/mybatis/mapper/AsraOpRelationsMapper.xml diff --git a/src/main/java/com/zteits/oa/api/dto/asradaily/AsraProjectAndPersonNumDTO.java b/src/main/java/com/zteits/oa/api/dto/asradaily/AsraProjectAndPersonNumDTO.java index 1e75780..e320da8 100644 --- a/src/main/java/com/zteits/oa/api/dto/asradaily/AsraProjectAndPersonNumDTO.java +++ b/src/main/java/com/zteits/oa/api/dto/asradaily/AsraProjectAndPersonNumDTO.java @@ -45,6 +45,37 @@ public class AsraProjectAndPersonNumDTO extends BaiscDTO{ public void setCommitPersonNum(Integer commitPersonNum) { this.commitPersonNum = commitPersonNum; } + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((projectId == null) ? 0 : projectId.hashCode()); + result = prime * result + ((projectName == null) ? 0 : projectName.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + AsraProjectAndPersonNumDTO other = (AsraProjectAndPersonNumDTO) obj; + if (projectId == null) { + if (other.projectId != null) + return false; + } else if (!projectId.equals(other.projectId)) + return false; + if (projectName == null) { + if (other.projectName != null) + return false; + } else if (!projectName.equals(other.projectName)) + return false; + return true; + } @Override public String toString() { return "AsraProjectAndPersonNumDTO [projectId=" + projectId + ", projectName=" + projectName diff --git a/src/main/java/com/zteits/oa/api/dto/asraop/AsraOpDTO.java b/src/main/java/com/zteits/oa/api/dto/asraop/AsraOpDTO.java index ac1566f..78b471b 100644 --- a/src/main/java/com/zteits/oa/api/dto/asraop/AsraOpDTO.java +++ b/src/main/java/com/zteits/oa/api/dto/asraop/AsraOpDTO.java @@ -1,6 +1,7 @@ package com.zteits.oa.api.dto.asraop; import java.util.Date; +import java.util.List; import com.zteits.oa.api.base.bean.BaiscDTO; /** @@ -77,8 +78,20 @@ public class AsraOpDTO extends BaiscDTO{ /**描述*/ private String remark; + /**员工ids.*/ + private List opIds; + + + + public List getOpIds() { + return opIds; + } + + public void setOpIds(List opIds) { + this.opIds = opIds; + } - /**获取主键*/ + /**获取主键*/ public Long getId() { return id; } diff --git a/src/main/java/com/zteits/oa/api/dto/asraop/LoginOathRes.java b/src/main/java/com/zteits/oa/api/dto/asraop/LoginOathRes.java index f897663..ded1088 100644 --- a/src/main/java/com/zteits/oa/api/dto/asraop/LoginOathRes.java +++ b/src/main/java/com/zteits/oa/api/dto/asraop/LoginOathRes.java @@ -1,6 +1,7 @@ package com.zteits.oa.api.dto.asraop; import java.io.Serializable; +import java.util.List; /** * 登陆授权response.
@@ -52,6 +53,18 @@ public class LoginOathRes implements Serializable { private Long cityId; /** 地市名称 */ private String cityName; + + /**员工ids.*/ + private List opIds; + + + + public List getOpIds() { + return opIds; + } + public void setOpIds(List opIds) { + this.opIds = opIds; + } public String getAccessToken() { return accessToken; } diff --git a/src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java b/src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java index ad37ff3..03b33be 100644 --- a/src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java +++ b/src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java @@ -5,7 +5,6 @@ import com.zteits.oa.api.base.bean.BizResult; import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; import com.zteits.oa.api.dto.asraoprelations.param.AsraOpRelationsQueryReq; import com.zteits.oa.api.service.report.query.AsraOpRelationsQueryService; -import com.zteits.oa.report.dao.AsraOpRelationsDao; import com.zteits.oa.report.domain.AsraOpRelations; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -29,14 +28,14 @@ import java.util.List; @Service public class AsraOpRelationsQueryServiceImpl implements AsraOpRelationsQueryService { - @Autowired - private AsraOpRelationsDao asraOpRelationsDao; + //@Autowired + //private AsraOpRelationsDao asraOpRelationsDao; @Override public BizResult> queryAsraOpRelations(AsraOpRelationsQueryReq asraOpRelationsQueryReq) { List asraOpRelationsDTOs = new ArrayList<>(); - List asraOpRelationsList = asraOpRelationsDao.queryAsraOpRelations(asraOpRelationsQueryReq.getParentId()); + List asraOpRelationsList = null;//asraOpRelationsDao.queryAsraOpRelations(asraOpRelationsQueryReq.getParentId()); if(CollectionUtil.isNotEmpty(asraOpRelationsList)) { BeanUtils.copyProperties(asraOpRelationsList, asraOpRelationsDTOs, AsraOpRelationsDTO.class); } diff --git a/src/main/java/com/zteits/oa/report/dao/AsraOpRelationsDao.java b/src/main/java/com/zteits/oa/report/dao/AsraOpRelationsDao.java deleted file mode 100644 index 4b556b5..0000000 --- a/src/main/java/com/zteits/oa/report/dao/AsraOpRelationsDao.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.zteits.oa.report.dao; - -import com.zteits.oa.report.domain.AsraOpRelations; - -import java.util.List; - -/** - * Copyright: Copyright (c) 2018 zteits - * - * @Description: - * @version: v1.0.0 - * @author: xiejianpeng - * @date: 2018/7/31 11 - * Modification History: - * Date Author Version Description - * ---------------------------------------------------------* - * 2018/7/31 xiejianpeng v1.0.0 创建 - */ -public interface AsraOpRelationsDao { - - /** - * 根据登录工号查询管理的员工信息 - * @param - * @return - * @Author: xiejianpeng - * @Date: 2018/7/31 11:42 - * - */ - List queryAsraOpRelations(Long parentId); -} diff --git a/src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java b/src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java index a8f2543..50dd97c 100644 --- a/src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java +++ b/src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java @@ -19,7 +19,6 @@ import com.zteits.oa.report.domain.AsraOpRelationsExample; import com.zteits.oa.report.domain.sdo.AsraDailyDO; import com.zteits.oa.report.domain.sdo.AsraDailyOpNumForCurrentDayDO; import com.zteits.oa.report.mapper.AsraDailyMapper; -import com.zteits.oa.report.mapper.AsraOpRelationsMapper; import com.zteits.oa.report.mapper.smapper.AsraDailySmapper; /** @@ -39,8 +38,7 @@ public class AsraDailyDaoImpl implements AsraDailyDao{ @Autowired private AsraDailyMapper asraDailyMapper; - @Autowired - private AsraOpRelationsMapper asraOpRelationsMapper; + @Autowired private AsraDailySmapper asraDailySmapper; @@ -73,21 +71,22 @@ public class AsraDailyDaoImpl implements AsraDailyDao{ public AsraDailyOpNumForCurrentDayDO queryAsraDailyOpNumForCurrentDay(AsraDailyForTotalNumAndDetailReq request) { AsraDailyOpNumForCurrentDayDO asraDailyOpNumForCurrentDayDO = new AsraDailyOpNumForCurrentDayDO(); List opList = new ArrayList<>(); - //1.总人数获取 - AsraOpRelationsExample example = new AsraOpRelationsExample(); - example.createCriteria().andParentIdEqualTo(request.getOpId()); - List selectByExample = asraOpRelationsMapper.selectByExample(example); - int employeeTotal = (CollectionUtil.isNotEmpty(selectByExample) ? selectByExample.size() +1 : 1); - asraDailyOpNumForCurrentDayDO.setEmployeeTotal(employeeTotal); - //获取员工人数 - if(CollectionUtil.isNotEmpty(selectByExample)){ - for(AsraOpRelations op:selectByExample){ - if(op == null){ - continue; - } - opList.add(op.getOpId()); - } - } + int employeeTotal = 0; +// //1.总人数获取 +// AsraOpRelationsExample example = new AsraOpRelationsExample(); +// example.createCriteria().andParentIdEqualTo(request.getOpId()); +// //List selectByExample = asraOpRelationsMapper.selectByExample(example); +// int employeeTotal = (CollectionUtil.isNotEmpty(selectByExample) ? selectByExample.size() +1 : 1); +// asraDailyOpNumForCurrentDayDO.setEmployeeTotal(employeeTotal); +// //获取员工人数 +// if(CollectionUtil.isNotEmpty(selectByExample)){ +// for(AsraOpRelations op:selectByExample){ +// if(op == null){ +// continue; +// } +// opList.add(op.getOpId()); +// } +// } opList.add(request.getOpId());//查询自己id //2.查询今日日报填写人数 AsraDailyExample exampleTwo = new AsraDailyExample(); diff --git a/src/main/java/com/zteits/oa/report/dao/impl/AsraOpRelationsDaoImpl.java b/src/main/java/com/zteits/oa/report/dao/impl/AsraOpRelationsDaoImpl.java deleted file mode 100644 index 68d80a4..0000000 --- a/src/main/java/com/zteits/oa/report/dao/impl/AsraOpRelationsDaoImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.zteits.oa.report.dao.impl; - -import com.zteits.oa.report.dao.AsraOpRelationsDao; -import com.zteits.oa.report.domain.AsraOpRelations; -import com.zteits.oa.report.domain.AsraOpRelationsExample; -import com.zteits.oa.report.mapper.AsraOpRelationsMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * Copyright: Copyright (c) 2018 zteits - * - * @Description: - * @version: v1.0.0 - * @author: xiejianpeng - * @date: 2018/7/31 11 - * Modification History: - * Date Author Version Description - * ---------------------------------------------------------* - * 2018/7/31 xiejianpeng v1.0.0 创建 - */ -@Component -public class AsraOpRelationsDaoImpl implements AsraOpRelationsDao { - - @Autowired - private AsraOpRelationsMapper asraOpRelationsMapper; - - @Override - public List queryAsraOpRelations(Long parentId) { - AsraOpRelationsExample example = new AsraOpRelationsExample(); - example.createCriteria().andParentIdEqualTo(parentId); - List asraOpRelationsList = asraOpRelationsMapper.selectByExample(example); - return asraOpRelationsList; - } -} diff --git a/src/main/java/com/zteits/oa/report/domain/AsraOp.java b/src/main/java/com/zteits/oa/report/domain/AsraOp.java index ee8b586..263597d 100644 --- a/src/main/java/com/zteits/oa/report/domain/AsraOp.java +++ b/src/main/java/com/zteits/oa/report/domain/AsraOp.java @@ -54,6 +54,9 @@ public class AsraOp { /**描述*/ private String remark; + /**父级ID 顶级为-1*/ + private Long parentId; + /**获取主键*/ public Long getId() { return id; @@ -223,4 +226,14 @@ public class AsraOp { public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); } + + /**获取父级ID 顶级为-1*/ + public Long getParentId() { + return parentId; + } + + /**设置父级ID 顶级为-1*/ + public void setParentId(Long parentId) { + this.parentId = parentId; + } } \ No newline at end of file diff --git a/src/main/java/com/zteits/oa/report/domain/AsraOpExample.java b/src/main/java/com/zteits/oa/report/domain/AsraOpExample.java index ddca246..06e93aa 100644 --- a/src/main/java/com/zteits/oa/report/domain/AsraOpExample.java +++ b/src/main/java/com/zteits/oa/report/domain/AsraOpExample.java @@ -1224,6 +1224,66 @@ public class AsraOpExample { addCriterion("remark not between", value1, value2, "remark"); return (Criteria) this; } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/zteits/oa/report/mapper/AsraOpRelationsMapper.java b/src/main/java/com/zteits/oa/report/mapper/AsraOpRelationsMapper.java deleted file mode 100644 index 4e07f71..0000000 --- a/src/main/java/com/zteits/oa/report/mapper/AsraOpRelationsMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.zteits.oa.report.mapper; - -import com.zteits.oa.report.domain.AsraOpRelations; -import com.zteits.oa.report.domain.AsraOpRelationsExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface AsraOpRelationsMapper { - long countByExample(AsraOpRelationsExample example); - - int deleteByExample(AsraOpRelationsExample example); - - int deleteByPrimaryKey(Long id); - - int insert(AsraOpRelations record); - - int insertSelective(AsraOpRelations record); - - List selectByExample(AsraOpRelationsExample example); - - AsraOpRelations selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") AsraOpRelations record, @Param("example") AsraOpRelationsExample example); - - int updateByExample(@Param("record") AsraOpRelations record, @Param("example") AsraOpRelationsExample example); - - int updateByPrimaryKeySelective(AsraOpRelations record); - - int updateByPrimaryKey(AsraOpRelations record); -} \ No newline at end of file diff --git a/src/main/java/com/zteits/oa/report/web/OAuthController.java b/src/main/java/com/zteits/oa/report/web/OAuthController.java index 6c85feb..f3a985b 100644 --- a/src/main/java/com/zteits/oa/report/web/OAuthController.java +++ b/src/main/java/com/zteits/oa/report/web/OAuthController.java @@ -1,9 +1,11 @@ package com.zteits.oa.report.web; +import java.util.ArrayList; +import java.util.List; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import com.zteits.oa.api.service.report.query.AsraOpQueryService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import com.alibaba.fastjson.JSONObject; import com.zteits.oa.api.base.bean.BizResult; import com.zteits.oa.api.base.constants.ErrorType; import com.zteits.oa.api.base.constants.SessionEnum; @@ -20,6 +23,7 @@ import com.zteits.oa.api.dto.asraop.AsraOpDTO; import com.zteits.oa.api.dto.asraop.LoginOathRes; import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; import com.zteits.oa.api.dto.asraop.param.LoginOauthReq; +import com.zteits.oa.api.service.report.query.AsraOpQueryService; import com.zteits.oa.report.vo.OAuthResult; import com.zteits.oa.util.MD5Utils; @@ -85,6 +89,13 @@ public class OAuthController { if(isCheckSuccess){ + + List opIds = new ArrayList<>(); + opIds.add(asraOpDTO.getId()); + /**递归查询员工ids.*/ + opIds = queryOpTreeByOpId(asraOpDTO.getParentId(),opIds); + logger.info("---获取到的opIds={}",JSONObject.toJSON(opIds)); + asraOpDTO.setOpIds(opIds); HttpSession session = request.getSession(); session.setAttribute(SessionEnum.USER_INFO.key(), asraOpDTO); logger.info("---获取到的session_id={}",session.getId()); @@ -121,6 +132,30 @@ public class OAuthController { logger.info("end用户登出.."); return new OAuthResult<>(true); } + + /** + * 递归查询员工id.
+ * @param parentOpId + * @param opList + * @return + * 2018年8月2日 wangfs.
+ */ + private List queryOpTreeByOpId(Long parentOpId,List opList){ + if(parentOpId != null && !parentOpId.equals(-1L)){ + AsraOpQueryReq asraOpQueryRe = new AsraOpQueryReq(); + asraOpQueryRe.setId(parentOpId); + BizResult asraOpReult = asraOpQueryService.queryAsraOp(asraOpQueryRe); + if(asraOpReult != null && asraOpReult.getData() != null){ + AsraOpDTO data = asraOpReult.getData(); + if(data != null){ + opList.add(data.getId()); + } + queryOpTreeByOpId(data.getParentId(),opList); + } + } + + return opList; + } } diff --git a/src/main/resources/generator/generatorConfig.xml b/src/main/resources/generator/generatorConfig.xml index 761b5d0..4e01980 100644 --- a/src/main/resources/generator/generatorConfig.xml +++ b/src/main/resources/generator/generatorConfig.xml @@ -38,22 +38,7 @@ - - - -
- - - -
- - - -
- - - -
+ diff --git a/src/main/resources/mybatis/mapper/AsraOpMapper.xml b/src/main/resources/mybatis/mapper/AsraOpMapper.xml index 384fd33..adfffd6 100644 --- a/src/main/resources/mybatis/mapper/AsraOpMapper.xml +++ b/src/main/resources/mybatis/mapper/AsraOpMapper.xml @@ -19,6 +19,7 @@ + @@ -81,7 +82,7 @@ id, login_code, login_password, op_name, email, role_id, city_id, city_name, is_remind_email, data_state, create_empid, create_emp_name, create_date, modfiy_empid, modfiy_emp_name, - modfiy_date, remark + modfiy_date, remark, parent_id @@ -296,6 +303,9 @@ remark = #{record.remark,jdbcType=VARCHAR}, + + parent_id = #{record.parentId,jdbcType=BIGINT}, + @@ -319,7 +329,8 @@ modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR}, modfiy_emp_name = #{record.modfiyEmpName,jdbcType=VARCHAR}, modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP}, - remark = #{record.remark,jdbcType=VARCHAR} + remark = #{record.remark,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT} @@ -375,6 +386,9 @@ remark = #{remark,jdbcType=VARCHAR}, + + parent_id = #{parentId,jdbcType=BIGINT}, + where id = #{id,jdbcType=BIGINT} @@ -395,7 +409,8 @@ modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR}, modfiy_emp_name = #{modfiyEmpName,jdbcType=VARCHAR}, modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP}, - remark = #{remark,jdbcType=VARCHAR} + remark = #{remark,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/AsraOpRelationsMapper.xml b/src/main/resources/mybatis/mapper/AsraOpRelationsMapper.xml deleted file mode 100644 index 650f751..0000000 --- a/src/main/resources/mybatis/mapper/AsraOpRelationsMapper.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, parent_id, op_id, data_state - - - - - delete from asra_op_relations - where id = #{id,jdbcType=BIGINT} - - - delete from asra_op_relations - - - - - - - SELECT LAST_INSERT_ID() - - insert into asra_op_relations (parent_id, op_id, data_state - ) - values (#{parentId,jdbcType=BIGINT}, #{opId,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER} - ) - - - - SELECT LAST_INSERT_ID() - - insert into asra_op_relations - - - parent_id, - - - op_id, - - - data_state, - - - - - #{parentId,jdbcType=BIGINT}, - - - #{opId,jdbcType=BIGINT}, - - - #{dataState,jdbcType=INTEGER}, - - - - - - update asra_op_relations - - - id = #{record.id,jdbcType=BIGINT}, - - - parent_id = #{record.parentId,jdbcType=BIGINT}, - - - op_id = #{record.opId,jdbcType=BIGINT}, - - - data_state = #{record.dataState,jdbcType=INTEGER}, - - - - - - - - update asra_op_relations - set id = #{record.id,jdbcType=BIGINT}, - parent_id = #{record.parentId,jdbcType=BIGINT}, - op_id = #{record.opId,jdbcType=BIGINT}, - data_state = #{record.dataState,jdbcType=INTEGER} - - - - - - update asra_op_relations - - - parent_id = #{parentId,jdbcType=BIGINT}, - - - op_id = #{opId,jdbcType=BIGINT}, - - - data_state = #{dataState,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=BIGINT} - - - update asra_op_relations - set parent_id = #{parentId,jdbcType=BIGINT}, - op_id = #{opId,jdbcType=BIGINT}, - data_state = #{dataState,jdbcType=INTEGER} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file -- libgit2 0.21.4