Commit f5ab27c5 by huluobin

update

parent b5d148d4
...@@ -38,7 +38,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor { ...@@ -38,7 +38,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
if (!activeProfile.equals("prod")) { if (!activeProfile.equals("prod")) {
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setOaUserId(0); sysUser.setOaUserId(0);
sysUser.setUserName("sys"); sysUser.setUserName("系统日志");
SessionUtils.putSysUser(sysUser); SessionUtils.putSysUser(sysUser);
return true; return true;
} }
......
...@@ -63,8 +63,8 @@ public class UserDomain { ...@@ -63,8 +63,8 @@ public class UserDomain {
public static UserDomain sysUser() { public static UserDomain sysUser() {
UserDomain sysUser = new UserDomain(); UserDomain sysUser = new UserDomain();
sysUser.setId(0); sysUser.setId(0);
sysUser.setUsername("sys"); sysUser.setUsername("系统日志");
sysUser.setUsercode("sys"); sysUser.setUsercode("系统日志");
return sysUser; return sysUser;
} }
} }
...@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -55,14 +54,6 @@ public class OaDepartmentController { ...@@ -55,14 +54,6 @@ public class OaDepartmentController {
} }
@ApiOperation("更新部门审核金额")
@GetMapping("/updateDepartmentMinimumReviewAmount")
public CostResult<Void> updateDepartmentMinimumReviewAmount(@RequestParam Integer oaDepartmentId,
@RequestParam BigDecimal amount) {
oaDepartmentService.updateDepartmentMinimumReviewAmount(oaDepartmentId, amount);
return CostResult.success();
}
@ApiOperation("/查询部门树") @ApiOperation("/查询部门树")
@GetMapping("/queryTree") @GetMapping("/queryTree")
public CostResult<List<OaCompany>> queryTree() { public CostResult<List<OaCompany>> queryTree() {
......
...@@ -57,8 +57,6 @@ public class OaDepartment implements Serializable { ...@@ -57,8 +57,6 @@ public class OaDepartment implements Serializable {
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private Integer sort; private Integer sort;
private BigDecimal departmentMinimumReviewAmount;
@ApiModelProperty(value = "创建人id") @ApiModelProperty(value = "创建人id")
private Integer createUserId; private Integer createUserId;
@ApiModelProperty(value = "创建人姓名") @ApiModelProperty(value = "创建人姓名")
...@@ -78,6 +76,8 @@ public class OaDepartment implements Serializable { ...@@ -78,6 +76,8 @@ public class OaDepartment implements Serializable {
@ApiModelProperty("更新用户姓名") @ApiModelProperty("更新用户姓名")
private String updateUserName; private String updateUserName;
private BigDecimal departmentMinimumReviewAmount;
@TableField(exist = false) @TableField(exist = false)
private List<CostReviewer> costReviewerList; private List<CostReviewer> costReviewerList;
......
...@@ -27,7 +27,7 @@ import java.io.Serializable; ...@@ -27,7 +27,7 @@ import java.io.Serializable;
@NoArgsConstructor @NoArgsConstructor
public class OaUser implements Serializable { public class OaUser implements Serializable {
public static final OaUser DEFAULT = new OaUser(-1, -1, "sys", "sys", "sys", -1, -1, -1,null); public static final OaUser DEFAULT = new OaUser(-1, -1, "系统日志", "系统日志", "系统日志", -1, -1, -1, null);
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -5,7 +5,6 @@ import com.blt.other.module.auth.model.OaCompany; ...@@ -5,7 +5,6 @@ import com.blt.other.module.auth.model.OaCompany;
import com.blt.other.module.auth.model.OaDepartment; import com.blt.other.module.auth.model.OaDepartment;
import org.springframework.lang.NonNull; import org.springframework.lang.NonNull;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -42,14 +41,6 @@ public interface IOaDepartmentService extends IService<OaDepartment> { ...@@ -42,14 +41,6 @@ public interface IOaDepartmentService extends IService<OaDepartment> {
void modifyDepartmentReviewer(Integer userId, Integer oaDepartmentId, List<Integer> departmentReviewerUserIds); void modifyDepartmentReviewer(Integer userId, Integer oaDepartmentId, List<Integer> departmentReviewerUserIds);
/** /**
* 更新部门审核金额
*
* @param oaDepartmentId oa部门id
* @param amount 金额
*/
void updateDepartmentMinimumReviewAmount(Integer oaDepartmentId, BigDecimal amount);
/**
* 获取百伦所有部门 * 获取百伦所有部门
* *
* @return 所有部门 * @return 所有部门
......
...@@ -15,7 +15,6 @@ import org.springframework.lang.NonNull; ...@@ -15,7 +15,6 @@ import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -76,12 +75,6 @@ public class OaDepartmentServiceImpl extends ServiceImpl<OaDepartmentMapper, OaD ...@@ -76,12 +75,6 @@ public class OaDepartmentServiceImpl extends ServiceImpl<OaDepartmentMapper, OaD
}); });
} }
@Override
public void updateDepartmentMinimumReviewAmount(Integer oaDepartmentId, BigDecimal amount) {
OaDepartment oaDepartment = baseMapper.selectByDepartmentId(oaDepartmentId);
oaDepartment.setDepartmentMinimumReviewAmount(amount);
baseMapper.updateById(oaDepartment);
}
@Override @Override
public List<OaDepartment> allOaDepartment() { public List<OaDepartment> allOaDepartment() {
......
...@@ -105,7 +105,7 @@ public class CostTemplate implements Serializable { ...@@ -105,7 +105,7 @@ public class CostTemplate implements Serializable {
BigDecimal amount = cost.getAmountRmb(); BigDecimal amount = cost.getAmountRmb();
return !(finalMinimumReviewAmount.compareTo(BigDecimal.ZERO) > 0 && return !(finalMinimumReviewAmount.compareTo(BigDecimal.ZERO) > 0 &&
amount.compareTo(finalMinimumReviewAmount) <= 0 amount.compareTo(finalMinimumReviewAmount) < 0
// && !cost.getCompanyName().contains("工会") // && !cost.getCompanyName().contains("工会")
) )
; ;
...@@ -115,7 +115,7 @@ public class CostTemplate implements Serializable { ...@@ -115,7 +115,7 @@ public class CostTemplate implements Serializable {
BigDecimal amount = cost.getAmountRmb(); BigDecimal amount = cost.getAmountRmb();
return !(departmentMinimumReviewAmount.compareTo(BigDecimal.ZERO) > 0 && return !(departmentMinimumReviewAmount.compareTo(BigDecimal.ZERO) > 0 &&
amount.compareTo(departmentMinimumReviewAmount) <= 0 amount.compareTo(departmentMinimumReviewAmount) < 0
// && !cost.getCompanyName().contains("工会") // && !cost.getCompanyName().contains("工会")
); );
} }
......
package com.blt.other.module.cost.service.impl; package com.blt.other.module.cost.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.blt.other.common.exception.BizRuntimeException;
import com.blt.other.database.model.CostCompanyDomain; import com.blt.other.database.model.CostCompanyDomain;
import com.blt.other.database.model.CostLogDomain; import com.blt.other.database.model.CostLogDomain;
import com.blt.other.database.model.UserDomain; import com.blt.other.database.model.UserDomain;
...@@ -9,14 +7,12 @@ import com.blt.other.module.auth.dao.OaUserMapper; ...@@ -9,14 +7,12 @@ import com.blt.other.module.auth.dao.OaUserMapper;
import com.blt.other.module.auth.dao.UserDao; import com.blt.other.module.auth.dao.UserDao;
import com.blt.other.module.auth.model.OaUser; import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.cost.dao.CostCompanyDao; import com.blt.other.module.cost.dao.CostCompanyDao;
import com.blt.other.module.cost.dao.CostCurrentReviewerMapper;
import com.blt.other.module.cost.dao.CostDao; import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.dao.CostLogDao; import com.blt.other.module.cost.dao.CostLogDao;
import com.blt.other.module.cost.model.CostDomain; import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostLogService; import com.blt.other.module.cost.service.CostLogService;
import com.blt.other.module.sys.dao.CostReviewerMapper;
import com.blt.other.module.sys.dao.DepartmentReviewerMapper; import com.blt.other.module.sys.dao.DepartmentReviewerMapper;
import com.blt.other.module.sys.model.CostReviewer;
import com.blt.other.module.sys.model.DepartmentReviewer;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -68,7 +64,7 @@ public class CostLogServiceImpl implements CostLogService { ...@@ -68,7 +64,7 @@ public class CostLogServiceImpl implements CostLogService {
@Resource @Resource
CostDao costDao; CostDao costDao;
@Resource @Resource
CostReviewerMapper costReviewerMapper; CostCurrentReviewerMapper costCurrentReviewerMapper;
@Resource @Resource
CostCompanyDao costCompanyDao; CostCompanyDao costCompanyDao;
@Resource @Resource
...@@ -84,46 +80,46 @@ public class CostLogServiceImpl implements CostLogService { ...@@ -84,46 +80,46 @@ public class CostLogServiceImpl implements CostLogService {
OaUser costUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid()); OaUser costUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid());
CostCompanyDomain costCompany = costCompanyDao.selectByNo(costDomain.getCompanyNo()); CostCompanyDomain costCompany = costCompanyDao.selectByNo(costDomain.getCompanyNo());
OaUser reviewer; OaUser reviewer = OaUser.DEFAULT;
//部门自动审核日志 // //部门自动审核日志
if (type.equals(CostLogDomain.DEPARTMENT_AUTO_PASS)) { // if (type.equals(CostLogDomain.DEPARTMENT_AUTO_PASS)) {
//
DepartmentReviewer departmentReviewer = departmentReviewerMapper.selectByPrimaryDepartmentId(costUser.getPrimaryDepartmentId()); // DepartmentReviewer departmentReviewer = departmentReviewerMapper.selectByPrimaryDepartmentId(costUser.getPrimaryDepartmentId());
//
reviewer = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>() // reviewer = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getType, CostReviewer.departmentReviewer) // .eq(CostReviewer::getType, CostReviewer.departmentReviewer)
.eq(CostReviewer::getReferId, departmentReviewer.getId())) // .eq(CostReviewer::getReferId, departmentReviewer.getId()))
.stream() // .stream()
.limit(1) // .limit(1)
.findAny() // .findAny()
.map(costReviewer -> oaUserMapper.selectByOaUserId(costReviewer.getReviewerUserId())) // .map(costReviewer -> oaUserMapper.selectByOaUserId(costReviewer.getReviewerUserId()))
.orElse(OaUser.DEFAULT); // .orElse(OaUser.DEFAULT);
} // }
//财务自动审核日志 // //财务自动审核日志
else if (type.equals(CostLogDomain.FINANCIAL_AUTO_PASS)) { // else if (type.equals(CostLogDomain.FINANCIAL_AUTO_PASS)) {
reviewer = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>() // reviewer = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getType, CostReviewer.financialReviewer) // .eq(CostReviewer::getType, CostReviewer.financialReviewer)
.eq(CostReviewer::getReferId, costCompany.getId())) // .eq(CostReviewer::getReferId, costCompany.getId()))
.stream() // .stream()
.limit(1) // .limit(1)
.findAny() // .findAny()
.map(costReviewer -> oaUserMapper.selectByOaUserId(costReviewer.getReviewerUserId())) // .map(costReviewer -> oaUserMapper.selectByOaUserId(costReviewer.getReviewerUserId()))
.orElse(OaUser.DEFAULT); // .orElse(OaUser.DEFAULT);
} // }
//最终审核自动审核日志 // //最终审核自动审核日志
else if (type.equals(CostLogDomain.FINAL_AUTO_PASS)) { // else if (type.equals(CostLogDomain.FINAL_AUTO_PASS)) {
reviewer = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>() // reviewer = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getType, CostReviewer.finalReviewer) // .eq(CostReviewer::getType, CostReviewer.finalReviewer)
.eq(CostReviewer::getReferId, costCompany.getId())) // .eq(CostReviewer::getReferId, costCompany.getId()))
.stream() // .stream()
.limit(1) // .limit(1)
.findAny() // .findAny()
.map(costReviewer -> oaUserMapper.selectByOaUserId(costReviewer.getReviewerUserId())) // .map(costReviewer -> oaUserMapper.selectByOaUserId(costReviewer.getReviewerUserId()))
.orElse(OaUser.DEFAULT); // .orElse(OaUser.DEFAULT);
} else { // } else {
throw new BizRuntimeException("invalid param"); // throw new BizRuntimeException("invalid param");
} // }
costLog.setUpdateUsercode(reviewer.getUserCode()); costLog.setUpdateUsercode(reviewer.getUserCode());
costLog.setUpdateUsername(reviewer.getUserName()); costLog.setUpdateUsername(reviewer.getUserName());
......
...@@ -7,11 +7,13 @@ import com.blt.other.module.auth.dao.OaDepartmentMapper; ...@@ -7,11 +7,13 @@ import com.blt.other.module.auth.dao.OaDepartmentMapper;
import com.blt.other.module.auth.dao.OaUserMapper; import com.blt.other.module.auth.dao.OaUserMapper;
import com.blt.other.module.auth.model.OaDepartment; import com.blt.other.module.auth.model.OaDepartment;
import com.blt.other.module.auth.model.OaUser; import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.cost.dao.SpecDepartmentCheckConfigMapper;
import com.blt.other.module.cost.model.CostDomain; import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplate; import com.blt.other.module.cost.model.CostTemplate;
import com.blt.other.module.sys.dao.DepartmentReviewerMapper; import com.blt.other.module.sys.dao.DepartmentReviewerMapper;
import com.blt.other.module.sys.model.CostReviewer; import com.blt.other.module.sys.model.CostReviewer;
import com.blt.other.module.sys.model.DepartmentReviewer; import com.blt.other.module.sys.model.DepartmentReviewer;
import com.blt.other.module.sys.model.SpecDepartmentCheckConfig;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -39,6 +41,8 @@ public class DepartmentCheckState extends CostState { ...@@ -39,6 +41,8 @@ public class DepartmentCheckState extends CostState {
OaDepartmentMapper oaDepartmentMapper; OaDepartmentMapper oaDepartmentMapper;
@Resource @Resource
OaUserMapper oaUserMapper; OaUserMapper oaUserMapper;
@Resource
SpecDepartmentCheckConfigMapper specDepartmentCheckConfigMapper;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
...@@ -52,12 +56,24 @@ public class DepartmentCheckState extends CostState { ...@@ -52,12 +56,24 @@ public class DepartmentCheckState extends CostState {
throw new BizRuntimeException("invalid status"); throw new BizRuntimeException("invalid status");
} }
//如果不需要审核 直接通过
OaUser oaUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid()); OaUser oaUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid());
OaDepartment oaDepartment = oaDepartmentMapper.selectByDepartmentId(oaUser.getPrimaryDepartmentId()); OaDepartment oaDepartment = oaDepartmentMapper.selectByDepartmentId(oaUser.getPrimaryDepartmentId());
//是否通过部门 //1、匹配特殊部门
if (!costTemplate.shouldDepartmentCheck(costDomain, oaDepartment.getDepartmentMinimumReviewAmount())) { SpecDepartmentCheckConfig specDepartmentCheckConfig = specDepartmentCheckConfigMapper.selectOne(new LambdaQueryWrapper<SpecDepartmentCheckConfig>()
.eq(SpecDepartmentCheckConfig::getCostCompanyName, costDomain.getCompanyName())
.eq(SpecDepartmentCheckConfig::getOaCompanyId, oaUser.getCompanyId()));
if (specDepartmentCheckConfig != null) {
Integer reviewerDepartmentId = specDepartmentCheckConfig.getReviewerDepartmentId();
oaDepartment = oaDepartmentMapper.selectByDepartmentId(reviewerDepartmentId);
costLogService.save(costDomain.getCostNo(), 0, "匹配特殊部门:" + oaDepartment.getFullName());
this.updateCurrentReviewer(reviewerDepartmentId);
}
//如果不需要审核 直接通过
DepartmentReviewer departmentReviewer = this.getCurrentDepartmentReviewer(oaDepartment.getDepartmentId());
if (!costTemplate.shouldDepartmentCheck(costDomain, departmentReviewer.getAutoReviewAmount())) {
costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK); costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now()); costDomain.setLastModifyDate(LocalDateTime.now());
...@@ -88,7 +104,6 @@ public class DepartmentCheckState extends CostState { ...@@ -88,7 +104,6 @@ public class DepartmentCheckState extends CostState {
} }
} }
//人工审核 //人工审核
if (costContext.currentUserId != null) { if (costContext.currentUserId != null) {
//人工审核通过 //人工审核通过
...@@ -135,11 +150,36 @@ public class DepartmentCheckState extends CostState { ...@@ -135,11 +150,36 @@ public class DepartmentCheckState extends CostState {
@Override @Override
public void updateCurrentReviewer() { public void updateCurrentReviewer() {
CostDomain costDomain = costContext.costDomain; CostDomain costDomain = costContext.costDomain;
OaUser costUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid()); OaUser costUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid());
this.updateCurrentReviewer(costUser.getDepartmentId());
}
private DepartmentReviewer getCurrentDepartmentReviewer(Integer departmentId) {
OaDepartment oaDepartment = oaDepartmentMapper.selectByDepartmentId(departmentId);
Integer primaryDepartmentId = departmentId;
if (oaDepartment.getParentId() > 0) {
primaryDepartmentId = oaDepartment.getParentId();
}
DepartmentReviewer primaryDepartmentReviewer = departmentReviewerMapper.selectByPrimaryDepartmentId(primaryDepartmentId);
DepartmentReviewer secondDepartmentReviewer = departmentReviewerMapper.selectBySecondDepartmentId(departmentId);
if (secondDepartmentReviewer != null) {
return secondDepartmentReviewer;
}
return primaryDepartmentReviewer;
}
DepartmentReviewer departmentReviewer = departmentReviewerMapper.selectByPrimaryDepartmentId(costUser.getPrimaryDepartmentId()); private void updateCurrentReviewer(Integer departmentId) {
CostDomain costDomain = costContext.costDomain;
DepartmentReviewer departmentReviewer = this.getCurrentDepartmentReviewer(departmentId);
if (departmentReviewer.getSecondDepartmentId() > 0) {
costLogService.save(costDomain.getCostNo(), 0, "匹配二级部门配置:" + departmentReviewer.getSecondDepartmentName());
}
List<CostReviewer> costReviewerList = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>() List<CostReviewer> costReviewerList = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getReferId, departmentReviewer.getId()) .eq(CostReviewer::getReferId, departmentReviewer.getId())
...@@ -149,6 +189,6 @@ public class DepartmentCheckState extends CostState { ...@@ -149,6 +189,6 @@ public class DepartmentCheckState extends CostState {
log.info("更新当前审核人为部门审核人:{}", departmentReviewerNames); log.info("更新当前审核人为部门审核人:{}", departmentReviewerNames);
costCurrentReviewerService.updateByCostNoAndReviewer(costDomain.getCostNo(), costReviewerList); costCurrentReviewerService.updateByCostNoAndReviewer(costDomain.getCostNo(), costReviewerList);
costLogService.save(costDomain.getCostNo(), costContext.currentUserId, "一级部门审核人:" + departmentReviewerNames); costLogService.save(costDomain.getCostNo(), costContext.currentUserId, "部门审核人:" + departmentReviewerNames);
} }
} }
...@@ -24,4 +24,7 @@ public interface DepartmentReviewerMapper extends BaseMapper<DepartmentReviewer> ...@@ -24,4 +24,7 @@ public interface DepartmentReviewerMapper extends BaseMapper<DepartmentReviewer>
//获取一级部门配置 //获取一级部门配置
//todo //todo
DepartmentReviewer selectByPrimaryDepartmentId(Integer primaryDepartmentId); DepartmentReviewer selectByPrimaryDepartmentId(Integer primaryDepartmentId);
//获取二级部门配置
DepartmentReviewer selectBySecondDepartmentId(Integer secondDepartmentId);
} }
...@@ -5,6 +5,10 @@ spring: ...@@ -5,6 +5,10 @@ spring:
url: jdbc:mysql://cdb-aanqm573.gz.tencentcdb.com:10120/bailun_other?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true url: jdbc:mysql://cdb-aanqm573.gz.tencentcdb.com:10120/bailun_other?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true
username: root username: root
password: 'Aarob2020#' password: 'Aarob2020#'
hikari:
maximum-pool-size: 200
minimum-idle: 10
# 前端配置 # 前端配置
thymeleaf: thymeleaf:
prefix: classpath:/templates/ prefix: classpath:/templates/
......
...@@ -6,10 +6,9 @@ spring: ...@@ -6,10 +6,9 @@ spring:
username: root username: root
password: 'Aarob2020#' password: 'Aarob2020#'
hikari: hikari:
minimum-idle: 3 maximum-pool-size: 200
maximum-pool-size: 10 minimum-idle: 10
max-lifetime: 30000
connection-test-query: 'select 1'
thymeleaf: thymeleaf:
prefix: classpath:/templates/ prefix: classpath:/templates/
suffix: .html suffix: .html
......
...@@ -19,10 +19,17 @@ ...@@ -19,10 +19,17 @@
</if> </if>
group by t1.id group by t1.id
</select> </select>
<select id="selectByPrimaryDepartmentId" resultType="com.blt.other.module.sys.model.DepartmentReviewer"> <select id="selectByPrimaryDepartmentId" resultType="com.blt.other.module.sys.model.DepartmentReviewer">
select * select *
from department_reviewer from department_reviewer
where primary_department_id = #{primaryDepartmentId} where primary_department_id = #{primaryDepartmentId}
and second_department_id = 0 and second_department_id = 0
</select> </select>
<select id="selectBySecondDepartmentId" resultType="com.blt.other.module.sys.model.DepartmentReviewer">
select *
from department_reviewer
where second_department_id = #{secondDepartmentId}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment