Commit 43e4cc59 by sdif

修改代码

parent 779cb5a6
package com.pz.applet; package com.pz.applet;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaIgnore;
import com.pz.applet.util.CityIdUtils; import com.pz.applet.util.CityIdUtils;
import com.pz.common.annotation.Log; import com.pz.common.annotation.Log;
import com.pz.common.annotation.RepeatSubmit; import com.pz.common.annotation.RepeatSubmit;
...@@ -18,6 +19,7 @@ import com.pz.merchant.domain.vo.EmployeesVo; ...@@ -18,6 +19,7 @@ import com.pz.merchant.domain.vo.EmployeesVo;
import com.pz.merchant.service.IEmployeesService; import com.pz.merchant.service.IEmployeesService;
import com.pz.system.domain.bo.DoctorBo; import com.pz.system.domain.bo.DoctorBo;
import com.pz.system.domain.bo.EmployeesCompanyBo; import com.pz.system.domain.bo.EmployeesCompanyBo;
import com.pz.system.domain.vo.TotalOrderVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -74,6 +76,15 @@ public class AppletEmployeesController extends BaseController { ...@@ -74,6 +76,15 @@ public class AppletEmployeesController extends BaseController {
} }
/** /**
* 查询陪诊员评论
*/
@SaIgnore
@GetMapping("/queryByAppComment")
public TableDataInfo<TotalOrderVo> rankingList(EmployeesBo bo,PageQuery pageQuery) {
return iEmployeesService.queryByAppComment(bo, pageQuery);
}
/**
* 新增陪诊员或者商家 * 新增陪诊员或者商家
*/ */
@RepeatSubmit() @RepeatSubmit()
......
...@@ -15,6 +15,7 @@ import com.pz.system.domain.bo.DataViewBo; ...@@ -15,6 +15,7 @@ import com.pz.system.domain.bo.DataViewBo;
import com.pz.system.domain.bo.EmployeesCompanyBo; import com.pz.system.domain.bo.EmployeesCompanyBo;
import com.pz.system.domain.bo.WithdrawDepositBo; import com.pz.system.domain.bo.WithdrawDepositBo;
import com.pz.system.domain.vo.DataViewVo; import com.pz.system.domain.vo.DataViewVo;
import com.pz.system.domain.vo.TotalOrderVo;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
...@@ -119,6 +120,12 @@ public interface IEmployeesService { ...@@ -119,6 +120,12 @@ public interface IEmployeesService {
EmployeesVo queryByApp(Integer id); EmployeesVo queryByApp(Integer id);
/** /**
* 查询陪诊员评论
* @return
*/
TableDataInfo<TotalOrderVo> queryByAppComment(EmployeesBo bo,PageQuery pageQuery);
/**
* 切换陪诊员身份 * 切换陪诊员身份
* *
* @param emId 陪诊员Id * @param emId 陪诊员Id
......
...@@ -315,7 +315,7 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -315,7 +315,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
int year = currentDate.getYear(); int year = currentDate.getYear();
EmployeesVo employeesVo = baseMapper.selectEmployeesById(id); EmployeesVo employeesVo = baseMapper.selectEmployeesById(id);
if(null != employeesVo){ if(null != employeesVo){
List<TotalOrderVo> totalOrder = totalOrderMapper.selectVoList(Wrappers.<TotalOrder>lambdaQuery() /*List<TotalOrderVo> totalOrder = totalOrderMapper.selectVoList(Wrappers.<TotalOrder>lambdaQuery()
.eq(TotalOrder::getEmId, employeesVo.getId()) .eq(TotalOrder::getEmId, employeesVo.getId())
.eq(TotalOrder::getIsSatisfaction, 1) .eq(TotalOrder::getIsSatisfaction, 1)
.orderByDesc(TotalOrder::getId)); .orderByDesc(TotalOrder::getId));
...@@ -326,13 +326,32 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -326,13 +326,32 @@ public class EmployeesServiceImpl implements IEmployeesService {
order.setProject(businessVo.getName()); order.setProject(businessVo.getName());
} }
} }
} }*/
employeesVo.setWrokYear(year - Integer.parseInt(employeesVo.getStartYear())); employeesVo.setWrokYear(year - Integer.parseInt(employeesVo.getStartYear()));
employeesVo.setTotalOrderVo(totalOrder); //employeesVo.setTotalOrderVo(totalOrder);
} }
return employeesVo; return employeesVo;
} }
@Override
public TableDataInfo<TotalOrderVo> queryByAppComment(EmployeesBo bo,PageQuery pageQuery) {
IPage<TotalOrderVo> totalOrder = totalOrderMapper.selectVoPage(pageQuery.build(),Wrappers.<TotalOrder>lambdaQuery()
.eq(TotalOrder::getEmId, bo.getId())
.eq(TotalOrder::getIsSatisfaction, 1)
.orderByDesc(TotalOrder::getId));
Optional.ofNullable(totalOrder.getRecords()).ifPresent(
orderVos -> {
orderVos.forEach(orderVo -> {
BusinessVo businessVo = businessMapper.selectVoOne(new LambdaQueryWrapper<Business>().eq(Business::getId, orderVo.getBusinessId()));
if (null != businessVo) {
orderVo.setProject(businessVo.getName());
}
});
}
);
return TableDataInfo.build(totalOrder);
}
/** /**
* 切换陪诊员用户身份 * 切换陪诊员用户身份
* *
......
...@@ -333,4 +333,6 @@ public class TotalOrderVo { ...@@ -333,4 +333,6 @@ public class TotalOrderVo {
private String pzRemark; private String pzRemark;
private Integer goodsId; private Integer goodsId;
private String avatar;
} }
...@@ -17,6 +17,7 @@ import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; ...@@ -17,6 +17,7 @@ import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.exception.WxPayException;
import com.pz.common.config.KbProperties; import com.pz.common.config.KbProperties;
import com.pz.common.core.domain.PageQuery; import com.pz.common.core.domain.PageQuery;
import com.pz.common.core.domain.entity.SysUser;
import com.pz.common.core.domain.model.LoginUser; import com.pz.common.core.domain.model.LoginUser;
import com.pz.common.core.page.TableDataInfo; import com.pz.common.core.page.TableDataInfo;
import com.pz.common.enums.CommonOrderStatus; import com.pz.common.enums.CommonOrderStatus;
...@@ -159,6 +160,9 @@ public class TotalOrderServiceImpl implements ITotalOrderService { ...@@ -159,6 +160,9 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
Optional.ofNullable(employeesMapper.selectVoById(totalOrderVo.getEmId())) Optional.ofNullable(employeesMapper.selectVoById(totalOrderVo.getEmId()))
.map(EmployeesVo::getName) .map(EmployeesVo::getName)
.ifPresent(totalOrderVo::setEmName); .ifPresent(totalOrderVo::setEmName);
Optional.ofNullable(sysUserMapper.selectVoById(totalOrderVo.getUid()))
.map(SysUser::getAvatar)
.ifPresent(totalOrderVo::setAvatar);
if (totalOrderVo.getBusinessId() == 1) {// 预约陪诊 if (totalOrderVo.getBusinessId() == 1) {// 预约陪诊
YypzOrder yypzOrder = yypzOrderMapper.selectOne(new LambdaQueryWrapper<YypzOrder>().eq(YypzOrder::getOrderId, totalOrderVo.getId())); YypzOrder yypzOrder = yypzOrderMapper.selectOne(new LambdaQueryWrapper<YypzOrder>().eq(YypzOrder::getOrderId, totalOrderVo.getId()));
......
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