package service;

import javax.annotation.Resource;
import model.seller;
import org.springframework.stereotype.Service;
import dao.SellerManagementDao;

@Service("sellerManagementServiceImp")
public class SellerManagementServiceImp implements SellerManagementService {

     
	@Resource(name = "sellerManagementDaoImp")
	private SellerManagementDao sellerManagementDaoImp;

	@Override
	public seller checkSeller(String username, String password) {

		return sellerManagementDaoImp.checkSeller(username, password);
	}
	
	@Override
	public boolean updateSellerinfo(seller seller) {

		return sellerManagementDaoImp.updateSellerinfo(seller);
	}
	
	@Override
	public boolean updatePassword(int Seller_id, String Seller_Password) {
		
		if (sellerManagementDaoImp.updatePassword(Seller_id, Seller_Password)) {
			return true;
		} else {
			return false;
		}
	}
	

	@Override
	public boolean updateEmail(int Seller_id, String Seller_Email) {
		if (sellerManagementDaoImp.updateEmail(Seller_id, Seller_Email)) {
			return true;
		} else {
			return false;
		}
	}

	@Override
	public boolean updatePhone(int Seller_id, String Seller_Telephone) {
		if (sellerManagementDaoImp.updatePhone(Seller_id, Seller_Telephone)) {
			return true;
		} else {
			return false;
		}
	}

	@Override
	public boolean regist(seller seller) {
		if(sellerManagementDaoImp.regist(seller)) return true;
		else return false;
	}

	

	
	@Override
	public seller getSellerById(int Seller_id) {
		// TODO Auto-generated method stub
		return sellerManagementDaoImp.getSellerById(Seller_id);
	}



}

@@ -44,24 +44,26 @@
 .Resource;%0D%0A
+%0D%0A
 import model
@@ -72,16 +72,18 @@
 eller;%0D%0A
+%0D%0A
 import o
@@ -122,16 +122,18 @@
 rvice;%0D%0A
+%0D%0A
 import d
@@ -542,32 +542,163 @@
 %0A%09%0D%0A%09@Override%0D%0A
+%09public seller validateUsername(String username)%7B%0D%0A%09%09return sellerManagementDaoImp.validateUsername(username);%0D%0A%09%7D%0D%0A%09%0D%0A%09@Override%0D%0A
 %09public boolean 
@@ -1755,17 +1755,305 @@
 );%0D%0A%09%7D%0D%0A
+%09
 %0D%0A
+%09@Override%0D%0A%09public boolean checkActivationCode(String code, String sellerid)%7B%0D%0A%09%09return sellerManagementDaoImp.checkActivationCode(code,sellerid);%0D%0A%09%7D%0D%0A%09%0D%0A%09@Override%0D%0A%09public boolean updateSellerStatus(String sellerid)%7B%0D%0A%09%09return sellerManagementDaoImp.updateSellerStatus(sellerid);%0D%0A%09%7D
 %0D%0A%0D%0A%7D%0D%0A

Update SellerManagementServiceImp.java