| | |
| | | package com.ks.app.service.impl; |
| | | |
| | | import com.ks.app.dao.admin.AdminUserDao; |
| | | import com.ks.app.entity.AdminUser; |
| | | import com.ks.app.service.inter.AdminUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author hxh |
| | |
| | | @Service |
| | | public class AdminUserServiceImpl implements AdminUserService { |
| | | |
| | | @Resource |
| | | private AdminUserDao adminUserDao; |
| | | |
| | | @Override |
| | | public AdminUser selectByAccount(String account) { |
| | | return null; |
| | | return adminUserDao.selectByAccount(account); |
| | | } |
| | | |
| | | @Override |
| | | public void add(AdminUser adminUser) throws Exception { |
| | | if (selectByAccount(adminUser.getAccount()) != null) { |
| | | throw new Exception("账号已存在"); |
| | | } |
| | | adminUserDao.save(adminUser); |
| | | } |
| | | } |