| | |
| | | |
| | | |
| | | /** |
| | | * 根据用户姓名和电话模糊查询 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/queryAPPUserByNameAndPhone") |
| | | public List<TAppUser> queryAPPUserByNameAndPhone(@RequestBody AppUserByNameAndPhoneDTO dto){ |
| | | return appUserService.queryAPPUserByNameAndPhone(dto); |
| | | } |
| | | /** |
| | | * 根据用户id获取用户信息 |
| | | * @param appUserId |
| | | * @return |
| | |
| | | */ |
| | | @PostMapping("/coach/queryCoachListByName") |
| | | @ResponseBody |
| | | public List<Coach> queryCoachListByName(String name){ |
| | | public List<Coach> queryCoachListByName(@RequestBody String name){ |
| | | return service.list(new QueryWrapper<Coach>().like("name",name)); |
| | | } |
| | | |
| | |
| | | |
| | | 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.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.IVipPaymentService; |
| | | import com.dsh.account.service.RechargeRecordsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class FinanceController { |
| | | @Autowired |
| | | private RechargeRecordsService rechargeRecordsService; |
| | | @Autowired |
| | | private IVipPaymentService vipPaymentService; |
| | | |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | @RequestMapping("/finance/rechargeList") |
| | | public List<RechargeRecordsVO> rechargeList(@RequestBody RechargeRecordsQuery query){ |
| | | List<RechargeRecordsVO> list = rechargeRecordsService.rechargeList(query); |
| | | return list; |
| | | return rechargeRecordsService.rechargeList(query); |
| | | } |
| | | /** |
| | | * 加入会员列表数据 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/finance/vipPaymentList") |
| | | public List<VipPayment> registrationList(@RequestBody IncomeQuery query){ |
| | | return rechargeRecordsService.listAll(query); |
| | | } |
| | | } |
| | |
| | | public List<TStudent> queryStudentListByName(@RequestBody String name){ |
| | | return studentService.list(new QueryWrapper<TStudent>().eq("state", 1).like("name", name)); |
| | | } |
| | | /** |
| | | * 根据名称模糊搜索学员 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @PostMapping("/student/queryTStudentListByName") |
| | | public List<TStudent> queryTStudentListByName(@RequestBody String name){ |
| | | return studentService.list(new QueryWrapper<TStudent>().eq("state", 1).like("name", name)); |
| | | } |
| | | |
| | | /** |
| | | * web端查找学员 |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dsh.account.util.UUIDUtil; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.entity.RechargeRecords; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.model.query.RechargeRecordsQuery; |
| | | import com.dsh.account.model.vo.RechargeRecordsVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public interface RechargeRecordsMapper extends BaseMapper<RechargeRecords> { |
| | | |
| | | List<RechargeRecordsVO> rechargeList(@Param("query") RechargeRecordsQuery query,@Param("sTime")String sTime,@Param("eTime")String eTime); |
| | | List<VipPayment> listAll(@Param("query") IncomeQuery query, @Param("sTime")String sTime, @Param("eTime")String eTime, @Param("amount") BigDecimal amount); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.AppUserByNameAndPhoneDTO; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | List<SelectDto> getSelects(@Param("studentIds") List<Integer> studentIds); |
| | | |
| | | int changeState(@Param("ids") List<Integer> ids,@Param("state") Integer state); |
| | | |
| | | List<TAppUser> queryAPPUserByNameAndPhone(@Param("query") AppUserByNameAndPhoneDTO dto); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/24 10:02 |
| | | */ |
| | | |
| | | public interface VipPaymentMapper extends BaseMapper<VipPayment> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 通过用户姓名和电话进行模糊查询DTO |
| | | */ |
| | | @Data |
| | | public class AppUserByNameAndPhoneDTO { |
| | | private String userName; |
| | | private String phone; |
| | | } |
New file |
| | |
| | | package com.dsh.account.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 收入管理Query |
| | | */ |
| | | @Data |
| | | public class IncomeQuery { |
| | | // 收入时间 |
| | | private String time; |
| | | // 收入类型 |
| | | private Integer incomeType; |
| | | // 用户姓名 |
| | | private String userName; |
| | | // 收入金额 |
| | | private BigDecimal amount; |
| | | // 用户ids |
| | | private List<Integer> userIds; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.account.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/4 23:39 |
| | | */ |
| | | @Data |
| | | public class Student { |
| | | private Integer id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 学员电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | private Integer sex; |
| | | /** |
| | | * 身高 |
| | | */ |
| | | private Double height; |
| | | /** |
| | | * 体重 |
| | | */ |
| | | private Double weight; |
| | | /** |
| | | * bmi健康值 |
| | | */ |
| | | private Double bmi; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 体侧表 |
| | | */ |
| | | private String lateralSurface; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String headImg; |
| | | /** |
| | | * 是否默认 1默认 2不是默认 |
| | | */ |
| | | private Integer isDefault; |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 充值记录列表查询Query |
| | | */ |
| | |
| | | * 1 = 会员 0 =非会员 |
| | | */ |
| | | private Integer type; |
| | | |
| | | private List<Integer> userIds; |
| | | private BigDecimal amount; |
| | | } |
| | |
| | | * 1 = 会员 2 =非会员 |
| | | */ |
| | | private Integer type; |
| | | private Integer appUserId; |
| | | private Integer state; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.util.ResultUtil; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil addVipPaymentCallback(String code, String orderNumber) throws Exception; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.entity.RechargeRecords; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.model.query.RechargeRecordsQuery; |
| | | import com.dsh.account.model.vo.RechargeRecordsVO; |
| | | import com.dsh.account.model.vo.userBenefitDetail.RechargeDetailsVo; |
| | |
| | | ResultUtil addRechargeCallbackPay(String code, String orderNumber); |
| | | |
| | | List<RechargeRecordsVO> rechargeList(RechargeRecordsQuery query); |
| | | List<VipPayment> listAll(IncomeQuery query); |
| | | } |
| | |
| | | |
| | | Object changeState(AdvertisementChangeStateDTO dto); |
| | | |
| | | List<TAppUser> queryAPPUserByNameAndPhone(AppUserByNameAndPhoneDTO dto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.account.entity.RechargeRecords; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.enums.RechargeRecordEnum; |
| | | import com.dsh.account.feignclient.competition.DeductionCompetitionsClient; |
| | | import com.dsh.account.feignclient.competition.model.PaymentCompetition; |
| | |
| | | import com.dsh.account.feignclient.other.model.SiteBooking; |
| | | import com.dsh.account.mapper.RechargeRecordsMapper; |
| | | import com.dsh.account.mapper.TAppUserMapper; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.model.query.RechargeRecordsQuery; |
| | | import com.dsh.account.model.vo.RechargeRecordsVO; |
| | | import com.dsh.account.model.vo.userBenefitDetail.RechargeDetailsVo; |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<VipPayment> listAll(IncomeQuery query) { |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getTime())) { |
| | | STime = query.getTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | return rechargeRecordsMapper.listAll(query,STime,ETime,query.getAmount()); |
| | | } |
| | | public static <T> List<T> pageList(List<T> list, int pageNum, int pageSize) { |
| | | //计算总页数 |
| | | int page = list.size() % pageSize == 0 ? list.size() / pageSize : list.size() / pageSize + 1; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TAppUser> queryAPPUserByNameAndPhone(AppUserByNameAndPhoneDTO dto) { |
| | | return appUserMapper.queryAPPUserByNameAndPhone(dto); |
| | | } |
| | | |
| | | @Override |
| | | public ClassInfoVo queryUserOfStus(Integer id) { |
| | | TAppUser tAppUser = this.baseMapper.selectById(id); |
| | | ClassInfoVo classInfoVo = new ClassInfoVo(); |
| | |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.mapper.VipPaymentMapper; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.service.IVipPaymentService; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.util.PayMoneyUtil; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | @Autowired |
| | | private VipPaymentMapper vipPaymentMapper; |
| | | |
| | | |
| | | |
| | |
| | | appUserService.updateById(appUser); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | <select id="rechargeList" resultType="com.dsh.account.model.vo.RechargeRecordsVO"> |
| | | select t1.*,t2.name,t2.phone from t_recharge_records t1 |
| | | left join t_app_user t2 on t1.appUserId = t2.id |
| | | select t1.* from t_recharge_records t1 |
| | | <where> |
| | | <if test="query.amount!=null and query.amount!= ''"> |
| | | and t1.amount <= #{query.amount} |
| | | </if> |
| | | <if test="query.name!=null and query.name!= ''"> |
| | | AND t1.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | and t1.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t1.appUserId IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="listAll" resultType="com.dsh.account.entity.VipPayment"> |
| | | select t1.* from t_vip_payment t1 |
| | | <where> |
| | | <if test="amount!=null and amount!= ''"> |
| | | and t1.amount <= #{amount} |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t1.appUserId IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | |
| | | </foreach> |
| | | </where> |
| | | </select> |
| | | <select id="queryAPPUserByNameAndPhone" resultType="com.dsh.account.entity.TAppUser"> |
| | | select * from t_app_user t1 |
| | | <where> |
| | | <if test="query.userName!=null and query.userName!= ''"> |
| | | AND t1.name LIKE concat('%',#{query.userName},'%') |
| | | </if> |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | AND t1.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="isDefault" property="isDefault" /> |
| | | </resultMap> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | import com.dsh.competition.feignclient.account.AppUserClient; |
| | | import com.dsh.competition.feignclient.account.model.AppUser; |
| | | import com.dsh.competition.feignclient.model.*; |
| | | import com.dsh.competition.model.CompetitionInfo; |
| | | import com.dsh.competition.model.CompetitionListVo; |
| | | import com.dsh.competition.model.PaymentCompetitionVo; |
| | | import com.dsh.competition.model.*; |
| | | import com.dsh.competition.service.CompetitionService; |
| | | import com.dsh.competition.service.IParticipantService; |
| | | import com.dsh.competition.service.IPaymentCompetitionService; |
| | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | /** |
| | | * 获取赛事报名记录 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/base/competition/listAllPayment") |
| | | public List<PaymentCompetition> listAllPayment(@RequestBody CompetitionQuery query){ |
| | | return paymentCompetitionService.listAll(query); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/competition/getPayedCompetitions") |
| | | public BillingRequestVo getAllCompetitionPayRecord(@RequestBody BillingDataRequestVo requestVo){ |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | } |
| | |
| | | package com.dsh.competition.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.competition.entity.Competition; |
| | | import com.dsh.competition.entity.PaymentCompetition; |
| | | import com.dsh.competition.feignclient.model.BillingRequest; |
| | | import com.dsh.competition.model.CompetitionListVo; |
| | | import com.dsh.competition.model.CompetitionQuery; |
| | | import com.dsh.competition.model.TCompetition; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Param("monthStart")String monthStart, |
| | | @Param("monthEnd")String monthEnd); |
| | | |
| | | List<PaymentCompetition> listAll(@Param("query")CompetitionQuery query, @Param("sTime")String sTime, @Param("eTime")String eTime, @Param("amount") BigDecimal amount); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.competition.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 收入管理Query |
| | | */ |
| | | @Data |
| | | public class CompetitionQuery { |
| | | // 收入时间 |
| | | private String time; |
| | | // 收入金额 |
| | | private BigDecimal amount; |
| | | // 用户ids |
| | | private List<Integer> userIds; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.competition.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-26 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_competition") |
| | | public class TCompetition extends Model<TCompetition> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 省 |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @TableField("storeId") |
| | | private String storeId; |
| | | /** |
| | | * 赛事名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | | */ |
| | | @TableField("registerCondition") |
| | | private Integer registerCondition; |
| | | /** |
| | | * 报名开始年龄 |
| | | */ |
| | | @TableField("startAge") |
| | | private Integer startAge; |
| | | /** |
| | | * 报名结束年龄 |
| | | */ |
| | | @TableField("endAge") |
| | | private Integer endAge; |
| | | /** |
| | | * 现金支付价格 |
| | | */ |
| | | @TableField("cashPrice") |
| | | private Double cashPrice; |
| | | /** |
| | | * 玩湃币支付价格 |
| | | */ |
| | | @TableField("playPaiCoin") |
| | | private Integer playPaiCoin; |
| | | /** |
| | | * 课时支付价格 |
| | | */ |
| | | @TableField("classPrice") |
| | | private Integer classPrice; |
| | | /** |
| | | * 参加地址 |
| | | */ |
| | | @TableField("address") |
| | | private String address; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("longitude") |
| | | private String longitude; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("latitude") |
| | | private String latitude; |
| | | /** |
| | | * 报名人数 |
| | | */ |
| | | @TableField("applicantsNumber") |
| | | private Integer applicantsNumber; |
| | | /** |
| | | * 基础人数 |
| | | */ |
| | | @TableField("baseNumber") |
| | | private Integer baseNumber; |
| | | /** |
| | | * 是否需要实名(0=否,1=是) |
| | | */ |
| | | @TableField("realName") |
| | | private Integer realName; |
| | | /** |
| | | * 赛事封面图 |
| | | */ |
| | | @TableField("coverDrawing") |
| | | private String coverDrawing; |
| | | /** |
| | | * 赛事简介 |
| | | */ |
| | | @TableField("introduction") |
| | | private String introduction; |
| | | /** |
| | | * 赛事图片 |
| | | */ |
| | | @TableField("imgs") |
| | | private String imgs; |
| | | /** |
| | | * 报名须知 |
| | | */ |
| | | @TableField("registrationNotes") |
| | | private String registrationNotes; |
| | | /** |
| | | * 参赛省 |
| | | */ |
| | | @TableField("entryProvince") |
| | | private String entryProvince; |
| | | /** |
| | | * 参赛省编号 |
| | | */ |
| | | @TableField("entryProvinceCode") |
| | | private String entryProvinceCode; |
| | | /** |
| | | * 参赛市 |
| | | */ |
| | | @TableField("entryCity") |
| | | private String entryCity; |
| | | /** |
| | | * 参赛市编号 |
| | | */ |
| | | @TableField("entryCityCode") |
| | | private String entryCityCode; |
| | | /** |
| | | * 参赛地址 |
| | | */ |
| | | @TableField("entryAddress") |
| | | private String entryAddress; |
| | | /** |
| | | * 参赛经度 |
| | | */ |
| | | @TableField("entryLon") |
| | | private String entryLon; |
| | | /** |
| | | * 参赛纬度 |
| | | */ |
| | | @TableField("entryLat") |
| | | private String entryLat; |
| | | /** |
| | | * 审核状态(1=待审核,2=已通过,3=已拒绝) |
| | | */ |
| | | @TableField("auditStatus") |
| | | private Integer auditStatus; |
| | | /** |
| | | * 审核人id |
| | | */ |
| | | @TableField("auditUserId") |
| | | private Integer auditUserId; |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | @TableField("auditRemark") |
| | | private String auditRemark; |
| | | /** |
| | | * 状态(1=未开始,2=已开始,3=已结束,4=已取消) |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date insertTime; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.dsh.competition.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.competition.entity.Competition; |
| | | import com.dsh.competition.entity.PaymentCompetition; |
| | | import com.dsh.competition.feignclient.model.BillingRequest; |
| | | import com.dsh.competition.model.CompetitionInfo; |
| | | import com.dsh.competition.model.CompetitionListVo; |
| | | import com.dsh.competition.model.CompetitionQuery; |
| | | import com.dsh.competition.model.TCompetition; |
| | | import com.dsh.competition.util.ResultUtil; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | List<BillingRequest> queryCancelDatas(Integer appUserId, String monthStart, String monthEnd); |
| | | |
| | | List<PaymentCompetition> listAll(CompetitionQuery query); |
| | | } |
| | |
| | | import com.dsh.competition.feignclient.other.StoreClient; |
| | | import com.dsh.competition.feignclient.other.model.Store; |
| | | import com.dsh.competition.mapper.PaymentCompetitionMapper; |
| | | import com.dsh.competition.model.CompetitionInfo; |
| | | import com.dsh.competition.model.CompetitionListVo; |
| | | import com.dsh.competition.model.ParticipantVo; |
| | | import com.dsh.competition.model.*; |
| | | import com.dsh.competition.service.CompetitionService; |
| | | import com.dsh.competition.service.IParticipantService; |
| | | import com.dsh.competition.service.IPaymentCompetitionService; |
| | |
| | | import com.dsh.competition.util.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | @Autowired |
| | | private PaymentCompetitionMapper paymentCompetitionMapper; |
| | | |
| | | |
| | | |
| | |
| | | public List<BillingRequest> queryCancelDatas(Integer appUserId, String monthStart, String monthEnd) { |
| | | return this.baseMapper.queryCancelDatas(appUserId,monthStart,monthEnd); |
| | | } |
| | | |
| | | @Override |
| | | public List<PaymentCompetition> listAll(CompetitionQuery query) { |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getTime())) { |
| | | STime = query.getTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | |
| | | return paymentCompetitionMapper.listAll(query,STime,ETime,query.getAmount()); |
| | | } |
| | | } |
| | |
| | | and appUserId = #{appUserId} |
| | | </if> |
| | | </select> |
| | | <select id="listAll" resultType="com.dsh.competition.entity.PaymentCompetition"> |
| | | select * from t_payment_competition t1 |
| | | <where> |
| | | <if test="query.amount!=null and query.amount!= ''"> |
| | | and t1.amount <= #{query.amount} |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t1.appUserId IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | @ResponseBody |
| | | @PostMapping("/cancelledClasses/listAll") |
| | | public List<CancelClassesVO> listAll(@RequestBody CancelClassesQuery query){ |
| | | |
| | | List<CancelClassesVO> res = new ArrayList<>(); |
| | | if (query.getStudentName()!=null){ |
| | | if (!query.getStudentName().equals("")){ |
| | | List<Integer> s = new ArrayList<>(); |
| | | List<Student> students = studentClient.queryStudentListByName(query.getStudentName()); |
| | |
| | | } |
| | | query.setStudentIds(s); |
| | | } |
| | | } |
| | | if (query.getCoachName()!=null){ |
| | | if (!query.getCoachName().equals("")){ |
| | | List<Integer> c = new ArrayList<>(); |
| | | List<Coach> coaches = coachClient.queryCoachListByName(query.getCoachName()); |
| | |
| | | } |
| | | query.setCoachIds(c); |
| | | } |
| | | } |
| | | |
| | | List<CancelClassesVO> result = cancelledClassesService.listAll(query); |
| | | for (CancelClassesVO cancelClassesVO : result) { |
| | | CoursePackageScheduling byId1 = coursePackageSchedulingService.getById(cancelClassesVO.getCoursePackageSchedulingId()); |
| | |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.feignclient.account.model.TCourseInfoRecord; |
| | | import com.dsh.course.feignclient.account.model.TStudent; |
| | | import com.dsh.course.feignclient.activity.CouponClient; |
| | | import com.dsh.course.feignclient.activity.model.Coupon; |
| | | import com.dsh.course.feignclient.model.*; |
| | |
| | | private CoursePackageSchedulingMapper coursePackageSchedulingMapper; |
| | | @Autowired |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | @Autowired |
| | | private CoursePackageStudentService coursePackageStudentService; |
| | | |
| | | private final SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm"); |
| | | /** |
| | |
| | | packagePayment.setInsertTime(new Date()); |
| | | packagePayment.setInsertTime(new Date()); |
| | | Integer studentId = packagePayment.getStudentId(); |
| | | // 添加学员上课记录 |
| | | CoursePackageStudent coursePackageStudent = new CoursePackageStudent(); |
| | | TCoursePackagePayment one = packagePaymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("studentId", packagePayment) |
| | | .orderByDesc("insertTime") |
| | | .last("LIMIT 1")); |
| | |
| | | // 没有过期 |
| | | if (one.getUseTime().after(new Date())){ |
| | | packagePayment.setTotalClassHours(packagePayment.getClassHours()+one.getTotalClassHours()); |
| | | packagePayment.setLaveClassHours(packagePayment.getClassHours()+one.getLaveClassHours()); |
| | | packagePayment.setLaveClassHours(one.getLaveClassHours()-packagePayment.getClassHours()); |
| | | packagePayment.setAbsencesNumber(one.getAbsencesNumber()); |
| | | } |
| | | packagePayment.setTotalClassHours(packagePayment.getClassHours()); |
| | |
| | | coursePackageScheduling.setEndDate(endDate.getTime()); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.save(coursePackageScheduling); |
| | | coursePackageStudent.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | |
| | | List<CoursePackageScheduling> list1 = coursePackageSchedulingService.list(new QueryWrapper<CoursePackageScheduling>() |
| | | .eq("coursePackageId", coursePackage.getId()) |
| | | .eq("classDate", classDate.getTime()) |
| | |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return packagePaymentService.save(packagePayment); |
| | | |
| | | coursePackageStudent.setStudentId(packagePayment.getStudentId()); |
| | | coursePackageStudent.setCoursePackageId(packagePayment.getCoursePackageId()); |
| | | |
| | | |
| | | coursePackageStudent.setSignInOrNot(0); |
| | | coursePackageStudent.setReservationStatus(1); |
| | | coursePackageStudent.setInsertTime(new Date()); |
| | | coursePackageStudent.setAppUserId(packagePayment.getAppUserId()); |
| | | packagePaymentService.save(packagePayment); |
| | | coursePackageStudent.setCoursePackagePaymentId(packagePayment.getId()); |
| | | return coursePackageStudentService.save(coursePackageStudent); |
| | | } |
| | | /** |
| | | * 手动支付 |
| | |
| | | List<AppUser> appUsers = appUserClient.queryAppUserListByName(query.getPayUser()); |
| | | for (AppUser user : appUsers) { |
| | | if (appUser.getName().equals(user.getName())){ |
| | | result.add(re); |
| | | } |
| | | } |
| | | } |
| | | if (query.getPayStudent()== null || query.getPayStudent().equals("")){ |
| | | }else{ |
| | | List<Student> students = studentClient.queryStudentListByName(query.getPayStudent()); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (re.getPayType()!=null){ |
| | | if (re.getPayType()==1){ |
| | | re.setBuyTypeName("微信支付"); |
| | |
| | | } |
| | | |
| | | // 如果支付用户类型为管理员 则购买方式则为1线下购买 |
| | | if (re.getPayUserType()!=null){ |
| | | if (re.getPayUserType()== 2){ |
| | | re.setBuyType(1); |
| | | }else{ |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (query.getPayStudent()== null || query.getPayStudent().equals("")){ |
| | | if (query.getPayUser()== null || query.getPayUser().equals("")){ |
| | | return res; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取报名订单记录列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/registerOrder/listAllRegister") |
| | | public List<RegisterOrderVO> listAllRegister(@RequestBody RegisterOrderQuery query){ |
| | | if (query.getStudentName()!=null){ |
| | | if (!query.getStudentName().equals("")){ |
| | | List<TStudent> students1 = studentClient.queryTStudentListByName(query.getStudentName()); |
| | | List<Integer> studentIds = students1.stream().map(TStudent::getId).collect(Collectors.toList()); |
| | | query.setStudentIds(studentIds); |
| | | if (students1.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<RegisterOrderVO> res = packagePaymentService.listAllRegister(query); |
| | | List<RegisterOrderVO> result = new ArrayList<>(); |
| | | for (RegisterOrderVO re : res) { |
| | | if(re.getSalesName()==null){ |
| | | re.setSalesName("无"); |
| | | } |
| | | if(re.getPayType()!=null){ |
| | | if (re.getPayType() == 3){ |
| | | re.setPayMoneyAndType(re.getPlayPaiCoin()+"玩湃币"); |
| | | }else{ |
| | | re.setPayMoneyAndType("¥"+re.getMoney()); |
| | | } |
| | | } |
| | | Store store = storeClient.queryStoreById(re.getStoreId()); |
| | | TAppUser appUser = appUserClient.queryAppUser1(re.getAppUserId()); |
| | | Student student = studentClient.queryStudentById(re.getStudentId()); |
| | | re.setPayStudent(student.getName()); |
| | | re.setPayUser(appUser.getName()); |
| | | re.setPhone(appUser.getPhone()); |
| | | re.setStoreName(store.getName()); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * 获取 没有学员信息的图片配置 |
| | | * @param stuId 学员id |
| | | * @return 课包列表 |
| | |
| | | */ |
| | | @TableField("payUserName") |
| | | private String payUserName; |
| | | /** |
| | | * 销售人员(线下购课添加购课订单时使用) |
| | | */ |
| | | @TableField("salesName") |
| | | private String salesName; |
| | | } |
| | |
| | | import com.dsh.course.entity.dto.SelectDto; |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.TCourseInfoRecord; |
| | | import com.dsh.course.model.AppUserByNameAndPhoneDTO; |
| | | import com.dsh.course.model.TAppUser; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface AppUserClient { |
| | | |
| | | |
| | | /** |
| | | * 根据用户姓名和电话模糊查询 |
| | | */ |
| | | @PostMapping("/base/appUser/queryAPPUserByNameAndPhone") |
| | | List<TAppUser> queryAPPUserByNameAndPhone(@RequestBody AppUserByNameAndPhoneDTO dto); |
| | | /** |
| | | * 根据用户id获取用户信息 |
| | | * @param appUserId |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/coach/queryCoachListByName") |
| | | List<Coach> queryCoachListByName(String name); |
| | | List<Coach> queryCoachListByName(@RequestBody String name); |
| | | |
| | | |
| | | } |
| | |
| | | package com.dsh.course.feignclient.account; |
| | | |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.feignclient.account.model.TStudent; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @PostMapping("/student/queryStudentListByName") |
| | | List<Student> queryStudentListByName(String name); |
| | | /** |
| | | * 根据名称模糊搜索学员 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @PostMapping("/student/queryTStudentListByName") |
| | | List<TStudent> queryTStudentListByName(@RequestBody String name); |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.course.feignclient.account.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员信息 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_student") |
| | | public class TStudent { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员姓名 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 学员电话 |
| | | */ |
| | | @TableField("phone") |
| | | private String phone; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | @TableField("sex") |
| | | private Integer sex; |
| | | /** |
| | | * 身高 |
| | | */ |
| | | @TableField("height") |
| | | private Double height; |
| | | /** |
| | | * 体重 |
| | | */ |
| | | @TableField("weight") |
| | | private Double weight; |
| | | /** |
| | | * bmi健康值 |
| | | */ |
| | | @TableField("bmi") |
| | | private Double bmi; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @TableField("idCard") |
| | | private String idCard; |
| | | /** |
| | | * 体侧表 |
| | | */ |
| | | @TableField("lateralSurface") |
| | | private String lateralSurface; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField("headImg") |
| | | private String headImg; |
| | | /** |
| | | * 是否默认 1默认 2不是默认 |
| | | */ |
| | | @TableField("isDefault") |
| | | private Integer isDefault; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.CoursePackagePaymentConfig; |
| | | import com.dsh.course.model.CoursePackagePayDTO; |
| | | import com.dsh.course.model.CoursePackagePaymentQuery; |
| | | import com.dsh.course.model.CoursePackagePaymentVO; |
| | | import com.dsh.course.model.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | List<CoursePackagePaymentVO> listAll(@Param("query") CoursePackagePaymentQuery query); |
| | | |
| | | int changeState(@Param("ids") List<Long> ids,@Param("payUserName") String payUserName,@Param("payUserId") Integer payUserId); |
| | | |
| | | List<RegisterOrderVO> listAllRegister(@Param("query")RegisterOrderQuery query, @Param("sTime")String sTime, @Param("eTime")String eTime, @Param("amount")BigDecimal amount); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 通过用户姓名和电话进行模糊查询DTO |
| | | */ |
| | | @Data |
| | | public class AppUserByNameAndPhoneDTO { |
| | | private String userName; |
| | | private String phone; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | import org.omg.CORBA.PRIVATE_MEMBER; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 报名订单列表查询Query |
| | | */ |
| | | @Data |
| | | public class RegisterOrderQuery { |
| | | // 省 |
| | | private String province; |
| | | // 市 |
| | | private String city; |
| | | // 门店名称 |
| | | private Integer storeId; |
| | | // 报名时间 |
| | | private String registerTime; |
| | | // 购买用户 |
| | | private String userName; |
| | | // 购买用户ids |
| | | private List<Integer> userIds; |
| | | // 联系方式 |
| | | private String phone; |
| | | // 报名学员 |
| | | private String studentName; |
| | | // 报名学员ids |
| | | private List<Integer> studentIds; |
| | | // 课包名称 |
| | | private String coursePackageName; |
| | | // 销售人员 |
| | | private String salesName; |
| | | // 订单来源 |
| | | private Integer orderSource; |
| | | // 订单金额 |
| | | private BigDecimal amount; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 报名订单列表VO |
| | | */ |
| | | @Data |
| | | public class RegisterOrderVO { |
| | | /** |
| | | * |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '所属门店', field: 'storeName', visible: role!=3?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '报名学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '报名时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'payMoneyAndType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源', field: 'payUserType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) {return{1:"线上",2:"线下"}[data]}}, |
| | | {title: '销售人员', field: 'salesName', visible: true, align: 'center', valign: 'middle'} |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | private Long id; |
| | | private String provinceAndCity; |
| | | // 门店id |
| | | private Integer storeId; |
| | | private String storeName; |
| | | |
| | | private String coursePackageName; |
| | | private Integer coursePackageId; |
| | | // 用户id |
| | | private Integer appUserId; |
| | | private String payUser; |
| | | private String phone; |
| | | // 学员id |
| | | private Integer studentId; |
| | | private String payStudent; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | // 支付金额 |
| | | private BigDecimal money; |
| | | // 玩湃币价格/积分 |
| | | private Integer playPaiCoin; |
| | | // 该字段用于展示在前端 |
| | | private String payMoneyAndType; |
| | | // 订单来源 2 为线下购买 1为线上 |
| | | private Integer payUserType; |
| | | // 销售人员 |
| | | private String salesName; |
| | | // 支付方式 |
| | | private Integer payType; |
| | | private Integer payStatus; |
| | | |
| | | } |
| | |
| | | List<CoursePackagePaymentVO> listAll(CoursePackagePaymentQuery query); |
| | | |
| | | int changeState(CoursePackagePayDTO dto); |
| | | |
| | | List<RegisterOrderVO> listAllRegister(RegisterOrderQuery query); |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return cpConfigMapper.changeState(list,dto.getPayUserName(),dto.getUserId()); |
| | | } |
| | | |
| | | @Override |
| | | public List<RegisterOrderVO> listAllRegister(RegisterOrderQuery query) { |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getRegisterTime())) { |
| | | STime = query.getRegisterTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getRegisterTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | return cpConfigMapper.listAllRegister(query,STime,ETime,query.getAmount()); |
| | | } |
| | | |
| | | /** |
| | | * 获取课包购买人数 |
| | | * @param coursePackageId |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="listAllRegister" resultType="com.dsh.course.model.RegisterOrderVO"> |
| | | select t1.id,t1.studentId,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.giftClassHours,t1.appUserId,t1.cashPayment as money,t1.playPaiCoin, |
| | | t1.insertTime, |
| | | CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackageName |
| | | from t_course_package_payment t1 |
| | | left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | <where> |
| | | <if test="query.amount!=null and query.amount!= ''"> |
| | | and t1.cashPayment <= #{query.amount} |
| | | </if> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t2.provinceCode = #{query.province} |
| | | </if> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t2.cityCode = #{query.city} |
| | | </if> |
| | | <if test="query.storeId!=null and query.storeId!= ''"> |
| | | and t2.storeId = #{query.storeId} |
| | | </if> |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t1.appUserId IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="query.studentIds != null and query.studentIds.size()>0"> |
| | | AND t1.studentId IN |
| | | <foreach collection="query.studentIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.coursePackageName!=null and query.coursePackageName!= ''"> |
| | | AND t2.name LIKE concat('%',#{query.coursePackageName},'%') |
| | | </if> |
| | | <if test="query.salesName!=null and query.salesName!= ''"> |
| | | AND t1.salesName LIKE concat('%',#{query.salesName},'%') |
| | | </if> |
| | | |
| | | <if test="query.orderSource!=null and query.orderSource!= ''"> |
| | | and t1.payUserType = #{query.orderSource} |
| | | </if> |
| | | and t1.payStatus = 2 |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.other.model.SiteChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.guns.modular.system.model.AppUserByNameAndPhoneDTO; |
| | | import com.dsh.guns.modular.system.model.TStudent; |
| | | import com.dsh.guns.modular.system.model.dto.GiftSearchDto; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | |
| | | |
| | | |
| | | /** |
| | | * 根据用户姓名和电话模糊查询 |
| | | */ |
| | | @PostMapping("/base/appUser/queryAPPUserByNameAndPhone") |
| | | List<TAppUser> queryAPPUserByNameAndPhone(@RequestBody AppUserByNameAndPhoneDTO dto); |
| | | /** |
| | | * 根据用户id获取用户信息 |
| | | * @param appUserId |
| | | * @return |
New file |
| | |
| | | package com.dsh.course.feignClient.account; |
| | | |
| | | import com.dsh.course.feignClient.account.model.VipPayment; |
| | | import com.dsh.guns.modular.system.model.IncomeQuery; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/4 23:38 |
| | | */ |
| | | @FeignClient("mb-cloud-account") |
| | | public interface VipPaymentClient { |
| | | |
| | | /** |
| | | * 加入会员列表数据 |
| | | */ |
| | | @RequestMapping("/finance/vipPaymentList") |
| | | List<VipPayment> registrationList(@RequestBody IncomeQuery query); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.account.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dsh.course.util.UUIDUtil; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/24 9:58 |
| | | */ |
| | | @Data |
| | | @TableName("t_vip_payment") |
| | | public class VipPayment { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 流水号 |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | @TableField("amount") |
| | | private Double amount; |
| | | /** |
| | | * 支付方式(1=微信,2=支付宝) |
| | | */ |
| | | @TableField("payType") |
| | | private Integer payType; |
| | | /** |
| | | * 支付状态(1=待支付,2=已支付) |
| | | */ |
| | | @TableField("payStatus") |
| | | private Integer payStatus; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @TableField("payTime") |
| | | private Date payTime; |
| | | /** |
| | | * 第三方流水号 |
| | | */ |
| | | @TableField("orderNumber") |
| | | private String orderNumber; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | public static String CODE(){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | return sdf.format(new Date()) + UUIDUtil.getNumberRandom(3); |
| | | } |
| | | } |
| | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient("mb-cloud-competition") |
| | | public interface CompetitionClient { |
| | | |
| | | /** |
| | | * 获取赛事报名记录 |
| | | */ |
| | | @RequestMapping("/base/competition/listAllPayment") |
| | | List<PaymentCompetition> listAllPayment(@RequestBody CompetitionQuery query); |
| | | @PostMapping("/base/competition/queryById") |
| | | Competition queryById(Integer id); |
| | | |
New file |
| | |
| | | package com.dsh.course.feignClient.competition.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 收入管理Query |
| | | */ |
| | | @Data |
| | | public class CompetitionQuery { |
| | | // 收入时间 |
| | | private String time; |
| | | // 收入金额 |
| | | private BigDecimal amount; |
| | | // 用户ids |
| | | private List<Integer> userIds; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.competition.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/6 16:30 |
| | | */ |
| | | @Data |
| | | @TableName("t_payment_competition") |
| | | public class PaymentCompetition { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.NONE) |
| | | private Long id; |
| | | /** |
| | | * 业务流水号 |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 赛事id |
| | | */ |
| | | @TableField("competitionId") |
| | | private Integer competitionId; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | * 支付方式(1=微信,2=支付宝,3=玩湃币,4=课时) |
| | | */ |
| | | @TableField("payType") |
| | | private Integer payType; |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | @TableField("amount") |
| | | private Double amount; |
| | | /** |
| | | * 支付状态(1=待支付,2=已支付,3=已退款) |
| | | */ |
| | | @TableField("payStatus") |
| | | private Integer payStatus; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @TableField("payTime") |
| | | private Date payTime; |
| | | /** |
| | | * 第三方支付流水号 |
| | | */ |
| | | @TableField("payOrderNo") |
| | | private String payOrderNo; |
| | | /** |
| | | * 退款时间 |
| | | */ |
| | | @TableField("refundTime") |
| | | private Date refundTime; |
| | | /** |
| | | * 第三方退款流水 |
| | | */ |
| | | @TableField("refundOrderNo") |
| | | private String refundOrderNo; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.competition.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-26 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_competition") |
| | | public class TCompetition extends Model<TCompetition> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 省 |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @TableField("storeId") |
| | | private String storeId; |
| | | /** |
| | | * 赛事名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | | */ |
| | | @TableField("registerCondition") |
| | | private Integer registerCondition; |
| | | /** |
| | | * 报名开始年龄 |
| | | */ |
| | | @TableField("startAge") |
| | | private Integer startAge; |
| | | /** |
| | | * 报名结束年龄 |
| | | */ |
| | | @TableField("endAge") |
| | | private Integer endAge; |
| | | /** |
| | | * 现金支付价格 |
| | | */ |
| | | @TableField("cashPrice") |
| | | private Double cashPrice; |
| | | /** |
| | | * 玩湃币支付价格 |
| | | */ |
| | | @TableField("playPaiCoin") |
| | | private Integer playPaiCoin; |
| | | /** |
| | | * 课时支付价格 |
| | | */ |
| | | @TableField("classPrice") |
| | | private Integer classPrice; |
| | | /** |
| | | * 参加地址 |
| | | */ |
| | | @TableField("address") |
| | | private String address; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("longitude") |
| | | private String longitude; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("latitude") |
| | | private String latitude; |
| | | /** |
| | | * 报名人数 |
| | | */ |
| | | @TableField("applicantsNumber") |
| | | private Integer applicantsNumber; |
| | | /** |
| | | * 基础人数 |
| | | */ |
| | | @TableField("baseNumber") |
| | | private Integer baseNumber; |
| | | /** |
| | | * 是否需要实名(0=否,1=是) |
| | | */ |
| | | @TableField("realName") |
| | | private Integer realName; |
| | | /** |
| | | * 赛事封面图 |
| | | */ |
| | | @TableField("coverDrawing") |
| | | private String coverDrawing; |
| | | /** |
| | | * 赛事简介 |
| | | */ |
| | | @TableField("introduction") |
| | | private String introduction; |
| | | /** |
| | | * 赛事图片 |
| | | */ |
| | | @TableField("imgs") |
| | | private String imgs; |
| | | /** |
| | | * 报名须知 |
| | | */ |
| | | @TableField("registrationNotes") |
| | | private String registrationNotes; |
| | | /** |
| | | * 参赛省 |
| | | */ |
| | | @TableField("entryProvince") |
| | | private String entryProvince; |
| | | /** |
| | | * 参赛省编号 |
| | | */ |
| | | @TableField("entryProvinceCode") |
| | | private String entryProvinceCode; |
| | | /** |
| | | * 参赛市 |
| | | */ |
| | | @TableField("entryCity") |
| | | private String entryCity; |
| | | /** |
| | | * 参赛市编号 |
| | | */ |
| | | @TableField("entryCityCode") |
| | | private String entryCityCode; |
| | | /** |
| | | * 参赛地址 |
| | | */ |
| | | @TableField("entryAddress") |
| | | private String entryAddress; |
| | | /** |
| | | * 参赛经度 |
| | | */ |
| | | @TableField("entryLon") |
| | | private String entryLon; |
| | | /** |
| | | * 参赛纬度 |
| | | */ |
| | | @TableField("entryLat") |
| | | private String entryLat; |
| | | /** |
| | | * 审核状态(1=待审核,2=已通过,3=已拒绝) |
| | | */ |
| | | @TableField("auditStatus") |
| | | private Integer auditStatus; |
| | | /** |
| | | * 审核人id |
| | | */ |
| | | @TableField("auditUserId") |
| | | private Integer auditUserId; |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | @TableField("auditRemark") |
| | | private String auditRemark; |
| | | /** |
| | | * 状态(1=未开始,2=已开始,3=已结束,4=已取消) |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date insertTime; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.dsh.course.feignClient.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.feignClient.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import com.dsh.guns.modular.system.model.CoursePackagePayDTO; |
| | | import com.dsh.guns.modular.system.model.CoursePackagePaymentQuery; |
| | | import com.dsh.guns.modular.system.model.CoursePackagePaymentVO; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackagePaymentClient { |
| | | |
| | | |
| | | /** |
| | | * 获取报名订单记录列表 |
| | | */ |
| | | @RequestMapping("/registerOrder/listAllRegister") |
| | | List<RegisterOrderVO> listAllRegister(@RequestBody RegisterOrderQuery query); |
| | | /** |
| | | * 添加购课记录-后台 |
| | | * @return |
| | |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.course.feignClient.other.model.SiteChangeStateVO; |
| | | import com.dsh.course.feignClient.other.model.TSiteDTO; |
| | | import com.dsh.guns.modular.system.model.ExpireSiteSearchVO; |
| | | import com.dsh.guns.modular.system.model.SiteSearchVO; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface SiteClient { |
| | | |
| | | |
| | | /** |
| | | * 获取场地预约记录 |
| | | */ |
| | | @RequestMapping("/base/site/listAll") |
| | | List<SiteBooking> listAll(@RequestBody SiteBookingQuery query); |
| | | /** |
| | | * 上/下架、删除常见问题 type=1为上架 2为下架 3为删除 |
| | | */ |
New file |
| | |
| | | package com.dsh.course.util; |
| | | |
| | | |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * 定义生成随机码的工具类 |
| | | */ |
| | | public class UUIDUtil { |
| | | |
| | | private int i = 1; |
| | | |
| | | |
| | | /** |
| | | * 定义生成原生的UUID随机码 |
| | | * @return |
| | | */ |
| | | public static String getNativeUUID(){ |
| | | return UUID.randomUUID().toString(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生成32位随机码 |
| | | * @return |
| | | */ |
| | | public static String getRandomCode(){ |
| | | return UUIDUtil.getNativeUUID().replaceAll("-", ""); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取给定长度的随机码 |
| | | * @param num |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static String getRandomCode(Integer num) throws Exception{ |
| | | String str = null; |
| | | if(0 < num){ |
| | | if(num % 32 > 0){ |
| | | Integer s = num / 32; |
| | | Integer l = num % 32; |
| | | StringBuffer sb = new StringBuffer(); |
| | | for(int i = 0; i < s; i++){ |
| | | sb.append(UUIDUtil.getRandomCode()); |
| | | } |
| | | sb.append(UUIDUtil.getRandomCode().substring(0, l)); |
| | | str = sb.toString(); |
| | | }else if(num % 32 == 0){ |
| | | Integer s = num / 32; |
| | | StringBuffer sb = new StringBuffer(); |
| | | for(int i = 0; i < s; i++){ |
| | | sb.append(UUIDUtil.getRandomCode()); |
| | | } |
| | | str = sb.toString(); |
| | | }else{ |
| | | str = UUIDUtil.getRandomCode().substring(0, num); |
| | | } |
| | | }else{ |
| | | throw new Exception("参数只能大于0"); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取根据当前时间的字符串数据 |
| | | * @return |
| | | */ |
| | | public synchronized static String getTimeStr(){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmssS"); |
| | | return simpleDateFormat.format(new Date()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @Description: 获取数字随机码 |
| | | * @Author pzb |
| | | * @Date 2021/8/11 16:52 |
| | | * @Param |
| | | * @Return |
| | | * @Exception |
| | | */ |
| | | public static String getNumberRandom(Integer num){ |
| | | if(null == num){ |
| | | num = 32; |
| | | } |
| | | StringBuffer sb = new StringBuffer(); |
| | | for(int i = 0; i < num; i++){ |
| | | sb.append(Double.valueOf(Math.random() * 10).intValue()); |
| | | } |
| | | return sb.toString(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | import com.dsh.course.feignClient.account.*; |
| | | import com.dsh.course.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.CompetitionQuery; |
| | | import com.dsh.course.feignClient.competition.model.PaymentCompetition; |
| | | import com.dsh.course.feignClient.competition.model.TCompetition; |
| | | import com.dsh.course.feignClient.other.SiteClient; |
| | | import com.google.common.collect.Lists; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.FinanceClient; |
| | | import com.dsh.course.feignClient.account.model.*; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.course.CancelledClassesClient; |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentClient; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 财务控制器 |
| | |
| | | private FinanceClient financeClient; |
| | | @Autowired |
| | | private CancelledClassesClient cancelledClassesClient; |
| | | @Autowired |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private CoursePackagePaymentClient coursePackagePaymentClient; |
| | | @Autowired |
| | | private VipPaymentClient vipPaymentClient; |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | |
| | | |
| | | /** |
| | | * 跳转到充值记录页面 |
| | |
| | | return total; |
| | | } |
| | | /** |
| | | * 获取报名订单统计数据 |
| | | */ |
| | | @RequestMapping(value = "/getData") |
| | | @ResponseBody |
| | | public RegisterDataVO getData(String province,String city,Integer storeId,String registerTime |
| | | ,String userName,String phone,String studentName,String coursePackageName,String salesName,Integer orderSource) { |
| | | RegisterDataVO registerDataVO = new RegisterDataVO(); |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | query.setProvince(province); |
| | | query.setCity(city); |
| | | query.setStoreId(storeId); |
| | | query.setRegisterTime(registerTime); |
| | | query.setUserName(userName); |
| | | query.setUserIds(Lists.newArrayList()); |
| | | query.setPhone(phone); |
| | | query.setStudentName(studentName); |
| | | query.setStudentIds(Lists.newArrayList()); |
| | | query.setCoursePackageName(coursePackageName); |
| | | query.setSalesName(salesName); |
| | | query.setOrderSource(orderSource); |
| | | |
| | | AppUserByNameAndPhoneDTO appUserByNameAndPhoneDTO = new AppUserByNameAndPhoneDTO(); |
| | | appUserByNameAndPhoneDTO.setUserName(query.getUserName()); |
| | | appUserByNameAndPhoneDTO.setPhone(query.getPhone()); |
| | | List<TAppUser> tAppUsers = appUserClient.queryAPPUserByNameAndPhone(appUserByNameAndPhoneDTO); |
| | | // 使用 Stream API 将 tAppUsers 中的 id 收集到一个集合中 |
| | | List<Integer> userIds = tAppUsers.stream() |
| | | .map(TAppUser::getId) // 使用方法引用获取每个对象的 id |
| | | .collect(Collectors.toList()); |
| | | query.setUserIds(userIds); |
| | | if (userIds.size()!=0){ |
| | | List<RegisterOrderVO> registerOrderVOS = coursePackagePaymentClient.listAllRegister(query); |
| | | BigDecimal total = new BigDecimal("0.00"); |
| | | BigDecimal result = new BigDecimal("0.00"); |
| | | int playPaiCoin = 0 ; |
| | | for (RegisterOrderVO rechargeRecordsVO : registerOrderVOS) { |
| | | if (rechargeRecordsVO.getMoney()!=null){ |
| | | BigDecimal amount = rechargeRecordsVO.getMoney(); |
| | | total = total.add(amount); // 将新的值赋给total |
| | | result = result.add(amount); // 将新的值赋给result |
| | | } |
| | | if (rechargeRecordsVO.getPlayPaiCoin()!=null){ |
| | | playPaiCoin += rechargeRecordsVO.getPlayPaiCoin(); |
| | | } |
| | | } |
| | | registerDataVO.setCashPayment(total); |
| | | registerDataVO.setTotalOrder(registerOrderVOS.size()); |
| | | registerDataVO.setPlayPaiCoin(playPaiCoin); |
| | | } |
| | | return registerDataVO; |
| | | } |
| | | /** |
| | | * 跳转到消课记录页面 |
| | | */ |
| | | @RequestMapping("/cancelledClasses") |
| | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "CancelledClasses.html"; |
| | | } |
| | | /** |
| | | * 根据市获取门店 |
| | | */ |
| | | @RequestMapping(value = "/getStore") |
| | | @ResponseBody |
| | | public List<Store> getStore(String city) { |
| | | return storeClient.getStore(city); |
| | | } |
| | | /** |
| | | * 跳转到消课记录页面 |
| | | */ |
| | | @RequestMapping("/registrationOrder") |
| | | public String registrationOrder(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("userType",objectType); |
| | | model.addAttribute("roleType",objectType); |
| | | return PREFIX + "RegistrationOrder.html"; |
| | | } |
| | | /** |
| | | * 跳转到消课记录页面 |
| | | */ |
| | | @RequestMapping("/income") |
| | | public String income(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("roleType",objectType); |
| | | return PREFIX + "income.html"; |
| | | } |
| | | /** |
| | | * 获取收入管理列表 |
| | | */ |
| | | @RequestMapping(value = "/incomeListAll") |
| | | @ResponseBody |
| | | public List<IncomeVO> incomeListAll(String time,Integer incomeType,String userName,String amount) { |
| | | // 充值记录查询query |
| | | RechargeRecordsQuery rechargeRecordsQuery = new RechargeRecordsQuery(); |
| | | // 报名课程查询query |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | // 赛事活动查询query |
| | | CompetitionQuery competitionQuery = new CompetitionQuery(); |
| | | // 会员支付查询query |
| | | IncomeQuery incomeQuery = new IncomeQuery(); |
| | | // 场地预约记录查询query |
| | | SiteBookingQuery siteBookingQuery = new SiteBookingQuery(); |
| | | AppUserByNameAndPhoneDTO appUserByNameAndPhoneDTO = new AppUserByNameAndPhoneDTO(); |
| | | appUserByNameAndPhoneDTO.setUserName(userName); |
| | | if (userName!=null){ |
| | | if (!userName.equals("")){ |
| | | List<TAppUser> tAppUsers = appUserClient.queryAPPUserByNameAndPhone(appUserByNameAndPhoneDTO); |
| | | // 用户ids |
| | | List<Integer> collect = tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | competitionQuery.setUserIds(collect); |
| | | rechargeRecordsQuery.setUserIds(collect); |
| | | query.setUserIds(collect); |
| | | incomeQuery.setUserIds(collect); |
| | | siteBookingQuery.setUserIds(collect); |
| | | } |
| | | } |
| | | if (amount==null || amount.equals("")){ |
| | | siteBookingQuery.setAmount(null); |
| | | query.setAmount(null); |
| | | rechargeRecordsQuery.setAmount(null); |
| | | competitionQuery.setAmount(null); |
| | | incomeQuery.setAmount(null); |
| | | }else { |
| | | siteBookingQuery.setAmount(new BigDecimal(amount)); |
| | | query.setAmount(new BigDecimal(amount)); |
| | | rechargeRecordsQuery.setAmount(new BigDecimal(amount)); |
| | | competitionQuery.setAmount(new BigDecimal(amount)); |
| | | incomeQuery.setAmount(new BigDecimal(amount)); |
| | | } |
| | | |
| | | siteBookingQuery.setTime(time); |
| | | query.setRegisterTime(time); |
| | | rechargeRecordsQuery.setTime(time); |
| | | competitionQuery.setTime(time); |
| | | incomeQuery.setTime(time); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | IncomeVO incomeVO = new IncomeVO(); |
| | | List<IncomeVO> incomeVOS = new ArrayList<>(); |
| | | |
| | | if (roleType == 1){ |
| | | if ( incomeType==null || incomeType == 1){ |
| | | // 会员支付记录 |
| | | List<VipPayment> vipPayments = vipPaymentClient.registrationList(incomeQuery); |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | |
| | | TAppUser tAppUser = appUserClient.queryById(vipPayment.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(vipPayment.getId()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setAmount(new BigDecimal(vipPayment.getAmount().toString())); |
| | | temp.setIncomeType(1); |
| | | temp.setState(vipPayment.getState()); |
| | | temp.setInsertTime(vipPayment.getInsertTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | if ( incomeType==null || incomeType == 2) { |
| | | // 充值记录 |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(rechargeRecordsQuery); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | TAppUser tAppUser = appUserClient.queryById(rechargeRecordsVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(rechargeRecordsVO.getId().intValue()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(rechargeRecordsVO.getInsertTime()); |
| | | if (rechargeRecordsVO.getAmount() != null) { |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | temp.setIncomeType(2); |
| | | temp.setState(rechargeRecordsVO.getState()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | if ( incomeType==null || incomeType == 3) { |
| | | // 报名课程记录 |
| | | List<RegisterOrderVO> registerOrderVOS = coursePackagePaymentClient.listAllRegister(query); |
| | | for (RegisterOrderVO registerOrderVO : registerOrderVOS) { |
| | | if (registerOrderVO.getMoney() == null) { |
| | | continue; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(registerOrderVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(registerOrderVO.getId().intValue()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(registerOrderVO.getStoreName()); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(registerOrderVO.getInsertTime()); |
| | | if (registerOrderVO.getMoney() != null) { |
| | | temp.setAmount(registerOrderVO.getMoney()); |
| | | } |
| | | temp.setIncomeType(3); |
| | | temp.setState(registerOrderVO.getPayStatus()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | if(roleType !=3) { |
| | | if (incomeType == null || incomeType == 4) { |
| | | // 报名活动 |
| | | List<PaymentCompetition> competitions = competitionClient.listAllPayment(competitionQuery); |
| | | for (PaymentCompetition competition : competitions) { |
| | | if (competition.getPayStatus() == 3) { |
| | | continue; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(competition.getAppUserId()); |
| | | Competition competition1 = competitionClient.queryById(competition.getCompetitionId()); |
| | | Store store = storeClient.getStoreById(competition1.getStoreId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(competition.getId().intValue()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | | temp.setIncomeType(4); |
| | | temp.setState(competition.getPayStatus()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | } |
| | | if (incomeType == null || incomeType == 5) { |
| | | // 预约场地 |
| | | List<SiteBooking> siteBookings = siteClient.listAll(siteBookingQuery); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | if (siteBooking.getStatus() == 0 || siteBooking.getStatus() == 5 || siteBooking.getStatus() == 4) { |
| | | temp.setState(1); |
| | | } else { |
| | | temp.setState(2); |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(siteBooking.getAppUserId()); |
| | | Store store = storeClient.getStoreById(siteBooking.getStoreId()); |
| | | |
| | | temp.setId(siteBooking.getId()); |
| | | temp.setProvince(siteBooking.getProvince()); |
| | | temp.setCity(siteBooking.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(siteBooking.getInsertTime()); |
| | | if (siteBooking.getPayMoney() != null) { |
| | | temp.setAmount(new BigDecimal(siteBooking.getPayMoney().toString())); |
| | | } |
| | | temp.setIncomeType(5); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | } |
| | | return incomeVOS; |
| | | } |
| | | /** |
| | | * 获取收入管理列表 |
| | | */ |
| | | @RequestMapping(value = "/getIncomeData") |
| | | @ResponseBody |
| | | public Object getIncomeData(String time,Integer incomeType,String userName,String amount) { |
| | | // 充值记录查询query |
| | | RechargeRecordsQuery rechargeRecordsQuery = new RechargeRecordsQuery(); |
| | | // 报名课程查询query |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | // 赛事活动查询query |
| | | CompetitionQuery competitionQuery = new CompetitionQuery(); |
| | | // 会员支付查询query |
| | | IncomeQuery incomeQuery = new IncomeQuery(); |
| | | // 场地预约记录查询query |
| | | SiteBookingQuery siteBookingQuery = new SiteBookingQuery(); |
| | | AppUserByNameAndPhoneDTO appUserByNameAndPhoneDTO = new AppUserByNameAndPhoneDTO(); |
| | | appUserByNameAndPhoneDTO.setUserName(userName); |
| | | if (userName!=null){ |
| | | if (!userName.equals("")){ |
| | | List<TAppUser> tAppUsers = appUserClient.queryAPPUserByNameAndPhone(appUserByNameAndPhoneDTO); |
| | | // 用户ids |
| | | List<Integer> collect = tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | competitionQuery.setUserIds(collect); |
| | | rechargeRecordsQuery.setUserIds(collect); |
| | | query.setUserIds(collect); |
| | | incomeQuery.setUserIds(collect); |
| | | siteBookingQuery.setUserIds(collect); |
| | | } |
| | | } |
| | | if (amount==null || amount.equals("")){ |
| | | siteBookingQuery.setAmount(null); |
| | | query.setAmount(null); |
| | | rechargeRecordsQuery.setAmount(null); |
| | | competitionQuery.setAmount(null); |
| | | incomeQuery.setAmount(null); |
| | | }else { |
| | | siteBookingQuery.setAmount(new BigDecimal(amount)); |
| | | query.setAmount(new BigDecimal(amount)); |
| | | rechargeRecordsQuery.setAmount(new BigDecimal(amount)); |
| | | competitionQuery.setAmount(new BigDecimal(amount)); |
| | | incomeQuery.setAmount(new BigDecimal(amount)); |
| | | } |
| | | |
| | | siteBookingQuery.setTime(time); |
| | | query.setRegisterTime(time); |
| | | rechargeRecordsQuery.setTime(time); |
| | | competitionQuery.setTime(time); |
| | | incomeQuery.setTime(time); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | IncomeVO incomeVO = new IncomeVO(); |
| | | List<IncomeVO> incomeVOS = new ArrayList<>(); |
| | | |
| | | if (roleType == 1){ |
| | | if ( incomeType==null || incomeType == 1){ |
| | | // 会员支付记录 |
| | | List<VipPayment> vipPayments = vipPaymentClient.registrationList(incomeQuery); |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | |
| | | TAppUser tAppUser = appUserClient.queryById(vipPayment.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(vipPayment.getId()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setAmount(new BigDecimal(vipPayment.getAmount().toString())); |
| | | temp.setIncomeType(1); |
| | | temp.setState(vipPayment.getState()); |
| | | temp.setInsertTime(vipPayment.getInsertTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | if ( incomeType==null || incomeType == 2) { |
| | | // 充值记录 |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(rechargeRecordsQuery); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | TAppUser tAppUser = appUserClient.queryById(rechargeRecordsVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(rechargeRecordsVO.getId().intValue()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(rechargeRecordsVO.getInsertTime()); |
| | | if (rechargeRecordsVO.getAmount() != null) { |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | temp.setIncomeType(2); |
| | | temp.setState(rechargeRecordsVO.getState()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | if ( incomeType==null || incomeType == 3) { |
| | | // 报名课程记录 |
| | | List<RegisterOrderVO> registerOrderVOS = coursePackagePaymentClient.listAllRegister(query); |
| | | for (RegisterOrderVO registerOrderVO : registerOrderVOS) { |
| | | if (registerOrderVO.getMoney() == null) { |
| | | continue; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(registerOrderVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(registerOrderVO.getId().intValue()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(registerOrderVO.getStoreName()); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(registerOrderVO.getInsertTime()); |
| | | if (registerOrderVO.getMoney() != null) { |
| | | temp.setAmount(registerOrderVO.getMoney()); |
| | | } |
| | | temp.setIncomeType(3); |
| | | temp.setState(registerOrderVO.getPayStatus()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | if(roleType !=3) { |
| | | if (incomeType == null || incomeType == 4) { |
| | | // 报名活动 |
| | | List<PaymentCompetition> competitions = competitionClient.listAllPayment(competitionQuery); |
| | | for (PaymentCompetition competition : competitions) { |
| | | if (competition.getPayStatus() == 3) { |
| | | continue; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(competition.getAppUserId()); |
| | | Competition competition1 = competitionClient.queryById(competition.getCompetitionId()); |
| | | Store store = storeClient.getStoreById(competition1.getStoreId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(competition.getId().intValue()); |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | | temp.setIncomeType(4); |
| | | temp.setState(competition.getPayStatus()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | } |
| | | if (incomeType == null || incomeType == 5) { |
| | | // 预约场地 |
| | | List<SiteBooking> siteBookings = siteClient.listAll(siteBookingQuery); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | if (siteBooking.getStatus() == 0 || siteBooking.getStatus() == 5 || siteBooking.getStatus() == 4) { |
| | | temp.setState(1); |
| | | } else { |
| | | temp.setState(2); |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(siteBooking.getAppUserId()); |
| | | Store store = storeClient.getStoreById(siteBooking.getStoreId()); |
| | | |
| | | temp.setId(siteBooking.getId()); |
| | | temp.setProvince(siteBooking.getProvince()); |
| | | temp.setCity(siteBooking.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | temp.setInsertTime(siteBooking.getInsertTime()); |
| | | if (siteBooking.getPayMoney() != null) { |
| | | temp.setAmount(new BigDecimal(siteBooking.getPayMoney().toString())); |
| | | } |
| | | temp.setIncomeType(5); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | } |
| | | BigDecimal totalAmount = BigDecimal.ZERO; // 初始化累加变量为0 |
| | | |
| | | for (IncomeVO vo : incomeVOS) { |
| | | BigDecimal totalMoney = vo.getAmount(); |
| | | totalAmount = totalAmount.add(totalMoney); // 累加每个IncomeVO对象的amount |
| | | } |
| | | return totalAmount; |
| | | } |
| | | /** |
| | | * 获取消课记录 |
| | |
| | | coachQuery.setTime(beginTime); |
| | | return cancelledClassesClient.listAll(coachQuery); |
| | | } |
| | | /** |
| | | * 获取报名订单记录 |
| | | */ |
| | | @RequestMapping(value = "/registerListAll") |
| | | @ResponseBody |
| | | public List<RegisterOrderVO> registerListAll(String province,String city,Integer storeId,String registerTime |
| | | ,String userName,String phone,String studentName,String coursePackageName,String salesName,Integer orderSource) { |
| | | RegisterOrderQuery query = new RegisterOrderQuery(); |
| | | query.setProvince(province); |
| | | query.setCity(city); |
| | | query.setStoreId(storeId); |
| | | query.setRegisterTime(registerTime); |
| | | query.setUserName(userName); |
| | | query.setUserIds(Lists.newArrayList()); |
| | | query.setPhone(phone); |
| | | query.setStudentName(studentName); |
| | | query.setStudentIds(Lists.newArrayList()); |
| | | query.setCoursePackageName(coursePackageName); |
| | | query.setSalesName(salesName); |
| | | query.setOrderSource(orderSource); |
| | | AppUserByNameAndPhoneDTO appUserByNameAndPhoneDTO = new AppUserByNameAndPhoneDTO(); |
| | | appUserByNameAndPhoneDTO.setUserName(query.getUserName()); |
| | | appUserByNameAndPhoneDTO.setPhone(query.getPhone()); |
| | | List<TAppUser> tAppUsers = appUserClient.queryAPPUserByNameAndPhone(appUserByNameAndPhoneDTO); |
| | | // 使用 Stream API 将 tAppUsers 中的 id 收集到一个集合中 |
| | | List<Integer> userIds = tAppUsers.stream() |
| | | .map(TAppUser::getId) // 使用方法引用获取每个对象的 id |
| | | .collect(Collectors.toList()); |
| | | query.setUserIds(userIds); |
| | | if (userIds.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | return coursePackagePaymentClient.listAllRegister(query); |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 通过用户姓名和电话进行模糊查询DTO |
| | | */ |
| | | @Data |
| | | public class AppUserByNameAndPhoneDTO { |
| | | private String userName; |
| | | private String phone; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 收入管理Query |
| | | */ |
| | | @Data |
| | | public class IncomeQuery { |
| | | // 收入时间 |
| | | private String time; |
| | | // 收入类型 |
| | | private Integer incomeType; |
| | | // 用户姓名 |
| | | private String userName; |
| | | // 收入金额 |
| | | private BigDecimal amount; |
| | | // 用户ids |
| | | private List<Integer> userIds; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 收入管理列表VO |
| | | */ |
| | | @Data |
| | | public class IncomeVO { |
| | | /** |
| | | {title: '所在省', field: 'province', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '所在市', field: 'city', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '消费门店', field: 'storeName', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '用户姓名', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '金 额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '收入类型', field: 'incomeType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) {return{1:"加入会员",2:"充值",3:"报名课程",4:"报名赛事活动",5:"预约场地"}[data]}}, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle',formatter:function (data) {return{1:"已支付",2:"未支付"}[data]}} |
| | | */ |
| | | private Integer id; |
| | | private String province; |
| | | private String city; |
| | | private String storeName; |
| | | private String payUser; |
| | | private String phone; |
| | | private BigDecimal amount; |
| | | private Integer incomeType; |
| | | private Integer state; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | } |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 充值记录列表查询Query |
| | |
| | | * 1 = 会员 2 =非会员 |
| | | */ |
| | | private Integer type; |
| | | |
| | | private List<Integer> userIds; |
| | | private BigDecimal amount; |
| | | } |
| | |
| | | * 1 = 会员 2 =非会员 |
| | | */ |
| | | private Integer type; |
| | | |
| | | private Integer appUserId; |
| | | private Integer state; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 报名订单统计数据VO |
| | | */ |
| | | @Data |
| | | public class RegisterDataVO { |
| | | |
| | | private Integer totalOrder; |
| | | private BigDecimal cashPayment; |
| | | |
| | | private Integer playPaiCoin; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 报名订单列表查询Query |
| | | */ |
| | | @Data |
| | | public class RegisterOrderQuery { |
| | | // 省 |
| | | private String province; |
| | | // 市 |
| | | private String city; |
| | | // 门店名称 |
| | | private Integer storeId; |
| | | // 报名时间 |
| | | private String registerTime; |
| | | // 购买用户 |
| | | private String userName; |
| | | // 购买用户ids |
| | | private List<Integer> userIds; |
| | | // 联系方式 |
| | | private String phone; |
| | | // 报名学员 |
| | | private String studentName; |
| | | // 报名学员ids |
| | | private List<Integer> studentIds; |
| | | // 课包名称 |
| | | private String coursePackageName; |
| | | // 销售人员 |
| | | private String salesName; |
| | | // 订单来源 |
| | | private Integer orderSource; |
| | | // 订单金额 |
| | | private BigDecimal amount; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 报名订单列表VO |
| | | */ |
| | | @Data |
| | | public class RegisterOrderVO { |
| | | /** |
| | | * |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '所属门店', field: 'storeName', visible: role!=3?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '报名学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '报名时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'payMoneyAndType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源', field: 'payUserType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) {return{1:"线上",2:"线下"}[data]}}, |
| | | {title: '销售人员', field: 'salesName', visible: true, align: 'center', valign: 'middle'} |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | private Long id; |
| | | private String provinceAndCity; |
| | | // 门店id |
| | | private Integer storeId; |
| | | private String storeName; |
| | | |
| | | private String coursePackageName; |
| | | private Integer coursePackageId; |
| | | // 用户id |
| | | private Integer appUserId; |
| | | private String payUser; |
| | | private String phone; |
| | | // 学员id |
| | | private Integer studentId; |
| | | private String payStudent; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | // 支付金额 |
| | | private BigDecimal money; |
| | | // 玩湃币价格/积分 |
| | | private Integer playPaiCoin; |
| | | // 该字段用于展示在前端 |
| | | private String payMoneyAndType; |
| | | // 订单来源 2 为线下购买 1为线上 |
| | | private Integer payUserType; |
| | | // 销售人员 |
| | | private String salesName; |
| | | // 支付方式 |
| | | private Integer payType; |
| | | private Integer payStatus; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/13 16:11 |
| | | */ |
| | | @Data |
| | | @TableName("t_site_booking") |
| | | public class SiteBooking { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 业务流水号 |
| | | */ |
| | | @TableField("orderNo") |
| | | private String orderNo; |
| | | /** |
| | | * 省 |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 市名称 |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @TableField("storeId") |
| | | private Integer storeId; |
| | | /** |
| | | * 场地id |
| | | */ |
| | | @TableField("siteId") |
| | | private Integer siteId; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | * 预约时段 |
| | | */ |
| | | @TableField("times") |
| | | private String times; |
| | | /** |
| | | * 预约开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @ApiModelProperty("预约开始时间") |
| | | private Date startTime; |
| | | /** |
| | | * 预约结束 |
| | | */ |
| | | @TableField("endTime") |
| | | @ApiModelProperty("预约结束时间") |
| | | private Date endTime; |
| | | /** |
| | | * 预约人 |
| | | */ |
| | | @TableField("booker") |
| | | @ApiModelProperty("预约人") |
| | | private String booker; |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @TableField("phone") |
| | | @ApiModelProperty("联系方式") |
| | | private String phone; |
| | | /** |
| | | * 支付方式(1=微信,2=支付宝,3=玩湃比,4=手动支付) |
| | | */ |
| | | @TableField("payType") |
| | | private Integer payType; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @TableField("payTime") |
| | | @ApiModelProperty("支付时间") |
| | | private Date payTime; |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | @TableField("payMoney") |
| | | @ApiModelProperty("支付金额") |
| | | private Double payMoney; |
| | | /** |
| | | * 优惠券id |
| | | */ |
| | | @TableField("userCouponId") |
| | | private Long userCouponId; |
| | | /** |
| | | * 状态(0=待支付,1=待核销,2=已到店,3=已完成,4=已过期,5=已取消) |
| | | */ |
| | | @TableField("status") |
| | | @ApiModelProperty("0=待支付,1=待核销,2=已到店,3=已完成,4=已过期,5=已取消") |
| | | private Integer status; |
| | | /** |
| | | * 第三方支付流水号 |
| | | */ |
| | | @TableField("payOrderNo") |
| | | private String payOrderNo; |
| | | /** |
| | | * 手动支付操作用户id |
| | | */ |
| | | @TableField("payUserId") |
| | | private Integer payUserId; |
| | | /** |
| | | * 取消用户id |
| | | */ |
| | | @TableField("cancelUserId") |
| | | private Integer cancelUserId; |
| | | /** |
| | | * 取消凭证 |
| | | */ |
| | | @TableField("voucher") |
| | | private String voucher; |
| | | /** |
| | | * 取消备注 |
| | | */ |
| | | @TableField("remark") |
| | | private String remark; |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @TableField("cancelTime") |
| | | private Date cancelTime; |
| | | /** |
| | | * 第三方取消退款流水号 |
| | | */ |
| | | @TableField("refundOrderNo") |
| | | private String refundOrderNo; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | @TableField("nextName") |
| | | @ApiModelProperty("场地名称") |
| | | private String nextName; |
| | | @TableField("isHalf") |
| | | @ApiModelProperty("半场 是否半场 1是 2否") |
| | | private Integer isHalf; |
| | | @TableField("halfName") |
| | | @ApiModelProperty("半场名称 ") |
| | | private String halfName; |
| | | @TableField("goType") |
| | | private Integer goType; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 场地预约记录Query |
| | | */ |
| | | @Data |
| | | public class SiteBookingQuery { |
| | | // 收入时间 |
| | | private String time; |
| | | // 收入金额 |
| | | private BigDecimal amount; |
| | | // 用户ids |
| | | private List<Integer> userIds; |
| | | |
| | | } |
| | |
| | | */ |
| | | @TableField("payUserName") |
| | | private String payUserName; |
| | | /** |
| | | * 销售人员(线下购课添加购课订单时使用) |
| | | */ |
| | | @TableField("salesName") |
| | | private String salesName; |
| | | } |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="beginTime" name="有效期" isTime="false"/> |
| | | <#TimeCon id="beginTime" name="消课时间" isTime="false"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | ,lang:"CN" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-title"> |
| | | <h5>报名订单</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="registerTime" name="收入时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="orderSource" name="收入类型" > |
| | | <option value="">全部</option> |
| | | @if(roleType == 1){ |
| | | <option value="1">加入会员</option> |
| | | <option value="2">充值</option> |
| | | @} |
| | | <option value="3">报名课程</option> |
| | | @if(roleType != 3){ |
| | | <option value="4">报名赛事活动</option> |
| | | @} |
| | | <option value="5">预约场地</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userName" name="用户姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="money" name="收入金额" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-title" style="display: flex"> |
| | | <h3 id ="totalMoney"></h3><h3>元</h3> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/finance/income.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#registerTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-title"> |
| | | <h5>报名订单</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | @if(roleType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true" > |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" onchange="TCompetition.getStore(this)" id="cCode"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType!=3){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"> |
| | | 所属门店 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="store"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="registerTime" name="报名时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userName" name="购买用户" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="联系方式" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="studentName" name="报名学员" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="coursePackageName" name="课包名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="orderSource" name="订单来源" > |
| | | <option value="">全部</option> |
| | | <option value="1">线上购课</option> |
| | | <option value="2">到店购课</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="salesName" name="销售人员" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-title" style="display: flex"> |
| | | <h3 id ="totalOrder"></h3> |
| | | <h3 id ="cashPayment"></h3><h3>元</h3> |
| | | <h3 id ="playPaiCoin"></h3> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/finance/RegistrationOrder.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#registerTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | }else{ |
| | | queryData['province'] = ""; |
| | | } |
| | | |
| | | queryData['city'] = $("#cCode").val(); |
| | | queryData['coursePackageTypeId'] = $("#coursePackage").val(); |
| | | queryData['coursePackageTypeName'] = $("#coursePackageName").val(); |
| | |
| | | }; |
| | | |
| | | TCompetition.threeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content1); |
| | | }); |
| | | ajax2.set("city",oneId); |
| | | ajax2.start(); |
| | | }; |
| | | TCompetition.fourChange = function (e) { |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | $.each(data, function(k,v) { |
| | |
| | | ajax2.set("city",e); |
| | | ajax2.start(); |
| | | }; |
| | | |
| | | |
| | | TCompetition.getStudent = function () { |
| | | var phone = $("#vipPhone").val(); |
| | |
| | | if (option.text === city) { |
| | | option.selected = true; |
| | | c = option.text; |
| | | |
| | | TCompetition.threeChange(c) |
| | | TCompetition.fourChange(c) |
| | | |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | var roleType =$("#roleType").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '所属门店', field: 'storeName', visible: roleType!=3?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '报名学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '报名时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'payMoneyAndType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'coursePackageName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源', field: 'payUserType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"线上",2:"线下"}[data] |
| | | } |
| | | }, |
| | | {title: '销售人员', field: 'salesName', visible: true, align: 'center', valign: 'middle', |
| | | |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | TCompetition.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.getStore = function () { |
| | | console.log("调用") |
| | | var city = $('#cCode option:selected').text(); |
| | | var ajax = new $ax(Feng.ctxPath + "/finance/getStore", function (data) { |
| | | if (data != null) { |
| | | var content = '<option value="">请选择</option>'; |
| | | $.each(data, function (k, v) { |
| | | content += "<option value='" + v.id + "'>" + v.name + "</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("city", city); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#pCode").val(); |
| | | queryData['city'] = $("#cCode").val(); |
| | | queryData['storeId'] = $("#store").val(); |
| | | queryData['registerTime'] = $("#registerTime").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['studentName'] = $("#studentName").val(); |
| | | queryData['coursePackageName'] = $("#coursePackageName").val(); |
| | | queryData['orderSource'] = $("#orderSource").val(); |
| | | queryData['salesName'] = $("#salesName").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | TCompetition.getData(); |
| | | }; |
| | | TCompetition.getData = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/finance/getData", function (data) { |
| | | var t1 = document.getElementById("totalOrder"); |
| | | var t2 = document.getElementById("cashPayment"); |
| | | var t3 = document.getElementById("playPaiCoin"); |
| | | t1.innerText = "总订单数:"+data.totalOrder+" "; |
| | | t2.innerText = "现金总收入:"+data.cashPayment+" "; |
| | | t3.innerText = "玩湃币总消耗:"+data.playPaiCoin+" "; |
| | | }); |
| | | ajax.set("province",$("#pCode").val()); |
| | | ajax.set("city",$("#cCode").val()); |
| | | ajax.set("storeId",$("#store").val()); |
| | | ajax.set("registerTime",$("#registerTime").val()); |
| | | ajax.set("userName",$("#userName").val()); |
| | | ajax.set("phone",$("#phone").val()); |
| | | ajax.set("studentName",$("#studentName").val()); |
| | | ajax.set("coursePackageName",$("#coursePackageName").val()); |
| | | ajax.set("orderSource",$("#orderSource").val()); |
| | | ajax.set("salesName",$("#salesName").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#store").val(""); |
| | | $("#registerTime").val(""); |
| | | $("#userName").val(""); |
| | | $("#phone").val(""); |
| | | $("#beginTime").val(""); |
| | | $("#studentName").val(""); |
| | | $("#coursePackageName").val(""); |
| | | $("#orderSource").val(""); |
| | | $("#salesName").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/finance/registerListAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCompetition.table = table.init(); |
| | | TCompetition.getData(); |
| | | }); |
| | | |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '消课凭证', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '消课凭证', field: 'voucher', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '消课数量', field: 'cancelledClassesNumber', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: objectType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '上课门店', field: 'storeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '学员姓名', field: 'studentName', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | |
| | | TCompetition.lookCancellationRecord = function(){ |
| | | if(this.check()){ |
| | | |
| | | let imgs = ClassRecord.seItem.cancelClasses.split(";"); |
| | | let imgs = TCompetition.seItem.voucher.split(";"); |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">课程名称:' + $("#name").text() + '</label>\n' + |
| | | ' <label class="col-sm-8 control-label">课程名称:' + TCompetition.seItem.courseName + '</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">*上传凭证(请上传小于5张图片):</label>\n' + |
| | | ' <label class="col-sm-8 control-label">*上传凭证:</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <div class="col-sm-8" style="min-height: 200px;">\n' + |
| | |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">扣除课时数:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="deductClassHour" value="' + ClassRecord.seItem.deductClassHour + '" type="number" min="0">' + |
| | | ' <input class="form-control" id="deductClassHour" value="' + TCompetition.seItem.cancelledClassesNumber + '" type="number" min="0">' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | var roleType =$("#roleType").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省', field: 'province', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '所在市', field: 'city', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '消费门店', field: 'storeName', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '用户姓名', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '金 额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '消费时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '收入类型', field: 'incomeType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"加入会员",2:"充值",3:"报名课程",4:"报名赛事活动",5:"预约场地"}[data] |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"已支付",2:"未支付"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | TCompetition.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.getStore = function () { |
| | | console.log("调用") |
| | | var city = $('#cCode option:selected').text(); |
| | | var ajax = new $ax(Feng.ctxPath + "/finance/getStore", function (data) { |
| | | if (data != null) { |
| | | var content = '<option value="">请选择</option>'; |
| | | $.each(data, function (k, v) { |
| | | content += "<option value='" + v.id + "'>" + v.name + "</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("city", city); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#pCode").val(); |
| | | queryData['city'] = $("#cCode").val(); |
| | | queryData['storeId'] = $("#store").val(); |
| | | queryData['time'] = $("#registerTime").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['studentName'] = $("#studentName").val(); |
| | | queryData['coursePackageName'] = $("#coursePackageName").val(); |
| | | queryData['incomeType'] = $("#orderSource").val(); |
| | | queryData['amount'] = $("#money").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | TCompetition.getData(); |
| | | }; |
| | | TCompetition.getData = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/finance/getIncomeData", function (data) { |
| | | var t1 = document.getElementById("totalMoney"); |
| | | |
| | | t1.innerText = "收入总金额:"+data; |
| | | |
| | | }); |
| | | ajax.set("province",$("#pCode").val()); |
| | | ajax.set("city",$("#cCode").val()); |
| | | ajax.set("storeId",$("#store").val()); |
| | | ajax.set("time",$("#registerTime").val()); |
| | | ajax.set("userName",$("#userName").val()); |
| | | ajax.set("phone",$("#phone").val()); |
| | | ajax.set("studentName",$("#studentName").val()); |
| | | ajax.set("coursePackageName",$("#coursePackageName").val()); |
| | | ajax.set("incomeType",$("#orderSource").val()); |
| | | ajax.set("amount",$("#money").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#store").val(""); |
| | | $("#registerTime").val(""); |
| | | $("#userName").val(""); |
| | | $("#phone").val(""); |
| | | $("#beginTime").val(""); |
| | | $("#studentName").val(""); |
| | | $("#coursePackageName").val(""); |
| | | $("#orderSource").val(""); |
| | | $("#money").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/finance/incomeListAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCompetition.table = table.init(); |
| | | TCompetition.getData(); |
| | | }); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 获取场地预约记录 |
| | | */ |
| | | @RequestMapping("/base/site/listAll") |
| | | public List<SiteBooking> listAll(@RequestBody SiteBookingQuery query){ |
| | | return siteBookingService.listAll(query); |
| | | } |
| | | /** |
| | | * 获取所有场地 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/site/list") |
| | | public List<TSiteDTO> listAll(@RequestBody SiteSearchVO vo){ |
| | | |
| | | return siteTypeService.listAll(vo); |
| | | |
| | | } |
| | | /** |
| | | * 获取场地有效期在两个月内的场地列表 |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | @TableField("nextName") |
| | | @ApiModelProperty("场地名称") |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.model.BillingRequestOfType; |
| | | import com.dsh.other.model.SiteBookingQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public interface SiteBookingMapper extends BaseMapper<SiteBooking> { |
| | | List<BillingRequestOfType> queryDatas(Integer appUserId, String monthStart, String monthEnd); |
| | | |
| | | List<SiteBooking> listAll(@Param("query")SiteBookingQuery query, @Param("sTime")String sTime, @Param("eTime")String eTime, @Param("amount") BigDecimal amount); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 场地预约记录Query |
| | | */ |
| | | @Data |
| | | public class SiteBookingQuery { |
| | | // 收入时间 |
| | | private String time; |
| | | // 收入金额 |
| | | private BigDecimal amount; |
| | | // 用户ids |
| | | private List<Integer> userIds; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.model.BillingRequestOfType; |
| | | import com.dsh.other.model.SiteBookingQuery; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public interface ISiteBookingService extends IService<SiteBooking> { |
| | | List<BillingRequestOfType> queryDatas(Integer appUserId, String monthStart, String monthEnd); |
| | | |
| | | List<SiteBooking> listAll(SiteBookingQuery query); |
| | | } |
| | |
| | | import com.dsh.other.entity.SiteBooking; |
| | | import com.dsh.other.mapper.SiteBookingMapper; |
| | | import com.dsh.other.model.BillingRequestOfType; |
| | | import com.dsh.other.model.SiteBookingQuery; |
| | | import com.dsh.other.service.ISiteBookingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | public class SiteBookingServiceImpl extends ServiceImpl<SiteBookingMapper, SiteBooking> implements ISiteBookingService { |
| | | @Autowired |
| | | private SiteBookingMapper siteBookingMapper; |
| | | @Override |
| | | public List<BillingRequestOfType> queryDatas(Integer appUserId, String monthStart, String monthEnd) { |
| | | return this.baseMapper.queryDatas(appUserId,monthStart,monthEnd); |
| | | } |
| | | |
| | | @Override |
| | | public List<SiteBooking> listAll(SiteBookingQuery query) { |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getTime())) { |
| | | STime = query.getTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | |
| | | return siteBookingMapper.listAll(query,STime,ETime,query.getAmount()); |
| | | } |
| | | } |
| | |
| | | and appUserId = #{appUserId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="listAll" resultType="com.dsh.other.entity.SiteBooking"> |
| | | select * from t_site_booking t1 |
| | | <where> |
| | | <if test="amount!=null and amount!= ''"> |
| | | and t1.payMoney <= #{amount} |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t1.appUserId IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |