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