shikeyin
2024-01-11 65da8373531677b1c37a98f53eaa30c892f35e5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.ishop.merchant.service;
 
import com.walker.jdbc.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
 
@Service
public class MerchantCategoryServiceImpl extends BaseServiceImpl {
 
    private static final String SQL_MAX_ID = "select max(id) from eb_merchant_category";
 
    /**
     * 获得下一个可用的最大ID。
     * @return
     * @date 2023-05-17
     */
    public int queryNextId(){
        int maxId = this.queryForInt(SQL_MAX_ID, new Object[]{});
        return maxId+1;
    }
}