用户购水卡和用户充值卡账单明细的逻辑实现
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
package com.fastbee.rechargecard.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户充值卡账单明细记录对象 user_consumption_details
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-18
|
||||
*/
|
||||
@ApiModel(value = "UserConsumptionDetails",description = "用户充值卡账单明细记录 user_consumption_details")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserConsumptionDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 关联用户 */
|
||||
@Excel(name = "关联用户")
|
||||
@ApiModelProperty("关联用户")
|
||||
private Long userId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
private String deviceNumber;
|
||||
|
||||
/** 购水卡卡号 */
|
||||
@Excel(name = "购水卡卡号")
|
||||
@ApiModelProperty("购水卡卡号")
|
||||
private String cardNumber;
|
||||
|
||||
/** 所属项目id */
|
||||
@Excel(name = "所属项目id")
|
||||
@ApiModelProperty("所属项目id")
|
||||
private Long projectId;
|
||||
|
||||
/** 所属机构 */
|
||||
@Excel(name = "所属机构")
|
||||
@ApiModelProperty("所属机构")
|
||||
private Long deptId;
|
||||
|
||||
/** 0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费) */
|
||||
@Excel(name = "0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费)")
|
||||
@ApiModelProperty("0充值,1刷卡(灌溉消费:刷卡开泵到刷卡关泵期间产生的消费)")
|
||||
private Integer billingType;
|
||||
|
||||
/** 开泵时长 */
|
||||
@Excel(name = "开泵时长")
|
||||
@ApiModelProperty("开泵时长")
|
||||
private BigDecimal pumpTime;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 总价(数量 * 单价) */
|
||||
@Excel(name = "总价", readConverterExp = "数=量,*=,单=价")
|
||||
@ApiModelProperty("总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 折扣金额 */
|
||||
@Excel(name = "折扣金额")
|
||||
@ApiModelProperty("折扣金额")
|
||||
private BigDecimal discount;
|
||||
|
||||
/** 税金 */
|
||||
@Excel(name = "税金")
|
||||
@ApiModelProperty("税金")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/** 应付金额(总价-折扣金额-税金) */
|
||||
@Excel(name = "应付金额", readConverterExp = "总=价-折扣金额-税金")
|
||||
@ApiModelProperty("应付金额")
|
||||
private BigDecimal amountDue;
|
||||
|
||||
/** 账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年 */
|
||||
@Excel(name = "账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年")
|
||||
@ApiModelProperty("账单所属的周期单位,0:小时、1:天、2:周、3:月、4:季度、5:年")
|
||||
private Integer billingPeriodUnit;
|
||||
|
||||
/** 账单周期时长 */
|
||||
@Excel(name = "账单周期时长")
|
||||
@ApiModelProperty("账单周期时长")
|
||||
private BigDecimal billingPeriodDuration;
|
||||
|
||||
/** 账单生成的日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "账单生成的日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("账单生成的日期")
|
||||
private Date billingDate;
|
||||
|
||||
/** 开泵时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("开泵时间")
|
||||
private Date startTime;
|
||||
|
||||
/** 关泵时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("关泵时间")
|
||||
private Date endTime;
|
||||
|
||||
/** 表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付” */
|
||||
@Excel(name = "表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付”")
|
||||
@ApiModelProperty("表明账单是否已支付,0:“未支付”、1:“部分支付”、2:“已支付”")
|
||||
private Integer paymentStatus;
|
||||
|
||||
/** 用户支付账单的方式1微信,2支付宝,3银联 */
|
||||
@Excel(name = "用户支付账单的方式1微信,2支付宝,3银联")
|
||||
@ApiModelProperty("用户支付账单的方式1微信,2支付宝,3银联")
|
||||
private Integer paymentMethod;
|
||||
|
||||
/** 账单支付的时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = " 账单支付的时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(" 账单支付的时间")
|
||||
private Date paymentTime;
|
||||
|
||||
/** 账单的当前状态,0:已支付、1:已取消 */
|
||||
@Excel(name = "账单的当前状态,0:已支付、1:已取消")
|
||||
@ApiModelProperty("账单的当前状态,0:已支付、1:已取消")
|
||||
private Integer status;
|
||||
|
||||
/** 关于账单的额外信息或备注 */
|
||||
@Excel(name = "关于账单的额外信息或备注")
|
||||
@ApiModelProperty("关于账单的额外信息或备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.fastbee.rechargecard.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户充值卡对象 user_recharge_cards
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-17
|
||||
*/
|
||||
@ApiModel(value = "UserRechargeCards",description = "用户充值卡 user_recharge_cards")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserRechargeCards extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
@ApiModelProperty("用户名")
|
||||
private String userName;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
/** 所属项目ID */
|
||||
@Excel(name = "所属项目ID")
|
||||
@ApiModelProperty("所属项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/** 所属机构ID */
|
||||
@Excel(name = "所属机构ID")
|
||||
@ApiModelProperty("所属机构ID")
|
||||
private Long deptId;
|
||||
|
||||
/** 账户余额 */
|
||||
@Excel(name = "账户余额")
|
||||
@ApiModelProperty("账户余额")
|
||||
private BigDecimal balance;
|
||||
|
||||
/** 充值卡号 */
|
||||
@Excel(name = "充值卡号")
|
||||
@ApiModelProperty("充值卡号")
|
||||
private String cardNumber;
|
||||
|
||||
/** 充值卡密码 */
|
||||
@Excel(name = "充值卡密码")
|
||||
@ApiModelProperty("充值卡密码")
|
||||
private String cardPassword;
|
||||
|
||||
/** 发行日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "发行日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("发行日期")
|
||||
private Date issueDate;
|
||||
|
||||
/** 有效期至 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "有效期至", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("有效期至")
|
||||
private Date expirationDate;
|
||||
|
||||
/** 状态,如:0正常使用,1禁用 */
|
||||
@Excel(name = "状态,如:0正常使用,1禁用")
|
||||
@ApiModelProperty("状态,如:0正常使用,1禁用")
|
||||
private Integer status;
|
||||
|
||||
/** 逻辑删除标志,0存在,2已删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 终端用户id */
|
||||
@Excel(name = "终端用户id")
|
||||
@ApiModelProperty("终端用户id")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.fastbee.rechargecard.domain;
|
||||
|
||||
public class test {
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.fastbee.rechargecard.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 用户充值卡账单明细记录Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-18
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserConsumptionDetailsMapper
|
||||
{
|
||||
/**
|
||||
* 根据卡号查询用户充值卡账单明细记录列表
|
||||
* @param cardNumber
|
||||
* @return
|
||||
*/
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsListById(String cardNumber);
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public UserConsumptionDetails selectUserConsumptionDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录列表
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 用户充值卡账单明细记录集合
|
||||
*/
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsList(UserConsumptionDetails userConsumptionDetails);
|
||||
|
||||
/**
|
||||
* 新增用户充值卡账单明细记录
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserConsumptionDetails(UserConsumptionDetails userConsumptionDetails);
|
||||
|
||||
/**
|
||||
* 修改用户充值卡账单明细记录
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserConsumptionDetails(UserConsumptionDetails userConsumptionDetails);
|
||||
|
||||
/**
|
||||
* 删除用户充值卡账单明细记录
|
||||
*
|
||||
* @param id 用户充值卡账单明细记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserConsumptionDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户充值卡账单明细记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserConsumptionDetailsByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.fastbee.rechargecard.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.UserRechargeCards;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 用户充值卡Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-17
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserRechargeCardsMapper extends MPJBaseMapper<UserRechargeCards>
|
||||
{
|
||||
/**
|
||||
* 测试方法
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public Long test(Long id);
|
||||
/**
|
||||
* 查询用户充值卡
|
||||
*
|
||||
* @param id 用户充值卡主键
|
||||
* @return 用户充值卡
|
||||
*/
|
||||
public UserRechargeCards selectUserRechargeCardsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户充值卡列表
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 用户充值卡集合
|
||||
*/
|
||||
public List<UserRechargeCards> selectUserRechargeCardsList(UserRechargeCards userRechargeCards);
|
||||
|
||||
/**
|
||||
* 新增用户充值卡
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserRechargeCards(UserRechargeCards userRechargeCards);
|
||||
|
||||
/**
|
||||
* 修改用户充值卡
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserRechargeCards(UserRechargeCards userRechargeCards);
|
||||
|
||||
/**
|
||||
* 删除用户充值卡
|
||||
*
|
||||
* @param id 用户充值卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserRechargeCardsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户充值卡
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserRechargeCardsByIds(Long[] ids);
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.fastbee.rechargecard.mapper;
|
||||
|
||||
public interface test {
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.fastbee.rechargecard.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
|
||||
/**
|
||||
* 用户充值卡账单明细记录Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-18
|
||||
*/
|
||||
public interface IUserConsumptionDetailsService
|
||||
{
|
||||
/**
|
||||
* 根据卡号查询用户充值卡账单明细记录列表
|
||||
*
|
||||
* @param cardNumber 卡号
|
||||
* @return 用户充值卡账单明细记录
|
||||
*/
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsListById(String cardNumber);
|
||||
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录
|
||||
*
|
||||
* @param id 用户充值卡账单明细记录主键
|
||||
* @return 用户充值卡账单明细记录
|
||||
*/
|
||||
public UserConsumptionDetails selectUserConsumptionDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录列表
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 用户充值卡账单明细记录集合
|
||||
*/
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsList(UserConsumptionDetails userConsumptionDetails);
|
||||
|
||||
/**
|
||||
* 新增用户充值卡账单明细记录
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserConsumptionDetails(UserConsumptionDetails userConsumptionDetails);
|
||||
|
||||
/**
|
||||
* 修改用户充值卡账单明细记录
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserConsumptionDetails(UserConsumptionDetails userConsumptionDetails);
|
||||
|
||||
/**
|
||||
* 批量删除用户充值卡账单明细记录
|
||||
*
|
||||
* @param ids 需要删除的用户充值卡账单明细记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserConsumptionDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户充值卡账单明细记录信息
|
||||
*
|
||||
* @param id 用户充值卡账单明细记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserConsumptionDetailsById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.fastbee.rechargecard.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.UserRechargeCards;
|
||||
|
||||
/**
|
||||
* 用户充值卡Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-17
|
||||
*/
|
||||
|
||||
public interface IUserRechargeCardsService
|
||||
{
|
||||
|
||||
public Long test(Long id);
|
||||
/**
|
||||
* 查询用户充值卡
|
||||
*
|
||||
* @param id 用户充值卡主键
|
||||
* @return 用户充值卡
|
||||
*/
|
||||
public UserRechargeCards selectUserRechargeCardsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户充值卡列表
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 用户充值卡集合
|
||||
*/
|
||||
public List<UserRechargeCards> selectUserRechargeCardsList(UserRechargeCards userRechargeCards);
|
||||
|
||||
/**
|
||||
* 新增用户充值卡
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserRechargeCards(UserRechargeCards userRechargeCards);
|
||||
|
||||
/**
|
||||
* 修改用户充值卡
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserRechargeCards(UserRechargeCards userRechargeCards);
|
||||
|
||||
/**
|
||||
* 批量删除用户充值卡
|
||||
*
|
||||
* @param ids 需要删除的用户充值卡主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserRechargeCardsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户充值卡信息
|
||||
*
|
||||
* @param id 用户充值卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserRechargeCardsById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.fastbee.rechargecard.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.rechargecard.mapper.UserConsumptionDetailsMapper;
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
import com.fastbee.rechargecard.service.IUserConsumptionDetailsService;
|
||||
|
||||
/**
|
||||
* 用户充值卡账单明细记录Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-18
|
||||
*/
|
||||
@Service
|
||||
public class UserConsumptionDetailsServiceImpl implements IUserConsumptionDetailsService
|
||||
{
|
||||
@Autowired
|
||||
private UserConsumptionDetailsMapper userConsumptionDetailsMapper;
|
||||
|
||||
/**
|
||||
* 根据卡号查询用户充值卡账单明细记录列表
|
||||
*
|
||||
* @param cardNumber 用户充值卡号
|
||||
* @return 用户充值卡账单明细记录
|
||||
*/
|
||||
@Override
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsListById(String cardNumber)
|
||||
{
|
||||
return userConsumptionDetailsMapper.selectUserConsumptionDetailsListById(cardNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录
|
||||
*
|
||||
* @param id 用户充值卡账单明细记录主键
|
||||
* @return 用户充值卡账单明细记录
|
||||
*/
|
||||
@Override
|
||||
public UserConsumptionDetails selectUserConsumptionDetailsById(Long id)
|
||||
{
|
||||
return userConsumptionDetailsMapper.selectUserConsumptionDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录列表
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 用户充值卡账单明细记录
|
||||
*/
|
||||
@Override
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsList(UserConsumptionDetails userConsumptionDetails)
|
||||
{
|
||||
return userConsumptionDetailsMapper.selectUserConsumptionDetailsList(userConsumptionDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户充值卡账单明细记录
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUserConsumptionDetails(UserConsumptionDetails userConsumptionDetails)
|
||||
{
|
||||
userConsumptionDetails.setCreateTime(DateUtils.getNowDate());
|
||||
return userConsumptionDetailsMapper.insertUserConsumptionDetails(userConsumptionDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户充值卡账单明细记录
|
||||
*
|
||||
* @param userConsumptionDetails 用户充值卡账单明细记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUserConsumptionDetails(UserConsumptionDetails userConsumptionDetails)
|
||||
{
|
||||
userConsumptionDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
return userConsumptionDetailsMapper.updateUserConsumptionDetails(userConsumptionDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户充值卡账单明细记录
|
||||
*
|
||||
* @param ids 需要删除的用户充值卡账单明细记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserConsumptionDetailsByIds(Long[] ids)
|
||||
{
|
||||
return userConsumptionDetailsMapper.deleteUserConsumptionDetailsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户充值卡账单明细记录信息
|
||||
*
|
||||
* @param id 用户充值卡账单明细记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserConsumptionDetailsById(Long id)
|
||||
{
|
||||
return userConsumptionDetailsMapper.deleteUserConsumptionDetailsById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.fastbee.rechargecard.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fastbee.rechargecard.mapper.UserRechargeCardsMapper;
|
||||
import com.fastbee.rechargecard.domain.UserRechargeCards;
|
||||
import com.fastbee.rechargecard.service.IUserRechargeCardsService;
|
||||
|
||||
/**
|
||||
* 用户充值卡Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-17
|
||||
*/
|
||||
@Service
|
||||
public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
|
||||
{
|
||||
/*@Autowired
|
||||
private UserRechargeCardsMapper userRechargeCardsMapper;*/
|
||||
@Autowired
|
||||
private UserRechargeCardsMapper userRechargeCardsMapper;
|
||||
|
||||
@Override
|
||||
public Long test(Long id) {
|
||||
return userRechargeCardsMapper.test(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户充值卡
|
||||
*
|
||||
* @param id 用户充值卡主键
|
||||
* @return 用户充值卡
|
||||
*/
|
||||
@Override
|
||||
public UserRechargeCards selectUserRechargeCardsById(Long id)
|
||||
{
|
||||
//return userRechargeCardsMapper.selectUserRechargeCardsById(id);
|
||||
//return id;
|
||||
System.out.println("selectUserRechargeCardsById");
|
||||
UserRechargeCards info=userRechargeCardsMapper.selectUserRechargeCardsById(id);
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户充值卡列表
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 用户充值卡
|
||||
*/
|
||||
@Override
|
||||
public List<UserRechargeCards> selectUserRechargeCardsList(UserRechargeCards userRechargeCards)
|
||||
{
|
||||
return userRechargeCardsMapper.selectUserRechargeCardsList(userRechargeCards);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户充值卡
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUserRechargeCards(UserRechargeCards userRechargeCards)
|
||||
{
|
||||
userRechargeCards.setCreateTime(DateUtils.getNowDate());
|
||||
return userRechargeCardsMapper.insertUserRechargeCards(userRechargeCards);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户充值卡
|
||||
*
|
||||
* @param userRechargeCards 用户充值卡
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUserRechargeCards(UserRechargeCards userRechargeCards)
|
||||
{
|
||||
userRechargeCards.setUpdateTime(DateUtils.getNowDate());
|
||||
return userRechargeCardsMapper.updateUserRechargeCards(userRechargeCards);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户充值卡
|
||||
*
|
||||
* @param ids 需要删除的用户充值卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserRechargeCardsByIds(Long[] ids)
|
||||
{
|
||||
return userRechargeCardsMapper.deleteUserRechargeCardsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户充值卡信息
|
||||
*
|
||||
* @param id 用户充值卡主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserRechargeCardsById(Long id)
|
||||
{
|
||||
return userRechargeCardsMapper.deleteUserRechargeCardsById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.fastbee.rechargecard.service.impl;
|
||||
|
||||
public class testImpl {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.fastbee.rechargecard.service;
|
||||
|
||||
public interface test {
|
||||
}
|
||||
Reference in New Issue
Block a user