| | |
| | | public R<Page<TBigGiftPackage>> pageList(@RequestBody BigGiftPackageQuery query) { |
| | | Page<TBigGiftPackage> tBigGiftPackagePage = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | LambdaQueryWrapper<TBigGiftPackage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TBigGiftPackage::getStatus,1); |
| | | wrapper.eq(TBigGiftPackage::getStatus,0); |
| | | wrapper.like(Objects.nonNull(query.getName()), TBigGiftPackage::getName, query.getName()); |
| | | wrapper.orderByDesc(TBigGiftPackage::getCreateTime); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Log(title = "大礼包商品-导入", businessType = BusinessType.INSERT) |
| | | @Log(title = "大礼包商品-导入", businessType = BusinessType.IMPORT) |
| | | @ApiOperation(value = "大礼包商品-导入") |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW) |
| | | @PostMapping("/import") |
| | |
| | | public void exportRegistration(@RequestBody BigGiftPackageQuery query){ |
| | | |
| | | LambdaQueryWrapper<TBigGiftPackage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TBigGiftPackage::getStatus,1); |
| | | wrapper.eq(TBigGiftPackage::getStatus,0); |
| | | wrapper.like(Objects.nonNull(query.getName()), TBigGiftPackage::getName, query.getName()); |
| | | wrapper.orderByDesc(TBigGiftPackage::getCreateTime); |
| | | List<TBigGiftPackage> list = tBigGiftPackageService.list(wrapper); |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TransferOrderDto; |
| | | import com.ruoyi.system.export.BigGiftPackageImport; |
| | | import com.ruoyi.system.export.TBigGiftPackageOrderExport; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.BigGiftPackageOrderQuery; |
| | | import com.ruoyi.system.query.OrderTransferQuery; |
| | |
| | | import com.ruoyi.system.vo.TOrderTransferVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | List<TBigGiftPackageOrder> list = tBigGiftPackageOrderService.pageList(tBigGiftPackageOrderPage,query); |
| | | tBigGiftPackageOrderPage.setRecords(list); |
| | | return R.ok(tBigGiftPackageOrderPage); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出大礼包订单") |
| | | @Log(title = "大礼包订单-导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export( @RequestBody BigGiftPackageOrderQuery query) { |
| | | List<TBigGiftPackageOrder> list = tBigGiftPackageOrderService.export(query); |
| | | ArrayList<TBigGiftPackageOrderExport> exports = new ArrayList<>(); |
| | | for (TBigGiftPackageOrder order : list) { |
| | | TBigGiftPackageOrderExport export = new TBigGiftPackageOrderExport(); |
| | | export.setCompanyName(order.getCompanyName()); |
| | | export.setOrderNo(order.getCode()); |
| | | export.setCreateTime(order.getCreateTime()); |
| | | export.setUsername(order.getUserName()); |
| | | export.setUserPhone(order.getPhone()); |
| | | export.setOrderAmount(order.getOrderPrice()); |
| | | export.setGoodsName(order.getBigGiftPackageName()); |
| | | export.setPayMethod("微信支付"); |
| | | export.setDeposit(order.getDeposit()); |
| | | export.setBalance(order.getFinalPayment()); |
| | | export.setOrderStatus(order.getStatus()); |
| | | exports.add(export); |
| | | } |
| | | |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TBigGiftPackageOrderExport.class, exports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | assert response != null; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | ServletOutputStream outputStream = null; |
| | | try { |
| | | String fileName = URLEncoder.encode("大礼包订单导出信息.xls", "utf-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | outputStream = response.getOutputStream(); |
| | | workbook.write(outputStream); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | return update ? R.ok() : R.fail(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "订单转让列表") |
| | | @PostMapping(value = "/transferList") |
| | | public R<Page<TOrderTransferVo>> transferList(@RequestBody OrderTransferQuery query) { |
| | |
| | | tOrderTransferPage.setRecords(list); |
| | | return R.ok(tOrderTransferPage); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "订单转让--导出") |
| | | @Log(title = "订单转让-导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/transferExport") |
| | | public void transferExport(@RequestBody OrderTransferQuery query) { |
| | | List<TOrderTransferVo> list = tOrderTransferService.pageListExport(query); |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TOrderTransferVo.class, list); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | assert response != null; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | ServletOutputStream outputStream = null; |
| | | try { |
| | | String fileName = URLEncoder.encode("订单转让导出信息.xls", "utf-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | outputStream = response.getOutputStream(); |
| | | workbook.write(outputStream); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "订单转让详情") |
| | | @PostMapping(value = "/transferDetail/{id}") |
| | |
| | | tOrderTransferVo.setOperateUser(sysUser.getNickName()); |
| | | return R.ok(tOrderTransferVo); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | public R<Page<TPhysicalGoods>> pageList(@RequestBody BigGiftPackageQuery query) { |
| | | Page<TPhysicalGoods> tPhysicalGoodsPage = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | LambdaQueryWrapper<TPhysicalGoods> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TPhysicalGoods::getStatus,1); |
| | | wrapper.eq(TPhysicalGoods::getStatus,0); |
| | | wrapper.like(Objects.nonNull(query.getName()), TPhysicalGoods::getName, query.getName()); |
| | | wrapper.orderByDesc(TPhysicalGoods::getCreateTime); |
| | | Page<TPhysicalGoods> pageInfo = tPhysicalGoodsService.page(tPhysicalGoodsPage, wrapper); |
| | |
| | | } |
| | | } |
| | | |
| | | @Log(title = "实物商品-导入", businessType = BusinessType.INSERT) |
| | | @Log(title = "实物商品-导入", businessType = BusinessType.IMPORT) |
| | | @ApiOperation(value = "实物商品-导入") |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW) |
| | | @PostMapping("/import") |
| | |
| | | public void exportRegistration(@RequestBody BigGiftPackageQuery query){ |
| | | |
| | | LambdaQueryWrapper<TPhysicalGoods> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TPhysicalGoods::getStatus,1); |
| | | wrapper.eq(TPhysicalGoods::getStatus,0); |
| | | wrapper.like(Objects.nonNull(query.getName()), TPhysicalGoods::getName, query.getName()); |
| | | wrapper.orderByDesc(TPhysicalGoods::getCreateTime); |
| | | List<TPhysicalGoods> list = tPhysicalGoodsService.list(wrapper); |
| | |
| | | |
| | | List<TBigGiftPackageOrder> pageList(@Param("tBigGiftPackageOrderPage") Page<TBigGiftPackageOrder> tBigGiftPackageOrderPage, @Param("query") BigGiftPackageOrderQuery query, @Param("sTime") String sTime, @Param("eTime") String eTime); |
| | | |
| | | List<TBigGiftPackageOrder> export(@Param("query") BigGiftPackageOrderQuery query, @Param("sTime") String sTime, @Param("eTime") String eTime); |
| | | |
| | | } |
| | |
| | | |
| | | List<TOrderTransferVo> pageList(@Param("tOrderTransferPage") Page<TOrderTransferVo> tOrderTransferPage, @Param("query") OrderTransferQuery query); |
| | | |
| | | List<TOrderTransferVo> pageListExport(@Param("query") OrderTransferQuery query); |
| | | |
| | | } |
| | |
| | | @TableField("create_user_id") |
| | | private Integer createUserId; |
| | | |
| | | @ApiModelProperty(value = "1分销 2导入") |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "购买人id") |
| | | @TableField("buy_user_id") |
| | | private Integer buyUserId; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | List<TBigGiftPackageOrder> pageList(Page<TBigGiftPackageOrder> tBigGiftPackageOrderPage, BigGiftPackageOrderQuery query); |
| | | |
| | | |
| | | List<TBigGiftPackageOrder> export(BigGiftPackageOrderQuery query); |
| | | |
| | | |
| | | } |
| | |
| | | List<TOrderTransferVo> pageList(Page<TOrderTransferVo> tOrderTransferPage, OrderTransferQuery query); |
| | | |
| | | |
| | | List<TOrderTransferVo> pageListExport(OrderTransferQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.mapper.TBigGiftPackageMapper; |
| | | import com.ruoyi.system.mapper.TCompanyMapper; |
| | | import com.ruoyi.system.model.TBigGiftPackage; |
| | | import com.ruoyi.system.model.TBigGiftPackageOrder; |
| | | import com.ruoyi.system.mapper.TBigGiftPackageOrderMapper; |
| | | import com.ruoyi.system.model.TCompany; |
| | | import com.ruoyi.system.query.BigGiftPackageOrderQuery; |
| | | import com.ruoyi.system.service.TBigGiftPackageOrderService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TBigGiftPackageOrderServiceImpl extends ServiceImpl<TBigGiftPackageOrderMapper, TBigGiftPackageOrder> implements TBigGiftPackageOrderService { |
| | | |
| | | @Resource |
| | | private TCompanyMapper companyMapper; |
| | | |
| | | @Resource |
| | | private TBigGiftPackageMapper bigGiftPackageMapper; |
| | | |
| | | |
| | | @Override |
| | | public List<TBigGiftPackageOrder> pageList(Page<TBigGiftPackageOrder> tBigGiftPackageOrderPage, BigGiftPackageOrderQuery query) { |
| | | String sTime = null; |
| | | String eTime = null; |
| | | if(query.getTime()!=null){ |
| | | if(query.getTime()!=null && !query.getTime().isEmpty()){ |
| | | |
| | | String[] split = query.getTime().split(" - "); |
| | | sTime = split[0] + " 00:00:00"; |
| | | eTime = split[1] + " 23:59:59"; |
| | | } |
| | | return this.baseMapper.pageList(tBigGiftPackageOrderPage,query,sTime,eTime); |
| | | List<TBigGiftPackageOrder> tBigGiftPackageOrders = this.baseMapper.pageList(tBigGiftPackageOrderPage, query, sTime, eTime); |
| | | if(!tBigGiftPackageOrders.isEmpty()){ |
| | | List<Integer> companyId = tBigGiftPackageOrders.stream().map(TBigGiftPackageOrder::getCompanyId).collect(Collectors.toList()); |
| | | List<TCompany> tCompanies = companyMapper.selectBatchIds(companyId); |
| | | tBigGiftPackageOrders.forEach(tBigGiftPackageOrder -> { |
| | | tBigGiftPackageOrder.setCompanyName(tCompanies.stream().filter(tCompany -> tCompany.getId().equals(tBigGiftPackageOrder.getCompanyId())).findFirst().get().getName()); |
| | | }); |
| | | List<Integer> goodsIds = tBigGiftPackageOrders.stream().map(TBigGiftPackageOrder::getBigGiftPackageId).collect(Collectors.toList()); |
| | | List<TBigGiftPackage> bigGiftPackages = bigGiftPackageMapper.selectBatchIds(goodsIds); |
| | | tBigGiftPackageOrders.forEach(tBigGiftPackageOrder -> { |
| | | tBigGiftPackageOrder.setBigGiftPackageName(bigGiftPackages.stream().filter(tBigGiftPackage -> tBigGiftPackage.getId().equals(tBigGiftPackageOrder.getBigGiftPackageId())).findFirst().get().getName()); |
| | | }); |
| | | |
| | | } |
| | | return tBigGiftPackageOrders ; |
| | | } |
| | | |
| | | @Override |
| | | public List<TBigGiftPackageOrder> export(BigGiftPackageOrderQuery query) { |
| | | String sTime = null; |
| | | String eTime = null; |
| | | if(query.getTime()!=null && !query.getTime().isEmpty()){ |
| | | String[] split = query.getTime().split(" - "); |
| | | sTime = split[0] + " 00:00:00"; |
| | | eTime = split[1] + " 23:59:59"; |
| | | } |
| | | List<TBigGiftPackageOrder> tBigGiftPackageOrders = this.baseMapper.export(query, sTime, eTime); |
| | | if(!tBigGiftPackageOrders.isEmpty()){ |
| | | List<Integer> companyId = tBigGiftPackageOrders.stream().map(TBigGiftPackageOrder::getCompanyId).collect(Collectors.toList()); |
| | | List<TCompany> tCompanies = companyMapper.selectBatchIds(companyId); |
| | | tBigGiftPackageOrders.forEach(tBigGiftPackageOrder -> { |
| | | tBigGiftPackageOrder.setCompanyName(tCompanies.stream().filter(tCompany -> tCompany.getId().equals(tBigGiftPackageOrder.getCompanyId())).findFirst().get().getName()); |
| | | }); |
| | | List<Integer> goodsIds = tBigGiftPackageOrders.stream().map(TBigGiftPackageOrder::getBigGiftPackageId).collect(Collectors.toList()); |
| | | List<TBigGiftPackage> bigGiftPackages = bigGiftPackageMapper.selectBatchIds(goodsIds); |
| | | tBigGiftPackageOrders.forEach(tBigGiftPackageOrder -> { |
| | | tBigGiftPackageOrder.setBigGiftPackageName(bigGiftPackages.stream().filter(tBigGiftPackage -> tBigGiftPackage.getId().equals(tBigGiftPackageOrder.getBigGiftPackageId())).findFirst().get().getName()); |
| | | }); |
| | | } |
| | | return tBigGiftPackageOrders ; |
| | | } |
| | | } |
| | |
| | | } |
| | | return tOrderTransferVos; |
| | | } |
| | | |
| | | @Override |
| | | public List<TOrderTransferVo> pageListExport(OrderTransferQuery query) { |
| | | List<TOrderTransferVo> tOrderTransferVos = this.baseMapper.pageListExport(query); |
| | | for (TOrderTransferVo tOrderTransferVo : tOrderTransferVos) { |
| | | Integer newCompanyId = tOrderTransferVo.getNewCompanyId(); |
| | | if(newCompanyId!=null){ |
| | | TCompany tCompany = tCompanyMapper.selectById(newCompanyId); |
| | | tOrderTransferVo.setNewCompany(tCompany.getName()); |
| | | } |
| | | Integer oldCompanyId = tOrderTransferVo.getOldCompanyId(); |
| | | if(oldCompanyId!=null){ |
| | | TCompany tCompany = tCompanyMapper.selectById(oldCompanyId); |
| | | tOrderTransferVo.setOldCompany(tCompany.getName()); |
| | | } |
| | | } |
| | | return tOrderTransferVos; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Integer bigGiftPackageOrderId; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | @Excel(name = "订单编号") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "原所属公司") |
| | | @Excel(name = "原所属公司") |
| | | private String oldCompany; |
| | | |
| | | @ApiModelProperty(value = "原所属公司Id") |
| | |
| | | private Integer oldUserId; |
| | | |
| | | @ApiModelProperty(value = "原用户") |
| | | @Excel(name = "原下单用户") |
| | | private String oldUser; |
| | | |
| | | @ApiModelProperty(value = "原用户工号") |
| | | @Excel(name = "原用户工号") |
| | | private String oldUserCode; |
| | | |
| | | @ApiModelProperty(value = "原用户手机") |
| | | @Excel(name = "原用户手机号") |
| | | private String oldUserPhone; |
| | | |
| | | @ApiModelProperty(value = "新所属公司") |
| | | @Excel(name = "转让所属公司") |
| | | private String newCompany; |
| | | |
| | | @ApiModelProperty(value = "新所属公司Id") |
| | | private Integer newCompanyId; |
| | | |
| | | @ApiModelProperty(value = "新用户") |
| | | @Excel(name = "转让用户") |
| | | private String newUser; |
| | | |
| | | @ApiModelProperty(value = "新用户id") |
| | | private Integer newUserId; |
| | | |
| | | @ApiModelProperty(value = "新用户工号") |
| | | @Excel(name = "转让用户工号") |
| | | private String newUserCode; |
| | | |
| | | @ApiModelProperty(value = "新用户手机") |
| | | @Excel(name = "转让用户手机号") |
| | | private String newUserPhone; |
| | | |
| | | } |
| | |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="export" resultType="com.ruoyi.system.model.TBigGiftPackageOrder"> |
| | | SELECT |
| | | |
| | | t1.id, t1.code, t1.company_id, t1.app_user_id, t1.create_time, t1.big_gift_package_id, t1.big_gift_package, |
| | | t1.order_price, t1.deposit, t1.final_payment, t1.payment_price, |
| | | t1.status, t1.delivery_time, t1.payment_type, t1.deposit_time, t1.deposit_payment_method, |
| | | t1.deposit_payment_serial_number, t1.final_payment_time, t1.final_payment_method, |
| | | t1.final_payment_serial_number, t1.del_flag, t1.remark,t2.phone,t2.name userName |
| | | FROM t_big_gift_package_order t1 LEFT JOIN t_app_user t2 ON t1.app_user_id = t2.id |
| | | WHERE t1.del_flag = 0 |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | AND t2.phone = #{query.phone} |
| | | </if> |
| | | <if test="query.code != null and query.code != ''"> |
| | | AND t1.code = #{query.code} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND t1.status = #{query.status} |
| | | </if> |
| | | <if test="sTime !=null "> |
| | | AND t1.create_time BETWEEN #{sTime} AND #{eTime} |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="total_settlement_integral" property="totalSettlementIntegral" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user_id" property="createUserId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="buy_user_id" property="buyUserId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, settlement_interval, settlement_start_time, settlement_end_time, total_settlement_integral, create_time, create_user_id |
| | | id, app_user_id, settlement_interval, settlement_start_time, settlement_end_time, total_settlement_integral, create_time, create_user_id,`type`,buy_user_id |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TOrderTransferVo"> |
| | | select t1.id,t2.code,t1.old_user_id oldUserId,t1.new_user_id newUserId,t3.name oldUser,t4.name newUser, |
| | | t3.code oldUserCode,t4.code newUserCode,t3.phone oldUserPhone,t4.phone newUserPhone,t3.company oldCompanyId, |
| | | t4.company newCompanyId |
| | | t3.code oldUserCode,t4.code newUserCode,t3.phone oldUserPhone,t4.phone newUserPhone,t3.company_id oldCompanyId, |
| | | t4.company_id newCompanyId |
| | | from t_order_transfer t1 |
| | | left join t_big_gift_package_order t2 on t1.big_gift_package_order_id = t2.id |
| | | left join t_app_user t3 on t1.old_app_user_id = t3.id |
| | |
| | | order by t1.create_time desc |
| | | |
| | | </select> |
| | | <select id="pageListExport" resultType="com.ruoyi.system.vo.TOrderTransferVo" |
| | | parameterType="com.ruoyi.system.query.OrderTransferQuery"> |
| | | select t1.id,t2.code,t1.old_user_id oldUserId,t1.new_user_id newUserId,t3.name oldUser,t4.name newUser, |
| | | t3.code oldUserCode,t4.code newUserCode,t3.phone oldUserPhone,t4.phone newUserPhone,t3.company_id oldCompanyId, |
| | | t4.company_id newCompanyId |
| | | from t_order_transfer t1 |
| | | left join t_big_gift_package_order t2 on t1.big_gift_package_order_id = t2.id |
| | | left join t_app_user t3 on t1.old_app_user_id = t3.id |
| | | left join t_app_user t4 on t1.new_app_user_id = t4.id |
| | | where t1.del_flag = 0 |
| | | <if test="query.code != null and query.code != ''"> |
| | | and t2.code like concat('%',#{query.code},'%') |
| | | </if> |
| | | <if test="query.oldUserCode != null and query.oldUserCode != ''"> |
| | | and t3.code like concat('%',#{query.oldUserCode},'%') |
| | | </if> |
| | | <if test="query.newUserCode != null and query.newUserCode != ''"> |
| | | and t4.code like concat('%',#{query.newUserCode},'%') |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |