mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
新增 会员与收藏站点相关实体类、service
This commit is contained in:
@@ -1,66 +1,70 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 会员与收藏的站点关系对象 member_station_relation
|
||||
*
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-03-18
|
||||
*/
|
||||
public class MemberStationRelation extends BaseEntity
|
||||
{
|
||||
public class MemberStationRelation extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/** 会员id */
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@Excel(name = "会员id")
|
||||
private Long memberId;
|
||||
|
||||
/** 站点id */
|
||||
/**
|
||||
* 站点id
|
||||
*/
|
||||
@Excel(name = "站点id")
|
||||
private Long stationId;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setMemberId(Long memberId)
|
||||
{
|
||||
|
||||
public void setMemberId(Long memberId) {
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public Long getMemberId()
|
||||
{
|
||||
public Long getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
public void setStationId(Long stationId)
|
||||
{
|
||||
|
||||
public void setStationId(Long stationId) {
|
||||
this.stationId = stationId;
|
||||
}
|
||||
|
||||
public Long getStationId()
|
||||
{
|
||||
public Long getStationId() {
|
||||
return stationId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("memberId", getMemberId())
|
||||
.append("stationId", getStationId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("memberId", getMemberId())
|
||||
.append("stationId", getStationId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,4 +95,64 @@ public class QueryStationDTO extends BaseEntity {
|
||||
* 运营商部门id
|
||||
*/
|
||||
private List<String> merchantDeptId;
|
||||
|
||||
/**
|
||||
* 排序方式(默认按照距离最近排序)
|
||||
* 1 - 低价优先
|
||||
* 2 - 距离最近
|
||||
*/
|
||||
private String sortType;
|
||||
|
||||
/**
|
||||
* 场站类型
|
||||
* 1 - 全部场站
|
||||
* 2 - 优选场站
|
||||
*/
|
||||
private String stationType;
|
||||
|
||||
/**
|
||||
* 充电速度(快充/慢充)
|
||||
* 1 - 快充(30-180kw)
|
||||
* 2 - 慢充(<30kw)
|
||||
* 3 - 超充(≥180kw)
|
||||
*/
|
||||
private String chargeSpeed;
|
||||
|
||||
/**
|
||||
* 其他筛选条件
|
||||
*/
|
||||
private OtherOptions otherOptions;
|
||||
|
||||
private List<String> stationIds;
|
||||
|
||||
@Data
|
||||
public static class OtherOptions {
|
||||
/**
|
||||
* 充电方式
|
||||
* 1 - 直流
|
||||
* 2 - 交流
|
||||
*/
|
||||
private String chargeMode;
|
||||
|
||||
/**
|
||||
* 充电桩功率
|
||||
* 1 - 快充(30-180kw)
|
||||
* 2 - 慢充(<30kw)
|
||||
* 3 - 超充(≥180kw)
|
||||
*/
|
||||
private List<String> pilePower;
|
||||
|
||||
/**
|
||||
* 站点服务
|
||||
* 1 - 雨棚
|
||||
* 2 - 休息室
|
||||
* 3 - 卫生间
|
||||
*/
|
||||
private List<String> stationService;
|
||||
|
||||
/**
|
||||
* 我的收藏
|
||||
*/
|
||||
private String myCollectionFlag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.MemberStationRelation;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 会员与收藏的站点关系Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-03-18
|
||||
*/
|
||||
@Repository
|
||||
public interface MemberStationRelationMapper {
|
||||
/**
|
||||
* 查询会员与收藏的站点关系
|
||||
*
|
||||
* @param id 会员与收藏的站点关系主键
|
||||
* @return 会员与收藏的站点关系
|
||||
*/
|
||||
public MemberStationRelation selectMemberStationRelationById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询会员与收藏的站点关系列表
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 会员与收藏的站点关系集合
|
||||
*/
|
||||
public List<MemberStationRelation> selectMemberStationRelationList(MemberStationRelation memberStationRelation);
|
||||
|
||||
/**
|
||||
* 新增会员与收藏的站点关系
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMemberStationRelation(MemberStationRelation memberStationRelation);
|
||||
|
||||
/**
|
||||
* 修改会员与收藏的站点关系
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMemberStationRelation(MemberStationRelation memberStationRelation);
|
||||
|
||||
/**
|
||||
* 删除会员与收藏的站点关系
|
||||
*
|
||||
* @param id 会员与收藏的站点关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMemberStationRelationById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除会员与收藏的站点关系
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMemberStationRelationByIds(Integer[] ids);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.MemberStationRelation;
|
||||
|
||||
/**
|
||||
* 会员与收藏的站点关系Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-03-18
|
||||
*/
|
||||
public interface MemberStationRelationService {
|
||||
/**
|
||||
* 查询会员与收藏的站点关系
|
||||
*
|
||||
* @param id 会员与收藏的站点关系主键
|
||||
* @return 会员与收藏的站点关系
|
||||
*/
|
||||
public MemberStationRelation selectMemberStationRelationById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询会员与收藏的站点关系列表
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 会员与收藏的站点关系集合
|
||||
*/
|
||||
public List<MemberStationRelation> selectMemberStationRelationList(MemberStationRelation memberStationRelation);
|
||||
|
||||
/**
|
||||
* 新增会员与收藏的站点关系
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMemberStationRelation(MemberStationRelation memberStationRelation);
|
||||
|
||||
/**
|
||||
* 修改会员与收藏的站点关系
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMemberStationRelation(MemberStationRelation memberStationRelation);
|
||||
|
||||
/**
|
||||
* 批量删除会员与收藏的站点关系
|
||||
*
|
||||
* @param ids 需要删除的会员与收藏的站点关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMemberStationRelationByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除会员与收藏的站点关系信息
|
||||
*
|
||||
* @param id 会员与收藏的站点关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMemberStationRelationById(Integer id);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,13 @@ public interface PileStationInfoService {
|
||||
*/
|
||||
PageResponse uniAppQueryStationInfoList(QueryStationDTO queryStationDTO);
|
||||
|
||||
/**
|
||||
* 小程序首页查询站点信息
|
||||
* @param queryStationDTO
|
||||
* @return
|
||||
*/
|
||||
PageResponse uniAppQueryStationInfoListV2(QueryStationDTO queryStationDTO);
|
||||
|
||||
PileStationVO getStationInfo(String stationId);
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.service.MemberStationRelationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.MemberStationRelationMapper;
|
||||
import com.jsowell.pile.domain.MemberStationRelation;
|
||||
|
||||
/**
|
||||
* 会员与收藏的站点关系Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2025-03-18
|
||||
*/
|
||||
@Service
|
||||
public class MemberStationRelationServiceImpl implements MemberStationRelationService {
|
||||
@Autowired
|
||||
private MemberStationRelationMapper memberStationRelationMapper;
|
||||
|
||||
/**
|
||||
* 查询会员与收藏的站点关系
|
||||
*
|
||||
* @param id 会员与收藏的站点关系主键
|
||||
* @return 会员与收藏的站点关系
|
||||
*/
|
||||
@Override
|
||||
public MemberStationRelation selectMemberStationRelationById(Integer id) {
|
||||
return memberStationRelationMapper.selectMemberStationRelationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员与收藏的站点关系列表
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 会员与收藏的站点关系
|
||||
*/
|
||||
@Override
|
||||
public List<MemberStationRelation> selectMemberStationRelationList(MemberStationRelation memberStationRelation) {
|
||||
return memberStationRelationMapper.selectMemberStationRelationList(memberStationRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员与收藏的站点关系
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMemberStationRelation(MemberStationRelation memberStationRelation) {
|
||||
memberStationRelation.setCreateTime(DateUtils.getNowDate());
|
||||
return memberStationRelationMapper.insertMemberStationRelation(memberStationRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员与收藏的站点关系
|
||||
*
|
||||
* @param memberStationRelation 会员与收藏的站点关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMemberStationRelation(MemberStationRelation memberStationRelation) {
|
||||
memberStationRelation.setUpdateTime(DateUtils.getNowDate());
|
||||
return memberStationRelationMapper.updateMemberStationRelation(memberStationRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除会员与收藏的站点关系
|
||||
*
|
||||
* @param ids 需要删除的会员与收藏的站点关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMemberStationRelationByIds(Integer[] ids) {
|
||||
return memberStationRelationMapper.deleteMemberStationRelationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员与收藏的站点关系信息
|
||||
*
|
||||
* @param id 会员与收藏的站点关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMemberStationRelationById(Integer id) {
|
||||
return memberStationRelationMapper.deleteMemberStationRelationById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,6 +607,37 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
||||
return pageResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序首页查询站点信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageResponse uniAppQueryStationInfoListV2(QueryStationDTO dto) {
|
||||
int pageNum = dto.getPageNum() == 0 ? 1 : dto.getPageNum();
|
||||
int pageSize = dto.getPageSize() == 0 ? 10 : dto.getPageSize();
|
||||
|
||||
// 小程序站点列表页只展示对外开放的站点
|
||||
dto.setPublicFlag(Constants.ONE);
|
||||
|
||||
String myCollectionFlag = dto.getOtherOptions().getMyCollectionFlag();
|
||||
// 先判断是否选择我的收藏中的站点
|
||||
if (StringUtils.isNotBlank(myCollectionFlag)) {
|
||||
// 不为空,先将要查询的站点idList添加进参数
|
||||
// TODO 查询我的收藏下的站点id
|
||||
|
||||
// dto.setStationIds();
|
||||
}
|
||||
// 分页
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
// 根据前端传的参数进行筛选查询(默认根据距离排序)
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据站点id查询运营商配置的汇付会员id
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user