Authored by linlong

update

package com.yoho.channel.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Created by yoho on 2017/2/15.
*/
public class ChannelGroupRest {
static Logger log = LoggerFactory.getLogger(ChannelGroupRest.class);
}
... ...
package com.yoho.channel.service;
import com.yoho.unions.dal.model.ChannelGroup;
import java.util.List;
/**
* Created by yoho on 2017/2/15.
*/
public interface ChannelGroupService {
public List<ChannelGroup> getChannelGroupList(ChannelGroup channelGroup);
}
... ...
package com.yoho.channel.service.impl;
import com.yoho.channel.service.ChannelGroupService;
import com.yoho.unions.dal.IChannelGroupDAO;
import com.yoho.unions.dal.model.ChannelGroup;
import org.springframework.beans.factory.annotation.Autowired;
import sun.rmi.transport.Channel;
import java.util.List;
/**
* Created by yoho on 2017/2/15.
*/
public class ChannelGroupServiceImpl implements ChannelGroupService{
@Autowired
private IChannelGroupDAO channelGroupDAO;
@Override
public List<ChannelGroup> getChannelGroupList(ChannelGroup channelGroup) {
return null;
}
}
... ...
#Generated by Apache Maven
#Wed Feb 15 10:39:17 CST 2017
#Wed Feb 15 11:43:31 CST 2017
version=1.0.0-SNAPSHOT
groupId=com.yoho.dsf.unions
artifactId=yoho-unions-channel
... ...
com\yoho\dsf\unions\App.class
com\yoho\channel\service\UserGroupService.class
... ...
E:\work\union\channel\src\main\java\com\yoho\dsf\unions\App.java
E:\work\union\channel\src\main\java\com\yoho\channel\service\UserGroupService.java
... ...
... ... @@ -2,6 +2,8 @@ package com.yoho.unions.dal;
import com.yoho.unions.dal.model.ChannelGroup;
import java.util.List;
public interface IChannelGroupDAO {
int deleteByPrimaryKey(Integer id);
... ... @@ -14,4 +16,6 @@ public interface IChannelGroupDAO {
int updateByPrimaryKeySelective(ChannelGroup record);
int updateByPrimaryKey(ChannelGroup record);
List<ChannelGroup> getChannelGroupList(ChannelGroup channelGroup);
}
\ No newline at end of file
... ...
... ... @@ -150,4 +150,28 @@
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="getChannelGroupList" resultMap="BaseResultMap" parameterType="com.yoho.unions.dal.model.ChannelGroup" >
select
<include refid="Base_Column_List" />
from channel_group
where 1=1
<if test="channelGroup.name != null" >
and name = #{channelGroup.name,jdbcType=VARCHAR},
</if>
<if test="channelGroup.createTime != null" >
and create_time>=#{channelGroup.createTime,jdbcType=INTEGER} and create_time &lt;=#{channelGroup.createTime,jdbcType=INTEGER}
</if>
<if test="channelGroup.createUser != null" >
create_user = #{channelGroup.createUser,jdbcType=INTEGER},
</if>
<if test="channelGroup.smsNumber != null" >
sms_number = #{channelGroup.smsNumber,jdbcType=INTEGER},
</if>
<if test="channelGroup.sendTime != null" >
send_time >= #{channelGroup.sendTime,jdbcType=INTEGER} and send_time &lt; #{channelGroup.sendTime,jdbcType=INTEGER}
</if>
<if test="channelGroup.sendUser != null" >
send_user = #{channelGroup.sendUser,jdbcType=INTEGER},
</if>
</select>
</mapper>
... ...