Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
0c84405c
Commit
0c84405c
authored
Oct 09, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机构端代码提交
parent
cdb32d01
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
9 deletions
+107
-9
pz-admin/src/main/java/com/pz/web/controller/system/DataViewController.java
+0
-7
pz-merchant/src/main/java/com/pz/merchant/controller/pc/CompanyController.java
+8
-0
pz-merchant/src/main/java/com/pz/merchant/controller/pc/EmployeesController.java
+12
-0
pz-system/src/main/java/com/pz/merchant/domain/bo/EmployeesBo.java
+5
-0
pz-system/src/main/java/com/pz/merchant/domain/vo/EmployeesVo.java
+4
-1
pz-system/src/main/java/com/pz/merchant/service/ICompanyService.java
+7
-0
pz-system/src/main/java/com/pz/merchant/service/IEmployeesService.java
+7
-0
pz-system/src/main/java/com/pz/merchant/service/impl/CompanyServiceImpl.java
+12
-0
pz-system/src/main/java/com/pz/merchant/service/impl/EmployeesServiceImpl.java
+52
-1
No files found.
pz-admin/src/main/java/com/pz/web/controller/system/DataViewController.java
View file @
0c84405c
...
...
@@ -61,7 +61,6 @@ public class DataViewController extends BaseController {
/**
* 新增用户统计
*/
@SaIgnore
@GetMapping
(
"/dataUser"
)
public
R
<
DataViewVo
>
dataUser
(
DataViewBo
dataViewBo
)
{
return
R
.
ok
(
iSysUserService
.
dataUser
(
dataViewBo
));
...
...
@@ -70,7 +69,6 @@ public class DataViewController extends BaseController {
/**
* 新增陪诊员统计
*/
@SaIgnore
@GetMapping
(
"/dataEmployees"
)
public
R
<
DataViewVo
>
dataEmployees
(
DataViewBo
dataViewBo
)
{
return
R
.
ok
(
iEmployeesService
.
dataEmployees
(
dataViewBo
));
...
...
@@ -79,7 +77,6 @@ public class DataViewController extends BaseController {
/**
* 新增机构统计
*/
@SaIgnore
@GetMapping
(
"/dataCompany"
)
public
R
<
DataViewVo
>
dataCompany
(
DataViewBo
dataViewBo
)
{
return
R
.
ok
(
iCompanyService
.
dataCompany
(
dataViewBo
));
...
...
@@ -88,7 +85,6 @@ public class DataViewController extends BaseController {
/**
* 新增商城商户统计
*/
@SaIgnore
@GetMapping
(
"/dataStoreApply"
)
public
R
<
DataViewVo
>
dataStoreApply
(
DataViewBo
dataViewBo
)
{
return
R
.
ok
(
iStoreApplyService
.
dataStoreApply
(
dataViewBo
));
...
...
@@ -97,7 +93,6 @@ public class DataViewController extends BaseController {
/**
* 订单销售额
*/
@SaIgnore
@GetMapping
(
"/saleroom"
)
public
R
<
DataOrderVo
>
saleroom
(
DataViewBo
dataViewBo
)
{
return
R
.
ok
(
iTotalOrderService
.
saleroom
(
dataViewBo
));
...
...
@@ -106,7 +101,6 @@ public class DataViewController extends BaseController {
/**
* 平台收益
*/
@SaIgnore
@GetMapping
(
"/platformRevenue"
)
public
R
<
DataOrderVo
>
platformRevenue
(
DataViewBo
dataViewBo
)
{
return
R
.
ok
(
iTotalOrderService
.
platformRevenue
(
dataViewBo
));
...
...
@@ -115,7 +109,6 @@ public class DataViewController extends BaseController {
/**
* 订单量
*/
@SaIgnore
@GetMapping
(
"/orderQuantity"
)
public
R
<
DataViewVo
>
orderQuantity
(
DataViewBo
dataViewBo
)
{
DataOrderVo
dataOrderVo
=
iTotalOrderService
.
orderQuantity
(
dataViewBo
);
...
...
pz-merchant/src/main/java/com/pz/merchant/controller/pc/CompanyController.java
View file @
0c84405c
...
...
@@ -46,6 +46,14 @@ public class CompanyController extends BaseController {
}
/**
* Pc查询商户列表
*/
@GetMapping
(
"/Plist"
)
public
R
<
List
<
CompanyVo
>>
Plist
(
CompanyBo
bo
)
{
return
R
.
ok
(
iCompanyService
.
queryListP
(
bo
));
}
/**
* 导出商户列表
*/
@Log
(
title
=
"商户"
,
businessType
=
BusinessType
.
EXPORT
)
...
...
pz-merchant/src/main/java/com/pz/merchant/controller/pc/EmployeesController.java
View file @
0c84405c
...
...
@@ -73,6 +73,7 @@ public class EmployeesController extends BaseController {
@RepeatSubmit
()
@PostMapping
()
public
R
<
Void
>
add
(
@Validated
(
AddGroup
.
class
)
@RequestBody
EmployeesBo
bo
)
{
bo
.
setUid
(
getUserId
().
intValue
());
return
toAjax
(
iEmployeesService
.
insertByBo
(
bo
));
}
...
...
@@ -87,6 +88,17 @@ public class EmployeesController extends BaseController {
}
/**
* 修改陪诊员
*/
@Log
(
title
=
"陪诊员"
,
businessType
=
BusinessType
.
UPDATE
)
@RepeatSubmit
()
@PutMapping
(
"/EmployeesUpdate"
)
public
R
<
Void
>
editE
(
@Validated
(
EditGroup
.
class
)
@RequestBody
EmployeesBo
bo
)
{
return
toAjax
(
iEmployeesService
.
updateByC
(
bo
));
}
/**
* 删除陪诊员
*
* @param ids 主键串
...
...
pz-system/src/main/java/com/pz/merchant/domain/bo/EmployeesBo.java
View file @
0c84405c
...
...
@@ -119,4 +119,9 @@ public class EmployeesBo extends BaseEntity {
*/
private
String
favorableRate
;
/**
* 手机号
*/
private
String
phone
;
}
pz-system/src/main/java/com/pz/merchant/domain/vo/EmployeesVo.java
View file @
0c84405c
...
...
@@ -110,7 +110,10 @@ public class EmployeesVo {
private
String
cityName
;
private
Integer
cityId
;
/**
* 城市
*/
private
Long
cityId
;
/**
* 好评率
*/
...
...
pz-system/src/main/java/com/pz/merchant/service/ICompanyService.java
View file @
0c84405c
...
...
@@ -41,6 +41,13 @@ public interface ICompanyService {
List
<
CompanyVo
>
queryList
(
CompanyBo
bo
);
/**
* pc查询商户列表
* @param bo
* @return
*/
List
<
CompanyVo
>
queryListP
(
CompanyBo
bo
);
/**
* 新增商户
*/
Boolean
insertByBo
(
CompanyBo
bo
);
...
...
pz-system/src/main/java/com/pz/merchant/service/IEmployeesService.java
View file @
0c84405c
...
...
@@ -70,6 +70,13 @@ public interface IEmployeesService {
* @return
*/
Boolean
updateByApp
(
EmployeesBo
bo
);
/**
* 机构端修改陪诊员
* @param bo
* @return
*/
Boolean
updateByC
(
EmployeesBo
bo
);
/**
* 校验并批量删除陪诊员信息
*/
...
...
pz-system/src/main/java/com/pz/merchant/service/impl/CompanyServiceImpl.java
View file @
0c84405c
...
...
@@ -96,9 +96,21 @@ public class CompanyServiceImpl implements ICompanyService {
return
baseMapper
.
selectVoList
(
lqw
);
}
/**
* pc查询商户列表
* @param bo
* @return
*/
@Override
public
List
<
CompanyVo
>
queryListP
(
CompanyBo
bo
)
{
LambdaQueryWrapper
<
Company
>
lqw
=
buildQueryWrapper
(
bo
);
return
baseMapper
.
selectVoList
(
lqw
);
}
private
LambdaQueryWrapper
<
Company
>
buildQueryWrapper
(
CompanyBo
bo
)
{
Map
<
String
,
Object
>
params
=
bo
.
getParams
();
LambdaQueryWrapper
<
Company
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
Company:
:
getStatus
,
1
);
lqw
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getName
()),
Company:
:
getName
,
bo
.
getName
());
return
lqw
;
}
...
...
pz-system/src/main/java/com/pz/merchant/service/impl/EmployeesServiceImpl.java
View file @
0c84405c
package
com
.
pz
.
merchant
.
service
.
impl
;
import
cn.dev33.satoken.secure.BCrypt
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -13,6 +15,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.pz.common.enums.UserType
;
import
com.pz.common.exception.ServiceException
;
import
com.pz.common.exception.user.UserException
;
import
com.pz.common.utils.StringUtils
;
import
com.pz.common.utils.redis.RedisUtils
;
import
com.pz.merchant.domain.Company
;
...
...
@@ -68,7 +71,12 @@ public class EmployeesServiceImpl implements IEmployeesService {
*/
@Override
public
EmployeesVo
queryById
(
Integer
id
)
{
return
baseMapper
.
selectVoById
(
id
);
EmployeesVo
employeesVo
=
baseMapper
.
selectVoById
(
id
);
// 获取用户头像
Optional
.
ofNullable
(
sysUserMapper
.
selectUserById
(
employeesVo
.
getUid
().
longValue
())).
ifPresent
(
sysUser
->
employeesVo
.
setAvatar
(
sysUser
.
getAvatar
())
);
return
employeesVo
;
}
/**
...
...
@@ -89,6 +97,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
sysUser
->
employeesVo
.
setUserName
(
sysUser
.
getNickName
())
);
// 获取城市
Optional
.
ofNullable
(
cityMapper
.
selectVoById
(
employeesVo
.
getCityId
())).
ifPresent
(
cityVo
->
employeesVo
.
setCityName
(
cityVo
.
getName
())
...
...
@@ -129,6 +138,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
lqw
.
eq
(
bo
.
getUid
()
!=
null
,
Employees:
:
getUid
,
bo
.
getUid
());
lqw
.
eq
(
bo
.
getStatus
()
!=
null
,
Employees:
:
getStatus
,
bo
.
getStatus
());
lqw
.
eq
(
bo
.
getNowType
()
!=
null
,
Employees:
:
getNowType
,
bo
.
getNowType
());
lqw
.
orderByDesc
(
Employees:
:
getId
);
return
lqw
;
}
...
...
@@ -138,10 +148,32 @@ public class EmployeesServiceImpl implements IEmployeesService {
@Override
public
Boolean
insertByBo
(
EmployeesBo
bo
)
{
Employees
add
=
BeanUtil
.
toBean
(
bo
,
Employees
.
class
);
add
.
setNowType
(
1
);
/*Integer id = companyMapper.selectVoOne(new LambdaQueryWrapper<Company>().eq(Company::getUid, bo.getUid())).getId();
if(null != id && id != 0){
add.setCompanyId(1);
}*/
add
.
setCompanyId
(
1
);
validEntityBeforeSave
(
add
);
boolean
flag
=
baseMapper
.
insert
(
add
)
>
0
;
if
(
flag
)
{
bo
.
setId
(
add
.
getId
());
// 注册用户
SysUser
sysUser
=
new
SysUser
();
//sysUser.setOpenId(loginBo.getOpenId());
sysUser
.
setPhonenumber
(
bo
.
getPhone
());
sysUser
.
setUserName
(
bo
.
getPhone
());
sysUser
.
setAvatar
(
bo
.
getAvatar
());
sysUser
.
setNickName
(
"用户"
+
RandomUtil
.
randomString
(
8
));
sysUser
.
setUserType
(
UserType
.
XCX_USER
.
getUserType
());
sysUser
.
setSex
(
"2"
);
// 初始密码为123456
sysUser
.
setPassword
(
BCrypt
.
hashpw
(
"123456"
));
if
(
sysUserMapper
.
insert
(
sysUser
)
<
1
)
{
throw
new
UserException
(
"用户注册失败,请检查用户信息"
);
}
add
.
setUid
(
sysUser
.
getUserId
().
intValue
());
baseMapper
.
updateById
(
add
);
}
return
flag
;
}
...
...
@@ -201,6 +233,25 @@ public class EmployeesServiceImpl implements IEmployeesService {
}
/**
* 机构端修改陪诊员
* @param bo
* @return
*/
@Override
public
Boolean
updateByC
(
EmployeesBo
bo
)
{
Employees
update
=
BeanUtil
.
toBean
(
bo
,
Employees
.
class
);
validEntityBeforeSave
(
update
);
// 注册用户
SysUser
sysUser
=
new
SysUser
();
sysUser
.
setUserId
(
update
.
getUid
().
longValue
());
sysUser
.
setAvatar
(
bo
.
getAvatar
());
if
(
sysUserMapper
.
updateById
(
sysUser
)
<
1
)
{
throw
new
UserException
(
"用户注册失败,请检查用户信息"
);
}
return
baseMapper
.
updateById
(
update
)
>
0
;
}
/**
* 需求广场
*
* @param bo
...
...
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