| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.account.entity.CoachType; |
| | | import com.dsh.account.entity.RechargeRecords; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.model.query.RechargeRecordsQuery; |
| | | import com.dsh.account.model.query.coachQuery.CoachQuery; |
| | | import com.dsh.account.model.vo.CoachSerchVO; |
| | | import com.dsh.account.model.vo.RechargeRecordsVO; |
| | | import com.dsh.account.service.CoachService; |
| | | import com.dsh.account.service.CoachTypeService; |
| | | import com.dsh.account.service.RechargeRecordsService; |
| | | import com.dsh.account.service.*; |
| | | import net.bytebuddy.asm.Advice; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class FinanceController { |
| | | @Autowired |
| | | private RechargeRecordsService rechargeRecordsService; |
| | | @Autowired |
| | | private IVipPaymentService vipPaymentService; |
| | | @Autowired |
| | | private TAppUserService appUserService; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/finance/rechargeList") |
| | | public List<RechargeRecordsVO> rechargeList(@RequestBody RechargeRecordsQuery query){ |
| | | List<RechargeRecordsVO> list = rechargeRecordsService.rechargeList(query); |
| | | return list; |
| | | public List<RechargeRecordsVO> rechargeList(@RequestBody RechargeRecordsQuery query) { |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = rechargeRecordsService.rechargeList(query); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | TAppUser byId = appUserService.getById(rechargeRecordsVO.getAppUserId()); |
| | | if (byId == null) continue; |
| | | Date vipEndTime = byId.getVipEndTime(); |
| | | if (vipEndTime == null) { |
| | | rechargeRecordsVO.setType(2); |
| | | continue; |
| | | } |
| | | if (rechargeRecordsVO.getPayTime().after(vipEndTime)) { |
| | | rechargeRecordsVO.setType(2); |
| | | } else { |
| | | rechargeRecordsVO.setType(1); |
| | | } |
| | | } |
| | | return rechargeRecordsVOS; |
| | | } |
| | | |
| | | /** |
| | | * 数据统计-充值记录列表数据 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/finance/rechargeList1") |
| | | public List<RechargeRecords> rechargeList1(@RequestBody RechargeRecordsQuery query) { |
| | | List<RechargeRecords> payStatus = rechargeRecordsService.list(new QueryWrapper<RechargeRecords>().eq("payStatus", 2)); |
| | | for (RechargeRecords list : payStatus) { |
| | | TAppUser byId = appUserService.getById(list.getAppUserId()); |
| | | Integer addUserId = byId.getAddUserId(); |
| | | |
| | | } |
| | | return payStatus; |
| | | } |
| | | |
| | | /** |
| | | * 加入会员列表数据 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/finance/vipPaymentList") |
| | | public List<VipPayment> registrationList(@RequestBody IncomeQuery query) { |
| | | return rechargeRecordsService.listAll(query); |
| | | } |
| | | } |