Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
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
姚本章
dm_project
Commits
8b218fe2
Commit
8b218fe2
authored
Dec 10, 2020
by
ysongq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主键查询用户企业详情信息
parent
5468acc8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
199 additions
and
7 deletions
+199
-7
DataGoodsApiService.java
...va/com/jz/dm/mall/moduls/service/DataGoodsApiService.java
+1
-1
DepartmentController.java
...nage/moduls/controller/customer/DepartmentController.java
+22
-5
CompanyDetailsDto.java
...oduls/controller/customer/bean/dto/CompanyDetailsDto.java
+113
-0
EnterpriseAuditDto.java
...duls/controller/customer/bean/dto/EnterpriseAuditDto.java
+2
-1
DepartmentDao.java
.../main/java/com/jz/manage/moduls/mapper/DepartmentDao.java
+9
-0
DepartmentService.java
.../java/com/jz/manage/moduls/service/DepartmentService.java
+8
-0
DepartmentServiceImpl.java
.../jz/manage/moduls/service/impl/DepartmentServiceImpl.java
+14
-0
DepartmentDao.xml
...nage/src/main/resources/mapper/customer/DepartmentDao.xml
+30
-0
No files found.
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/DataGoodsApiService.java
View file @
8b218fe2
...
...
@@ -16,5 +16,5 @@ public interface DataGoodsApiService {
* @param id
* @return
*/
DataGoodsApiDto
selectById
(
Long
goodsApi
);
DataGoodsApiDto
selectById
(
Long
id
);
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/DepartmentController.java
View file @
8b218fe2
...
...
@@ -2,17 +2,17 @@ package com.jz.manage.moduls.controller.customer;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.StatusCode
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto
;
import
com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto
;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
import
com.jz.manage.moduls.service.DepartmentService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -24,7 +24,7 @@ import javax.servlet.http.HttpServletRequest;
*/
@RestController
@RequestMapping
(
"department"
)
@Api
(
tags
=
"企业"
)
@Api
(
tags
=
"企业
api
"
)
public
class
DepartmentController
extends
BaseController
{
/**
* 服务对象
...
...
@@ -32,6 +32,13 @@ public class DepartmentController extends BaseController {
@Autowired
private
DepartmentService
departmentService
;
/**
* 条件分页查询企业审核信息
* @param auditRequest
* @param req
* @return
* @throws Exception
*/
@PostMapping
(
value
=
"/findList"
)
@ApiOperation
(
value
=
"条件分页查询企业审核信息"
)
public
PageInfoResponse
<
EnterpriseAuditDto
>
findList
(
@RequestBody
EnterpriseAuditRequest
auditRequest
,
HttpServletRequest
req
)
throws
Exception
{
...
...
@@ -45,4 +52,14 @@ public class DepartmentController extends BaseController {
}
return
pageInfo
;
}
@GetMapping
(
value
=
"/{id}"
)
@ApiOperation
(
value
=
"主键查询用户企业详情信息"
)
public
Result
<
CompanyDetailsDto
>
selectById
(
@PathVariable
(
value
=
"id"
)
String
id
,
HttpServletRequest
req
)
{
if
(
id
!=
null
)
{
CompanyDetailsDto
companyDetails
=
departmentService
.
selectById
(
Long
.
valueOf
(
id
));
return
new
Result
<
CompanyDetailsDto
>(
true
,
"查询企业详情成功!"
,
StatusCode
.
OK
,
companyDetails
);
}
return
new
Result
<
CompanyDetailsDto
>(
false
,
"查询企业详情失败!"
,
StatusCode
.
ERROR
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/bean/dto/CompanyDetailsDto.java
0 → 100644
View file @
8b218fe2
package
com
.
jz
.
manage
.
moduls
.
controller
.
customer
.
bean
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/10
* @Version:
*/
@ApiModel
(
value
=
"企业详细信息返回参数"
)
public
class
CompanyDetailsDto
{
@ApiModelProperty
(
value
=
"企业id"
)
private
Long
departmentId
;
@ApiModelProperty
(
value
=
"企业名称"
)
private
String
departmentName
;
@ApiModelProperty
(
value
=
"联系人姓名"
)
private
String
customerName
;
@ApiModelProperty
(
value
=
"联系人电话"
)
private
String
customerPhone
;
@ApiModelProperty
(
value
=
"企业地址"
)
private
String
registeredAddress
;
@ApiModelProperty
(
value
=
"营业执照"
)
private
String
businessLicense
;
@ApiModelProperty
(
value
=
"统一社会信用代码"
)
private
String
unifredCreditCode
;
@ApiModelProperty
(
value
=
"银行卡号"
)
private
String
bankCardNubmer
;
@ApiModelProperty
(
value
=
"开户行地址"
)
private
String
bankAddress
;
public
Long
getDepartmentId
()
{
return
departmentId
;
}
public
void
setDepartmentId
(
Long
departmentId
)
{
this
.
departmentId
=
departmentId
;
}
public
String
getDepartmentName
()
{
return
departmentName
;
}
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
}
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getCustomerPhone
()
{
return
customerPhone
;
}
public
void
setCustomerPhone
(
String
customerPhone
)
{
this
.
customerPhone
=
customerPhone
;
}
public
String
getRegisteredAddress
()
{
return
registeredAddress
;
}
public
void
setRegisteredAddress
(
String
registeredAddress
)
{
this
.
registeredAddress
=
registeredAddress
;
}
public
String
getBusinessLicense
()
{
return
businessLicense
;
}
public
void
setBusinessLicense
(
String
businessLicense
)
{
this
.
businessLicense
=
businessLicense
;
}
public
String
getUnifredCreditCode
()
{
return
unifredCreditCode
;
}
public
void
setUnifredCreditCode
(
String
unifredCreditCode
)
{
this
.
unifredCreditCode
=
unifredCreditCode
;
}
public
String
getBankCardNubmer
()
{
return
bankCardNubmer
;
}
public
void
setBankCardNubmer
(
String
bankCardNubmer
)
{
this
.
bankCardNubmer
=
bankCardNubmer
;
}
public
String
getBankAddress
()
{
return
bankAddress
;
}
public
void
setBankAddress
(
String
bankAddress
)
{
this
.
bankAddress
=
bankAddress
;
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/bean/dto/EnterpriseAuditDto.java
View file @
8b218fe2
package
com
.
jz
.
manage
.
moduls
.
controller
.
customer
.
bean
.
dto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
...
...
@@ -11,7 +12,7 @@ import java.util.Date;
* @Date: 2020/12/10
* @Version:
*/
@Api
(
tags
=
"企业审核信息返回参数"
)
@Api
Model
(
value
=
"企业审核信息返回参数"
)
public
class
EnterpriseAuditDto
{
@ApiModelProperty
(
value
=
"企业id"
)
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/DepartmentDao.java
View file @
8b218fe2
...
...
@@ -2,7 +2,9 @@ package com.jz.manage.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.entity.Department
;
import
com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto
;
import
com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -21,4 +23,11 @@ public interface DepartmentDao extends BaseMapper<Department> {
* @return
*/
List
<
EnterpriseAuditDto
>
findList
(
Map
<
String
,
Object
>
param
);
/**
* 主键获取用户企业详情信息
* @param id
* @return
*/
CompanyDetailsDto
selectById
(
@Param
(
"departmentId"
)
Long
id
);
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/DepartmentService.java
View file @
8b218fe2
package
com
.
jz
.
manage
.
moduls
.
service
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto
;
import
com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto
;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
...
...
@@ -22,4 +23,11 @@ public interface DepartmentService {
* @return
*/
PageInfoResponse
<
EnterpriseAuditDto
>
findList
(
EnterpriseAuditRequest
auditRequest
,
HttpServletRequest
req
);
/**
* 主键获取用户企业详情信息
* @param id
* @return
*/
CompanyDetailsDto
selectById
(
Long
id
);
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DepartmentServiceImpl.java
View file @
8b218fe2
...
...
@@ -4,6 +4,8 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.entity.Department
;
import
com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto
;
import
com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto
;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
import
com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsDto
;
...
...
@@ -69,4 +71,16 @@ public class DepartmentServiceImpl implements DepartmentService {
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/**
* 主键获取用户企业详情信息
*
* @param id
* @return
*/
@Override
public
CompanyDetailsDto
selectById
(
Long
id
)
{
CompanyDetailsDto
CompanyDetails
=
tDepartmentDao
.
selectById
(
id
);
return
CompanyDetails
;
}
}
\ No newline at end of file
jz-dm-manage/src/main/resources/mapper/customer/DepartmentDao.xml
View file @
8b218fe2
...
...
@@ -311,4 +311,34 @@
and t1.audit_status = #{auditStatus}
</if>
</select>
<select
id=
"selectById"
resultType=
"com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto"
parameterType=
"map"
>
SELECT
t1.department_id AS departmentId,
t1.department_name AS departmentName,
t1.registered_address AS registeredAddress,
t1.business_license AS businessLicense,
t1.unified_credit_code AS unifiedCreditCode,
t1.bank_address AS bankAddress,
t1.bank_card_number AS bankCardNumber,
(CASE
WHEN t1.audit_status = '01' THEN
'待审核'
WHEN t1.audit_status = '02' THEN
'已审核'
WHEN t1.audit_status = '03' THEN
'未通过'
END ) AS auditStatus,
t2.customer_name AS customerName,
t2.customer_phone AS customerPhone
FROM
t_department t1
INNER JOIN t_mall_customer t2 ON t1.department_id = t2.department_id
WHERE
1= 1 and
t1.del_flag = 'N'
<if
test=
"departmentId != null"
>
and t1.department_id = #{departmentId}
</if>
</select>
</mapper>
\ 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