Commit 41090553 by 邹磊浩

修改代码

parent 03f31845
package com.pz.web.controller.system;
import java.util.List;
import java.util.Arrays;
import lombok.RequiredArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.pz.common.annotation.RepeatSubmit;
import com.pz.common.annotation.Log;
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.validate.AddGroup;
import com.pz.common.core.validate.EditGroup;
import com.pz.common.enums.BusinessType;
import com.pz.common.utils.poi.ExcelUtil;
import com.pz.system.domain.vo.PaymentRecordVo;
import com.pz.system.domain.bo.PaymentRecordBo;
import com.pz.system.service.IPaymentRecordService;
import com.pz.common.core.page.TableDataInfo;
/**
* 支付订单
*
* @author ruoyi
* @date 2023-09-12
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/system/paymentRecord")
public class PaymentRecordController extends BaseController {
private final IPaymentRecordService iPaymentRecordService;
/**
* 查询支付订单列表
*/
@SaCheckPermission("system:paymentRecord:list")
@GetMapping("/list")
public TableDataInfo<PaymentRecordVo> list(PaymentRecordBo bo, PageQuery pageQuery) {
return iPaymentRecordService.queryPageList(bo, pageQuery);
}
/**
* 导出支付订单列表
*/
@SaCheckPermission("system:paymentRecord:export")
@Log(title = "支付订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(PaymentRecordBo bo, HttpServletResponse response) {
List<PaymentRecordVo> list = iPaymentRecordService.queryList(bo);
ExcelUtil.exportExcel(list, "支付订单", PaymentRecordVo.class, response);
}
/**
* 获取支付订单详细信息
*
* @param id 主键
*/
@SaCheckPermission("system:paymentRecord:query")
@GetMapping("/{id}")
public R<PaymentRecordVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Integer id) {
return R.ok(iPaymentRecordService.queryById(id));
}
/**
* 新增支付订单
*/
@SaCheckPermission("system:paymentRecord:add")
@Log(title = "支付订单", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody PaymentRecordBo bo) {
return toAjax(iPaymentRecordService.insertByBo(bo));
}
/**
* 修改支付订单
*/
@SaCheckPermission("system:paymentRecord:edit")
@Log(title = "支付订单", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PaymentRecordBo bo) {
return toAjax(iPaymentRecordService.updateByBo(bo));
}
/**
* 删除支付订单
*
* @param ids 主键串
*/
@SaCheckPermission("system:paymentRecord:remove")
@Log(title = "支付订单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Integer[] ids) {
return toAjax(iPaymentRecordService.deleteWithValidByIds(Arrays.asList(ids), true));
}
}
package com.pz.system.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.pz.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 支付订单对象 payment_record
*
* @author ruoyi
* @date 2023-09-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("payment_record")
public class PaymentRecord extends BaseEntity {
private static final long serialVersionUID=1L;
/**
*
*/
@TableId(value = "id")
private Integer id;
/**
* 类型:0-支付。1-退款
*/
private Integer payType;
/**
* 订单id
*/
private Integer orderId;
/**
* 第三方订单号
*/
private String otherOrder;
/**
* 金额
*/
private Long money;
/**
* 用户
*/
private Long uid;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private String delFlag;
/**
* 备注
*/
private String remark;
}
package com.pz.system.domain.bo;
import com.pz.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;
/**
* 支付订单业务对象 payment_record
*
* @author ruoyi
* @date 2023-09-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class PaymentRecordBo extends BaseEntity {
/**
*
*/
private Integer id;
/**
* 类型:0-支付。1-退款
*/
private Integer payType;
/**
* 订单id
*/
private Integer orderId;
/**
* 第三方订单号
*/
private String otherOrder;
/**
* 金额
*/
private Long money;
/**
* 用户
*/
private Long uid;
/**
* 备注
*/
private String remark;
}
package com.pz.system.domain.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.pz.common.annotation.ExcelDictFormat;
import com.pz.common.convert.ExcelDictConvert;
import lombok.Data;
/**
* 支付订单视图对象 payment_record
*
* @author ruoyi
* @date 2023-09-12
*/
@Data
@ExcelIgnoreUnannotated
public class PaymentRecordVo {
private static final long serialVersionUID = 1L;
/**
*
*/
@ExcelProperty(value = "")
private Integer id;
/**
* 类型:0-支付。1-退款
*/
@ExcelProperty(value = "类型:0-支付。1-退款")
private Integer payType;
/**
* 订单id
*/
@ExcelProperty(value = "订单id")
private Integer orderId;
/**
* 第三方订单号
*/
@ExcelProperty(value = "第三方订单号")
private String otherOrder;
/**
* 金额
*/
@ExcelProperty(value = "金额")
private Long money;
/**
* 用户
*/
@ExcelProperty(value = "用户")
private Long uid;
/**
* 备注
*/
@ExcelProperty(value = "备注")
private String remark;
}
...@@ -6,6 +6,9 @@ import com.pz.common.annotation.ExcelDictFormat; ...@@ -6,6 +6,9 @@ import com.pz.common.annotation.ExcelDictFormat;
import com.pz.common.convert.ExcelDictConvert; import com.pz.common.convert.ExcelDictConvert;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/** /**
* 用户退款视图对象 user_refund * 用户退款视图对象 user_refund
...@@ -73,5 +76,21 @@ public class UserRefundVo { ...@@ -73,5 +76,21 @@ public class UserRefundVo {
@ExcelProperty(value = "备注") @ExcelProperty(value = "备注")
private String remark; private String remark;
/**
* 业务名称
*/
private String bname;
/**
* 订单号
*/
private String orderSn;
/**
* 金额
*/
private BigDecimal payMoney;
private Date createTime;
} }
package com.pz.system.domain.vo; package com.pz.system.domain.vo;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
...@@ -87,5 +88,52 @@ public class ZqghOrderVo { ...@@ -87,5 +88,52 @@ public class ZqghOrderVo {
@ExcelProperty(value = "备注") @ExcelProperty(value = "备注")
private String remark; private String remark;
/**
* 医生名称
*/
private String doName;
/**
* 当前状态
*/
@ExcelProperty(value = "当前状态")
private Integer yStatus;
/**
* 订单状态
*/
@ExcelProperty(value = "订单状态")
private Integer tStatus;
/**
* 城市
*/
private String cityName;
/**
* 医院
*/
private String hName;
/**
* 科室
*/
private String title;
/**
* 订单号
*/
private String orderSn;
/**
* 订单价格
*/
private BigDecimal payMoney;
/**
* 用户名称
*/
private String userName;
private Date createTime;
} }
...@@ -146,4 +146,6 @@ public class ZyphOrderVo { ...@@ -146,4 +146,6 @@ public class ZyphOrderVo {
* 就诊人员 * 就诊人员
*/ */
private UserVsitorVo userVsitorVo; private UserVsitorVo userVsitorVo;
private Date createTime;
} }
package com.pz.system.mapper;
import com.pz.system.domain.PaymentRecord;
import com.pz.system.domain.vo.PaymentRecordVo;
import com.pz.common.core.mapper.BaseMapperPlus;
/**
* 支付订单Mapper接口
*
* @author ruoyi
* @date 2023-09-12
*/
public interface PaymentRecordMapper extends BaseMapperPlus<PaymentRecordMapper, PaymentRecord, PaymentRecordVo> {
}
package com.pz.system.mapper; package com.pz.system.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pz.system.domain.UserRefund; import com.pz.system.domain.UserRefund;
import com.pz.system.domain.ZqghOrder;
import com.pz.system.domain.bo.UserRefundBo;
import com.pz.system.domain.bo.ZqghOrderBo;
import com.pz.system.domain.vo.UserRefundVo; import com.pz.system.domain.vo.UserRefundVo;
import com.pz.common.core.mapper.BaseMapperPlus; import com.pz.common.core.mapper.BaseMapperPlus;
import com.pz.system.domain.vo.ZqghOrderVo;
import org.apache.ibatis.annotations.Param;
/** /**
* 用户退款Mapper接口 * 用户退款Mapper接口
...@@ -11,5 +18,4 @@ import com.pz.common.core.mapper.BaseMapperPlus; ...@@ -11,5 +18,4 @@ import com.pz.common.core.mapper.BaseMapperPlus;
* @date 2023-09-12 * @date 2023-09-12
*/ */
public interface UserRefundMapper extends BaseMapperPlus<UserRefundMapper, UserRefund, UserRefundVo> { public interface UserRefundMapper extends BaseMapperPlus<UserRefundMapper, UserRefund, UserRefundVo> {
} }
package com.pz.system.mapper; 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.merchant.domain.vo.SonOrderVo;
import com.pz.system.domain.ZqghOrder; import com.pz.system.domain.ZqghOrder;
import com.pz.system.domain.ZyphOrder;
import com.pz.system.domain.bo.ZqghOrderBo;
import com.pz.system.domain.bo.ZyphOrderBo;
import com.pz.system.domain.vo.ZqghOrderVo; import com.pz.system.domain.vo.ZqghOrderVo;
import com.pz.common.core.mapper.BaseMapperPlus; import com.pz.common.core.mapper.BaseMapperPlus;
import com.pz.system.domain.vo.ZyphOrderVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 诊前挂号订单Mapper接口 * 诊前挂号订单Mapper接口
...@@ -15,6 +22,9 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -15,6 +22,9 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface ZqghOrderMapper extends BaseMapperPlus<ZqghOrderMapper, ZqghOrder, ZqghOrderVo> { public interface ZqghOrderMapper extends BaseMapperPlus<ZqghOrderMapper, ZqghOrder, ZqghOrderVo> {
Page<ZqghOrderVo> findZqghOrderVoPage(IPage<ZqghOrder> iPage, @Param("bo") ZqghOrderBo bo);
/** /**
* 根据主订单ID查询子订单相关信息 * 根据主订单ID查询子订单相关信息
* @param totalId 主订单ID * @param totalId 主订单ID
......
package com.pz.system.service;
import com.pz.system.domain.PaymentRecord;
import com.pz.system.domain.vo.PaymentRecordVo;
import com.pz.system.domain.bo.PaymentRecordBo;
import com.pz.common.core.page.TableDataInfo;
import com.pz.common.core.domain.PageQuery;
import java.util.Collection;
import java.util.List;
/**
* 支付订单Service接口
*
* @author ruoyi
* @date 2023-09-12
*/
public interface IPaymentRecordService {
/**
* 查询支付订单
*/
PaymentRecordVo queryById(Integer id);
/**
* 查询支付订单列表
*/
TableDataInfo<PaymentRecordVo> queryPageList(PaymentRecordBo bo, PageQuery pageQuery);
/**
* 查询支付订单列表
*/
List<PaymentRecordVo> queryList(PaymentRecordBo bo);
/**
* 新增支付订单
*/
Boolean insertByBo(PaymentRecordBo bo);
/**
* 修改支付订单
*/
Boolean updateByBo(PaymentRecordBo bo);
/**
* 校验并批量删除支付订单信息
*/
Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid);
}
package com.pz.system.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
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 lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.pz.system.domain.bo.PaymentRecordBo;
import com.pz.system.domain.vo.PaymentRecordVo;
import com.pz.system.domain.PaymentRecord;
import com.pz.system.mapper.PaymentRecordMapper;
import com.pz.system.service.IPaymentRecordService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.Optional;
/**
* 支付订单Service业务层处理
*
* @author ruoyi
* @date 2023-09-12
*/
@RequiredArgsConstructor
@Service
public class PaymentRecordServiceImpl implements IPaymentRecordService {
private final PaymentRecordMapper baseMapper;
/**
* 查询支付订单
*/
@Override
public PaymentRecordVo queryById(Integer id){
return baseMapper.selectVoById(id);
}
/**
* 查询支付订单列表
*/
@Override
public TableDataInfo<PaymentRecordVo> queryPageList(PaymentRecordBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<PaymentRecord> lqw = buildQueryWrapper(bo);
Page<PaymentRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Optional.ofNullable(result.getRecords())
.ifPresent(paymentRecordVos -> {
});
return TableDataInfo.build(result);
}
/**
* 查询支付订单列表
*/
@Override
public List<PaymentRecordVo> queryList(PaymentRecordBo bo) {
LambdaQueryWrapper<PaymentRecord> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
}
private LambdaQueryWrapper<PaymentRecord> buildQueryWrapper(PaymentRecordBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<PaymentRecord> lqw = Wrappers.lambdaQuery();
lqw.eq(bo.getPayType() != null, PaymentRecord::getPayType, bo.getPayType());
lqw.eq(bo.getOrderId() != null, PaymentRecord::getOrderId, bo.getOrderId());
lqw.eq(StringUtils.isNotBlank(bo.getOtherOrder()), PaymentRecord::getOtherOrder, bo.getOtherOrder());
lqw.eq(bo.getMoney() != null, PaymentRecord::getMoney, bo.getMoney());
lqw.eq(bo.getUid() != null, PaymentRecord::getUid, bo.getUid());
return lqw;
}
/**
* 新增支付订单
*/
@Override
public Boolean insertByBo(PaymentRecordBo bo) {
PaymentRecord add = BeanUtil.toBean(bo, PaymentRecord.class);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setId(add.getId());
}
return flag;
}
/**
* 修改支付订单
*/
@Override
public Boolean updateByBo(PaymentRecordBo bo) {
PaymentRecord update = BeanUtil.toBean(bo, PaymentRecord.class);
validEntityBeforeSave(update);
return baseMapper.updateById(update) > 0;
}
/**
* 保存前的数据校验
*/
private void validEntityBeforeSave(PaymentRecord entity){
//TODO 做一些数据校验,如唯一约束
}
/**
* 批量删除支付订单
*/
@Override
public Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验
}
return baseMapper.deleteBatchIds(ids) > 0;
}
}
...@@ -7,6 +7,8 @@ import com.pz.common.core.domain.PageQuery; ...@@ -7,6 +7,8 @@ import com.pz.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.pz.system.mapper.BusinessMapper;
import com.pz.system.mapper.TotalOrderMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.pz.system.domain.bo.UserRefundBo; import com.pz.system.domain.bo.UserRefundBo;
...@@ -15,9 +17,11 @@ import com.pz.system.domain.UserRefund; ...@@ -15,9 +17,11 @@ import com.pz.system.domain.UserRefund;
import com.pz.system.mapper.UserRefundMapper; import com.pz.system.mapper.UserRefundMapper;
import com.pz.system.service.IUserRefundService; import com.pz.system.service.IUserRefundService;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Collection; import java.util.Collection;
import java.util.Optional;
/** /**
* 用户退款Service业务层处理 * 用户退款Service业务层处理
...@@ -31,11 +35,15 @@ public class UserRefundServiceImpl implements IUserRefundService { ...@@ -31,11 +35,15 @@ public class UserRefundServiceImpl implements IUserRefundService {
private final UserRefundMapper baseMapper; private final UserRefundMapper baseMapper;
private final TotalOrderMapper totalOrderMapper;
private final BusinessMapper businessMapper;
/** /**
* 查询用户退款 * 查询用户退款
*/ */
@Override @Override
public UserRefundVo queryById(Integer id){ public UserRefundVo queryById(Integer id) {
return baseMapper.selectVoById(id); return baseMapper.selectVoById(id);
} }
...@@ -46,6 +54,21 @@ public class UserRefundServiceImpl implements IUserRefundService { ...@@ -46,6 +54,21 @@ public class UserRefundServiceImpl implements IUserRefundService {
public TableDataInfo<UserRefundVo> queryPageList(UserRefundBo bo, PageQuery pageQuery) { public TableDataInfo<UserRefundVo> queryPageList(UserRefundBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<UserRefund> lqw = buildQueryWrapper(bo); LambdaQueryWrapper<UserRefund> lqw = buildQueryWrapper(bo);
Page<UserRefundVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); Page<UserRefundVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Optional.ofNullable(result.getRecords()).ifPresent(userRefundVos -> {
userRefundVos.forEach(userRefundVo -> {
Optional.ofNullable(totalOrderMapper.selectVoById(userRefundVo.getOrderId()))
.ifPresent(totalOrderVo -> {
userRefundVo.setOrderSn(totalOrderVo.getOrderSn());
userRefundVo.setPayMoney(new BigDecimal(totalOrderVo.getPayMoney()));
});
Optional.ofNullable(businessMapper.selectVoById(userRefundVo.getBusinessId())).ifPresent(
businessVo -> {
userRefundVo.setBname(businessVo.getName());
}
);
});
});
return TableDataInfo.build(result); return TableDataInfo.build(result);
} }
...@@ -98,7 +121,7 @@ public class UserRefundServiceImpl implements IUserRefundService { ...@@ -98,7 +121,7 @@ public class UserRefundServiceImpl implements IUserRefundService {
/** /**
* 保存前的数据校验 * 保存前的数据校验
*/ */
private void validEntityBeforeSave(UserRefund entity){ private void validEntityBeforeSave(UserRefund entity) {
//TODO 做一些数据校验,如唯一约束 //TODO 做一些数据校验,如唯一约束
} }
...@@ -107,7 +130,7 @@ public class UserRefundServiceImpl implements IUserRefundService { ...@@ -107,7 +130,7 @@ public class UserRefundServiceImpl implements IUserRefundService {
*/ */
@Override @Override
public Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid) { public Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid) {
if(isValid){ if (isValid) {
//TODO 做一些业务上的校验,判断是否需要校验 //TODO 做一些业务上的校验,判断是否需要校验
} }
return baseMapper.deleteBatchIds(ids) > 0; return baseMapper.deleteBatchIds(ids) > 0;
......
...@@ -46,8 +46,7 @@ public class ZqghOrderServiceImpl implements IZqghOrderService, ISonOrderService ...@@ -46,8 +46,7 @@ public class ZqghOrderServiceImpl implements IZqghOrderService, ISonOrderService
*/ */
@Override @Override
public TableDataInfo<ZqghOrderVo> queryPageList(ZqghOrderBo bo, PageQuery pageQuery) { public TableDataInfo<ZqghOrderVo> queryPageList(ZqghOrderBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<ZqghOrder> lqw = buildQueryWrapper(bo); Page<ZqghOrderVo> result = baseMapper.findZqghOrderVoPage(pageQuery.build(), bo);
Page<ZqghOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result); return TableDataInfo.build(result);
} }
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pz.system.mapper.UserRefundMapper"> <mapper namespace="com.pz.system.mapper.UserRefundMapper">
<resultMap type="com.pz.system.domain.UserRefund" id="UserRefundResult"> <resultMap type="com.pz.system.domain.UserRefund" id="UserRefundResult">
...@@ -20,6 +20,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -20,6 +20,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
</resultMap> </resultMap>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pz.system.mapper.ZyphOrderMapper"> <mapper namespace="com.pz.system.mapper.ZyphOrderMapper">
<resultMap type="com.pz.system.domain.ZyphOrder" id="ZyphOrderResult"> <resultMap type="com.pz.system.domain.ZyphOrder" id="ZyphOrderResult">
...@@ -43,7 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,7 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
yyod.start_day, yyod.start_day,
yyod.end_day, yyod.end_day,
yyod.start_time, yyod.start_time,
yyod.end_time yyod.end_time,
yyod.create_time
FROM zyph_order AS yyod FROM zyph_order AS yyod
LEFT JOIN total_order AS tlo ON yyod.order_id = tlo.id LEFT JOIN total_order AS tlo ON yyod.order_id = tlo.id
LEFT JOIN city AS c ON c.id = tlo.city_id LEFT JOIN city AS c ON c.id = tlo.city_id
...@@ -51,16 +52,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -51,16 +52,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN department AS d ON d.id = yyod.did LEFT JOIN department AS d ON d.id = yyod.did
LEFT JOIN services AS s ON s.id = tlo.service_id LEFT JOIN services AS s ON s.id = tlo.service_id
LEFT JOIN employees AS e ON e.id = tlo.em_id LEFT JOIN employees AS e ON e.id = tlo.em_id
<!-- <if test="bo.orderSn != null and bo.orderSn != ''">--> <!-- <if test="bo.orderSn != null and bo.orderSn != ''">-->
<!-- where tlo.order_sn LIKE CONCAT('%', #{bo.orderSn}, '%')--> <!-- where tlo.order_sn LIKE CONCAT('%', #{bo.orderSn}, '%')-->
<!-- </if>--> <!-- </if>-->
</select> </select>
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo"> <select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
select user.name as userName, select user.name as userName,
zyph_order.status as orderStatus zyph_order.status as orderStatus
from zyph_order from zyph_order
left join user_vsitor as user on user.id = zyph_order.visitor left join user_vsitor as user
on user.id = zyph_order.visitor
where zyph_order.order_id = #{id} where zyph_order.order_id = #{id}
</select> </select>
......
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