public void changeAccountStatus(int id, int accountStatus) {
   Seller seller = sellerMapper.getSellerById(id);
   seller.setAccountStatus(accountStatus);
   sellerMapper.updateSeller(seller);
   if (accountStatus == AccountStatus.SUSPEND) { // 冻结账号,停售所有产品
     productService.changeProductsOfSeller(id, ProductStatus.Unsellable);
   } else if (accountStatus == AccountStatus.OK) {
     productService.changeProductsOfSeller(id, ProductStatus.Sellable);
   }
   emailService.sendEmailWhenAdminChangeAccountStatus(seller.getEmail());
 }
 public boolean insertSeller(Seller seller) {
   seller.setCreatedAt(new Date());
   boolean flag = seller.selfCheck();
   if (flag) {
     sellerMapper.insertSeller(seller);
     return true;
   } else {
     return false;
   }
 }
 public List<Seller> getSellerListByPage(Page page) {
   return sellerMapper.getSellerListByPage(page);
 }
 public void updateSeller(Seller seller) {
   sellerMapper.updateSeller(seller);
 }
 public Seller getSellerByEmailAndPassword(String email, String password) {
   return sellerMapper.getSellerByEmailAndPassword(email, password);
 }
 public Seller getSellerByEmail(String email) {
   return sellerMapper.getSellerByEmail(email);
 }
 public Seller getSellerById(int id) {
   return sellerMapper.getSellerById(id);
 }