Showing
11 changed files
with
81 additions
and
4 deletions
1 | +package com.yoho.channel.service; | ||
2 | + | ||
3 | +import com.yoho.unions.dal.model.ChannelGroup; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * Created by yoho on 2017/2/15. | ||
9 | + */ | ||
10 | +public interface ChannelGroupService { | ||
11 | + public List<ChannelGroup> getChannelGroupList(ChannelGroup channelGroup); | ||
12 | + | ||
13 | +} |
1 | +package com.yoho.channel.service.impl; | ||
2 | + | ||
3 | +import com.yoho.channel.service.ChannelGroupService; | ||
4 | +import com.yoho.unions.dal.IChannelGroupDAO; | ||
5 | +import com.yoho.unions.dal.model.ChannelGroup; | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import sun.rmi.transport.Channel; | ||
8 | + | ||
9 | +import java.util.List; | ||
10 | + | ||
11 | +/** | ||
12 | + * Created by yoho on 2017/2/15. | ||
13 | + */ | ||
14 | +public class ChannelGroupServiceImpl implements ChannelGroupService{ | ||
15 | + | ||
16 | + @Autowired | ||
17 | + private IChannelGroupDAO channelGroupDAO; | ||
18 | + | ||
19 | + @Override | ||
20 | + public List<ChannelGroup> getChannelGroupList(ChannelGroup channelGroup) { | ||
21 | + return null; | ||
22 | + } | ||
23 | +} |
No preview for this file type
No preview for this file type
No preview for this file type
@@ -2,6 +2,8 @@ package com.yoho.unions.dal; | @@ -2,6 +2,8 @@ package com.yoho.unions.dal; | ||
2 | 2 | ||
3 | import com.yoho.unions.dal.model.ChannelGroup; | 3 | import com.yoho.unions.dal.model.ChannelGroup; |
4 | 4 | ||
5 | +import java.util.List; | ||
6 | + | ||
5 | public interface IChannelGroupDAO { | 7 | public interface IChannelGroupDAO { |
6 | int deleteByPrimaryKey(Integer id); | 8 | int deleteByPrimaryKey(Integer id); |
7 | 9 | ||
@@ -14,4 +16,6 @@ public interface IChannelGroupDAO { | @@ -14,4 +16,6 @@ public interface IChannelGroupDAO { | ||
14 | int updateByPrimaryKeySelective(ChannelGroup record); | 16 | int updateByPrimaryKeySelective(ChannelGroup record); |
15 | 17 | ||
16 | int updateByPrimaryKey(ChannelGroup record); | 18 | int updateByPrimaryKey(ChannelGroup record); |
19 | + | ||
20 | + List<ChannelGroup> getChannelGroupList(ChannelGroup channelGroup); | ||
17 | } | 21 | } |
@@ -150,4 +150,28 @@ | @@ -150,4 +150,28 @@ | ||
150 | update_time = #{updateTime,jdbcType=INTEGER} | 150 | update_time = #{updateTime,jdbcType=INTEGER} |
151 | where id = #{id,jdbcType=INTEGER} | 151 | where id = #{id,jdbcType=INTEGER} |
152 | </update> | 152 | </update> |
153 | -</mapper> | ||
153 | + <select id="getChannelGroupList" resultMap="BaseResultMap" parameterType="com.yoho.unions.dal.model.ChannelGroup" > | ||
154 | + select | ||
155 | + <include refid="Base_Column_List" /> | ||
156 | + from channel_group | ||
157 | + where 1=1 | ||
158 | + <if test="channelGroup.name != null" > | ||
159 | + and name = #{channelGroup.name,jdbcType=VARCHAR}, | ||
160 | + </if> | ||
161 | + <if test="channelGroup.createTime != null" > | ||
162 | + and create_time>=#{channelGroup.createTime,jdbcType=INTEGER} and create_time <=#{channelGroup.createTime,jdbcType=INTEGER} | ||
163 | + </if> | ||
164 | + <if test="channelGroup.createUser != null" > | ||
165 | + create_user = #{channelGroup.createUser,jdbcType=INTEGER}, | ||
166 | + </if> | ||
167 | + <if test="channelGroup.smsNumber != null" > | ||
168 | + sms_number = #{channelGroup.smsNumber,jdbcType=INTEGER}, | ||
169 | + </if> | ||
170 | + <if test="channelGroup.sendTime != null" > | ||
171 | + send_time >= #{channelGroup.sendTime,jdbcType=INTEGER} and send_time < #{channelGroup.sendTime,jdbcType=INTEGER} | ||
172 | + </if> | ||
173 | + <if test="channelGroup.sendUser != null" > | ||
174 | + send_user = #{channelGroup.sendUser,jdbcType=INTEGER}, | ||
175 | + </if> | ||
176 | + </select> | ||
177 | +</mapper> |
-
Please register or login to post a comment