Commit bbb79827e4c2fba3f3983e0971b8f5aa8e30376d
Merge branch 'fix-main-ch' into 'main'
避免最初dictory中没有生产科时无法在创建生产科用户的同时创建生产科daodictory中 See merge request !9
Showing
1 changed file
with
10 additions
and
9 deletions
src/main/java/com/order/erp/service/admin/impl/AdminUserServiceImpl.java
@@ -230,15 +230,16 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser | @@ -230,15 +230,16 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser | ||
230 | dictionaryVO.setSort(count+1); | 230 | dictionaryVO.setSort(count+1); |
231 | dictionaryService.add(dictionaryVO); | 231 | dictionaryService.add(dictionaryVO); |
232 | } | 232 | } |
233 | - } | ||
234 | - DictionaryVO dictionaryVO = new DictionaryVO(); | ||
235 | - dictionaryVO.setRemark("生产科"); | ||
236 | - dictionaryVO.setDictCode("productionDepartment"); | ||
237 | - dictionaryVO.setDictName("生产科"); | ||
238 | - dictionaryVO.setDictValue(adminUserVO.getNickName()); | ||
239 | - int count = dictionaryService.count(); | ||
240 | - dictionaryVO.setSort(count+1); | ||
241 | - dictionaryService.add(dictionaryVO); | 233 | + }else { |
234 | + DictionaryVO dictionaryVO = new DictionaryVO(); | ||
235 | + dictionaryVO.setRemark("生产科"); | ||
236 | + dictionaryVO.setDictCode("productionDepartment"); | ||
237 | + dictionaryVO.setDictName("生产科"); | ||
238 | + dictionaryVO.setDictValue(adminUserVO.getNickName()); | ||
239 | + int count = dictionaryService.count(); | ||
240 | + dictionaryVO.setSort(count + 1); | ||
241 | + dictionaryService.add(dictionaryVO); | ||
242 | + } | ||
242 | } | 243 | } |
243 | return ServerResult.success(); | 244 | return ServerResult.success(); |
244 | } | 245 | } |