This commit is contained in:
nyoung 2024-09-03 08:50:49 +08:00
parent a75b052167
commit e4d1ea9d84
8 changed files with 35 additions and 12 deletions

View File

@ -396,8 +396,8 @@ public class PartnerOwnController extends BaseController {
if (!partnersTmp.getUserId().equals(user.getId())){ if (!partnersTmp.getUserId().equals(user.getId())){
return null; return null;
} }
PageHelper.startPage(pageNum,pageSize); Page<InspectionAppointment> page = new Page<>(pageNum,pageSize);
List<InspectionAppointment> appointments = partnerList.getAppointmentList(partnerId,phoneNum); List<InspectionAppointment> appointments = partnerList.getAppointmentList(page,partnerId,phoneNum);
return getDataTable(appointments); return getDataTable(appointments);
} }

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.iocoder.yudao.module.inspection.entity.InspectionAppointment; import cn.iocoder.yudao.module.inspection.entity.InspectionAppointment;
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;
@ -63,7 +64,7 @@ public interface InspectionAppointmentMapper extends BaseMapper<InspectionAppoin
* @return 结果 * @return 结果
*/ */
public int deleteInspectionAppointmentByIds(Long[] ids); public int deleteInspectionAppointmentByIds(Long[] ids);
List<InspectionAppointment> getAppointmentList(@Param("partnerId") Long partnerId,@Param("phoneNum")String phoneNum); List<InspectionAppointment> getAppointmentList(Page<InspectionAppointment> page,@Param("partnerId") Long partnerId, @Param("phoneNum")String phoneNum);
List<InspectionAppointment> getAppointmentOwn(@Param("userId") Long userId); List<InspectionAppointment> getAppointmentOwn(@Param("userId") Long userId);

View File

@ -64,7 +64,7 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
void addStepInfo(InspectionStepInfo stepInfo); void addStepInfo(InspectionStepInfo stepInfo);
void stopInspection(InspectionInfo info) throws Exception; void stopInspection(InspectionInfo info) throws Exception;
void makeCertOk(Long inspectionId); void makeCertOk(Long inspectionId);
List<InspectionAppointment> getAppointmentList(Long partnerId,String phoneNum); List<InspectionAppointment> getAppointmentList(Page<InspectionAppointment> page,Long partnerId,String phoneNum);
List<OrderInfo> validationList(Long partnerId,String searchValue); List<OrderInfo> validationList(Long partnerId,String searchValue);
void sendCoupon(ShopCouponTemplate template) throws Exception; void sendCoupon(ShopCouponTemplate template) throws Exception;
List<ShopCouponTemplate> listCoupon(Long partnerId,String searchValue); List<ShopCouponTemplate> listCoupon(Long partnerId,String searchValue);

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.inspection.service; package cn.iocoder.yudao.module.inspection.service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import cn.iocoder.yudao.module.inspection.entity.InspectionAppointment; import cn.iocoder.yudao.module.inspection.entity.InspectionAppointment;
import cn.iocoder.yudao.module.inspection.entity.InspectionPickCar; import cn.iocoder.yudao.module.inspection.entity.InspectionPickCar;
@ -72,6 +73,6 @@ public interface IInspectionAppointmentService extends IService<InspectionAppoi
JSONObject pickCarInfo(); JSONObject pickCarInfo();
JSONObject computeDistanceAndPrice(Long goodsId,Double longitude,Double latitude,String type ) throws Exception; JSONObject computeDistanceAndPrice(Long goodsId,Double longitude,Double latitude,String type ) throws Exception;
public List<InspectionAppointment> getAppointmentList(Long partnerId,String phoneNum); public List<InspectionAppointment> getAppointmentList(Page<InspectionAppointment> page,Long partnerId, String phoneNum);
List<InspectionAppointment> getAppointmentOwn(); List<InspectionAppointment> getAppointmentOwn();
} }

View File

@ -1214,8 +1214,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
} }
@Override @Override
public List<InspectionAppointment> getAppointmentList(Long partnerId,String phoneNum) { public List<InspectionAppointment> getAppointmentList(Page<InspectionAppointment> page,Long partnerId,String phoneNum) {
return appointmentService.getAppointmentList(partnerId,phoneNum); return appointmentService.getAppointmentList(page,partnerId,phoneNum);
} }
@Override @Override

View File

@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import cn.iocoder.yudao.util.SendSmsUtil; import cn.iocoder.yudao.util.SendSmsUtil;
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.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.iocoder.yudao.util.DateUtils; import cn.iocoder.yudao.util.DateUtils;
import cn.iocoder.yudao.util.StringUtils; import cn.iocoder.yudao.util.StringUtils;
@ -346,8 +347,8 @@ public class InspectionAppointmentServiceImpl extends ServiceImpl<InspectionAppo
} }
@Override @Override
public List<InspectionAppointment> getAppointmentList(Long partnerId,String phoneNum) { public List<InspectionAppointment> getAppointmentList(Page<InspectionAppointment> page,Long partnerId, String phoneNum) {
return baseMapper.getAppointmentList(partnerId,phoneNum); return baseMapper.getAppointmentList(page,partnerId,phoneNum);
} }
@Override @Override

View File

@ -346,7 +346,7 @@ FROM
FROM FROM
order_info oi order_info oi
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
left join sys_dict_data sdd on sdd.dict_value = ii.customer_source and sdd.dict_type = concat('customer_source-',#{partnerId}) left join system_dict_data sdd on sdd.value = ii.customer_source and sdd.dict_type = concat('customer_source-',#{partnerId})
WHERE oi.partner_id =#{partnerId} WHERE oi.partner_id =#{partnerId}
and ii.create_time BETWEEN #{startTime} and #{endTime} and ii.create_time BETWEEN #{startTime} and #{endTime}
GROUP BY sdd.remark GROUP BY sdd.remark
@ -359,7 +359,7 @@ FROM
FROM FROM
order_info oi order_info oi
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
left join sys_dict_data sdd on sdd.dict_value = ii.customer_source and sdd.dict_type = concat('customer_source-',#{partnerId}) left join system_dict_data sdd on sdd.value = ii.customer_source and sdd.dict_type = concat('customer_source-',#{partnerId})
WHERE oi.partner_id =#{partnerId} WHERE oi.partner_id =#{partnerId}
<if test="remark !=null and remark !=''"> <if test="remark !=null and remark !=''">
<choose> <choose>
@ -392,7 +392,7 @@ FROM
FROM FROM
order_info oi order_info oi
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
inner join system_user su on su.id = oi.user_id inner join system_users su on su.id = oi.user_id
WHERE oi.partner_id ='19' WHERE oi.partner_id ='19'
and ii.create_time BETWEEN #{startTime} and #{endTime} and ii.create_time BETWEEN #{startTime} and #{endTime}
and oi.validation_time is null and ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is null and ii.`status`='1' and ii.is_pass = '1'

View File

@ -2,8 +2,10 @@ package cn.iocoder.yudao.module.rescue.app.controller.admin;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.common.CommonErrorCodeConstants; import cn.iocoder.yudao.common.CommonErrorCodeConstants;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.config.SecurityProperties;
import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.rescue.core.redis.RedisCache; import cn.iocoder.yudao.module.rescue.core.redis.RedisCache;
@ -39,6 +41,7 @@ import javax.annotation.Resource;
import javax.crypto.Cipher; import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;
import javax.servlet.http.HttpServletRequest;
import java.security.spec.AlgorithmParameterSpec; import java.security.spec.AlgorithmParameterSpec;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
@ -90,6 +93,10 @@ public class SysLoginController {
@Resource @Resource
private RestTemplate restTemplate; private RestTemplate restTemplate;
@Resource
private SecurityProperties securityProperties;
// @Autowired // @Autowired
// private IUserBalanceService balanceService; // private IUserBalanceService balanceService;
// @Autowired // @Autowired
@ -650,4 +657,17 @@ public class SysLoginController {
driverInfoService.syncData(); driverInfoService.syncData();
return CommonResult.ok(); return CommonResult.ok();
} }
@PostMapping("/logout")
@Operation(summary = "登出系统")
public CommonResult<Boolean> logout(HttpServletRequest request) {
String token = SecurityFrameworkUtils.obtainAuthorization(request,
securityProperties.getTokenHeader(), securityProperties.getTokenParameter());
if (StrUtil.isNotBlank(token)) {
loginService.logout(token,1);
}
return success(true);
}
} }