Commit 7756d185 by 邹磊浩

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

parents a2433cd3 88d2b5a1
......@@ -53,33 +53,33 @@ spring:
username: root
password: 4f9fa23639242790
# 从库数据源
# slave:
# lazy: true
# type: ${spring.datasource.type}
# 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
# username:
# password:
# oracle:
# type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@//localhost:1521/XE
# username: ROOT
# password: root
# hikari:
# connectionTestQuery: SELECT 1 FROM DUAL
# postgres:
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
# username: root
# password: root
# sqlserver:
# type: ${spring.datasource.type}
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
# username: SA
# password: root
# slave:
# lazy: true
# type: ${spring.datasource.type}
# 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
# username:
# password:
# oracle:
# type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@//localhost:1521/XE
# username: ROOT
# password: root
# hikari:
# connectionTestQuery: SELECT 1 FROM DUAL
# postgres:
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
# username: root
# password: root
# sqlserver:
# type: ${spring.datasource.type}
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
# username: SA
# password: root
hikari:
# 最大连接池数量
maxPoolSize: 20
......
......@@ -81,7 +81,7 @@ public class HospitalServiceImpl implements IHospitalService {
LambdaQueryWrapper<Hospital> lqw = new LambdaQueryWrapper<>();
Page<HospitalVo> result = new Page<>();
bo.setStatus(1);
if (null == bo.getId()) {
/*if (null == bo.getId()) {
lqw = buildQueryWrapper(bo);
result = baseMapper.selectVoPage(pageQuery.build(), lqw);
} else {
......@@ -92,8 +92,9 @@ public class HospitalServiceImpl implements IHospitalService {
}
lqw = buildQueryWrapper(bo);
result = baseMapper.selectVoPage(pageQuery.build(), lqw);
}
}*/
lqw = buildQueryWrapper(bo);
result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Optional.ofNullable(result.getRecords()).ifPresent(hospitalVos -> {
hospitalVos.forEach(hospitalVo -> {
//获取医院类型名称
......
......@@ -44,10 +44,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.*;
/**
* 用户 业务层处理
......@@ -101,9 +98,13 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
private Wrapper<SysUser> buildQueryWrapper(SysUser user) {
Map<String, Object> params = user.getParams();
QueryWrapper<SysUser> wrapper = Wrappers.query();
List<Integer> u = new ArrayList<>();
u.add(1);
u.add(2);
wrapper.eq("u.del_flag", UserConstants.USER_NORMAL)
.eq(StringUtils.isNotBlank(user.getUserType()), "u.user_type", user.getUserType())
.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())
.eq(StringUtils.isNotBlank(user.getStatus()), "u.status", user.getStatus())
.like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber())
......
......@@ -1435,6 +1435,8 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
@Override
public DataOrderVo platformRevenue(DataViewBo dataViewBo) {
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.selectPlatformRevenue(dataViewBo);
......
......@@ -85,7 +85,7 @@
<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
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
<if test="dataViewBo.condition == 2">
and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
......@@ -100,7 +100,7 @@
<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
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">
and company.uid = #{dataViewBo.userId}
</if>
......@@ -153,7 +153,7 @@
<select id="selectPlatformCom" resultType="com.pz.system.domain.vo.DataOrderVo">
SELECT IFNULL(ROUND(SUM(employees_divide.divide_price), 2),0) as dataSum FROM
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}
<if test="dataViewBo.condition == 2">
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