Commit 7756d185 by 邹磊浩

Merge remote-tracking branch 'origin/dev' into dev

parents a2433cd3 88d2b5a1
...@@ -53,33 +53,33 @@ spring: ...@@ -53,33 +53,33 @@ spring:
username: root username: root
password: 4f9fa23639242790 password: 4f9fa23639242790
# 从库数据源 # 从库数据源
# slave: # slave:
# lazy: true # lazy: true
# type: ${spring.datasource.type} # type: ${spring.datasource.type}
# driverClassName: com.mysql.cj.jdbc.Driver # driverClassName: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true # url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
# username: # username:
# password: # password:
# oracle: # oracle:
# type: ${spring.datasource.type} # type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver # driverClassName: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@//localhost:1521/XE # url: jdbc:oracle:thin:@//localhost:1521/XE
# username: ROOT # username: ROOT
# password: root # password: root
# hikari: # hikari:
# connectionTestQuery: SELECT 1 FROM DUAL # connectionTestQuery: SELECT 1 FROM DUAL
# postgres: # postgres:
# type: ${spring.datasource.type} # type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver # driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
# username: root # username: root
# password: root # password: root
# sqlserver: # sqlserver:
# type: ${spring.datasource.type} # type: ${spring.datasource.type}
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
# username: SA # username: SA
# password: root # password: root
hikari: hikari:
# 最大连接池数量 # 最大连接池数量
maxPoolSize: 20 maxPoolSize: 20
......
...@@ -81,7 +81,7 @@ public class HospitalServiceImpl implements IHospitalService { ...@@ -81,7 +81,7 @@ public class HospitalServiceImpl implements IHospitalService {
LambdaQueryWrapper<Hospital> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Hospital> lqw = new LambdaQueryWrapper<>();
Page<HospitalVo> result = new Page<>(); Page<HospitalVo> result = new Page<>();
bo.setStatus(1); bo.setStatus(1);
if (null == bo.getId()) { /*if (null == bo.getId()) {
lqw = buildQueryWrapper(bo); lqw = buildQueryWrapper(bo);
result = baseMapper.selectVoPage(pageQuery.build(), lqw); result = baseMapper.selectVoPage(pageQuery.build(), lqw);
} else { } else {
...@@ -92,8 +92,9 @@ public class HospitalServiceImpl implements IHospitalService { ...@@ -92,8 +92,9 @@ public class HospitalServiceImpl implements IHospitalService {
} }
lqw = buildQueryWrapper(bo); lqw = buildQueryWrapper(bo);
result = baseMapper.selectVoPage(pageQuery.build(), lqw); result = baseMapper.selectVoPage(pageQuery.build(), lqw);
} }*/
lqw = buildQueryWrapper(bo);
result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Optional.ofNullable(result.getRecords()).ifPresent(hospitalVos -> { Optional.ofNullable(result.getRecords()).ifPresent(hospitalVos -> {
hospitalVos.forEach(hospitalVo -> { hospitalVos.forEach(hospitalVo -> {
//获取医院类型名称 //获取医院类型名称
......
...@@ -44,10 +44,7 @@ import org.springframework.cache.annotation.Cacheable; ...@@ -44,10 +44,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/** /**
* 用户 业务层处理 * 用户 业务层处理
...@@ -101,9 +98,13 @@ public class SysUserServiceImpl implements ISysUserService, UserService { ...@@ -101,9 +98,13 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
private Wrapper<SysUser> buildQueryWrapper(SysUser user) { private Wrapper<SysUser> buildQueryWrapper(SysUser user) {
Map<String, Object> params = user.getParams(); Map<String, Object> params = user.getParams();
QueryWrapper<SysUser> wrapper = Wrappers.query(); QueryWrapper<SysUser> wrapper = Wrappers.query();
List<Integer> u = new ArrayList<>();
u.add(1);
u.add(2);
wrapper.eq("u.del_flag", UserConstants.USER_NORMAL) wrapper.eq("u.del_flag", UserConstants.USER_NORMAL)
.eq(StringUtils.isNotBlank(user.getUserType()), "u.user_type", user.getUserType()) .eq(StringUtils.isNotBlank(user.getUserType()), "u.user_type", user.getUserType())
.eq(ObjectUtil.isNotNull(user.getUserId()), "u.user_id", user.getUserId()) .eq(ObjectUtil.isNotNull(user.getUserId()), "u.user_id", user.getUserId())
.notIn("u.user_id", u)
.like(StringUtils.isNotBlank(user.getUserName()), "u.user_name", user.getUserName()) .like(StringUtils.isNotBlank(user.getUserName()), "u.user_name", user.getUserName())
.eq(StringUtils.isNotBlank(user.getStatus()), "u.status", user.getStatus()) .eq(StringUtils.isNotBlank(user.getStatus()), "u.status", user.getStatus())
.like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber()) .like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber())
......
...@@ -1435,6 +1435,8 @@ public class TotalOrderServiceImpl implements ITotalOrderService { ...@@ -1435,6 +1435,8 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
@Override @Override
public DataOrderVo platformRevenue(DataViewBo dataViewBo) { public DataOrderVo platformRevenue(DataViewBo dataViewBo) {
if(null != dataViewBo.getUserId()){ if(null != dataViewBo.getUserId()){
Company company = companyMapper.selectOne(new LambdaQueryWrapper<Company>().eq(Company::getUid, dataViewBo.getUserId()));
dataViewBo.setUserId(company.getId().longValue());
return baseMapper.selectPlatformCom(dataViewBo); return baseMapper.selectPlatformCom(dataViewBo);
} }
return baseMapper.selectPlatformRevenue(dataViewBo); return baseMapper.selectPlatformRevenue(dataViewBo);
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<select id="selectPlatformRevenue" resultType="com.pz.system.domain.vo.DataOrderVo"> <select id="selectPlatformRevenue" resultType="com.pz.system.domain.vo.DataOrderVo">
SELECT IFNULL(ROUND(SUM(employees_divide.order_price - employees_divide.divide_price), 2),0) as dataSum FROM SELECT IFNULL(ROUND(SUM(employees_divide.order_price - employees_divide.divide_price), 2),0) as dataSum FROM
employees_divide employees_divide
left join total_order on total_order.order_sn = employees_divide.order_id WHERE total_order.`status` = 2 and left join total_order on total_order.order_sn = employees_divide.id WHERE total_order.`status` = 2 and
refund_amount = 0 refund_amount = 0
<if test="dataViewBo.condition == 2"> <if test="dataViewBo.condition == 2">
and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天 and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<select id="selectOrderQuantity" resultType="com.pz.system.domain.vo.DataOrderVo"> <select id="selectOrderQuantity" resultType="com.pz.system.domain.vo.DataOrderVo">
SELECT count(total_order.id) as dataSum FROM total_order left join employees on employees.id = total_order.em_id SELECT count(total_order.id) as dataSum FROM total_order left join employees on employees.id = total_order.em_id
left join company on company.id = employees.company_id left join company on company.id = employees.company_id
WHERE total_order.`status` != 0 and total_order.refund_amount = 0 and total_order.em_id !=0 WHERE total_order.`status` != 0
<if test="dataViewBo.userId != null"> <if test="dataViewBo.userId != null">
and company.uid = #{dataViewBo.userId} and company.uid = #{dataViewBo.userId}
</if> </if>
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<select id="selectPlatformCom" resultType="com.pz.system.domain.vo.DataOrderVo"> <select id="selectPlatformCom" resultType="com.pz.system.domain.vo.DataOrderVo">
SELECT IFNULL(ROUND(SUM(employees_divide.divide_price), 2),0) as dataSum FROM SELECT IFNULL(ROUND(SUM(employees_divide.divide_price), 2),0) as dataSum FROM
employees_divide employees_divide
left join total_order on total_order.order_sn = employees_divide.order_id WHERE total_order.`status` = 2 and left join total_order on total_order.order_sn = employees_divide.id WHERE total_order.`status` = 2 and
refund_amount = 0 and company_id = #{dataViewBo.userId} refund_amount = 0 and company_id = #{dataViewBo.userId}
<if test="dataViewBo.condition == 2"> <if test="dataViewBo.condition == 2">
and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天 and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment