Refactor db layer

1. Use Hibernate Criteria API to replace Condition.
2. I write a new DTO tools that can generate DTOs by specified json file.
3. Rewrite ArticleService and CodeService use new API and fix all tests about it.