Merge remote-tracking branch 'origin/master'

This commit is contained in:
13405411873 2024-09-20 00:41:27 +08:00
commit c6ba9f0b8d
10 changed files with 266 additions and 33 deletions

View File

@ -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.partner.entity.PartnerWorker;
import cn.iocoder.yudao.module.payment.entity.OrderInfo; import cn.iocoder.yudao.module.payment.entity.OrderInfo;
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; 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.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.IPage;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
@ -172,7 +172,9 @@ public class ShopInspectionGoodsController extends BaseController
* 查询检测订单列表 * 查询检测订单列表
*/ */
@GetMapping("/partnerOrderListSystem") @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(); LoginUser user = SecurityFrameworkUtils.getLoginUser();
Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId()); Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId());
List<RoleDO> roleList = roleService.getRoleList(userRoleIdListByUserId); 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"); queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
partner = appInspectionPartnerService.getOne(queryWrapper); partner = appInspectionPartnerService.getOne(queryWrapper);
if (ObjectUtil.isEmpty(partner)){ if (ObjectUtil.isEmpty(partner)){
TableDataInfo dataInfo =new TableDataInfo(); return error();
dataInfo.setCode(500);
dataInfo.setRows(new ArrayList<>());
dataInfo.setMsg("信息有误");
return dataInfo;
} }
}else if (roles.contains("jcworker")){ }else if (roles.contains("jcworker")){
LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>(); LambdaQueryWrapper<PartnerWorker> queryWrapperWork =new LambdaQueryWrapper<>();
queryWrapperWork.eq(PartnerWorker::getUserId,user.getId()); queryWrapperWork.eq(PartnerWorker::getUserId,user.getId());
PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork); PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork);
if (ObjectUtil.isEmpty(worker)){ if (ObjectUtil.isEmpty(worker)){
TableDataInfo dataInfo =new TableDataInfo(); return error();
dataInfo.setCode(500);
dataInfo.setRows(new ArrayList<>());
dataInfo.setMsg("信息有误");
return dataInfo;
} }
partner.setPartnerId(worker.getPartnerId()); partner.setPartnerId(worker.getPartnerId());
} }
shopInspectionOrder.setPartnerId(partner.getPartnerId()); shopInspectionOrder.setPartnerId(partner.getPartnerId());
shopInspectionOrder.setValidationTime(new Date()); shopInspectionOrder.setValidationTime(new Date());
int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); Page<OrderInfo> page = new Page<>(pageNo, pageSize);
int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); return CommonResult.success(orderInfoService.queryListPage(shopInspectionOrder,page));
// Page<OrderInfo> page = new Page<>(pageNum,pageSize);
startPage();
List<OrderInfo> list = orderInfoService.orderListSystem(shopInspectionOrder);
return getDataTable(list);
} }

View File

@ -1,6 +1,9 @@
package cn.iocoder.yudao.module.inspection.controller; package cn.iocoder.yudao.module.inspection.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
@ -121,4 +124,64 @@ public class SiteInfoController extends BaseController
return success(sum); return success(sum);
} }
/**
* 修改user_id
*/
@GetMapping("/updateUserID")
public CommonResult updateUserId(){
//Map key存放老Idvalue存放新Id
Map<Integer, Integer> map = new HashMap<>();
map.put(135,4826);
map.put(855,4828);
map.put(896,4829);
map.put(900,4830);
map.put(901,4221);
map.put(902,4832);
map.put(903,123);
map.put(904,846);
map.put(905,125);
map.put(907,850);
map.put(908,845);
map.put(909,4568);
map.put(910,4839);
map.put(911,4840);
map.put(912,4841);
map.put(913,4842);
map.put(914,4843);
map.put(915,4844);
map.put(916,4845);
map.put(917,4846);
map.put(918,4847);
map.put(919,138);
map.put(920,4849);
map.put(921,4850);
map.put(924,4851);
map.put(926,4853);
map.put(927,2793);
map.put(928,4855);
map.put(929,842);
map.put(930,4857);
map.put(931,4858);
map.put(932,908);
map.put(933,4860);
map.put(934,4861);
map.put(935,4862);
map.put(936,4863);
int sum = 0;
//遍历Map获得key和value
for (Map.Entry<Integer, Integer> userId : map.entrySet()) {
Integer oldUserId = userId.getKey();
Integer newUserId = userId.getValue();
sum +=siteInfoService.updateUserId1(newUserId ,oldUserId);
sum +=siteInfoService.updateUserId2(newUserId ,oldUserId);
sum +=siteInfoService.updateUserId3(newUserId ,oldUserId);
sum +=siteInfoService.updateUserId4(newUserId ,oldUserId);
sum +=siteInfoService.updateUserId5(newUserId ,oldUserId);
}
return success(sum);
}
} }

View File

@ -80,4 +80,12 @@ public interface SiteInfoMapper
*/ */
public int addAll(NweUsers user); public int addAll(NweUsers user);
/**
* 修改user_id
*/
public int updateUserId1(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
public int updateUserId2(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
public int updateUserId3(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
public int updateUserId4(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
public int updateUserId5(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
} }

View File

@ -78,4 +78,15 @@ public interface ISiteInfoService
public int addNewDB(NweUsers user); public int addNewDB(NweUsers user);
/**
* 修改user_id
*/
public int updateUserId1(int newUserId,int oldUserId);
public int updateUserId2(int newUserId,int oldUserId);
public int updateUserId3(int newUserId,int oldUserId);
public int updateUserId4(int newUserId,int oldUserId);
public int updateUserId5(int newUserId,int oldUserId);
} }

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.service.impl;
import java.util.List; import java.util.List;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.inspection.entity.NweUsers; import cn.iocoder.yudao.module.inspection.entity.NweUsers;
import cn.iocoder.yudao.util.DateUtils; import cn.iocoder.yudao.util.DateUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -124,5 +125,39 @@ public class SiteInfoServiceImpl implements ISiteInfoService
return siteInfoMapper.addAll(user); return siteInfoMapper.addAll(user);
} }
/**
* 修改user_id 5个SQL
*/
@Override
@TenantIgnore
public int updateUserId1(int newUserId, int oldUserId) {
return siteInfoMapper.updateUserId1(newUserId, oldUserId);
}
@Override
@TenantIgnore
public int updateUserId2(int newUserId, int oldUserId) {
return siteInfoMapper.updateUserId2(newUserId, oldUserId);
}
@Override
@TenantIgnore
public int updateUserId3(int newUserId, int oldUserId) {
return siteInfoMapper.updateUserId3(newUserId, oldUserId);
}
@Override
@TenantIgnore
public int updateUserId4(int newUserId, int oldUserId) {
return siteInfoMapper.updateUserId4(newUserId, oldUserId);
}
@Override
@TenantIgnore
public int updateUserId5(int newUserId, int oldUserId) {
return siteInfoMapper.updateUserId5(newUserId, oldUserId);
}
} }

View File

@ -1,10 +1,13 @@
package cn.iocoder.yudao.module.payment.mapper; package cn.iocoder.yudao.module.payment.mapper;
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; 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.OrderInfo;
import cn.iocoder.yudao.module.payment.entity.commentVo; import cn.iocoder.yudao.module.payment.entity.commentVo;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -19,30 +22,42 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface OrderInfoMapper extends BaseMapper<OrderInfo> { 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); 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<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> 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> validationListWx(Page<OrderInfo> page, @Param("validationUserId") Long validationUserId);
List<OrderInfo> validationListPc(Page<OrderInfo> page,Long partnerId);
List<OrderInfo> validationListPc(Page<OrderInfo> page, Long partnerId);
Integer getNoCommentOrder(@Param("userId") Long userId); Integer getNoCommentOrder(@Param("userId") Long userId);

View File

@ -2,9 +2,12 @@ package cn.iocoder.yudao.module.payment.service;
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; 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.OrderInfo;
import cn.iocoder.yudao.module.payment.entity.commentVo; import cn.iocoder.yudao.module.payment.entity.commentVo;
import com.alibaba.fastjson.JSONObject; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
@ -18,21 +21,38 @@ import java.util.Map;
* @since 2023-07-24 18:30:29 * @since 2023-07-24 18:30:29
*/ */
public interface OrderInfoService extends IService<OrderInfo> { 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<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); 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); 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; Long createOrder(OrderInfo orderInfo) throws Exception;
JSONObject pickCarDetail(Long pickCarId); 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); void cancelPay(Long orderId);
List<OrderInfo> orderList(String status,String title); List<OrderInfo> orderList(String status, String title);
String validation(String accessCode); String validation(String accessCode);

View File

@ -24,6 +24,7 @@ import cn.iocoder.yudao.util.StringUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
@ -143,6 +144,20 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
return baseMapper.orderListSystem(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 @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Long createOrder(OrderInfo orderInfo) throws Exception { public Long createOrder(OrderInfo orderInfo) throws Exception {

View File

@ -153,5 +153,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert> </insert>
<update id="updateUserId1" >
update rescue_info set user_id = #{newUserId} where user_id = #{oldUserId}
</update>
<update id="updateUserId2" >
update rescue_order_info set validation_user_id = #{newUserId} where user_id = #{oldUserId}
</update>
<update id="updateUserId3" >
update rescue_order_info set user_id = #{newUserId} where user_id = #{oldUserId}
</update>
<update id="updateUserId4" >
update rescue_order_return set user_id = #{newUserId} where user_id = #{oldUserId}
</update>
<update id="updateUserId5" >
update driver_info set user_id = #{newUserId} where user_id = #{oldUserId}
</update>
</mapper> </mapper>

View File

@ -236,4 +236,62 @@
where partner_id = #{partnerId} and comment_star is not null where partner_id = #{partnerId} and comment_star is not null
ORDER BY comment_time desc ORDER BY comment_time desc
</select> </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> </mapper>