Skip to content
This repository was archived by the owner on May 7, 2019. It is now read-only.

Commit 77d362b

Browse files
committed
init
1 parent 51c7af5 commit 77d362b

File tree

740 files changed

+52463
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

740 files changed

+52463
-1
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.class
2+
3+
# BlueJ files
4+
*.ctxt
5+
6+
# Mobile Tools for Java (J2ME)
7+
.mtj.tmp/
8+
9+
# Package Files #
10+
*.jar
11+
*.war
12+
*.ear
13+
14+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
15+
hs_err_pid*
16+
17+
*.log

.metadata/.lock

Whitespace-only changes.

.metadata/.mylyn/.tasks.xml.zip

235 Bytes
Binary file not shown.

.metadata/.mylyn/repositories.xml.zip

561 Bytes
Binary file not shown.

.metadata/.mylyn/tasks.xml.zip

235 Bytes
Binary file not shown.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package com.orz.po;
2+
3+
import java.io.Serializable;
4+
5+
import javax.persistence.Column;
6+
import javax.persistence.Entity;
7+
import javax.persistence.Id;
8+
import javax.persistence.Table;
9+
10+
import net.sourceforge.jtds.jdbc.DateTime;
11+
12+
/* gbf�زĻ�����Ϣ */
13+
@Entity
14+
@Table(name = "Base_User")
15+
public class GBF_Item_Info implements Serializable {
16+
private static final long serialVersionUID = 1L;
17+
18+
@Id
19+
@Column(name = "id")
20+
private int id;
21+
22+
@Column(name = "patch")
23+
private int patch;
24+
25+
@Column(name = "category_type")
26+
private String category_type;
27+
28+
@Column(name = "image")
29+
private int image;
30+
31+
@Column(name = "is_display_item")
32+
private Boolean is_display_item;
33+
34+
@Column(name = "item_id")
35+
private int item_id;
36+
37+
@Column(name = "name")
38+
private String name;
39+
40+
@Column(name = "number")
41+
private int number;
42+
43+
@Column(name = "user_id")
44+
private int user_id;
45+
46+
@Column(name = "create_time")
47+
private DateTime create_time;
48+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.orz.controller;
2+
3+
import org.springframework.beans.factory.annotation.Autowired;
4+
import org.springframework.stereotype.Controller;
5+
import org.springframework.ui.Model;
6+
import org.springframework.web.bind.annotation.RequestMapping;
7+
import org.springframework.web.bind.annotation.ResponseBody;
8+
9+
import com.orz.service.UserService;
10+
11+
@Controller
12+
@RequestMapping("/gbf")
13+
public class GbfController {
14+
@Autowired
15+
private UserService userService;
16+
17+
@RequestMapping("/test")
18+
@ResponseBody
19+
public String getPage(Model model) {
20+
return obj.toString();
21+
}
22+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.orz.service;
2+
3+
import com.orz.po.Base_User;
4+
5+
public interface UserService extends CommonService<Base_User> {
6+
public JSONObject getUser();
7+
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
package com.orz.po;
2+
3+
import java.io.Serializable;
4+
5+
import javax.persistence.Column;
6+
import javax.persistence.Entity;
7+
import javax.persistence.Id;
8+
import javax.persistence.Table;
9+
10+
import net.sourceforge.jtds.jdbc.DateTime;
11+
12+
/* gbf�زĻ�����Ϣ */
13+
@Entity
14+
@Table(name = "Base_User")
15+
public class GBF_Item_Info implements Serializable {
16+
private static final long serialVersionUID = 1L;
17+
18+
@Id
19+
@Column(name = "id")
20+
private int id;
21+
22+
// ���ţ�ͬһ��id��ͬ���ε�����
23+
@Column(name = "patch")
24+
private int patch;
25+
26+
// ɸѡʱ�õ����ͣ���ʱ���ã�
27+
@Column(name = "category_type")
28+
private String category_type;
29+
30+
// ����icon id����ʱ���ã�
31+
@Column(name = "image")
32+
private int image;
33+
34+
// �Ƿ���ʾ�ڵײ�������ʱ���ã�
35+
@Column(name = "is_display_item")
36+
private Boolean is_display_item;
37+
38+
39+
@Column(name = "item_id")
40+
private int item_id;
41+
42+
@Column(name = "name")
43+
private String name;
44+
45+
@Column(name = "number")
46+
private int number;
47+
48+
@Column(name = "user_id")
49+
private int user_id;
50+
51+
@Column(name = "create_time")
52+
private DateTime create_time;
53+
54+
public int getId() {
55+
return id;
56+
}
57+
58+
public void setId(int id) {
59+
this.id = id;
60+
}
61+
62+
public int getPatch() {
63+
return patch;
64+
}
65+
66+
public void setPatch(int patch) {
67+
this.patch = patch;
68+
}
69+
70+
public String getCategory_type() {
71+
return category_type;
72+
}
73+
74+
public void setCategory_type(String category_type) {
75+
this.category_type = category_type;
76+
}
77+
78+
public int getImage() {
79+
return image;
80+
}
81+
82+
public void setImage(int image) {
83+
this.image = image;
84+
}
85+
86+
public Boolean getIs_display_item() {
87+
return is_display_item;
88+
}
89+
90+
public void setIs_display_item(Boolean is_display_item) {
91+
this.is_display_item = is_display_item;
92+
}
93+
94+
public int getItem_id() {
95+
return item_id;
96+
}
97+
98+
public void setItem_id(int item_id) {
99+
this.item_id = item_id;
100+
}
101+
102+
public String getName() {
103+
return name;
104+
}
105+
106+
public void setName(String name) {
107+
this.name = name;
108+
}
109+
110+
public int getNumber() {
111+
return number;
112+
}
113+
114+
public void setNumber(int number) {
115+
this.number = number;
116+
}
117+
118+
public int getUser_id() {
119+
return user_id;
120+
}
121+
122+
public void setUser_id(int user_id) {
123+
this.user_id = user_id;
124+
}
125+
126+
public DateTime getCreate_time() {
127+
return create_time;
128+
}
129+
130+
public void setCreate_time(DateTime create_time) {
131+
this.create_time = create_time;
132+
}
133+
134+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.orz.service.impl;
2+
3+
import javax.annotation.Resource;
4+
5+
import org.springframework.stereotype.Service;
6+
import org.springframework.transaction.annotation.Transactional;
7+
8+
import com.orz.dao.GenericDao;
9+
import com.orz.po.Base_User;
10+
import com.orz.po.User;
11+
import com.orz.service.UserService;
12+
13+
@Service("userService")
14+
@Transactional
15+
public class UserServiceImpl extends CommonServiceImpl<Base_User> implements UserService {
16+
@Resource(name = "userDao")
17+
public void setDao(GenericDao<Base_User> dao) {
18+
super.setDao(dao);
19+
}
20+
21+
public void regist(Base_User user) {
22+
// TODO Auto-generated method stub
23+
24+
}
25+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package com.orz.dao.impl;
2+
3+
import java.io.Serializable;
4+
import java.util.List;
5+
6+
import org.hibernate.Query;
7+
import org.hibernate.Session;
8+
import org.hibernate.SessionFactory;
9+
import org.springframework.beans.factory.annotation.Autowired;
10+
11+
import com.orz.dao.GenericDao;
12+
13+
public class GenericDaoImpl<T> implements GenericDao<T> {
14+
private Class<T> clazz;
15+
16+
@Autowired
17+
private SessionFactory sessionFactory;
18+
19+
protected Session getSession() {
20+
return this.sessionFactory.getCurrentSession();
21+
}
22+
23+
public void save(T entity) {
24+
this.getSession().save(entity);
25+
}
26+
27+
public void update(T entity) {
28+
this.getSession().update(entity);
29+
}
30+
31+
public void delete(Serializable id) {
32+
this.getSession().delete(this.findById(id));
33+
}
34+
35+
@SuppressWarnings("unchecked")
36+
public T findById(Serializable id) {
37+
return (T) this.getSession().get(this.clazz, id);
38+
}
39+
40+
@SuppressWarnings("unchecked")
41+
public List<T> findByHql(java.lang.String hql, Object... params) {
42+
Query query = this.getSession().createQuery(hql);
43+
for (int i = 0; params != null && i < params.length; i++) {
44+
query.setParameter(i, params);
45+
}
46+
return query.list();
47+
}
48+
49+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.orz.service.impl;
2+
3+
import javax.annotation.Resource;
4+
5+
import org.springframework.stereotype.Service;
6+
import org.springframework.transaction.annotation.Transactional;
7+
8+
import com.orz.dao.GenericDao;
9+
import com.orz.po.Base_User;
10+
import com.orz.service.UserService;
11+
12+
@Service("userService")
13+
@Transactional
14+
public class UserServiceImpl extends CommonServiceImpl<Base_User> implements UserService {
15+
@Resource(name = "userDao")
16+
public void setDao(GenericDao<Base_User> dao) {
17+
super.setDao(dao);
18+
}
19+
20+
public Base_User getUser(Base_User user) {
21+
return user;
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.orz.service.impl;
2+
3+
import javax.annotation.Resource;
4+
5+
import org.springframework.stereotype.Service;
6+
import org.springframework.transaction.annotation.Transactional;
7+
8+
import com.orz.dao.GenericDao;
9+
import com.orz.po.Base_User;
10+
import com.orz.service.UserService;
11+
12+
@Service("userService")
13+
@Transactional
14+
public class UserServiceImpl extends CommonServiceImpl<Base_User> implements UserService {
15+
@Resource(name = "userDao")
16+
public void setDao(GenericDao<Base_User> dao) {
17+
super.setDao(dao);
18+
}
19+
20+
public void regist(Base_User user) {
21+
22+
}
23+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.orz.controller;
2+
3+
import org.springframework.stereotype.Controller;
4+
import org.springframework.ui.Model;
5+
import org.springframework.web.bind.annotation.RequestMapping;
6+
import org.springframework.web.bind.annotation.RequestParam;
7+
import org.springframework.web.bind.annotation.ResponseBody;
8+
9+
import net.sf.json.JSONObject;
10+
11+
@Controller
12+
@RequestMapping("/gbf")
13+
public class GbfController {
14+
@RequestMapping("/test")
15+
@ResponseBody
16+
public JSONObject getPage(@RequestParam(value = "pageNum", required = false) String pageNum, Model model) {
17+
JSONObject obj = new JSONObject();
18+
19+
return obj;
20+
}
21+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
encoding//src/main/java/com/orz/dao/impl/GenericDaoImpl.java=UTF-8
3+
encoding//src/main/java/com/orz/po/User.java=UTF-8
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.orz.dao.impl;
2+
3+
import org.springframework.stereotype.Repository;
4+
5+
import com.orz.po.Base_User;
6+
7+
@Repository(value = "userDao")
8+
public class Base_User_Dao<T> extends GenericDaoImpl<Base_User> implements Base_User_Dao_Impl<T> {
9+
10+
}

0 commit comments

Comments
 (0)