Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
965e4300
Commit
965e4300
authored
4 years ago
by
liqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
40c4477f
master
1.0
dev
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
15 deletions
+21
-15
GlobalExceptionAdvisor.java
...gy/chnmuseum/party/common/mvc/GlobalExceptionAdvisor.java
+1
-0
InterfaceException.java
...energy/chnmuseum/party/common/mvc/InterfaceException.java
+2
-0
RequestParamValidAspect.java
...y/chnmuseum/party/common/mvc/RequestParamValidAspect.java
+1
-1
EnumValueValidator.java
.../chnmuseum/party/common/validator/EnumValueValidator.java
+1
-1
IdCardValidator.java
...rgy/chnmuseum/party/common/validator/IdCardValidator.java
+1
-1
PhoneValidator.java
...ergy/chnmuseum/party/common/validator/PhoneValidator.java
+1
-1
EnumValue.java
...nmuseum/party/common/validator/constraints/EnumValue.java
+1
-1
IdCard.java
.../chnmuseum/party/common/validator/constraints/IdCard.java
+1
-1
Phone.java
...y/chnmuseum/party/common/validator/constraints/Phone.java
+1
-1
BasePageOrderParam.java
...senergy/chnmuseum/party/common/vo/BasePageOrderParam.java
+1
-1
controller.java.vm
src/main/resources/templates/controller.java.vm
+10
-7
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/mvc/GlobalExceptionAdvisor.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
mvc
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
mvc
;
import
cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM
;
import
com.google.common.base.Splitter
;
import
com.google.common.base.Splitter
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/mvc/InterfaceException.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
mvc
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
mvc
;
import
cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM
;
/**
/**
* 自定义接口异常对象
* 自定义接口异常对象
*/
*/
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/mvc/RequestParamValidAspect.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
mvc
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
mvc
;
import
cn.wisenergy.
datastation.common.core.utils.exception
.RESPONSE_CODE_ENUM
;
import
cn.wisenergy.
chnmuseum.party.common.enums
.RESPONSE_CODE_ENUM
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Aspect
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/validator/EnumValueValidator.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
;
import
cn.wisenergy.
datastation.model
.validator.constraints.EnumValue
;
import
cn.wisenergy.
chnmuseum.party.common
.validator.constraints.EnumValue
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/validator/IdCardValidator.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
;
import
cn.wisenergy.
datastation.model
.validator.constraints.IdCard
;
import
cn.wisenergy.
chnmuseum.party.common
.validator.constraints.IdCard
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidatorContext
;
import
javax.validation.ConstraintValidatorContext
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/validator/PhoneValidator.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
;
import
cn.wisenergy.
datastation.model
.validator.constraints.Phone
;
import
cn.wisenergy.
chnmuseum.party.common
.validator.constraints.Phone
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidatorContext
;
import
javax.validation.ConstraintValidatorContext
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/validator/constraints/EnumValue.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
constraints
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
constraints
;
import
cn.wisenergy.
datastation.model
.validator.EnumValueValidator
;
import
cn.wisenergy.
chnmuseum.party.common
.validator.EnumValueValidator
;
import
javax.validation.Constraint
;
import
javax.validation.Constraint
;
import
javax.validation.Payload
;
import
javax.validation.Payload
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/validator/constraints/IdCard.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
constraints
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
constraints
;
import
cn.wisenergy.
datastation.model
.validator.IdCardValidator
;
import
cn.wisenergy.
chnmuseum.party.common
.validator.IdCardValidator
;
import
javax.validation.Constraint
;
import
javax.validation.Constraint
;
import
javax.validation.Payload
;
import
javax.validation.Payload
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/validator/constraints/Phone.java
View file @
965e4300
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
constraints
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
constraints
;
import
cn.wisenergy.
datastation.model
.validator.PhoneValidator
;
import
cn.wisenergy.
chnmuseum.party.common
.validator.PhoneValidator
;
import
javax.validation.Constraint
;
import
javax.validation.Constraint
;
import
javax.validation.Payload
;
import
javax.validation.Payload
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BasePageOrderParam.java
View file @
965e4300
...
@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModel;
...
@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
org.apache.commons.collections
4
.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.Collections
;
import
java.util.Collections
;
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/templates/controller.java.vm
View file @
965e4300
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
Wrappers
;
import
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
Wrappers
;
import
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
;
import
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
;
#
if
(${
superControllerClassPackage
})
#
if
(${
superControllerClassPackage
})
import
c
om
.
wisenergy
.
DigDataStation
.
common
.
controller
.
BaseController
;
import
c
n
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
.
base
.
BaseController
;
#
end
#
end
import
${
package
.
Entity
}.${
entity
};
import
${
package
.
Entity
}.${
entity
};
import
${
package
.
Service
}.${
table
.
serviceName
};
import
${
package
.
Service
}.${
table
.
serviceName
};
...
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.*;
import
org
.
springframework
.
stereotype
.
Controller
;
import
org
.
springframework
.
stereotype
.
Controller
;
import
javax
.
annotation
.
Resource
;
import
javax
.
annotation
.
Resource
;
import
java
.
util
.
HashMap
;
import
java
x
.
validation
.
constraints
.
NotNull
;
import
java
.
util
.
List
;
import
java
.
util
.
List
;
import
java
.
util
.
Map
;
import
java
.
util
.
Map
;
...
@@ -117,8 +117,11 @@ public class ${table.controllerName} {
...
@@ -117,8 +117,11 @@ public class ${table.controllerName} {
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
),
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
),
@
ApiImplicitParam
(
name
=
"status"
,
value
=
"状态"
,
paramType
=
"query"
,
dataType
=
"String"
)
@
ApiImplicitParam
(
name
=
"status"
,
value
=
"状态"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
public
Map
<
String
,
Object
>
updateStatus
(@
NotNull
(
message
=
"$!{table.comment}ID不能为空"
)
@
PathVariable
(
"id"
)
Long
id
,
@
RequestParam
(
"status"
)
AuditStatusEnum
status
)
{
public
Map
<
String
,
Object
>
updateStatus
(@
NotNull
(
message
=
"$!{table.comment}ID不能为空"
)
@
PathVariable
(
"id"
)
String
id
,
@
RequestParam
(
"status"
)
AuditStatusEnum
status
)
{
boolean
flag
=
${
table
.
entityPath
}
Service
.
updateAuditStatusById
(
id
,
status
);
UpdateWrapper
<${
entity
}>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
eq
(
"id"
,
id
);
updateWrapper
.
eq
(
"audit_status"
,
status
.
name
());
boolean
flag
=
${
table
.
entityPath
}
Service
.
update
(
updateWrapper
);
if
(
flag
)
{
if
(
flag
)
{
return
getSuccessResult
();
return
getSuccessResult
();
}
}
...
@@ -133,7 +136,7 @@ public class ${table.controllerName} {
...
@@ -133,7 +136,7 @@ public class ${table.controllerName} {
@
ApiImplicitParams
(
value
=
{
@
ApiImplicitParams
(
value
=
{
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
})
public
Map
<
String
,
Object
>
delete
${
entity
}(@
PathVariable
(
"id"
)
Lo
ng
id
)
{
public
Map
<
String
,
Object
>
delete
${
entity
}(@
PathVariable
(
"id"
)
Stri
ng
id
)
{
boolean
result
=
${
table
.
entityPath
}
Service
.
removeById
(
id
);
boolean
result
=
${
table
.
entityPath
}
Service
.
removeById
(
id
);
if
(
result
)
{
if
(
result
)
{
return
getSuccessResult
();
return
getSuccessResult
();
...
@@ -206,7 +209,7 @@ public class ${table.controllerName} {
...
@@ -206,7 +209,7 @@ public class ${table.controllerName} {
#
if
(${
cfg
.
requiresPermissions
})
#
if
(${
cfg
.
requiresPermissions
})
@
RequiresPermissions
(
"$!{cfg.colonTableName}:getById"
)
@
RequiresPermissions
(
"$!{cfg.colonTableName}:getById"
)
#
end
#
end
public
Map
<
String
,
Object
>
getById
(@
PathVariable
(
"id"
)
Lo
ng
id
)
{
public
Map
<
String
,
Object
>
getById
(@
PathVariable
(
"id"
)
Stri
ng
id
)
{
${
entity
}
${
table
.
entityPath
}
=
${
table
.
entityPath
}
Service
.
getById
(
id
);
${
entity
}
${
table
.
entityPath
}
=
${
table
.
entityPath
}
Service
.
getById
(
id
);
return
getResult
(${
table
.
entityPath
});
return
getResult
(${
table
.
entityPath
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment