Revert "更新"

This reverts commit f627b242a9.
This commit is contained in:
Vinjor 2024-11-13 13:53:35 +08:00
parent f627b242a9
commit 0d69f824f6
9 changed files with 26 additions and 77 deletions

View File

@ -141,7 +141,7 @@ public class AppSwiperController extends BaseController
{ {
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>(); LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
LoginUser user = SecurityFrameworkUtils.getLoginUser(); LoginUser user = SecurityFrameworkUtils.getLoginUser();
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
ShopMallPartners partner = partnersService.getOne(queryWrapper); ShopMallPartners partner = partnersService.getOne(queryWrapper);
if (ObjectUtil.isEmpty(partner)){ if (ObjectUtil.isEmpty(partner)){
return error("信息有误"); return error("信息有误");

View File

@ -81,16 +81,5 @@ public class DlInspectionProjectController {
return success(pageResult); return success(pageResult);
} }
/**
* 修改项目排序
* @param updateReqVO
* @return
*/
@PutMapping("/updateSort")
public CommonResult updateSort(@RequestBody DlInspectionProjectSaveReqVO updateReqVO) {
dlInspectionProjectService.updateSort(updateReqVO);
return success(true);
}
} }

View File

@ -31,12 +31,6 @@ public interface DlInspectionProjectService extends IService<DlInspectionProject
*/ */
void updateDlInspectionProject(@Valid DlInspectionProjectSaveReqVO updateReqVO); void updateDlInspectionProject(@Valid DlInspectionProjectSaveReqVO updateReqVO);
/**
* 更新排序
* @param updateReqVO
*/
void updateSort(DlInspectionProjectSaveReqVO updateReqVO);
/** /**
* 删除检测项目 * 删除检测项目
* *

View File

@ -21,7 +21,6 @@ import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
import cn.iocoder.yudao.module.payment.entity.OrderInfo; import cn.iocoder.yudao.module.payment.entity.OrderInfo;
import cn.iocoder.yudao.module.payment.entity.OrderInfoDetail; import cn.iocoder.yudao.module.payment.entity.OrderInfoDetail;
import cn.iocoder.yudao.module.payment.service.IOrderInfoDetailService; import cn.iocoder.yudao.module.payment.service.IOrderInfoDetailService;
import cn.iocoder.yudao.module.shop.service.IShopMallPartnersService;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
@ -120,8 +119,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
private RoleService roleService; private RoleService roleService;
@Autowired @Autowired
private AdminUserService adminUserService; private AdminUserService adminUserService;
@Autowired
private IShopMallPartnersService partnersService;
@Override @Override
public IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, PartnerListQuery partnerListQuery) { public IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, PartnerListQuery partnerListQuery) {
@ -169,33 +166,28 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
@Override @Override
@TenantIgnore @TenantIgnore
public ShopMallPartners shopInfo() throws Exception { public ShopMallPartners shopInfo() throws Exception {
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
// Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId());
// List<RoleDO> roleList = roleService.getRoleList(userRoleIdListByUserId);
//
// List<String> roles = roleList.stream().map(RoleDO::getCode).collect(Collectors.toList());
// ShopMallPartners partner = new ShopMallPartners();
// if (roles.contains("jcshop")){
// LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
// queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
// partner = this.getOne(queryWrapper);
// if (ObjectUtil.isEmpty(partner)){
// throw new Exception("信息有误");
// }
// }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)){
// throw new Exception("信息有误");
// }
// partner.setPartnerId(worker.getPartnerId());
// }
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
LoginUser user = SecurityFrameworkUtils.getLoginUser(); LoginUser user = SecurityFrameworkUtils.getLoginUser();
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); Set<Long> userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId());
ShopMallPartners partner = partnersService.getOne(queryWrapper); List<RoleDO> roleList = roleService.getRoleList(userRoleIdListByUserId);
List<String> roles = roleList.stream().map(RoleDO::getCode).collect(Collectors.toList());
ShopMallPartners partner = new ShopMallPartners();
if (roles.contains("jcshop")){
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
partner = this.getOne(queryWrapper);
if (ObjectUtil.isEmpty(partner)){
throw new Exception("信息有误");
}
}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)){
throw new Exception("信息有误");
}
partner.setPartnerId(worker.getPartnerId());
}
return partner; return partner;
} }

View File

@ -81,17 +81,6 @@ public class DlInspectionProjectServiceImpl extends ServiceImpl<DlInspectionProj
projectRoyaltyService.batchInsertProjectRoyalty(collect); projectRoyaltyService.batchInsertProjectRoyalty(collect);
} }
/**
* 更新排序
*
* @param updateReqVO
*/
@Override
public void updateSort(DlInspectionProjectSaveReqVO updateReqVO) {
DlInspectionProject updateObj = BeanUtils.toBean(updateReqVO, DlInspectionProject.class);
dlInspectionProjectMapper.updateById(updateObj);
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void deleteDlInspectionProject(String id) { public void deleteDlInspectionProject(String id) {

View File

@ -346,9 +346,6 @@ public class RescueInfoSystem extends BaseController {
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
Page<RescueInfo> page = new Page<>(pageNo, pageSize); Page<RescueInfo> page = new Page<>(pageNo, pageSize);
if ("".equals(rescueInfo.getFeeType())){
rescueInfo.setFeeType(null);
}
IPage<RescueInfo> rescueInfos = rescueInfoService.getRescueInfoByDriver(rescueInfo, page); IPage<RescueInfo> rescueInfos = rescueInfoService.getRescueInfoByDriver(rescueInfo, page);
List<MoneyManagement> list = rescueInfoService.moneyManagement2(rescueInfos.getRecords(), rescueInfo.getRescueStart()); List<MoneyManagement> list = rescueInfoService.moneyManagement2(rescueInfos.getRecords(), rescueInfo.getRescueStart());
IPage<MoneyManagement> result = new Page<>(pageNo, pageSize); IPage<MoneyManagement> result = new Page<>(pageNo, pageSize);

View File

@ -345,9 +345,6 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
rescueInfo.setRescueTcBig(rescueTcBig); rescueInfo.setRescueTcBig(rescueTcBig);
rescueInfo.setRescueTcMid(rescueTcMid); rescueInfo.setRescueTcMid(rescueTcMid);
rescueInfo.setRescueTcSmall(rescueTcSmall); rescueInfo.setRescueTcSmall(rescueTcSmall);
if ("".equals(rescueInfo.getFeeType())){
rescueInfo.setFeeType(null);
}
JSONObject res = baseMapper.listData(rescueInfo); JSONObject res = baseMapper.listData(rescueInfo);
//在计算燃油费 //在计算燃油费
JSONObject jsonObject = refuelRecordService.listData(rescueInfo); JSONObject jsonObject = refuelRecordService.listData(rescueInfo);

View File

@ -88,7 +88,7 @@
<if test="map.rescueType != null"> <if test="map.rescueType != null">
and ri.rescue_type = #{map.rescueType} and ri.rescue_type = #{map.rescueType}
</if> </if>
<if test="map.feeType != null and map.feeType != ''"> <if test="map.feeType != null">
and ri.fee_type = #{map.feeType} and ri.fee_type = #{map.feeType}
</if> </if>
<if test="map.flag != null"> <if test="map.flag != null">
@ -126,14 +126,8 @@
<if test="flag != null"> <if test="flag != null">
and ri.driver_id is not null and ri.driver_id is not null
</if> </if>
<if test="feeType != null and feeType != ''"> <if test="rescueStart != null">
and ri.fee_type = #{feeType} and rescue_time like concat(#{rescueStart}, '%')
</if>
<if test="rescueStartMonth != null">
and rescue_time like concat(#{rescueStartMonth}, '%')
</if>
<if test="rescueStart != null and rescueEnd != null">
and rescue_time between concat(#{rescueStart}, ' 00:00:00') and concat(#{rescueEnd}, ' 23:59:59')
</if> </if>
</where> </where>
</select> </select>

View File

@ -76,10 +76,7 @@
<if test="driverCarNum != null "> <if test="driverCarNum != null ">
and rci.rescue_car_num like concat('%',#{driverCarNum},'%') and rci.rescue_car_num like concat('%',#{driverCarNum},'%')
</if> </if>
<if test="rescueStartMonth">and rrr.record_time like concat(#{rescueStartMonth},'%')</if> <if test="rescueStart">and rrr.record_time like concat(#{rescueStart},'%')</if>
<if test="rescueStart != null and rescueEnd != null">
and rrr.record_time between concat(#{rescueStart}, ' 00:00:00') and concat(#{rescueEnd}, ' 23:59:59')
</if>
</where> </where>
</select> </select>