Authored by linlong

update

  1 +package com.yoho.channel.controller;
  2 +
  3 +import org.slf4j.Logger;
  4 +import org.slf4j.LoggerFactory;
  5 +
  6 +/**
  7 + * Created by yoho on 2017/2/15.
  8 + */
  9 +public class ChannelGroupRest {
  10 + static Logger log = LoggerFactory.getLogger(ChannelGroupRest.class);
  11 +
  12 +
  13 +}
  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 +}
1 #Generated by Apache Maven 1 #Generated by Apache Maven
2 -#Wed Feb 15 10:39:17 CST 2017 2 +#Wed Feb 15 11:43:31 CST 2017
3 version=1.0.0-SNAPSHOT 3 version=1.0.0-SNAPSHOT
4 groupId=com.yoho.dsf.unions 4 groupId=com.yoho.dsf.unions
5 artifactId=yoho-unions-channel 5 artifactId=yoho-unions-channel
1 -com\yoho\dsf\unions\App.class 1 +com\yoho\channel\service\UserGroupService.class
1 -E:\work\union\channel\src\main\java\com\yoho\dsf\unions\App.java 1 +E:\work\union\channel\src\main\java\com\yoho\channel\service\UserGroupService.java
@@ -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 &lt;=#{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 &lt; #{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>