Commit 6439af720ae10d31be16ea8f53667b6524aa8b16
1 parent
61447fd6
Exists in
master
id format to long
Showing
6 changed files
with
10 additions
and
10 deletions
Show diff stats
build.gradle
build/classes/java/main/com/taover/codegenerate/bazhuayun/GenerateCode.class
No preview for this file type
src/main/resources/template/bazhuayun/RepositoryTemplate.ftl
... | ... | @@ -16,20 +16,20 @@ import com.taover.util.UtilHttpRequestMap; |
16 | 16 | import com.taover.util.UtilObject; |
17 | 17 | |
18 | 18 | @Repository |
19 | -public class ${repositoryClassSimpleName} extends CustomJdbcTemplate<${entityClassSimpleName}, Integer>{ | |
19 | +public class ${repositoryClassSimpleName} extends CustomJdbcTemplate<${entityClassSimpleName}, Long>{ | |
20 | 20 | |
21 | 21 | public ${repositoryClassSimpleName}() throws Exception { |
22 | 22 | super(); |
23 | 23 | } |
24 | 24 | |
25 | - public String getSsidById(Integer id) throws Exception{ | |
25 | + public String getSsidById(Long id) throws Exception{ | |
26 | 26 | MessagePack pack = new MessagePack(); |
27 | - return Base64.getEncoder().encodeToString(pack.write(new Integer[]{id, id, id})); | |
27 | + return Base64.getEncoder().encodeToString(pack.write(new Long[]{id, id, id})); | |
28 | 28 | } |
29 | 29 | |
30 | 30 | public Integer getIdBySsid(String ssid) throws Exception{ |
31 | 31 | MessagePack pack = new MessagePack(); |
32 | - return pack.read(Base64.getDecoder().decode(ssid), Integer[].class)[0]; | |
32 | + return pack.read(Base64.getDecoder().decode(ssid), Long[].class)[0]; | |
33 | 33 | } |
34 | 34 | |
35 | 35 | public Map<String, Object> getVoPage(List<Object[]> condition, Integer page, Integer size) throws Exception{ | ... | ... |
src/main/resources/template/bazhuayun/ServiceImplTemplate.ftl
... | ... | @@ -30,7 +30,7 @@ public class ${serviceImplClassSimpleName} implements ${serviceClassSimpleName} |
30 | 30 | } |
31 | 31 | |
32 | 32 | @Override |
33 | - public ResultInfo getOneV1(Integer id) { | |
33 | + public ResultInfo getOneV1(Long id) { | |
34 | 34 | try { |
35 | 35 | return UtilResultInfo.getSuccess("查询成功", this.${repositoryClassFieldName}.findEntityByID(id)); |
36 | 36 | } catch (Exception e) { | ... | ... |
src/main/resources/template/bazhuayun/ServiceTemplate.ftl
src/main/resources/template/bazhuayun/V1ControllerTemplate.ftl
... | ... | @@ -82,7 +82,7 @@ public class ${controllerClassName} { |
82 | 82 | * @apiUse ResultInfo |
83 | 83 | */ |
84 | 84 | @GetMapping("/{id}") |
85 | - public ResultInfo get(@PathVariable Integer id){ | |
85 | + public ResultInfo get(@PathVariable Long id){ | |
86 | 86 | return this.${serviceClassFieldName}.getOneV1(id); |
87 | 87 | } |
88 | 88 | |
... | ... | @@ -114,7 +114,7 @@ public class ${controllerClassName} { |
114 | 114 | * @apiUse ResultInfo |
115 | 115 | */ |
116 | 116 | @DeleteMapping("/{id}") |
117 | - public ResultInfo delete(@PathVariable Integer id){ | |
117 | + public ResultInfo delete(@PathVariable Long id){ | |
118 | 118 | return UtilResultInfo.getFailure("没有找到对应处理逻辑"); |
119 | 119 | } |
120 | 120 | |
... | ... | @@ -130,7 +130,7 @@ public class ${controllerClassName} { |
130 | 130 | * @apiUse ResultInfo |
131 | 131 | */ |
132 | 132 | @PutMapping("/{id}") |
133 | - public ResultInfo put(@PathVariable Integer id, HttpServletRequest request){ | |
133 | + public ResultInfo put(@PathVariable Long id, HttpServletRequest request){ | |
134 | 134 | return UtilResultInfo.getFailure("没有找到对应处理逻辑"); |
135 | 135 | } |
136 | 136 | ... | ... |