1
This commit is contained in:
parent
2c5dccd6f4
commit
4e5a0d3f63
@ -21,8 +21,8 @@ import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
|
||||
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
||||
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
||||
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.pagehelper.IPage;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
@ -172,7 +172,9 @@ public class ShopInspectionGoodsController extends BaseController
|
||||
* 查询检测订单列表
|
||||
*/
|
||||
@GetMapping("/partnerOrderListSystem")
|
||||
public TableDataInfo partnerOrderListSystem(OrderInfo shopInspectionOrder) throws Exception {
|
||||
public CommonResult<IPage<?>> partnerOrderListSystem(OrderInfo shopInspectionOrder,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
|
||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId());
|
||||
List<RoleDO> roleList = roleService.getRoleList(userRoleIdListByUserId);
|
||||
@ -184,33 +186,21 @@ public class ShopInspectionGoodsController extends BaseController
|
||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
||||
partner = appInspectionPartnerService.getOne(queryWrapper);
|
||||
if (ObjectUtil.isEmpty(partner)){
|
||||
TableDataInfo dataInfo =new TableDataInfo();
|
||||
dataInfo.setCode(500);
|
||||
dataInfo.setRows(new ArrayList<>());
|
||||
dataInfo.setMsg("信息有误");
|
||||
return dataInfo;
|
||||
return error();
|
||||
}
|
||||
}else if (roles.contains("jcworker")){
|
||||
LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
|
||||
queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
|
||||
PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
|
||||
if (ObjectUtil.isEmpty(worker)){
|
||||
TableDataInfo dataInfo =new TableDataInfo();
|
||||
dataInfo.setCode(500);
|
||||
dataInfo.setRows(new ArrayList<>());
|
||||
dataInfo.setMsg("信息有误");
|
||||
return dataInfo;
|
||||
return error();
|
||||
}
|
||||
partner.setPartnerId(worker.getPartnerId());
|
||||
}
|
||||
shopInspectionOrder.setPartnerId(partner.getPartnerId());
|
||||
shopInspectionOrder.setValidationTime(new Date());
|
||||
int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
// Page<OrderInfo> page = new Page<>(pageNum,pageSize);
|
||||
startPage();
|
||||
List<OrderInfo> list = orderInfoService.orderListSystem(shopInspectionOrder);
|
||||
return getDataTable(list);
|
||||
Page<OrderInfo> page = new Page<>(pageNo, pageSize);
|
||||
return CommonResult.success(orderInfoService.queryListPage(shopInspectionOrder,page));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
package cn.iocoder.yudao.module.payment.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo;
|
||||
import cn.iocoder.yudao.module.label.vo.LabelPageReqVO;
|
||||
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
||||
import cn.iocoder.yudao.module.payment.entity.commentVo;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -19,30 +22,42 @@ import java.util.List;
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
|
||||
List<OrderInfo> orderListApp(@Param("userId") Long userId, @Param("status") String status,@Param("title") String title,@Param("type") String type);
|
||||
List<OrderInfo> orderListApp(@Param("userId") Long userId, @Param("status") String status, @Param("title") String title, @Param("type") String type);
|
||||
|
||||
Double avgPartnerScore(@Param("partnerId") Long partnerId);
|
||||
|
||||
List<JSONObject> statisticsZXTDay(@Param("partnerId") Long partnerId, @Param("startTime")String startTime, @Param("endTime")String endTime);
|
||||
List<JSONObject> statisticsZXTDay(@Param("partnerId") Long partnerId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<JSONObject> statisticsMid();
|
||||
|
||||
List<InspectionInfo> inspectionList(@Param("status") String status, @Param("userId")Long userId);
|
||||
List<InspectionInfo> inspectionList(@Param("status") String status, @Param("userId") Long userId);
|
||||
|
||||
List<OrderInfo> orderListSystem( OrderInfo orderInfo);
|
||||
List<OrderInfo> orderListSystem(OrderInfo orderInfo);
|
||||
|
||||
List<JSONObject> statisticsZXTMonth(@Param("partnerId") Long partnerId,@Param("startTime")String startTime,@Param("endTime")String endTime);
|
||||
/**
|
||||
* 分页查询订单
|
||||
*
|
||||
* @param entity OrderInfo实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.payment.entity.OrderInfo>
|
||||
* @author PQZ
|
||||
* @date 0:04 2024/9/20
|
||||
**/
|
||||
IPage<OrderInfo> pageOrderListSystem(@Param("entity") OrderInfo entity, Page<OrderInfo> page);
|
||||
|
||||
List<JSONObject> statisticsZXTMonth(@Param("partnerId") Long partnerId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<JSONObject> statisticsOrder();
|
||||
|
||||
List<JSONObject> getPartnerList(@Param("partnerName")String partnerName);
|
||||
List<JSONObject> getPartnerList(@Param("partnerName") String partnerName);
|
||||
|
||||
List<InspectionInfo> governmentInspectionList(@Param("carNum")String carNum, @Param("status")String status, @Param("partnerId")String partnerId);
|
||||
List<InspectionInfo> governmentInspectionList(@Param("carNum") String carNum, @Param("status") String status, @Param("partnerId") String partnerId);
|
||||
|
||||
List<OrderInfo> orderList(@Param("userId") Long userId, @Param("status") String status,@Param("title") String title);
|
||||
List<OrderInfo> orderList(@Param("userId") Long userId, @Param("status") String status, @Param("title") String title);
|
||||
|
||||
List<OrderInfo> validationListWx(Page<OrderInfo> page,@Param("validationUserId") Long validationUserId);
|
||||
List<OrderInfo> validationListPc(Page<OrderInfo> page,Long partnerId);
|
||||
List<OrderInfo> validationListWx(Page<OrderInfo> page, @Param("validationUserId") Long validationUserId);
|
||||
|
||||
List<OrderInfo> validationListPc(Page<OrderInfo> page, Long partnerId);
|
||||
|
||||
Integer getNoCommentOrder(@Param("userId") Long userId);
|
||||
|
||||
|
@ -2,9 +2,12 @@ package cn.iocoder.yudao.module.payment.service;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo;
|
||||
import cn.iocoder.yudao.module.label.vo.LabelPageReqVO;
|
||||
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
|
||||
import cn.iocoder.yudao.module.payment.entity.commentVo;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@ -18,21 +21,38 @@ import java.util.Map;
|
||||
* @since 2023-07-24 18:30:29
|
||||
*/
|
||||
public interface OrderInfoService extends IService<OrderInfo> {
|
||||
void reviewOrder(String orderId,Integer starLevel,String reviewStr) throws Exception;
|
||||
void reviewOrder(String orderId, Integer starLevel, String reviewStr) throws Exception;
|
||||
|
||||
List<OrderInfo> orderListApp(String status, String title, String type);
|
||||
|
||||
List<InspectionInfo> workOrder(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
|
||||
Map<String,Object> workOrderData(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
|
||||
List<InspectionInfo> delworkOrder(Long partnerId,String carNum,String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime);
|
||||
|
||||
Map<String, Object> workOrderData(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
|
||||
|
||||
List<InspectionInfo> delworkOrder(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
|
||||
|
||||
List<OrderInfo> orderListSystem(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 分页查询订单
|
||||
*
|
||||
* @param orderInfo OrderInfo实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.payment.entity.OrderInfo>
|
||||
* @author PQZ
|
||||
* @date 0:02 2024/9/20
|
||||
**/
|
||||
IPage<OrderInfo> queryListPage(OrderInfo orderInfo, Page<OrderInfo> page);
|
||||
|
||||
Long createOrder(OrderInfo orderInfo) throws Exception;
|
||||
|
||||
JSONObject pickCarDetail(Long pickCarId);
|
||||
|
||||
JSONObject orderDetail(Long goodsId,String type,String title,Integer amount);
|
||||
JSONObject orderDetail(Long goodsId, String type, String title, Integer amount);
|
||||
|
||||
void cancelPay(Long orderId);
|
||||
|
||||
List<OrderInfo> orderList(String status,String title);
|
||||
List<OrderInfo> orderList(String status, String title);
|
||||
|
||||
String validation(String accessCode);
|
||||
|
||||
|
@ -24,6 +24,7 @@ import cn.iocoder.yudao.util.StringUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@ -143,6 +144,20 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
return baseMapper.orderListSystem(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询订单
|
||||
*
|
||||
* @param orderInfo OrderInfo实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.payment.entity.OrderInfo>
|
||||
* @author PQZ
|
||||
* @date 0:02 2024/9/20
|
||||
**/
|
||||
@Override
|
||||
public IPage<OrderInfo> queryListPage(OrderInfo orderInfo, Page<OrderInfo> page) {
|
||||
return baseMapper.pageOrderListSystem(orderInfo,page);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createOrder(OrderInfo orderInfo) throws Exception {
|
||||
|
@ -236,4 +236,62 @@
|
||||
where partner_id = #{partnerId} and comment_star is not null
|
||||
ORDER BY comment_time desc
|
||||
</select>
|
||||
<select id="pageOrderListSystem" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||
SELECT
|
||||
oi.id,
|
||||
oi.order_no,
|
||||
oi.goods_title,
|
||||
oi.goods_title,
|
||||
oi.goods_type,
|
||||
su.nickname AS realName,
|
||||
su.mobile as phonenumber,
|
||||
oi.goods_price,
|
||||
oi.pay_money,
|
||||
oi.order_time,
|
||||
oi.balance,
|
||||
oi.pay_time,
|
||||
oi.order_status,
|
||||
oi.comment_desc,
|
||||
oi.comment_star,
|
||||
suc.car_no
|
||||
FROM
|
||||
`order_info` oi
|
||||
LEFT JOIN system_users su ON su.id = oi.user_id
|
||||
left join shop_user_car suc on suc.car_id = oi.user_car_id
|
||||
where 1=1
|
||||
<if test="entity.orderStatus!=null and entity.orderStatus!='' ">
|
||||
and oi.order_status = #{entity.orderStatus}
|
||||
</if>
|
||||
<if test="entity.validationTime!=null">
|
||||
and oi.validation_time is not null
|
||||
</if>
|
||||
<if test="entity.realName!=null and entity.realName!='' ">
|
||||
and oi.real_name like concat('%',#{entity.realName},'%')
|
||||
</if>
|
||||
<if test="entity.orderNo!=null and entity.orderNo!='' ">
|
||||
and oi.order_no like concat('%',#{entity.orderNo},'%')
|
||||
</if>
|
||||
<if test="entity.goodsTitle!=null and entity.goodsTitle!='' ">
|
||||
and oi.goods_title like concat('%',#{entity.goodsTitle},'%')
|
||||
</if>
|
||||
<if test="entity.validationRealName!=null and entity.validationRealName!='' ">
|
||||
and oi.validation_real_name like concat('%',#{entity.validationRealName},'%')
|
||||
</if>
|
||||
<if test="entity.phonenumber!=null and entity.phonenumber!='' ">
|
||||
and su.mobile like concat('%',#{entity.phonenumber},'%')
|
||||
</if>
|
||||
<if test="entity.realPayMoney!=null ">
|
||||
and oi.pay_money <![CDATA[>=]]> #{entity.realPayMoney}
|
||||
</if>
|
||||
<if test="entity.startTime!=null ">
|
||||
and oi.pay_time <![CDATA[>=]]> #{entity.startTime}
|
||||
</if>
|
||||
<if test="entity.endTime!=null ">
|
||||
and oi.pay_time <![CDATA[<=]]> #{entity.endTime}
|
||||
</if>
|
||||
<if test="entity.partnerId!=null ">
|
||||
and oi.partner_id = #{entity.partnerId}
|
||||
</if>
|
||||
order by oi.order_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user