Compare commits

..

No commits in common. "d84b6869f58adfb5bb833b8a3ead1b195b2952a7" and "87fc147c0256322320ae66accda4b411d80f63e7" have entirely different histories.

3 changed files with 1 additions and 34 deletions

View File

@ -12,13 +12,11 @@ import cn.iocoder.yudao.module.shop.service.recharge.PhoneRecordService;
import cn.iocoder.yudao.module.shop.service.recharge.RechargeGearService;
import cn.iocoder.yudao.module.shop.service.recharge.RechargeOrderService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@ -66,12 +64,6 @@ public class MemberController {
return CommonResult.success(rechargeOrderService.memberHeadInfo());
}
@Operation(summary = "根据手机号查询档次信息")
@RequestMapping(value = "/memberByHomeGradeInfo", method = RequestMethod.GET)
@PreAuthenticated
@TenantIgnore
public CommonResult<List<RechargeGearRespVO>> memberByPhoneGradeInfo(@RequestParam String phone) {
return CommonResult.success(rechargeGearService.memberByPhoneGradeInfo(phone));
}
}

View File

@ -68,6 +68,4 @@ public interface RechargeGearService {
List<RechargeGearDO> getRechargeGearList(RechargeGearExportReqVO exportReqVO);
List<RechargeGearRespVO> getGradeInfo();
List<RechargeGearRespVO> memberByPhoneGradeInfo(String phone);
}

View File

@ -125,27 +125,4 @@ public class RechargeGearServiceImpl implements RechargeGearService {
return rechargeGearRespVOS;
}
@Override
public List<RechargeGearRespVO> memberByPhoneGradeInfo(String phone) {
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
.eq(RechargeGearDO::getDeleted, 0));
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUserPhone, phone)
.eq(RechargeOrderDO::getPaid,1)
.last("LIMIT 1"));
if (Objects.nonNull(orderDO)) {
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderDO.getId()));
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
rechargeGearRespVOS.forEach(vo -> {
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
if (!CollectionUtils.isEmpty(infoDOS1)) {
vo.setIsExist("1");
} else {
vo.setIsExist("0");
}
});
}
return rechargeGearRespVOS;
}
}