创建刷卡记录表
This commit is contained in:
@ -0,0 +1,72 @@
|
||||
package com.fastbee.iot.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;
|
||||
|
||||
/**
|
||||
* 刷卡记录对象 ng_card_swipe_records
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@ApiModel(value = "NgCardSwipeRecords",description = "刷卡记录 ng_card_swipe_records")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NgCardSwipeRecords extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键自增 */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
private String deviceNumber;
|
||||
|
||||
/** 0=开阀,1=关阀 */
|
||||
@Excel(name = "0=开阀,1=关阀")
|
||||
@ApiModelProperty("0=开阀,1=关阀")
|
||||
private Integer cardSwipeType;
|
||||
|
||||
/** 购水卡卡号 */
|
||||
@Excel(name = "购水卡卡号")
|
||||
@ApiModelProperty("购水卡卡号")
|
||||
private String cardNumber;
|
||||
|
||||
/** 机构id */
|
||||
@Excel(name = "机构id")
|
||||
@ApiModelProperty("机构id")
|
||||
private Long deptId;
|
||||
|
||||
/** 刷卡时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS")
|
||||
@Excel(name = "刷卡时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("刷卡时间")
|
||||
private Date cardSwipeTime;
|
||||
|
||||
/** 此次开关阀消费金额(只在关阀时填写) */
|
||||
@Excel(name = "此次开关阀消费金额", readConverterExp = "只=在关阀时填写")
|
||||
@ApiModelProperty("此次开关阀消费金额")
|
||||
private BigDecimal amountDue;
|
||||
|
||||
/** 区域码 */
|
||||
@Excel(name = "区域码")
|
||||
@ApiModelProperty("区域码")
|
||||
private String areaCode;
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.NgCardSwipeRecords;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 刷卡记录Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Repository
|
||||
public interface NgCardSwipeRecordsMapper
|
||||
{
|
||||
/**
|
||||
* 查询刷卡记录
|
||||
*
|
||||
* @param id 刷卡记录主键
|
||||
* @return 刷卡记录
|
||||
*/
|
||||
public NgCardSwipeRecords selectNgCardSwipeRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 刷卡记录集合
|
||||
*/
|
||||
public List<NgCardSwipeRecords> selectNgCardSwipeRecordsList(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 新增刷卡记录
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNgCardSwipeRecords(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 修改刷卡记录
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNgCardSwipeRecords(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 删除刷卡记录
|
||||
*
|
||||
* @param id 刷卡记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgCardSwipeRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除刷卡记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgCardSwipeRecordsByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.iot.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.NgCardSwipeRecords;
|
||||
|
||||
/**
|
||||
* 刷卡记录Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
public interface INgCardSwipeRecordsService
|
||||
{
|
||||
/**
|
||||
* 查询刷卡记录
|
||||
*
|
||||
* @param id 刷卡记录主键
|
||||
* @return 刷卡记录
|
||||
*/
|
||||
public NgCardSwipeRecords selectNgCardSwipeRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 刷卡记录集合
|
||||
*/
|
||||
public List<NgCardSwipeRecords> selectNgCardSwipeRecordsList(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 新增刷卡记录
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNgCardSwipeRecords(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 修改刷卡记录
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNgCardSwipeRecords(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 批量删除刷卡记录
|
||||
*
|
||||
* @param ids 需要删除的刷卡记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgCardSwipeRecordsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除刷卡记录信息
|
||||
*
|
||||
* @param id 刷卡记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNgCardSwipeRecordsById(Long id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.fastbee.iot.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.iot.mapper.NgCardSwipeRecordsMapper;
|
||||
import com.fastbee.iot.domain.NgCardSwipeRecords;
|
||||
import com.fastbee.iot.service.INgCardSwipeRecordsService;
|
||||
|
||||
/**
|
||||
* 刷卡记录Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-30
|
||||
*/
|
||||
@Service
|
||||
public class NgCardSwipeRecordsServiceImpl implements INgCardSwipeRecordsService
|
||||
{
|
||||
@Autowired
|
||||
private NgCardSwipeRecordsMapper ngCardSwipeRecordsMapper;
|
||||
|
||||
/**
|
||||
* 查询刷卡记录
|
||||
*
|
||||
* @param id 刷卡记录主键
|
||||
* @return 刷卡记录
|
||||
*/
|
||||
@Override
|
||||
public NgCardSwipeRecords selectNgCardSwipeRecordsById(Long id)
|
||||
{
|
||||
return ngCardSwipeRecordsMapper.selectNgCardSwipeRecordsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 刷卡记录
|
||||
*/
|
||||
@Override
|
||||
public List<NgCardSwipeRecords> selectNgCardSwipeRecordsList(NgCardSwipeRecords ngCardSwipeRecords)
|
||||
{
|
||||
return ngCardSwipeRecordsMapper.selectNgCardSwipeRecordsList(ngCardSwipeRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增刷卡记录
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertNgCardSwipeRecords(NgCardSwipeRecords ngCardSwipeRecords)
|
||||
{
|
||||
ngCardSwipeRecords.setCreateTime(DateUtils.getNowDate());
|
||||
return ngCardSwipeRecordsMapper.insertNgCardSwipeRecords(ngCardSwipeRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改刷卡记录
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateNgCardSwipeRecords(NgCardSwipeRecords ngCardSwipeRecords)
|
||||
{
|
||||
ngCardSwipeRecords.setUpdateTime(DateUtils.getNowDate());
|
||||
return ngCardSwipeRecordsMapper.updateNgCardSwipeRecords(ngCardSwipeRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除刷卡记录
|
||||
*
|
||||
* @param ids 需要删除的刷卡记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNgCardSwipeRecordsByIds(Long[] ids)
|
||||
{
|
||||
return ngCardSwipeRecordsMapper.deleteNgCardSwipeRecordsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除刷卡记录信息
|
||||
*
|
||||
* @param id 刷卡记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNgCardSwipeRecordsById(Long id)
|
||||
{
|
||||
return ngCardSwipeRecordsMapper.deleteNgCardSwipeRecordsById(id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user