Commit faaff7e2 by xugaojun

优化更新逻辑

parent 177109d0
......@@ -123,7 +123,7 @@ public class WelcomeServiceImpl implements WelcomeService {
private TabWelcome addWelcome(SaveWelcomeBO bo) {
if (bo.getDefaultWelcomeFlag() == 1 && this.existDefaultWelcome(bo.getWxEnterpriseId())) {
throw new RuntimeException("已存在全体成员欢迎语, 无法新增多条");
throw new RuntimeException("已存在全体成员欢迎语, 无法新增多条-新增逻辑");
}
TabWelcome welcome = new TabWelcome();
welcome.setWelcomeId(StringUtil.randomUUID());
......@@ -143,6 +143,9 @@ public class WelcomeServiceImpl implements WelcomeService {
}
private TabWelcome updateWelcome(TabWelcome welcome, SaveWelcomeBO bo) {
if (bo.getDefaultWelcomeFlag() == 0 && this.existDefaultWelcome(bo.getWxEnterpriseId())) {
throw new RuntimeException("已存在全体成员欢迎语, 无法新增多条-更新逻辑");
}
welcome.setTitle(bo.getTitle());
welcome.setWelcomeContent(bo.getWelcomeContent());
welcome.setUpdateTime(new Date());
......
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