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
b6f48fa5
Commit
b6f48fa5
authored
Dec 10, 2020
by
ysongq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业审核添加
parent
7472fb81
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
9 deletions
+77
-9
DataGoodsApiController.java
.../mall/moduls/controller/goods/DataGoodsApiController.java
+2
-2
DepartmentController.java
...nage/moduls/controller/customer/DepartmentController.java
+20
-3
Department.java
...src/main/java/com/jz/manage/moduls/entity/Department.java
+4
-0
DepartmentDao.java
.../main/java/com/jz/manage/moduls/mapper/DepartmentDao.java
+1
-1
DepartmentService.java
.../java/com/jz/manage/moduls/service/DepartmentService.java
+6
-0
DepartmentServiceImpl.java
.../jz/manage/moduls/service/impl/DepartmentServiceImpl.java
+44
-3
No files found.
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/goods/DataGoodsApiController.java
View file @
b6f48fa5
...
@@ -39,9 +39,9 @@ public class DataGoodsApiController extends BaseController {
...
@@ -39,9 +39,9 @@ public class DataGoodsApiController extends BaseController {
*/
*/
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
@ApiOperation
(
value
=
"点击商品查看商品详情"
,
notes
=
"api商品"
)
@ApiOperation
(
value
=
"点击商品查看商品详情"
,
notes
=
"api商品"
)
public
Result
<
DataGoodsApiDto
>
findById
(
@PathVariable
(
value
=
"id"
)
Stri
ng
id
)
{
public
Result
<
DataGoodsApiDto
>
findById
(
@PathVariable
(
value
=
"id"
)
Lo
ng
id
)
{
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
DataGoodsApiDto
dataGoodsApi
=
tDataGoodsApiService
.
selectById
(
Long
.
valueOf
(
id
)
);
DataGoodsApiDto
dataGoodsApi
=
tDataGoodsApiService
.
selectById
(
id
);
return
new
Result
<
DataGoodsApiDto
>(
true
,
"查询商品详情成功!"
,
StatusCode
.
OK
,
dataGoodsApi
);
return
new
Result
<
DataGoodsApiDto
>(
true
,
"查询商品详情成功!"
,
StatusCode
.
OK
,
dataGoodsApi
);
}
}
return
new
Result
<>(
false
,
"查询商品详情失败!"
);
return
new
Result
<>(
false
,
"查询商品详情失败!"
);
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/customer/DepartmentController.java
View file @
b6f48fa5
...
@@ -10,6 +10,7 @@ import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto;
...
@@ -10,6 +10,7 @@ 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.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.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
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.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -53,13 +54,29 @@ public class DepartmentController extends BaseController {
...
@@ -53,13 +54,29 @@ public class DepartmentController extends BaseController {
return
pageInfo
;
return
pageInfo
;
}
}
/**
* 主键获取企业审核信息
* @param id
* @param req
* @return
*/
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
@ApiOperation
(
value
=
"主键查询用户企业详情信息"
)
@ApiOperation
(
value
=
"主键查询用户企业详情信息"
)
public
Result
<
CompanyDetailsDto
>
selectById
(
@PathVariable
(
value
=
"id"
)
Stri
ng
id
,
HttpServletRequest
req
)
{
public
Result
<
CompanyDetailsDto
>
selectById
(
@PathVariable
(
value
=
"id"
)
Lo
ng
id
,
HttpServletRequest
req
)
{
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
CompanyDetailsDto
companyDetails
=
departmentService
.
selectById
(
Long
.
valueOf
(
id
)
);
CompanyDetailsDto
companyDetails
=
departmentService
.
selectById
(
id
);
return
new
Result
<
CompanyDetailsDto
>(
true
,
"查询企业详情成功!"
,
StatusCode
.
OK
,
companyDetails
);
return
new
Result
<
CompanyDetailsDto
>(
true
,
"查询企业详情成功!"
,
StatusCode
.
OK
,
companyDetails
);
}
}
return
new
Result
<
CompanyDetailsDto
>(
false
,
"查询企业详情失败!"
,
StatusCode
.
ERROR
);
return
new
Result
<
CompanyDetailsDto
>(
false
,
"查询企业详情失败!"
,
StatusCode
.
ERROR
);
}
}
}
\ No newline at end of file
@PostMapping
(
value
=
"audit/{id}"
)
@ApiModelProperty
(
value
=
"企业审核"
)
public
Result
audit
(
@PathVariable
(
value
=
"id"
)
Long
id
)
{
if
(
id
!=
null
)
{
departmentService
.
audit
(
id
);
return
new
Result
<
CompanyDetailsDto
>(
true
,
"企业审核成功!"
,
StatusCode
.
ERROR
);
}
return
new
Result
<
CompanyDetailsDto
>(
false
,
"企业审核失败!"
,
StatusCode
.
ERROR
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/entity/Department.java
View file @
b6f48fa5
package
com
.
jz
.
manage
.
moduls
.
entity
;
package
com
.
jz
.
manage
.
moduls
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -19,6 +22,7 @@ public class Department implements Serializable {
...
@@ -19,6 +22,7 @@ public class Department implements Serializable {
/**
/**
* 企业id
* 企业id
*/
*/
@TableId
(
value
=
"department_id"
,
type
=
IdType
.
AUTO
)
private
Long
departmentId
;
private
Long
departmentId
;
/**
/**
* 企业名称
* 企业名称
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/DepartmentDao.java
View file @
b6f48fa5
package
com
.
jz
.
manage
.
moduls
.
mapper
;
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.
manage.moduls
.entity.Department
;
import
com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto
;
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.dto.EnterpriseAuditDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/DepartmentService.java
View file @
b6f48fa5
...
@@ -30,4 +30,10 @@ public interface DepartmentService {
...
@@ -30,4 +30,10 @@ public interface DepartmentService {
* @return
* @return
*/
*/
CompanyDetailsDto
selectById
(
Long
id
);
CompanyDetailsDto
selectById
(
Long
id
);
/**
* 企业审核信息
* @param id
*/
void
audit
(
Long
id
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DepartmentServiceImpl.java
View file @
b6f48fa5
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.entity.Department
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.exception.ResponseException
;
import
com.jz.common.utils.DateUtils
;
import
com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto
;
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.dto.EnterpriseAuditDto
;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
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.entity.Department
;
import
com.jz.manage.moduls.entity.FinanceCustomerAssets
;
import
com.jz.manage.moduls.mapper.DepartmentDao
;
import
com.jz.manage.moduls.mapper.DepartmentDao
;
import
com.jz.manage.moduls.mapper.FinanceCustomerAssetsDao
;
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
;
...
@@ -31,6 +38,8 @@ public class DepartmentServiceImpl implements DepartmentService {
...
@@ -31,6 +38,8 @@ public class DepartmentServiceImpl implements DepartmentService {
@Autowired
@Autowired
private
DepartmentDao
tDepartmentDao
;
private
DepartmentDao
tDepartmentDao
;
@Autowired
private
FinanceCustomerAssetsDao
financeCustomerAssetsDao
;
/**
/**
* 条件查询企业审核信息列表
* 条件查询企业审核信息列表
*
*
...
@@ -74,7 +83,6 @@ public class DepartmentServiceImpl implements DepartmentService {
...
@@ -74,7 +83,6 @@ public class DepartmentServiceImpl implements DepartmentService {
/**
/**
* 主键获取用户企业详情信息
* 主键获取用户企业详情信息
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -83,4 +91,37 @@ public class DepartmentServiceImpl implements DepartmentService {
...
@@ -83,4 +91,37 @@ public class DepartmentServiceImpl implements DepartmentService {
CompanyDetailsDto
CompanyDetails
=
tDepartmentDao
.
selectById
(
id
);
CompanyDetailsDto
CompanyDetails
=
tDepartmentDao
.
selectById
(
id
);
return
CompanyDetails
;
return
CompanyDetails
;
}
}
/**
* 企业审核信息
*
* @param id
*/
@Override
public
void
audit
(
Long
id
)
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"department_id"
,
id
);
// 获取企业详细信息
Department
department
=
tDepartmentDao
.
selectOne
(
queryWrapper
);
// if (department.getAuditStatus().equals("02") ) {
// throw ResponseException.of(ResultCode.FAILURE, "已审核!不用在审核!");
// }
// 从session获取商城用户id
// 更新信息: 将企业审核状态改为已审核,企业信息更新
department
.
setAuditStatus
(
"02"
);
department
.
setAuditPerson
(
"1"
);
department
.
setAuditTime
(
DateUtils
.
getToday
());
department
.
setUptTime
(
DateUtils
.
getToday
());
department
.
setUptPerson
(
department
.
getUptPerson
());
tDepartmentDao
.
updateById
(
department
);
// 新增企业客户资产
FinanceCustomerAssets
financeCustomerAssets
=
new
FinanceCustomerAssets
();
financeCustomerAssets
.
setDepartmentId
(
department
.
getDepartmentId
());
financeCustomerAssets
.
setCreTime
(
DateUtils
.
getToday
());
financeCustomerAssets
.
setCrePerson
(
"1"
);
financeCustomerAssetsDao
.
insert
(
financeCustomerAssets
);
}
}
}
\ 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