diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdpartySnRelation.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdpartySnRelation.java new file mode 100644 index 000000000..81524a900 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdpartySnRelation.java @@ -0,0 +1,72 @@ +package com.jsowell.pile.domain; + +import com.jsowell.common.annotation.Excel; +import com.jsowell.common.core.domain.BaseEntity; +import lombok.*; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 万车充--第三方平台桩编号对应关系对象 thirdparty_sn_relation + * + * @author jsowell + * @date 2024-03-09 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class ThirdpartySnRelation extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Long id; + + /** + * 站点id + */ + private String stationId; + + /** + * 桩编号 + */ + @Excel(name = "桩编号") + private String pileSn; + + /** + * 第三方平台类型 + */ + @Excel(name = "第三方平台类型") + private String thirdpartyType; + + /** + * 第三方平台对应的设备编号 + */ + @Excel(name = "第三方平台对应的设备编号") + private String thirdpartyPileSn; + + /** + * 删除标识(0-正常;1-删除) + */ + private String delFlag; + + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.JSON_STYLE) + .append("id", getId()) + .append("pileSn", getPileSn()) + .append("thirdpartyType", getThirdpartyType()) + .append("thirdpartyPileSn", getThirdpartyPileSn()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartySnRelationMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartySnRelationMapper.java new file mode 100644 index 000000000..5fc15f69a --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartySnRelationMapper.java @@ -0,0 +1,63 @@ +package com.jsowell.pile.mapper; + +import java.util.List; + +import com.jsowell.pile.domain.ThirdpartySnRelation; +import org.springframework.stereotype.Component; + +/** + * 万车充--第三方平台桩编号对应关系Mapper接口 + * + * @author jsowell + * @date 2024-03-09 + */ +@Component +public interface ThirdpartySnRelationMapper { + /** + * 查询万车充--第三方平台桩编号对应关系 + * + * @param id 万车充--第三方平台桩编号对应关系主键 + * @return 万车充--第三方平台桩编号对应关系 + */ + public ThirdpartySnRelation selectThirdpartySnRelationById(Long id); + + /** + * 查询万车充--第三方平台桩编号对应关系列表 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 万车充--第三方平台桩编号对应关系集合 + */ + public List selectThirdpartySnRelationList(ThirdpartySnRelation thirdpartySnRelation); + + /** + * 新增万车充--第三方平台桩编号对应关系 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 结果 + */ + public int insertThirdpartySnRelation(ThirdpartySnRelation thirdpartySnRelation); + + /** + * 修改万车充--第三方平台桩编号对应关系 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 结果 + */ + public int updateThirdpartySnRelation(ThirdpartySnRelation thirdpartySnRelation); + + /** + * 删除万车充--第三方平台桩编号对应关系 + * + * @param id 万车充--第三方平台桩编号对应关系主键 + * @return 结果 + */ + public int deleteThirdpartySnRelationById(Long id); + + /** + * 批量删除万车充--第三方平台桩编号对应关系 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteThirdpartySnRelationByIds(Long[] ids); +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdpartySnRelationService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdpartySnRelationService.java new file mode 100644 index 000000000..c131324f5 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdpartySnRelationService.java @@ -0,0 +1,61 @@ +package com.jsowell.pile.service; + +import java.util.List; + +import com.jsowell.pile.domain.ThirdpartySnRelation; + +/** + * 万车充--第三方平台桩编号对应关系Service接口 + * + * @author jsowell + * @date 2024-03-09 + */ +public interface IThirdpartySnRelationService { + /** + * 查询万车充--第三方平台桩编号对应关系 + * + * @param id 万车充--第三方平台桩编号对应关系主键 + * @return 万车充--第三方平台桩编号对应关系 + */ + public ThirdpartySnRelation selectThirdpartySnRelationById(Long id); + + /** + * 查询万车充--第三方平台桩编号对应关系列表 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 万车充--第三方平台桩编号对应关系集合 + */ + public List selectThirdpartySnRelationList(ThirdpartySnRelation thirdpartySnRelation); + + /** + * 新增万车充--第三方平台桩编号对应关系 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 结果 + */ + public int insertThirdpartySnRelation(ThirdpartySnRelation thirdpartySnRelation); + + /** + * 修改万车充--第三方平台桩编号对应关系 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 结果 + */ + public int updateThirdpartySnRelation(ThirdpartySnRelation thirdpartySnRelation); + + /** + * 批量删除万车充--第三方平台桩编号对应关系 + * + * @param ids 需要删除的万车充--第三方平台桩编号对应关系主键集合 + * @return 结果 + */ + public int deleteThirdpartySnRelationByIds(Long[] ids); + + /** + * 删除万车充--第三方平台桩编号对应关系信息 + * + * @param id 万车充--第三方平台桩编号对应关系主键 + * @return 结果 + */ + public int deleteThirdpartySnRelationById(Long id); +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdpartySnRelationServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdpartySnRelationServiceImpl.java new file mode 100644 index 000000000..6784a9888 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdpartySnRelationServiceImpl.java @@ -0,0 +1,90 @@ +package com.jsowell.pile.service.impl; + +import java.util.List; + +import com.jsowell.common.util.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.jsowell.pile.mapper.ThirdpartySnRelationMapper; +import com.jsowell.pile.domain.ThirdpartySnRelation; +import com.jsowell.pile.service.IThirdpartySnRelationService; + +/** + * 万车充--第三方平台桩编号对应关系Service业务层处理 + * + * @author jsowell + * @date 2024-03-09 + */ +@Service +public class ThirdpartySnRelationServiceImpl implements IThirdpartySnRelationService { + @Autowired + private ThirdpartySnRelationMapper thirdpartySnRelationMapper; + + /** + * 查询万车充--第三方平台桩编号对应关系 + * + * @param id 万车充--第三方平台桩编号对应关系主键 + * @return 万车充--第三方平台桩编号对应关系 + */ + @Override + public ThirdpartySnRelation selectThirdpartySnRelationById(Long id) { + return thirdpartySnRelationMapper.selectThirdpartySnRelationById(id); + } + + /** + * 查询万车充--第三方平台桩编号对应关系列表 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 万车充--第三方平台桩编号对应关系 + */ + @Override + public List selectThirdpartySnRelationList(ThirdpartySnRelation thirdpartySnRelation) { + return thirdpartySnRelationMapper.selectThirdpartySnRelationList(thirdpartySnRelation); + } + + /** + * 新增万车充--第三方平台桩编号对应关系 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 结果 + */ + @Override + public int insertThirdpartySnRelation(ThirdpartySnRelation thirdpartySnRelation) { + thirdpartySnRelation.setCreateTime(DateUtils.getNowDate()); + return thirdpartySnRelationMapper.insertThirdpartySnRelation(thirdpartySnRelation); + } + + /** + * 修改万车充--第三方平台桩编号对应关系 + * + * @param thirdpartySnRelation 万车充--第三方平台桩编号对应关系 + * @return 结果 + */ + @Override + public int updateThirdpartySnRelation(ThirdpartySnRelation thirdpartySnRelation) { + thirdpartySnRelation.setUpdateTime(DateUtils.getNowDate()); + return thirdpartySnRelationMapper.updateThirdpartySnRelation(thirdpartySnRelation); + } + + /** + * 批量删除万车充--第三方平台桩编号对应关系 + * + * @param ids 需要删除的万车充--第三方平台桩编号对应关系主键 + * @return 结果 + */ + @Override + public int deleteThirdpartySnRelationByIds(Long[] ids) { + return thirdpartySnRelationMapper.deleteThirdpartySnRelationByIds(ids); + } + + /** + * 删除万车充--第三方平台桩编号对应关系信息 + * + * @param id 万车充--第三方平台桩编号对应关系主键 + * @return 结果 + */ + @Override + public int deleteThirdpartySnRelationById(Long id) { + return thirdpartySnRelationMapper.deleteThirdpartySnRelationById(id); + } +} diff --git a/jsowell-pile/src/main/resources/mapper/pile/ThirdpartySnRelationMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ThirdpartySnRelationMapper.xml new file mode 100644 index 000000000..11a5cef15 --- /dev/null +++ b/jsowell-pile/src/main/resources/mapper/pile/ThirdpartySnRelationMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + select id, station_id, pile_sn, thirdparty_type, thirdparty_pile_sn, create_time, create_by, update_time, update_by, del_flag from thirdparty_sn_relation + + + + + + + + insert into thirdparty_sn_relation + + station_id, + pile_sn, + thirdparty_type, + thirdparty_pile_sn, + create_time, + create_by, + update_time, + update_by, + del_flag, + + + #{stationId}, + #{pileSn}, + #{thirdpartyType}, + #{thirdpartyPileSn}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + #{delFlag}, + + + + + update thirdparty_sn_relation + + station_id = #{stationId}, + pile_sn = #{pileSn}, + thirdparty_type = #{thirdpartyType}, + thirdparty_pile_sn = #{thirdpartyPileSn}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + del_flag = #{delFlag}, + + where id = #{id} + + + + delete from thirdparty_sn_relation where id = #{id} + + + + delete from thirdparty_sn_relation where id in + + #{id} + + + \ No newline at end of file