Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
ce3ed7c7
Commit
ce3ed7c7
authored
Sep 30, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试并修改企业信息接口
parent
edbd1046
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
37 deletions
+18
-37
CompanyDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/CompanyDto.java
+3
-0
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+15
-20
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+0
-17
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/CompanyDto.java
View file @
ce3ed7c7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -20,6 +21,8 @@ public class CompanyDto extends BaseDto {
...
@@ -20,6 +21,8 @@ public class CompanyDto extends BaseDto {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
Company
company
;
@ApiModelProperty
(
value
=
"企业名称"
)
@ApiModelProperty
(
value
=
"企业名称"
)
private
String
name
;
private
String
name
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
ce3ed7c7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
...
@@ -10,7 +10,7 @@ import io.swagger.annotations.Api;
...
@@ -10,7 +10,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -118,7 +118,7 @@ public class CompanyController extends BaseController {
...
@@ -118,7 +118,7 @@ public class CompanyController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表列表全部数据查询"
,
notes
=
"企业信息表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表列表全部数据查询"
,
notes
=
"企业信息表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
CompanyDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
CompanyDto
>>
selectForList
()
{
...
@@ -132,20 +132,14 @@ public class CompanyController extends BaseController {
...
@@ -132,20 +132,14 @@ public class CompanyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"修改企业信息"
,
notes
=
"修改企业信息"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"修改企业信息"
,
notes
=
"修改企业信息"
)
@PostMapping
(
value
=
"/modifyCompanyInfo"
)
@PostMapping
(
value
=
"/modifyCompanyInfo"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
modifyCompanyInfo
(
Company
companyList
)
throws
Exception
{
public
ResponseModel
<
String
>
modifyCompanyInfo
(
@RequestBody
CompanyDto
company
)
throws
Exception
{
Map
<
String
,
Object
>
message
=
new
HashMap
<>();
try
{
companyServiceImpl
.
queryForCompanyList
();
companyServiceImpl
.
modifyCompanyInfo
(
companyList
);
message
.
put
(
"res"
,
true
);
}
catch
(
Exception
e
){
message
.
put
(
"res"
,
false
);
message
.
put
(
"Exception"
,
e
.
getMessage
());
}
return
ResponseHelper
.
buildResponse
(
message
);
companyServiceImpl
.
updateById
(
company
.
getCompany
());
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
/**
/**
...
@@ -153,18 +147,19 @@ public class CompanyController extends BaseController {
...
@@ -153,18 +147,19 @@ public class CompanyController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查看企业信息详情"
,
notes
=
"查看企业信息详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查看企业信息详情"
,
notes
=
"查看企业信息详情"
)
@GetMapping
(
value
=
"/getCompanyInfo"
)
@GetMapping
(
value
=
"/getCompanyInfo"
)
public
ResponseModel
<
Company
>
getCompanyInfo
(
Company
companyList
)
{
public
ResponseModel
<
Company
>
getCompanyInfo
(
Company
companyList
)
{
Company
company
;
// Company company;
QueryWrapper
<
Company
>
lambdaQueryWrapper
=
new
QueryWrapper
<>();
// QueryWrapper<Company> lambdaQueryWrapper=new QueryWrapper<>();
lambdaQueryWrapper
.
eq
(
"name"
,
companyList
.
getName
());
// lambdaQueryWrapper.eq("name",companyList.getName());
company
=
companyMapper
.
selectOne
(
lambdaQueryWrapper
);
// company= companyMapper.selectOne(lambdaQueryWrapper);
return
ResponseHelper
.
buildResponse
(
company
);
return
ResponseHelper
.
buildResponse
(
company
Mapper
.
selectById
(
companyList
)
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
ce3ed7c7
...
@@ -48,22 +48,6 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -48,22 +48,6 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
public
void
modifyCompanyInfo
(
Company
companyList
)
throws
Exception
{
public
void
modifyCompanyInfo
(
Company
companyList
)
throws
Exception
{
try
{
LambdaUpdateWrapper
<
Company
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
eq
(
Company:
:
getSequenceNbr
,
companyList
.
getSequenceNbr
());
//获取数据库所有数据
List
<
Company
>
list
=
companyMapper
.
selectList
(
null
);
for
(
Company
i:
list
){
if
(
i
.
getName
()!=
companyList
.
getName
())
{
companyMapper
.
update
(
companyList
,
wrapper
);
}
else
{
throw
new
Exception
(
"企业名称不能相同"
);
}
}
}
catch
(
Exception
e
)
{
throw
new
Exception
(
e
);
}
}
}
}
}
\ No newline at end of file
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