Commit 9f5600cd by lijingjing

修改根据三级或二级一级编号更新编号为空的问题;

parent 940860c8
...@@ -1803,7 +1803,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe ...@@ -1803,7 +1803,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
} else if (2 == level) { } else if (2 == level) {
fromFiled = " COALESCE(second_code,first_code) "; fromFiled = " COALESCE(second_code,first_code) ";
} }
return baseMapper.updateForSet(String.format("code=%s", fromFiled), new EntityWrapper<EntrustSample>().eq("entrust_id", entrustId).eq("type", 0)) > 0; return baseMapper.updateForSet(String.format("code=%s", fromFiled), new EntityWrapper<EntrustSample>().eq("entrust_id", entrustId).eq("type", 0).isNotNull("first_code")) > 0;
} }
@Override @Override
...@@ -1818,7 +1818,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe ...@@ -1818,7 +1818,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
} else if (2 == level) { } else if (2 == level) {
fromFiled = " COALESCE(second_code,first_code) "; fromFiled = " COALESCE(second_code,first_code) ";
} }
return baseMapper.updateForSet(String.format("code=%s", fromFiled), new EntityWrapper<EntrustSample>().in("id", sampleIdsList)) > 0; return baseMapper.updateForSet(String.format("code=%s", fromFiled), new EntityWrapper<EntrustSample>().in("id", sampleIdsList).isNotNull("first_code")) > 0;
} }
@Override @Override
......
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