| | |
| | | package com.consum.base.core; |
| | | |
| | | |
| | | import com.consum.base.core.tools.SqlParameter; |
| | | import com.consum.base.core.utils.SqlParameter; |
| | | import com.consum.model.po.BaseCodeIndexing; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * 编码统一生成服务 |
| | | */ |
| | | @Service |
| | | @Transactional(propagation = Propagation.NOT_SUPPORTED) |
| | | public class CodeGeneratorService extends BaseServiceImpl { |
| | | |
| | | |
| | |
| | | System.out.println(prefix); |
| | | } |
| | | |
| | | public String createCodeByPrefix(String prefix,int length){ |
| | | private String createCodeByPrefix(String prefix,int length){ |
| | | String CODE_PREFIX = prefix; |
| | | String sql = "SELECT * from BASE_CODE_INDEXING where CODE_PREFIX=:CODE_PREFIX"; |
| | | |