Commit d7fc30c7 by Wangmin

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

parents c9e3649d 794320e1
......@@ -14,6 +14,7 @@ import com.pz.merchant.domain.vo.EmployeesListVo;
import com.pz.merchant.domain.vo.EmployeesVo;
import com.pz.merchant.domain.vo.OrderInfoVO;
import com.pz.merchant.domain.vo.TodayOrderListVo;
import com.pz.merchant.service.ICompanyService;
import com.pz.merchant.service.IEmployeesService;
import com.pz.system.service.ISysUserService;
import lombok.RequiredArgsConstructor;
......@@ -39,6 +40,8 @@ public class AccompanyEmployeesController extends BaseController {
private final ISysUserService iSysUserService;
private final ICompanyService iCompanyService;
/**
* 修改陪诊员个人信息
*
......@@ -64,6 +67,7 @@ public class AccompanyEmployeesController extends BaseController {
Optional.ofNullable(iSysUserService.selectUserById(getUserId()))
.ifPresent(sysUser -> {
employeesVo.setAvatar(sysUser.getAvatar());
employeesVo.setPhone(sysUser.getPhonenumber());
});
return R.ok(employeesVo);
}
......
......@@ -10,6 +10,7 @@ import com.pz.common.core.page.TableDataInfo;
import com.pz.common.core.validate.AddGroup;
import com.pz.common.core.validate.EditGroup;
import com.pz.common.enums.BusinessType;
import com.pz.common.helper.LoginHelper;
import com.pz.common.utils.poi.ExcelUtil;
import com.pz.system.domain.UserAppreciate;
import com.pz.system.domain.bo.ArticleBo;
......@@ -68,7 +69,7 @@ public class AppletArticleController extends BaseController {
@RepeatSubmit()
@PostMapping("/Appreciate")
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserAppreciateBo bo) {
bo.setUid(1);
bo.setUid(LoginHelper.getLoginUser().getUserId().intValue());
return toAjax(iArticleService.insertByAppreciate(bo));
}
......@@ -78,7 +79,7 @@ public class AppletArticleController extends BaseController {
@RepeatSubmit()
@PostMapping("/Collect")
public R<Void> add(@Validated(AddGroup.class) @RequestBody UserCollectBo bo) {
bo.setUid(1);
bo.setUid(LoginHelper.getLoginUser().getUserId().intValue());
return toAjax(iArticleService.insertByCollect(bo));
}
......@@ -88,7 +89,7 @@ public class AppletArticleController extends BaseController {
@RepeatSubmit()
@PostMapping("/Comment")
public R<Void> add(@Validated(AddGroup.class) @RequestBody ArticleCommentBo bo) {
bo.setUid(1);
bo.setUid(getUserId());
return toAjax(iArticleService.insertByComment(bo));
}
......
......@@ -14,6 +14,7 @@ import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotNull;
/**
......@@ -33,14 +34,16 @@ public class AppletCarouselController extends BaseController {
* 首页
*/
@GetMapping("/home")
public R<HomeVo> getHome() {
return R.ok(iCarouselService.selectHome(1));
public R<HomeVo> getHome(HttpServletRequest reques) {
return R.ok(iCarouselService.selectHome(Integer.parseInt(reques.getHeader("city_id"))));
}
/**
* 查询轮播图列表
*/
@GetMapping("/list")
public TableDataInfo<CarouselVo> list(CarouselBo bo, PageQuery pageQuery) {
public TableDataInfo<CarouselVo> list(CarouselBo bo, PageQuery pageQuery, HttpServletRequest reques) {
bo.setStatus(1);
bo.setCityId(Long.valueOf(reques.getHeader("city_id")));
return iCarouselService.queryPageList(bo, pageQuery);
}
......
......@@ -44,6 +44,7 @@ public class AppletUserAddressController extends BaseController {
*/
@GetMapping("/list")
public TableDataInfo<UserAddressVo> list(UserAddressBo bo, PageQuery pageQuery) {
bo.setUid(LoginHelper.getLoginUser().getUserId().intValue());
return iUserAddressService.queryPageList(bo, pageQuery);
}
......
......@@ -6,6 +6,7 @@ import com.pz.common.annotation.RepeatSubmit;
import com.pz.common.core.controller.BaseController;
import com.pz.common.core.domain.PageQuery;
import com.pz.common.core.domain.R;
import com.pz.common.core.domain.model.LoginUser;
import com.pz.common.core.page.TableDataInfo;
import com.pz.common.core.validate.AddGroup;
import com.pz.common.enums.BusinessType;
......@@ -39,6 +40,8 @@ public class AppletUserVsitorController extends BaseController {
*/
@GetMapping("/list")
public TableDataInfo<UserVsitorVo> list(UserVsitorBo bo, PageQuery pageQuery) {
LoginUser loginUser = LoginHelper.getLoginUser();
bo.setUid(loginUser.getUserId().intValue());
return iUserVsitorService.queryPageList(bo, pageQuery);
}
/**
......
......@@ -2,6 +2,7 @@ package com.pz.applet;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.pz.common.utils.DateUtils;
import com.pz.system.domain.Message;
......@@ -184,7 +185,7 @@ public class WebSocketOneToOneController {
List<Object> list = sessionPool.get(sessionList.getToUserId());
try {
if (list == null || list.isEmpty()) {
if (CollectionUtils.isEmpty(list)) {
//增加对方未读数
sessionListMapper.addUnReadCount(receiveId, sendId);
//发送消息
......
......@@ -13,7 +13,10 @@ import java.util.Date;
*/
@Data
public class SonOrderVo {
/**
* 子订单id
*/
private Integer sonOrderId;
/**
* 就诊人员姓名
*/
......
......@@ -309,7 +309,7 @@ public class EmployeesServiceImpl implements IEmployeesService {
Optional.ofNullable(companyMapper.selectVoById(employeesVo.getCompanyId()))
.ifPresent(companyVo -> employeesVo.setCompanyName(companyVo.getName()));
return baseMapper.selectVoOne(Wrappers.<Employees>lambdaQuery().eq(Employees::getUid, userId));
return employeesVo;
}
@Override
......
......@@ -5,6 +5,8 @@ import com.pz.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 商品对象 store_goods
......@@ -43,11 +45,11 @@ public class StoreGoods extends BaseEntity {
/**
* 原价
*/
private String price;
private BigDecimal price;
/**
* 售价
*/
private String salePrice;
private BigDecimal salePrice;
/**
* 小封面图
*/
......
......@@ -30,7 +30,7 @@ public class ArticleCommentBo extends BaseEntity {
/**
* 用户
*/
private Integer uid;
private Long uid;
/**
* 评论
......
......@@ -8,7 +8,10 @@ import com.pz.common.core.domain.BaseEntity;
import com.pz.system.domain.Carousel;
import com.pz.system.domain.StoreGoodsTag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -20,7 +23,7 @@ import java.util.List;
*/
@Data
@ExcelIgnoreUnannotated
public class StoreGoodsVo extends BaseEntity {
public class StoreGoodsVo {
private static final long serialVersionUID = 1L;
......@@ -58,13 +61,13 @@ public class StoreGoodsVo extends BaseEntity {
* 原价
*/
@ExcelProperty(value = "原价")
private String price;
private BigDecimal price;
/**
* 售价
*/
@ExcelProperty(value = "售价")
private double salePrice;
private BigDecimal salePrice;
/**
* 小封面图
......@@ -124,4 +127,6 @@ public class StoreGoodsVo extends BaseEntity {
* 流水单号
*/
private String logisticsCode;
private Date updateTime;
}
......@@ -7,6 +7,7 @@ import com.pz.common.convert.ExcelDictConvert;
import com.pz.system.domain.StoreGoodsTag;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -323,7 +324,7 @@ public class TotalOrderVo {
*/
private String smallCover;
private double price;
private BigDecimal price;
private Integer num;
......
......@@ -2,6 +2,7 @@ package com.pz.system.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pz.merchant.domain.vo.SonOrderVo;
import com.pz.system.domain.StoreOrder;
import com.pz.system.domain.bo.StoreOrderBo;
import com.pz.system.domain.vo.StoreAdminOrderVo;
......@@ -25,4 +26,12 @@ public interface StoreOrderMapper extends BaseMapperPlus<StoreOrderMapper, Store
* @return
*/
Page<StoreAdminOrderVo> findStoreAdminOrderVoPage(IPage<StoreOrder> iPage, @Param("bo") StoreOrderBo bo);
/**
* 根据主订单ID查询子订单相关信息
*
* @param totalId 主订单ID
* @return 子订单相关信息
*/
SonOrderVo selectSonOrderInfoByTotalId(Integer totalId);
}
package com.pz.system.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.pz.common.core.domain.entity.SysUser;
import com.pz.common.core.domain.model.LoginUser;
import com.pz.common.core.page.TableDataInfo;
import com.pz.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -57,31 +59,65 @@ public class ArticleServiceImpl implements IArticleService {
*/
@Override
public ArticleVo queryById(Integer id) {
LoginUser loginUser = LoginHelper.getLoginUser();
ArticleVo articleVo = baseMapper.selectVoById(id);
Long aLong = userAppreciateMapper.selectCount(Wrappers.<UserAppreciate>lambdaQuery().eq(UserAppreciate::getAid, id));
Long aLong1 = userCollectMapper.selectCount(Wrappers.<UserCollect>lambdaQuery().eq(UserCollect::getAid, id));
//是否点赞
articleVo.setAppreciate(aLong != 0);
//点赞数量
articleVo.setAppreciateNum(Math.toIntExact(aLong));
//是否收藏
articleVo.setCollect(aLong1 != 0);
//收藏数量
articleVo.setCollectNum(Math.toIntExact(aLong1));
//用户评论
List<ArticleCommentVo> articleCommentVos = articleCommentMapper.selectVoList(Wrappers.<ArticleComment>lambdaQuery().eq(ArticleComment::getAid, id));
// 查询点赞数量和是否点赞
LambdaQueryWrapper<UserAppreciate> appreciateWrapper = Wrappers.<UserAppreciate>lambdaQuery().eq(UserAppreciate::getAid, id);
Long appreciateCount = userAppreciateMapper.selectCount(appreciateWrapper);
appreciateWrapper.eq(UserAppreciate::getUid, loginUser.getUserId());
boolean appreciated = userAppreciateMapper.selectCount(appreciateWrapper) != 0;
articleVo.setAppreciate(appreciated);
articleVo.setAppreciateNum(Math.toIntExact(appreciateCount));
// 查询收藏数量和是否收藏
LambdaQueryWrapper<UserCollect> collectWrapper = Wrappers.<UserCollect>lambdaQuery().eq(UserCollect::getAid, id);
Long collectCount = userCollectMapper.selectCount(collectWrapper);
collectWrapper.eq(UserCollect::getUid, loginUser.getUserId());
boolean collected = userCollectMapper.selectCount(collectWrapper) != 0;
articleVo.setCollect(collected);
articleVo.setCollectNum(Math.toIntExact(collectCount));
// 查询用户评论
List<ArticleCommentVo> articleCommentVos = articleCommentMapper.selectVoList(Wrappers.<ArticleComment>lambdaQuery()
.eq(ArticleComment::getAid, id).eq(ArticleComment::getUid, loginUser.getUserId()));
// 查询用户信息并设置到评论中
if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
Set<Long> userIds = new HashSet<>();
for (ArticleCommentVo articleCommentVo : articleCommentVos) {
if (null != articleCommentVo.getUid()) {
SysUser sysUser = sysUserMapper.selectById(LoginHelper.getLoginUser().getUserId().intValue());
Long uid = articleCommentVo.getUid();
if (uid != null) {
userIds.add(uid);
}
}
Map<Long, SysUser> sysUserMap = new HashMap<>();
if (!userIds.isEmpty()) {
List<SysUser> sysUsers = sysUserMapper.selectBatchIds(userIds);
for (SysUser sysUser : sysUsers) {
sysUserMap.put(sysUser.getUserId(), sysUser);
}
}
for (ArticleCommentVo articleCommentVo : articleCommentVos) {
Long uid = articleCommentVo.getUid();
if (uid != null) {
SysUser sysUser = sysUserMap.get(uid);
if (sysUser != null) {
articleCommentVo.setAvatar(sysUser.getAvatar());
articleCommentVo.setUserName(sysUser.getUserName());
}
}
}
}
articleVo.setComment(articleCommentVos);
return articleVo;
}
/**
* 查询文章列表
*/
......@@ -147,8 +183,8 @@ public class ArticleServiceImpl implements IArticleService {
LambdaQueryWrapper<Article> lqw = new LambdaQueryWrapper<>();
//Page<ArticleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
// TODO 待登录写完修改
//int userId = LoginHelper.getLoginUser().getUserId().intValue();
int userId = 1;
int userId = LoginHelper.getLoginUser().getUserId().intValue();
//int userId = 1;
Page<ArticleVo> result = new Page<>();
//判断是否展示收藏文章
if (bo.getIsCollect() == 1) {
......@@ -210,7 +246,7 @@ public class ArticleServiceImpl implements IArticleService {
//List<String> ids = JsonUtils.parseArray(articleVo.getCover(), String.class);
List<String> ids = new ArrayList<>();
// 使用逗号分割字符串,并逐个转换为 Integer 添加到 List 中
if(null != articleVo.getCover()){
if (null != articleVo.getCover()) {
Collections.addAll(ids, articleVo.getCover().split(","));
articleVo.setCoverList(ids);
}
......@@ -288,7 +324,7 @@ public class ArticleServiceImpl implements IArticleService {
@Override
public Boolean insertByComment(ArticleCommentBo bo) {
ArticleComment add = BeanUtil.toBean(bo, ArticleComment.class);
add.setUid(bo.getUid());
boolean flag = articleCommentMapper.insert(add) > 0;
if (flag) {
bo.setId(add.getId());
......
......@@ -133,7 +133,9 @@ public class CarouselServiceImpl implements ICarouselService {
@Override
public HomeVo selectHome(Integer cityId) {
HomeVo homeVo = new HomeVo();
List<Notice> notices = noticeMapper.selectList();
List<Notice> notices = noticeMapper.selectList(
new LambdaQueryWrapper<Notice>().eq(Notice::getSite,1).eq(Notice::getCityId,cityId)
);
if(null != notices && notices.size() != 0){
homeVo.setNotice(notices.get(0).getInfo());
}
......@@ -142,7 +144,7 @@ public class CarouselServiceImpl implements ICarouselService {
Carousel::getSite,1
).eq(
Carousel::getStatus,1
)
).eq(Carousel::getCityId,cityId)
));
homeVo.setBusiness(businessMapper.selectList());
return homeVo;
......
package com.pz.system.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.TypeReference;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.pz.common.core.page.TableDataInfo;
import com.pz.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.pz.common.utils.JsonUtils;
import com.pz.system.domain.Hospital;
import com.pz.system.mapper.HospitalMapper;
import lombok.RequiredArgsConstructor;
......@@ -88,18 +92,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
@Override
public List<DepartmentVo> departmentByHospitalId(Integer hospitalId) {
Hospital hospital = hospitalMapper.selectById(hospitalId);
// 去除方括号
String numbers = hospital.getDepartments().substring(1, hospital.getDepartments().length() - 1);
// 使用逗号分割字符串
String[] numberArray = numbers.split(", ");
// 创建 List<Integer> 并将转换后的整数加入列表中
List<Integer> integerList = new ArrayList<>();
for (String num : numberArray) {
integerList.add(Integer.parseInt(num.trim()));
}
List<DepartmentVo> departments = baseMapper.selectVoList(new LambdaQueryWrapper<Department>().in(Department::getId, integerList));
List<Integer> ids = JsonUtils.parseArray(hospital.getDepartments(), Integer.class);
List<DepartmentVo> departments = baseMapper.selectVoList(new LambdaQueryWrapper<Department>().in(Department::getId, ids));
if (CollectionUtils.isNotEmpty(departments)) {
//查询所有菜单
List<DepartmentVo> allMenu = departments;
......
......@@ -138,7 +138,7 @@ public class StoreOrderServiceImpl implements IStoreOrderService, ISonOrderServi
@Override
public SonOrderVo getSonOrderSimpleDataByTotalId(Integer totalId) {
return null;
return baseMapper.selectSonOrderInfoByTotalId(totalId);
}
@Override
......
......@@ -121,6 +121,8 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
private final SysUserMapper sysUserMapper;
private final UserRefundMapper userRefundMapper;
@Override
public TotalOrderVo queryById(Long id) {
return baseMapper.selectVoById(id);
......@@ -478,8 +480,9 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
} else if (bo.getBusinessId() == 5) {// 代办买药
DbmyOrder dbmyOrder = BeanUtil.toBean(bo, DbmyOrder.class);
dbmyOrderMapper.insert(dbmyOrder);
dbmyOrder.setRemark("");
dbmyOrderMapper.insert(dbmyOrder);
} else if (bo.getBusinessId() == 6) {// 诊前挂号
ZqghOrder zqghOrder = BeanUtil.toBean(bo, ZqghOrder.class);
......@@ -520,7 +523,7 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
// 已接单、待服务状态下等待陪诊员开始服务或取消订单
TotalOrderBo totalOrderBo = new TotalOrderBo();
totalOrderBo.setId(totalOrder.getId());
if (totalOrder.getBusinessId() == 3 && totalOrder.getStatus() == 1) {
if (totalOrder.getBusinessId() == 3 && totalOrder.getStatus() == 1 && sonOrderSimpleDataByTotalId.getOrderStatus() == 1) {
totalOrderBo.setIsRefund(0);
return this.refundOrder(totalOrderBo);
......@@ -543,7 +546,13 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
return this.refundOrder(totalOrderBo);
}
if (totalOrder.getEmId() == 0) {// 预约陪诊
// 已付款 未结单直接退款
if (sonOrderSimpleDataByTotalId.getOrderStatus() == 0 && totalOrder.getStatus() == 1) {
totalOrderBo.setIsRefund(0);
return this.refundOrder(totalOrderBo);
}
if (sonOrderSimpleDataByTotalId.getOrderStatus() == 0 && totalOrder.getEmId() == 0 && totalOrder.getStatus() == 0) {// 预约陪诊
// yypzOrderMapper.selectOne(new LambdaQueryWrapper<YypzOrder>().eq(YypzOrder::getOrderId,totalOrder));
totalOrder.setStatus(TotalOrderStatus.CANCEL.getCode());
return baseMapper.updateById(totalOrder) > 0;
......@@ -617,10 +626,18 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
ISonOrderService orderService = serviceBuilder.getSonOrderService(totalOrder.getBusinessId());
Objects.requireNonNull(orderService, "订单业务属性出错");
SonOrderVo sonOrderSimpleDataByTotalId = orderService.getSonOrderSimpleDataByTotalId(totalOrder.getId().intValue());
// 已付款 未结单直接退款
if (sonOrderSimpleDataByTotalId.getOrderStatus() == 0 && totalOrder.getStatus() == 1) {
totalOrder.setStatus(TotalOrderStatus.CANCEL.getCode());
}
// 修改子订单状态
boolean sonOrderFlag = orderService.switchSonOrderStatus(totalOrder.getId(), CommonOrderStatus.REFUND.getCode());
if (!sonOrderFlag) {
if (sonOrderFlag) {
throw new ServiceException("子订单状态修改出错,接单失败");
}
if (baseMapper.updateById(totalOrder) > 0) {
......@@ -656,8 +673,12 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
if (bo.getIsRefund() == 0) {// 陪诊员订单未完成用户主动退款
// 主订单必须为付款并且子订单为已接单
if (totalOrder.getStatus() != 1 && sonOrderSimpleDataByTotalId.getOrderStatus() != 1) {
if(totalOrder.getStatus() == 1 && sonOrderSimpleDataByTotalId.getOrderStatus() == 0){
money = totalOrder.getPayMoney();
}else {
throw new ServiceException("退款出错!");
}
}
/**
*责任归属:用户下单,陪诊人员接单后,客户单方面取消,客户为本次订单负责:
*
......@@ -680,9 +701,9 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
money = totalOrder.getPayMoney();
} else if (totalOrder.getBusinessId() == 0) {// 商城订单
} else {// 一般陪诊订单
} else {
// 一般陪诊订单
// 一般订单开始服务时间
String serveTime = orderService.getFinishTime(totalOrder.getBusinessId());
if (StringUtils.isNotEmpty(serveTime)) {
money = getMoney(serveTime, totalOrder.getPayMoney());// 计算退款金额
......@@ -702,6 +723,7 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
} catch (WxPayException e) {
e.printStackTrace();
}
totalOrder.setRefundAmount(totalOrder.getPayMoney());
} else if (bo.getIsRefund() == 1) {// 陪诊员订单完成走审批流程
if (sonOrderSimpleDataByTotalId.getOrderStatus() != 2) {
......@@ -710,6 +732,14 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
// 修改主订单退款理由
totalOrder.setRefundAmount(totalOrder.getPayMoney());
totalOrder.setRefundReason(bo.getRefundReason());
//添加退款审核记录
UserRefund userRefund = new UserRefund();
userRefund.setRefundNo(getOrderSn());
userRefund.setOrderId(totalOrder.getId().intValue());
userRefund.setBusinessId(totalOrder.getBusinessId());
userRefund.setSonOrderId(sonOrderSimpleDataByTotalId.getSonOrderId());
userRefund.setPhone(bo.getPhone());
userRefund.setStatus(0);
}
......
......@@ -56,7 +56,8 @@
dbgh_order.status as orderStatus,
sys_user.avatar,
hospital.name as hospital,
dbgh_order.visit_time
dbgh_order.visit_time,
dbgh_order.id as sonOrderId
from dbgh_order
left join user_vsitor as vsitor on vsitor.id = dbgh_order.visitor
left join sys_user on sys_user.user_id = vsitor.uid
......
......@@ -58,7 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
select dbmy_order.status as orderStatus,
sys_user.nick_name as userName,
sys_user.avatar
sys_user.avatar,
dbmy_order.id as sonOrderId
from dbmy_order
left join total_order on total_order.id = dbmy_order.order_id
left join sys_user on sys_user.user_id = total_order.uid
......
......@@ -59,7 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select vsitor.name as userName,
dbwz_order.status as orderStatus,
sys_user.avatar,
dbwz_order.visit_time
dbwz_order.visit_time,
dbwz_order.id as sonOrderId
from dbwz_order
left join user_vsitor as vsitor on vsitor.id = dbwz_order.visitor
left join sys_user on sys_user.user_id = vsitor.uid
......
......@@ -56,6 +56,9 @@
</if>
</where>
</select>
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
select s.id as sonOrderId store_order s where order_id = #{totalId}
</select>
</mapper>
......@@ -58,7 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
yypz_order.status as orderStatus,
sys_user.avatar,
hospital.name as hospital,
yypz_order.visit_time
yypz_order.visit_time,
yypz_order.id as sonOrderId
from yypz_order
left join user_vsitor as vsitor on vsitor.id = yypz_order.visitor
left join sys_user on sys_user.user_id = vsitor.uid
......
......@@ -56,7 +56,8 @@
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
select user.nick_name as userName,
zqgh_order.status as orderStatus,
user.avatar
user.avatar,
zqgh_order.id as sonOrderId
from zqgh_order
left join total_order on total_order.id = zqgh_order.order_id
left join sys_user as user on user.user_id = total_order.uid
......
......@@ -62,7 +62,8 @@
zyph_order.status as orderStatus,
sys_user.avatar,
hospital.name as hospital,
zyph_order.start_day as visitTime
zyph_order.start_day as visitTime,
zyph_order.id as sonOrderId
from zyph_order
left join user_vsitor as vsitor on vsitor.id = zyph_order.visitor
left join sys_user on sys_user.user_id = vsitor.uid
......
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