liuyuhang_branch
parent
2176d7dde4
commit
b9d7fc4c35
@ -0,0 +1,64 @@
|
||||
package com.wsk.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/21.
|
||||
*/
|
||||
public class ShopContextBean implements Serializable {
|
||||
private int id;
|
||||
private Date modified;
|
||||
private int sid;
|
||||
private String context;
|
||||
private int uid;
|
||||
private String username;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
public int getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(int sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.ShopContext;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShopContextMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopContext record);
|
||||
|
||||
int insertSelective(ShopContext record);
|
||||
|
||||
ShopContext selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopContext record);
|
||||
|
||||
int updateByPrimaryKey(ShopContext record);
|
||||
|
||||
int getCounts(int sid);
|
||||
|
||||
List<ShopContext> findById(int sid, int start);
|
||||
|
||||
@Select("select * from shopcontext where sid=#{id,jdbcType=INTEGER} and display=1")
|
||||
List<ShopContext> selectBySid(int id);
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ShopContext implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private String context;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private int uid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context == null ? null : context.trim();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.ShopCarMapper;
|
||||
import com.wsk.pojo.ShopCar;
|
||||
import com.wsk.service.ShopCarService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class ShopCarServiceImpl implements ShopCarService {
|
||||
@Resource
|
||||
private ShopCarMapper shopCarMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ShopCar record) {
|
||||
return shopCarMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ShopCar record) {
|
||||
return shopCarMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopCar selectByPrimaryKey(Integer id) {
|
||||
return shopCarMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ShopCar record) {
|
||||
return shopCarMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ShopCar record) {
|
||||
return shopCarMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return shopCarMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<ShopCar> selectByUid(int uid, int start) {
|
||||
// return shopCarMapper.selectByUid(uid, start);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ShopCar selectByUid(int uid) {
|
||||
return shopCarMapper.selectByUid(uid);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue