Commit 56e72c92ed480bcef594b2ce2b0e330531e9ca35

Authored by 郑超
1 parent 7a91bcd9

update

src/main/java/com/cnlive/shenhe/entity/ShyActivity.java
... ... @@ -26,7 +26,7 @@ public class ShyActivity {
26 26 */
27 27 private Date update_time;
28 28  
29   - private Byte exempt_from_trial;
  29 + private Integer exempt_from_trial;
30 30  
31 31 /**
32 32 * 获取活动表主键ID
... ... @@ -82,11 +82,13 @@ public class ShyActivity {
82 82 this.create_time = create_time;
83 83 }
84 84  
  85 +
85 86 /**
86 87 * 获取修改时间
87 88 *
88 89 * @return update_time - 修改时间
89 90 */
  91 +
90 92 public Date getUpdate_time() {
91 93 return update_time;
92 94 }
... ... @@ -100,17 +102,12 @@ public class ShyActivity {
100 102 this.update_time = update_time;
101 103 }
102 104  
103   - /**
104   - * @return exempt_from_trial
105   - */
106   - public Byte getExempt_from_trial() {
  105 + public Integer getExempt_from_trial() {
107 106 return exempt_from_trial;
108 107 }
109 108  
110   - /**
111   - * @param exempt_from_trial
112   - */
113   - public void setExempt_from_trial(Byte exempt_from_trial) {
  109 + public void setExempt_from_trial(Integer exempt_from_trial) {
114 110 this.exempt_from_trial = exempt_from_trial;
115 111 }
  112 +
116 113 }
117 114 \ No newline at end of file
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/ShyActivityImpl.java
1 1 package com.cnlive.shenhe.serviceImpl;
2 2  
3 3  
4   -import com.cnlive.shenhe.dto.ShyActivityDTO;
5 4 import com.cnlive.shenhe.entity.ShyActivity;
6 5 import com.cnlive.shenhe.mapper.ShyActivityMapper;
7 6 import com.cnlive.shenhe.utils.CommonUtils;
8   -import com.github.pagehelper.Page;
9 7 import com.github.pagehelper.PageHelper;
10 8 import com.github.pagehelper.PageInfo;
11 9 import org.springframework.beans.factory.annotation.Autowired;
12 10 import org.springframework.stereotype.Service;
13   -import org.springframework.web.bind.annotation.RequestParam;
14 11 import tk.mybatis.mapper.entity.Example;
15 12  
16   -import java.security.PublicKey;
17 13 import java.util.Date;
18 14 import java.util.List;
19 15  
... ... @@ -38,8 +34,7 @@ public class ShyActivityImpl {
38 34 Date date = new Date();
39 35 shyActivity.setCreate_time(date);
40 36 shyActivity.setUpdate_time(date);
41   - Byte aByte = new Byte("0");
42   - shyActivity.setExempt_from_trial(aByte);
  37 + shyActivity.setExempt_from_trial(0);
43 38 int i = ShyActivityMapper.insertSelective(shyActivity);
44 39 return i;
45 40 }
... ... @@ -72,11 +67,12 @@ public class ShyActivityImpl {
72 67  
73 68 /**
74 69 * 查询活动
  70 + *
75 71 * @param pageNum
76 72 * @param pageSize
77 73 * @return
78 74 */
79   - public PageInfo<ShyActivity> selectByExample(Integer pageNum, Integer pageSize,String activity,String exempt_from_trial) {
  75 + public PageInfo<ShyActivity> selectByExample(Integer pageNum, Integer pageSize, String activity, String exempt_from_trial) {
80 76 Example example = new Example(ShyActivity.class);
81 77 //如果为空 按照倒序排序 分页查询所有
82 78 //以创建时间为条件进行倒序
... ...
src/main/resources/mapper/ShyActivityMapper.xml
... ... @@ -9,7 +9,7 @@
9 9 <result column="activity" jdbcType="VARCHAR" property="activity" />
10 10 <result column="create_time" jdbcType="TIMESTAMP" property="create_time" />
11 11 <result column="update_time" jdbcType="TIMESTAMP" property="update_time" />
12   - <result column="exempt_from_trial" jdbcType="TINYINT" property="exempt_from_trial" />
  12 + <result column="exempt_from_trial" jdbcType="INTEGER" property="exempt_from_trial" />
13 13 </resultMap>
14 14 <select id="selectAllByExempt_from_trial" resultType="java.lang.Integer">
15 15 select id from shy_activity where exempt_from_trial=${exempt_from_trial};
... ...