喻健
2018-11-16 41a4f9aa848255b97b4ad2bd76cb2dfa177df609
后台导航栏管理
5个文件已修改
142 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/help/AppPageNotificationMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/help/AppPageNotification.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/help/AppPageNotificationMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/help/AppPageNotificationServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/help/AppPageNotificationService.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/help/AppPageNotificationMapper.java
@@ -1,5 +1,9 @@
package com.yeshi.fanli.dao.mybatis.help;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.entity.bus.help.AppPageNotification;
public interface AppPageNotificationMapper {
@@ -23,4 +27,20 @@
    int updateByPrimaryKeySelective(AppPageNotification record);
    int updateByPrimaryKey(AppPageNotification record);
    /**
     * 根据主键批量删除
     * @param list
     * @return
     */
    int deleteBatchByPrimaryKey(List<Long> list);
    /**
     * 后端列表查询
     * @return
     */
    List<AppPageNotification> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("show") Integer show, @Param("canClose") Integer canClose);
    long countQuery(@Param("key") String key,@Param("show") Integer show, @Param("canClose") Integer canClose);
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/help/AppPageNotification.java
@@ -3,7 +3,10 @@
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Transient;
import com.google.gson.annotations.Expose;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
@@ -26,7 +29,7 @@
                "资金"), accountDetail("账户明细"), extract("提现"), orderFanli("返利订单"),orderTiCheng("提成订单"),orderTaoBao("淘宝订单"), coollect("收藏"), scanHistory("足迹"), team(
                        "队员"), kefu("联系客服"), taoBaoShoppingCart("淘宝购物车"), orderFind("订单申诉"), msgCenter("消息中心");
        private final String desc;
        private AppPageNotificationTypeEnum(String desc) {
            this.desc = desc;
        }
@@ -63,6 +66,9 @@
    @Column(name = "an_updatetime")
    private Date updateTime;// 更新时间
    @Transient // 页面名称
    private String pageName;
    public Long getId() {
        return id;
    }
@@ -135,4 +141,12 @@
        this.updateTime = updateTime;
    }
    public String getPageName() {
        return pageName;
    }
    public void setPageName(String pageName) {
        this.pageName = pageName;
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/help/AppPageNotificationMapper.xml
@@ -96,4 +96,42 @@
        </set>
        where an_id = #{id,jdbcType=BIGINT}
    </update>
    <select id="listQuery" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />  FROM yeshi_ec_apppage_notification
        WHERE 1=1
           <if test='key != null and key != ""'>
                  AND (an_type like '%${key}%' or an_content like '%${key}%')
           </if>
           <if test='show != null'>
                  AND an_show = #{show}
           </if>
           <if test='canClose != null'>
                  AND an_can_close = #{canClose}
           </if>
           ORDER BY an_createtime desc
        LIMIT ${start},${count}
   </select>
   <select id="countQuery" resultType="java.lang.Long">
        SELECT IFNULL(count(an_id),0)  FROM yeshi_ec_apppage_notification
        WHERE 1=1
            <if test='key != null and key != ""'>
                  AND (an_type like '%${key}%' or an_content like '%${key}%')
           </if>
           <if test='show != null'>
                  AND an_show = #{show}
           </if>
           <if test='canClose != null'>
                  AND an_can_close = #{canClose}
           </if>
    </select>
      <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
        delete from yeshi_ec_apppage_notification WHERE an_id in
        <foreach collection="list" item="item" open="(" close=")"
            separator=",">#{item}</foreach>
    </delete>
</mapper>
fanli/src/main/java/com/yeshi/fanli/service/impl/help/AppPageNotificationServiceImpl.java
@@ -1,6 +1,7 @@
package com.yeshi.fanli.service.impl.help;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
@@ -48,4 +49,35 @@
        appPageNotificationMapper.insertSelective(apn);
    }
    @Override
    public void insertSelective(AppPageNotification record) {
        appPageNotificationMapper.insertSelective(record);
    }
    @Override
    public void updateByPrimaryKeySelective(AppPageNotification record) {
        appPageNotificationMapper.updateByPrimaryKeySelective(record);
    }
    @Override
    public AppPageNotification selectByPrimaryKey(Long id) {
        return appPageNotificationMapper.selectByPrimaryKey(id);
    }
    @Override
    public int deleteBatchByPrimaryKey(List<Long> list) {
        return appPageNotificationMapper.deleteBatchByPrimaryKey(list);
    }
    @Override
    public List<AppPageNotification> listQuery(long start, int count, String key, Integer show, Integer canClose) {
        return appPageNotificationMapper.listQuery(start, count, key, show, canClose);
    }
    @Override
    public long countQuery(String key, Integer show, Integer canClose) {
        return appPageNotificationMapper.countQuery(key, show, canClose);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/inter/help/AppPageNotificationService.java
@@ -1,5 +1,7 @@
package com.yeshi.fanli.service.inter.help;
import java.util.List;
import com.yeshi.fanli.entity.bus.help.AppPageNotification;
/**
@@ -32,5 +34,39 @@
     * @param apn
     */
    public void addAppPageNotification(AppPageNotification apn) throws Exception;
    /**
     * 选择性插入
     * @param record
     */
    public void insertSelective(AppPageNotification record);
    /**
     * 选择性更新
     * @param record
     */
    public void updateByPrimaryKeySelective(AppPageNotification record);
    /**
     * 根据主键查询
     * @param id
     * @return
     */
    public AppPageNotification selectByPrimaryKey(Long id);
    /**
     * 根据主键批量删除
     * @param list
     * @return
     */
    public int deleteBatchByPrimaryKey(List<Long> list);
    /**
     * 后端列表查询
     * @return
     */
    public List<AppPageNotification> listQuery(long start, int count,String key, Integer show, Integer canClose);
    public long countQuery(String key, Integer show, Integer canClose);
}