Package com.example.model

Examples of com.example.model.Tag


        render(400, "失败", ViewType.string);
    }

    @At(path = "/tag/{id}", types = {RestRequest.Method.GET})
    public void find() {
        Tag tag = Tag.where(map("name", param("id"))).singleFetch();
        if (tag == null) {
            render(404, map());
        }
        render(404, list(tag));
View Full Code Here


*/
public class TagController extends ApplicationController {

    @At(path = "/tag", types = {RestRequest.Method.POST})
    public void save() {
        Tag tag = Tag.create(params());
        if (tag.save()) {
            render(200, "成功", ViewType.string);
        }
        render(400, "失败", ViewType.string);
    }
View Full Code Here

TOP

Related Classes of com.example.model.Tag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.