"SSM Blogger (blog) Project Combat 13" home features Perfect

Source: Internet
Author: User

This module has four functions to implement, but it's not difficult, so I'm going to write it together.
1 querying logs by log category
This is a simple way to spell data to the background to query the difficult SQL code you can see

<SelectId="Countlist"resultmap="Blogtyperesult">SELECTT2.id,t2.typename,count (t1.id) asBlogcount fromT_blog T1 RightJOINT_blogtype T2 onT1.typeid=t2.idGROUP  byT2.typenameORDER  byT2.orderno; </Select> <SelectId="FindByID"Parametertype="Integer"resultmap="Blogtyperesult">Select* fromT_blogtypewhereId=#{id}</Select>

2 querying logs by log date
This is a simple way to spell data to the background to query the difficult SQL code you can see

<SelectId="List"Parametertype="Map"resultmap="Blogresult">Select* fromT_blog <where> <iftest="Typeid!=null and typeid!= "> andTypeid=#{typeid}</if> <iftest="Releasedatestr!=null and releasedatestr!= "> andDate_format (ReleaseDate,'%y year%m Month ') =#{releasedatestr}</if> </where>Order  byReleaseDate Desc <iftest="Start!=null and Size!=null"> Limit#{start},#{size}</if> </Select> <SelectId="Gettotal"Parametertype="Map"Resulttype="Long">SelectCOUNT (*) fromT_blog <where> <iftest="Typeid!=null and typeid!= "> andTypeid=#{typeid}</if> <iftest="Releasedatestr!=null and releasedatestr!= "> andDate_format (ReleaseDate,'%y year%m Month ') =#{releasedatestr}</if> </where> </Select>

3 Bo Master Personal introduction page implementation
Because when I initialize it, this piece of information is read out and stored in the application, so the latter will be taken directly, but there is a problem that there will be a cache problem background once the foreground is modified, but do not worry about the back I will add a cache empty function

<%@ page language="java" contenttype="text/html; Charset=utf-8 "pageencoding="UTF-8"%><div class="Data_list">        <div class="Data_list_title">            <img src="${pagecontext.request.contextpath}/static/images/about_icon.png" />About Bo Master</div>    <div Style="padding:30px">${blogger.profile}</div></div>

4 contact bo master Download source code
This page is chipped page data is completely written dead just want to tell everyone is not necessarily all the data are read from the database how to choose should see the application see Demand O (∩_∩) o haha ~

<%@ page language="java" contenttype="text/html; Charset=utf-8 "pageencoding="UTF-8"%><div class="Data_list">        <div class="Data_list_title">    <img src="${pagecontext.request.contextpath}/static/images/download_icon.png" />Contact Bo Master Download source code</div>    <div Style="padding:30px">Source refused to share ha haha</div></div>

"is looking at my blog of the children's shoes, I see you imposing, the conversation between the faint king of the gas, there will be a future!" There is a "top" word, you can conveniently point it (to login csdn account first) "

-willing to share and progress together!
- More articles please see: Http://blog.csdn.net/duruiqi_fx

"SSM Blogger (blog) Project Combat 13" home features Perfect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.