summaryrefslogtreecommitdiff
path: root/src/main/java/com/mesasoft/cn/dao/sqlprovider/CommonSqlProvider.java
blob: ad2d0249903e03bafd3f489660ae96b8d9b181d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.mesasoft.cn.dao.sqlprovider;

import org.apache.ibatis.jdbc.SQL;

/**
 * @author pantao
 * @since 2018/1/19
 */
public class CommonSqlProvider {

    private CommonSqlProvider() {}

    public static String updateAuthById(String table) {
        return new SQL() {{
            UPDATE(table);
            SET("is_downloadable=#{isDownloadable}");
            SET("is_uploadable=#{isUploadable}");
            SET("is_deletable=#{isDeletable}");
            SET("is_updatable=#{isUpdatable}");
            SET("is_visible=#{isVisible}");
            WHERE("id=#{id}");
        }}.toString();
    }
}