mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-12 03:09:48 +08:00
集团移除会员
This commit is contained in:
@@ -150,4 +150,12 @@ public class MemberGroupController extends BaseController {
|
|||||||
public AjaxResult removeStationFromMemberGroup(@RequestBody MemberGroupDTO dto) {
|
public AjaxResult removeStationFromMemberGroup(@RequestBody MemberGroupDTO dto) {
|
||||||
return toAjax(memberGroupService.removeStationFromMemberGroup(dto));
|
return toAjax(memberGroupService.removeStationFromMemberGroup(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团移除会员
|
||||||
|
*/
|
||||||
|
@PostMapping("/removeMemberFromMemberGroup")
|
||||||
|
public AjaxResult removeMemberFromMemberGroup(@RequestBody MemberGroupDTO dto) {
|
||||||
|
return toAjax(memberGroupService.removeMemberFromMemberGroup(dto));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,4 +21,6 @@ public class MemberGroupDTO extends BaseEntity {
|
|||||||
private List<String> merchantIdList;
|
private List<String> merchantIdList;
|
||||||
|
|
||||||
private String stationId;
|
private String stationId;
|
||||||
|
|
||||||
|
private String memberId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.MemberGroupRelation;
|
import com.jsowell.pile.domain.MemberGroupRelation;
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface MemberGroupRelationMapper {
|
public interface MemberGroupRelationMapper {
|
||||||
/**
|
/**
|
||||||
* delete by primary key
|
* delete by primary key
|
||||||
@@ -56,4 +57,6 @@ public interface MemberGroupRelationMapper {
|
|||||||
int updateBatchSelective(List<MemberGroupRelation> list);
|
int updateBatchSelective(List<MemberGroupRelation> list);
|
||||||
|
|
||||||
int batchInsert(@Param("list") List<MemberGroupRelation> list);
|
int batchInsert(@Param("list") List<MemberGroupRelation> list);
|
||||||
|
|
||||||
|
int deleteRelationByGroupCodeAndMemberId(@Param("groupCode") String groupCode, @Param("memberId") String memberId);
|
||||||
}
|
}
|
||||||
@@ -27,4 +27,5 @@ public interface MemberGroupRelationService{
|
|||||||
|
|
||||||
int batchInsert(List<MemberGroupRelation> list);
|
int batchInsert(List<MemberGroupRelation> list);
|
||||||
|
|
||||||
|
int deleteRelationByGroupCodeAndMemberId(String groupCode, String memberId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ public interface MemberGroupService {
|
|||||||
|
|
||||||
int removeStationFromMemberGroup(MemberGroupDTO dto);
|
int removeStationFromMemberGroup(MemberGroupDTO dto);
|
||||||
|
|
||||||
|
int removeMemberFromMemberGroup(MemberGroupDTO dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据memberGroup查询车辆消费记录
|
* 根据memberGroup查询车辆消费记录
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jsowell.pile.service.impl;
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.pile.domain.MemberGroupRelation;
|
import com.jsowell.pile.domain.MemberGroupRelation;
|
||||||
import com.jsowell.pile.mapper.MemberGroupRelationMapper;
|
import com.jsowell.pile.mapper.MemberGroupRelationMapper;
|
||||||
import com.jsowell.pile.service.MemberGroupRelationService;
|
import com.jsowell.pile.service.MemberGroupRelationService;
|
||||||
@@ -72,4 +73,12 @@ public class MemberGroupRelationServiceImpl implements MemberGroupRelationServic
|
|||||||
return memberGroupRelationMapper.batchInsert(list);
|
return memberGroupRelationMapper.batchInsert(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteRelationByGroupCodeAndMemberId(String groupCode, String memberId) {
|
||||||
|
if (StringUtils.isBlank(groupCode) || StringUtils.isBlank(memberId)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return memberGroupRelationMapper.deleteRelationByGroupCodeAndMemberId(groupCode, memberId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,6 +299,11 @@ public class MemberGroupServiceImpl implements MemberGroupService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int removeMemberFromMemberGroup(MemberGroupDTO dto) {
|
||||||
|
return memberGroupRelationService.deleteRelationByGroupCodeAndMemberId(dto.getGroupCode(), dto.getMemberId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MemberGroupConsumptionVO> queryMemberGroupConsumptionList(String groupCode) {
|
public List<MemberGroupConsumptionVO> queryMemberGroupConsumptionList(String groupCode) {
|
||||||
List<MemberGroupConsumptionVO> resultList = Lists.newArrayList();
|
List<MemberGroupConsumptionVO> resultList = Lists.newArrayList();
|
||||||
|
|||||||
@@ -369,4 +369,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteRelationByGroupCodeAndMemberId">
|
||||||
|
delete from member_group_relation
|
||||||
|
where group_code = #{groupCode,jdbcType=VARCHAR}
|
||||||
|
and member_id = #{memberId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user