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
c9b80084
Commit
c9b80084
authored
Dec 10, 2020
by
ysongq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
条件分页查询企业审核
parent
052851e7
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
284 additions
and
3 deletions
+284
-3
OrderMethodEnum.java
...on/src/main/java/com/jz/common/enums/OrderMethodEnum.java
+1
-1
DataGoodsDao.xml
jz-dm-mall/src/main/resources/mapperconf/DataGoodsDao.xml
+1
-1
DepartmentController.java
...nage/moduls/controller/customer/DepartmentController.java
+24
-1
EnterpriseAuditDto.java
...duls/controller/customer/bean/dto/EnterpriseAuditDto.java
+93
-0
EnterpriseAuditRequest.java
...troller/customer/bean/request/EnterpriseAuditRequest.java
+59
-0
DepartmentDao.java
.../main/java/com/jz/manage/moduls/mapper/DepartmentDao.java
+10
-0
DepartmentService.java
.../java/com/jz/manage/moduls/service/DepartmentService.java
+13
-0
DepartmentServiceImpl.java
.../jz/manage/moduls/service/impl/DepartmentServiceImpl.java
+54
-0
DepartmentDao.xml
...nage/src/main/resources/mapper/customer/DepartmentDao.xml
+29
-0
No files found.
jz-dm-common/src/main/java/com/jz/common/enums/OrderMethodEnum.java
View file @
c9b80084
...
@@ -23,7 +23,7 @@ public enum OrderMethodEnum {
...
@@ -23,7 +23,7 @@ public enum OrderMethodEnum {
MONTH
(
"MONTH"
,
"03"
),
MONTH
(
"MONTH"
,
"03"
),
/**
/**
*
月
*
次
*/
*/
SECOND
(
"SECOND"
,
"04"
),
SECOND
(
"SECOND"
,
"04"
),
;
;
...
...
jz-dm-mall/src/main/resources/mapperconf/DataGoodsDao.xml
View file @
c9b80084
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
and t1.category_id = #{categoryId}
and t1.category_id = #{categoryId}
</if>
</if>
<if
test=
"dataName != null and dataName != ''"
>
<if
test=
"dataName != null and dataName != ''"
>
and data_name
= #{dataName}
and data_name
like concat('%',#{dataName},'%')
</if>
</if>
<if
test=
"dataType != null and dataType != ''"
>
<if
test=
"dataType != null and dataType != ''"
>
and data_type = #{dataType}
and data_type = #{dataType}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/DepartmentController.java
View file @
c9b80084
package
com
.
jz
.
manage
.
moduls
.
controller
.
customer
;
package
com
.
jz
.
manage
.
moduls
.
controller
.
customer
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.controller.BaseController
;
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
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.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.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
/**
* 企业(Department)表控制层
* 企业(Department)表控制层
*
*
...
@@ -14,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -14,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
*/
@RestController
@RestController
@RequestMapping
(
"department"
)
@RequestMapping
(
"department"
)
@Api
(
tags
=
"企业"
)
public
class
DepartmentController
extends
BaseController
{
public
class
DepartmentController
extends
BaseController
{
/**
/**
* 服务对象
* 服务对象
...
@@ -21,5 +32,17 @@ public class DepartmentController extends BaseController {
...
@@ -21,5 +32,17 @@ public class DepartmentController extends BaseController {
@Autowired
@Autowired
private
DepartmentService
departmentService
;
private
DepartmentService
departmentService
;
@PostMapping
(
value
=
"/findList"
)
@ApiOperation
(
value
=
"条件分页查询企业审核信息"
)
public
PageInfoResponse
<
EnterpriseAuditDto
>
findList
(
@RequestBody
EnterpriseAuditRequest
auditRequest
,
HttpServletRequest
req
)
throws
Exception
{
PageInfoResponse
<
EnterpriseAuditDto
>
pageInfo
=
new
PageInfoResponse
<>();
try
{
pageInfo
=
departmentService
.
findList
(
auditRequest
,
req
);
}
catch
(
Exception
e
)
{
pageInfo
.
setMessage
(
"查询失败"
);
pageInfo
.
setCode
(
Constants
.
FAILURE_CODE
);
e
.
printStackTrace
();
}
return
pageInfo
;
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/bean/dto/EnterpriseAuditDto.java
0 → 100644
View file @
c9b80084
package
com
.
jz
.
manage
.
moduls
.
controller
.
customer
.
bean
.
dto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/10
* @Version:
*/
@Api
(
tags
=
"企业审核信息返回参数"
)
public
class
EnterpriseAuditDto
{
@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
auditStatus
;
@ApiModelProperty
(
value
=
"提交时间"
)
private
Date
creTime
;
@ApiModelProperty
(
value
=
"审核时间"
)
private
Date
auditTime
;
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
getAuditStatus
()
{
return
auditStatus
;
}
public
void
setAuditStatus
(
String
auditStatus
)
{
this
.
auditStatus
=
auditStatus
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
Date
getAuditTime
()
{
return
auditTime
;
}
public
void
setAuditTime
(
Date
auditTime
)
{
this
.
auditTime
=
auditTime
;
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/bean/request/EnterpriseAuditRequest.java
0 → 100644
View file @
c9b80084
package
com
.
jz
.
manage
.
moduls
.
controller
.
customer
.
bean
.
request
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/10
* @Version:
*/
@Api
(
tags
=
"企业审核信息请求参数封装"
)
public
class
EnterpriseAuditRequest
extends
BasePageBean
{
@ApiModelProperty
(
value
=
"企业地址"
)
private
String
registeredAddress
;
@ApiModelProperty
(
value
=
"企业名称"
)
private
String
departmentName
;
@ApiModelProperty
(
value
=
"联系人电话"
)
private
String
customerPhone
;
@ApiModelProperty
(
value
=
"审核状态"
)
private
String
auditStatus
;
public
String
getRegisteredAddress
()
{
return
registeredAddress
;
}
public
void
setRegisteredAddress
(
String
registeredAddress
)
{
this
.
registeredAddress
=
registeredAddress
;
}
public
String
getDepartmentName
()
{
return
departmentName
;
}
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
}
public
String
getCustomerPhone
()
{
return
customerPhone
;
}
public
void
setCustomerPhone
(
String
customerPhone
)
{
this
.
customerPhone
=
customerPhone
;
}
public
String
getAuditStatus
()
{
return
auditStatus
;
}
public
void
setAuditStatus
(
String
auditStatus
)
{
this
.
auditStatus
=
auditStatus
;
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/DepartmentDao.java
View file @
c9b80084
...
@@ -2,6 +2,10 @@ package com.jz.manage.moduls.mapper;
...
@@ -2,6 +2,10 @@ package com.jz.manage.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.entity.Department
;
import
com.jz.common.entity.Department
;
import
com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 企业(TDepartment)表数据库访问层
* 企业(TDepartment)表数据库访问层
...
@@ -11,4 +15,10 @@ import com.jz.common.entity.Department;
...
@@ -11,4 +15,10 @@ import com.jz.common.entity.Department;
*/
*/
public
interface
DepartmentDao
extends
BaseMapper
<
Department
>
{
public
interface
DepartmentDao
extends
BaseMapper
<
Department
>
{
/**
* 条件分页查询企业审核信息表
* @param param
* @return
*/
List
<
EnterpriseAuditDto
>
findList
(
Map
<
String
,
Object
>
param
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/DepartmentService.java
View file @
c9b80084
package
com
.
jz
.
manage
.
moduls
.
service
;
package
com
.
jz
.
manage
.
moduls
.
service
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto
;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
import
javax.servlet.http.HttpServletRequest
;
/**
/**
* 企业(TDepartment)表服务接口
* 企业(TDepartment)表服务接口
*
*
...
@@ -9,4 +15,11 @@ package com.jz.manage.moduls.service;
...
@@ -9,4 +15,11 @@ package com.jz.manage.moduls.service;
public
interface
DepartmentService
{
public
interface
DepartmentService
{
/**
* 条件查询企业审核信息列表
* @param auditRequest
* @param req
* @return
*/
PageInfoResponse
<
EnterpriseAuditDto
>
findList
(
EnterpriseAuditRequest
auditRequest
,
HttpServletRequest
req
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DepartmentServiceImpl.java
View file @
c9b80084
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
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.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
;
import
com.jz.manage.moduls.mapper.DepartmentDao
;
import
com.jz.manage.moduls.mapper.DepartmentDao
;
import
com.jz.manage.moduls.service.DepartmentService
;
import
com.jz.manage.moduls.service.DepartmentService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 企业(TDepartment)表服务实现类
* 企业(TDepartment)表服务实现类
...
@@ -15,4 +28,45 @@ import org.springframework.stereotype.Service;
...
@@ -15,4 +28,45 @@ import org.springframework.stereotype.Service;
public
class
DepartmentServiceImpl
implements
DepartmentService
{
public
class
DepartmentServiceImpl
implements
DepartmentService
{
@Autowired
@Autowired
private
DepartmentDao
tDepartmentDao
;
private
DepartmentDao
tDepartmentDao
;
/**
* 条件查询企业审核信息列表
*
* @param auditRequest
* @param req
* @return
*/
@Override
public
PageInfoResponse
<
EnterpriseAuditDto
>
findList
(
EnterpriseAuditRequest
auditRequest
,
HttpServletRequest
req
)
{
PageInfoResponse
<
EnterpriseAuditDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
// 企业地址
if
(!
StringUtils
.
isEmpty
(
auditRequest
.
getRegisteredAddress
()))
{
param
.
put
(
"registeredAddress"
,
auditRequest
.
getRegisteredAddress
());
}
// 企业名
if
(!
StringUtils
.
isEmpty
(
auditRequest
.
getDepartmentName
()))
{
param
.
put
(
"departmentName"
,
auditRequest
.
getDepartmentName
());
}
// 联系人电话
if
(
auditRequest
.
getCustomerPhone
()
!=
null
)
{
param
.
put
(
"customerPhone"
,
auditRequest
.
getCustomerPhone
());
}
// 审核状态
if
(!
StringUtils
.
isEmpty
(
auditRequest
.
getAuditStatus
()))
{
param
.
put
(
"auditStatus"
,
auditRequest
.
getAuditStatus
());
}
PageHelper
.
startPage
(
auditRequest
.
getPageNum
(),
auditRequest
.
getPageSize
());
List
<
EnterpriseAuditDto
>
list
=
tDepartmentDao
.
findList
(
param
);
PageInfo
<
EnterpriseAuditDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/resources/mapper/customer/DepartmentDao.xml
View file @
c9b80084
...
@@ -282,4 +282,33 @@
...
@@ -282,4 +282,33 @@
delete from t_department where department_id = #{departmentId}
delete from t_department where department_id = #{departmentId}
</delete>
</delete>
<select
id=
"findList"
parameterType=
"map"
resultType=
"com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto"
>
SELECT
t1.department_id as departmentId,
t1.department_name as departmentName,
t2.customer_name as customerName,
t2.customer_phone as customerPhone,
(CASE WHEN t1.audit_status = '01' THEN '待审核' WHEN t1.audit_status = '02' THEN '已审核' WHEN t1.audit_status = '03' THEN '未通过' end) as auditStatus,
t1.cre_time as creTime,
t1.audit_time as auditTime
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' and
<if
test=
"registeredAddress != null and registeredAddress != ''"
>
and t1.registered_address like concat('%',#{registeredAddress},'%')
</if>
<if
test=
"departmentName != null and departmentName != ''"
>
and t1.department_name like concat('%',#{departmentName},'%')
</if>
<if
test=
"customerPhone != null and customerPhone != ''"
>
and t2.customer_phone = #{customerPhone}
</if>
<if
test=
"auditStatus != null and auditStatus != ''"
>
and t1.audit_status = #{auditStatus}
</if>
</select>
</mapper>
</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