mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 添加集团名称字段
This commit is contained in:
@@ -167,4 +167,13 @@ public class MemberGroupController extends BaseController {
|
||||
public TableDataInfo queryMemberGroupConsumptionList(@RequestBody MemberGroupDTO dto) {
|
||||
return getDataTable(memberGroupService.queryMemberGroupConsumptionList(dto.getGroupCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车辆消费明细
|
||||
* queryConsumptionDetailListByVinCode
|
||||
*/
|
||||
@PostMapping("/queryConsumptionDetailListByVinCode")
|
||||
public TableDataInfo queryConsumptionDetailListByVinCode(@RequestBody MemberGroupDTO dto) {
|
||||
return getDataTable(memberGroupService.queryConsumptionDetailListByVinCode(dto.getGroupCode(), dto.getVinCode()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.jsowell.pile.domain;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
@@ -13,6 +15,8 @@ import java.math.BigDecimal;
|
||||
* @author jsowell
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class MemberGroup extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -21,6 +25,12 @@ public class MemberGroup extends BaseEntity {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员组名称
|
||||
*/
|
||||
@Excel(name = "会员组名称")
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 会员组编号
|
||||
*/
|
||||
@@ -62,70 +72,6 @@ public class MemberGroup extends BaseEntity {
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setGroupCode(String groupCode) {
|
||||
this.groupCode = groupCode;
|
||||
}
|
||||
|
||||
public String getGroupCode() {
|
||||
return groupCode;
|
||||
}
|
||||
|
||||
public void setMerchantId(String merchantId) {
|
||||
this.merchantId = merchantId;
|
||||
}
|
||||
|
||||
public String getMerchantId() {
|
||||
return merchantId;
|
||||
}
|
||||
|
||||
public void setStationId(String stationId) {
|
||||
this.stationId = stationId;
|
||||
}
|
||||
|
||||
public String getStationId() {
|
||||
return stationId;
|
||||
}
|
||||
|
||||
public void setGroupLevel(String groupLevel) {
|
||||
this.groupLevel = groupLevel;
|
||||
}
|
||||
|
||||
public String getGroupLevel() {
|
||||
return groupLevel;
|
||||
}
|
||||
|
||||
public void setGroupType(String groupType) {
|
||||
this.groupType = groupType;
|
||||
}
|
||||
|
||||
public String getGroupType() {
|
||||
return groupType;
|
||||
}
|
||||
|
||||
public void setDiscount(BigDecimal discount) {
|
||||
this.discount = discount;
|
||||
}
|
||||
|
||||
public BigDecimal getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
|
||||
@@ -23,4 +23,6 @@ public class MemberGroupDTO extends BaseEntity {
|
||||
private String stationId;
|
||||
|
||||
private String memberId;
|
||||
|
||||
private String vinCode;
|
||||
}
|
||||
|
||||
@@ -315,13 +315,13 @@ public class MemberGroupServiceImpl implements MemberGroupService {
|
||||
Map<String, List<OrderBasicInfo>> listMap = orderList.stream().collect(Collectors.groupingBy(OrderBasicInfo::getMemberId));
|
||||
MemberGroupConsumptionVO vo = null;
|
||||
for (Map.Entry<String, List<OrderBasicInfo>> entry : listMap.entrySet()) {
|
||||
if (CollectionUtils.isEmpty(entry.getValue())) {
|
||||
continue;
|
||||
}
|
||||
// 订单根据结算时间倒序,结算时间为null的排在最后(null在前,结算日期正序,之后整个list反转)
|
||||
List<OrderBasicInfo> orderBasicInfoList = entry.getValue().stream()
|
||||
.sorted(Comparator.comparing(OrderBasicInfo::getSettlementTime, Comparator.nullsLast(Comparator.reverseOrder())))
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(orderBasicInfoList)) {
|
||||
continue;
|
||||
}
|
||||
vo = new MemberGroupConsumptionVO();
|
||||
|
||||
String vinCode = null;
|
||||
@@ -359,7 +359,7 @@ public class MemberGroupServiceImpl implements MemberGroupService {
|
||||
dto.setGroupCode(groupCode);
|
||||
dto.setVinCode(vinCode);
|
||||
List<OrderListVO> orderListVOS = orderBasicInfoService.selectOrderBasicInfoList(dto);
|
||||
return null;
|
||||
return orderListVOS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,11 @@ import java.math.BigDecimal;
|
||||
public class MemberGroupVO {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员组名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 会员组编号
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.MemberGroup" id="MemberGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="groupCode" column="group_code" />
|
||||
<result property="merchantId" column="merchant_id" />
|
||||
<result property="stationId" column="station_id" />
|
||||
@@ -20,7 +21,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, group_code, merchant_id, station_id, group_level, group_type, discount, create_by, create_time, update_by, update_time, del_flag
|
||||
id, group_name, group_code, merchant_id, station_id, group_level, group_type, discount, create_by, create_time, update_by, update_time, del_flag
|
||||
</sql>
|
||||
|
||||
<sql id="selectMemberGroupVo">
|
||||
@@ -32,6 +33,7 @@
|
||||
<select id="selectMemberGroupList" parameterType="com.jsowell.pile.domain.MemberGroup" resultMap="MemberGroupResult">
|
||||
<include refid="selectMemberGroupVo"/>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name = #{groupName}</if>
|
||||
<if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
|
||||
<if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
|
||||
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
||||
@@ -50,6 +52,7 @@
|
||||
insert into member_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="groupName != null">group_name,</if>
|
||||
<if test="groupCode != null">group_code,</if>
|
||||
<if test="merchantId != null">merchant_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
@@ -64,6 +67,7 @@
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="groupName != null">#{groupName},</if>
|
||||
<if test="groupCode != null">#{groupCode},</if>
|
||||
<if test="merchantId != null">#{merchantId},</if>
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
@@ -81,6 +85,7 @@
|
||||
<update id="updateMemberGroup" parameterType="com.jsowell.pile.domain.MemberGroup">
|
||||
update member_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="groupName != null">group_name = #{groupName},</if>
|
||||
<if test="groupCode != null">group_code = #{groupCode},</if>
|
||||
<if test="merchantId != null">merchant_id = #{merchantId},</if>
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
@@ -110,6 +115,7 @@
|
||||
<select id="queryMemberGroupList" resultType="com.jsowell.pile.vo.web.MemberGroupVO">
|
||||
select
|
||||
t1.id as id,
|
||||
t1.group_name as groupName,
|
||||
t1.group_code as groupCode,
|
||||
t1.merchant_id as merchantId,
|
||||
t1.station_id as stationId,
|
||||
|
||||
Reference in New Issue
Block a user