电商项目开发6

电商项目开发6

在这里插入图片描述
电商项目开发6_第1张图片

在这里插入图片描述
电商项目开发6_第2张图片
电商项目开发6_第3张图片

用户管理

UserDao.xml





	
		
		
		
		
		
		
		
	

	



	
		
			
				and username = #{username}
			
			
				and pwd = #{pwd}
			
			
			
				and id = #{id}
			
			
				and realname like concat('%',#{realname},'%')
			
		
	
	
	

	
	
		insert into
		user(username,pwd,realname)
		values(#{username},#{pwd},#{realname})
	

	
		update user
		
			
				username = #{username},
			
			
				pwd = #{pwd},
			
			
				realname = #{realname},
			
		
		where id = #{id}
		
	

	
		delete from user where id =	#{id}
	
	
	
	
		update user set pwd = '123' where id in 
		
			#{item}
		
	

	
	
	
		update user set grade = grade + 1 where id in 
		
			#{item.id}
		
	

UserDao.java

package com.zq.dao;

import java.util.List;
import java.util.Map;

import com.zq.model.User;

public interface UserDao {	
	public List list(User user);
	public void create(User user);
	public void update(User user);
	public void delete(Integer id);
	public void updateBatch(List list);
	public User findById(Integer id);
	public List findByTotal(List> gradeList);
	public void updateGrade(List users);
}

你可能感兴趣的:(电商项目开发6)