Commit 8994f437 by huluobin

update

parent fa4751f5
...@@ -2,8 +2,8 @@ spring: ...@@ -2,8 +2,8 @@ spring:
# 数据源配置 # 数据源配置
datasource: datasource:
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://gz-cdb-lnrmt5zh.sql.tencentcdb.com:61369/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://gz-cdb-lnrmt5zh.sql.tencentcdb.com:61369/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://10.0.8.2:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull # url: jdbc:mysql://10.0.8.2:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
username: root username: root
password: "#7kfnymAM$Y9-Ntf" password: "#7kfnymAM$Y9-Ntf"
hikari: hikari:
......
...@@ -466,7 +466,7 @@ ...@@ -466,7 +466,7 @@
and (t7.reviewer_user_id = #{req.userid} ) and (t7.reviewer_user_id = #{req.userid} )
</if> </if>
<if test=" req.costNo!=null and req.costNo != ''"> <if test=" req.costNo!=null and req.costNo != ''">
and t1.cost_no =#{req.costNo} and t1.cost_no like concat('%',#{req.costNo},'%')
</if> </if>
group by group by
t1.id t1.id
......
package com.blt.other.module.auth.service.impl; package com.blt.other.module.auth.service.impl;
import com.bailuntec.common.ListUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.blt.other.module.auth.dao.CostReviewerMapper; import com.blt.other.module.auth.dao.CostReviewerMapper;
import com.blt.other.module.auth.dao.OaDepartmentMapper; import com.blt.other.module.auth.dao.OaDepartmentMapper;
...@@ -16,6 +17,7 @@ import org.springframework.test.context.ActiveProfiles; ...@@ -16,6 +17,7 @@ import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* <p> * <p>
...@@ -71,12 +73,16 @@ public class OaDepartmentServiceImplTest { ...@@ -71,12 +73,16 @@ public class OaDepartmentServiceImplTest {
@Test @Test
public void setDepartmentReviewer() { public void setDepartmentReviewer() {
costReviewerMapper.delete(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getType, CostReviewer.departmentReviewer));
oaDepartmentMapper.selectList(new LambdaQueryWrapper<>()) oaDepartmentMapper.selectList(new LambdaQueryWrapper<>())
.forEach(oaDepartment -> { .forEach(oaDepartment -> {
try { try {
List<CostReviewer> costReviewerList = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getType, CostReviewer.departmentReviewer)
.eq(CostReviewer::getReferId, oaDepartment.getDepartmentId()));
if (ListUtil.isEmpty(costReviewerList)) {
String manage = oaDepartment.getManageUser1(); String manage = oaDepartment.getManageUser1();
OaUser oaUser = oaUserMapper.selectByUserName(manage); OaUser oaUser = oaUserMapper.selectByUserName(manage);
...@@ -88,6 +94,8 @@ public class OaDepartmentServiceImplTest { ...@@ -88,6 +94,8 @@ public class OaDepartmentServiceImplTest {
.build(); .build();
costReviewerMapper.insert(costReviewer); costReviewerMapper.insert(costReviewer);
}
} catch (Exception ignore) { } catch (Exception ignore) {
} }
......
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