Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b957c2c2
Commit
b957c2c2
authored
Dec 12, 2022
by
季圣华
Browse files
解决供应商和客户重名校验接口的bug
parent
f73d3689
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/SupplierController.java
View file @
b957c2c2
...
...
@@ -58,7 +58,7 @@ public class SupplierController {
@GetMapping
(
value
=
"/checkIsNameAndTypeExist"
)
@ApiOperation
(
value
=
"检查名称和类型是否存在"
)
public
String
checkIsNameAndTypeExist
(
@RequestParam
Long
id
,
@RequestParam
(
value
=
"name"
)
String
name
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"type"
)
String
type
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/CommonQueryManager.java
View file @
b957c2c2
...
...
@@ -128,7 +128,7 @@ public class CommonQueryManager {
* @return
*/
public
int
checkIsNameExist
(
String
apiName
,
Long
id
,
String
name
)
throws
Exception
{
if
(
StringUtil
.
isNotEmpty
(
apiName
))
{
if
(
StringUtil
.
isNotEmpty
(
apiName
)
&&
name
!=
null
)
{
return
container
.
getCommonQuery
(
apiName
).
checkIsNameExist
(
id
,
name
);
}
return
0
;
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
b957c2c2
...
...
@@ -272,6 +272,7 @@ public class SupplierService {
}
public
int
checkIsNameAndTypeExist
(
Long
id
,
String
name
,
String
type
)
throws
Exception
{
name
=
name
==
null
?
""
:
name
;
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andIdNotEqualTo
(
id
).
andSupplierEqualTo
(
name
).
andTypeEqualTo
(
type
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
...
...
Write
Preview
Supports
Markdown
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