## 商品指定某个会员可见;
This commit is contained in:
parent
3965ed4116
commit
91a474d8a7
|
@ -2521,10 +2521,13 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
||||||
Set<WaresAuthorityParentParam> waresAuthorityParentParamList = new HashSet<>();
|
Set<WaresAuthorityParentParam> waresAuthorityParentParamList = new HashSet<>();
|
||||||
// 安置查询
|
// 安置查询
|
||||||
Set<WaresAuthorityParentParam> waresAuthorityPlaceParamList = new HashSet<>();
|
Set<WaresAuthorityParentParam> waresAuthorityPlaceParamList = new HashSet<>();
|
||||||
|
// 指定会员
|
||||||
|
Set<Long> pkMemberList = new HashSet<>();
|
||||||
|
|
||||||
for (ShowWaresDTO showWaresDTO : showWaresDTOS) {
|
for (ShowWaresDTO showWaresDTO : showWaresDTOS) {
|
||||||
for (BdWaresAuthority bw : showWaresDTO.getWaresAuthorityList()) {
|
for (BdWaresAuthority bw : showWaresDTO.getWaresAuthorityList()) {
|
||||||
if (bw.getAuthorityType() == EWaresPermissionType.BLOOD_ALLOW.getValue() || bw.getAuthorityType() == EWaresPermissionType.BLOOD_STOP.getValue()) {
|
if (bw.getAuthorityType() == EWaresPermissionType.BLOOD_ALLOW.getValue() || bw.getAuthorityType() == EWaresPermissionType.BLOOD_STOP.getValue()) {
|
||||||
|
// 血缘关系
|
||||||
WaresAuthorityParentParam waresAuthorityParentParam = WaresAuthorityParentParam.builder()
|
WaresAuthorityParentParam waresAuthorityParentParam = WaresAuthorityParentParam.builder()
|
||||||
.pkMember(bw.getPkMember())
|
.pkMember(bw.getPkMember())
|
||||||
.loginMember(showWaresDTO.getLoginMember())
|
.loginMember(showWaresDTO.getLoginMember())
|
||||||
|
@ -2532,12 +2535,17 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
||||||
waresAuthorityParentParamList.add(waresAuthorityParentParam);
|
waresAuthorityParentParamList.add(waresAuthorityParentParam);
|
||||||
}
|
}
|
||||||
if (bw.getAuthorityType() == EWaresPermissionType.PLACE_ALLWO.getValue() || bw.getAuthorityType() == EWaresPermissionType.PLACE_STOP.getValue()) {
|
if (bw.getAuthorityType() == EWaresPermissionType.PLACE_ALLWO.getValue() || bw.getAuthorityType() == EWaresPermissionType.PLACE_STOP.getValue()) {
|
||||||
|
// 安置关系
|
||||||
WaresAuthorityParentParam waresAuthorityParentParam = WaresAuthorityParentParam.builder()
|
WaresAuthorityParentParam waresAuthorityParentParam = WaresAuthorityParentParam.builder()
|
||||||
.pkMember(bw.getPkMember())
|
.pkMember(bw.getPkMember())
|
||||||
.loginMember(showWaresDTO.getLoginMember())
|
.loginMember(showWaresDTO.getLoginMember())
|
||||||
.build();
|
.build();
|
||||||
waresAuthorityPlaceParamList.add(waresAuthorityParentParam);
|
waresAuthorityPlaceParamList.add(waresAuthorityParentParam);
|
||||||
}
|
}
|
||||||
|
if (bw.getAuthorityType() == EWaresPermissionType.MEMBER.getValue()) {
|
||||||
|
// 指定会员可见
|
||||||
|
pkMemberList.add(bw.getPkMember());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2568,6 +2576,9 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
||||||
} else if (bdWaresAuthority.getAuthorityType() == EWaresPermissionType.PLACE_STOP.getValue()) {
|
} else if (bdWaresAuthority.getAuthorityType() == EWaresPermissionType.PLACE_STOP.getValue()) {
|
||||||
// 安置禁止
|
// 安置禁止
|
||||||
isShowWares = !waresAuthorityPlaceList.contains(bdWaresAuthority.getPkMember());
|
isShowWares = !waresAuthorityPlaceList.contains(bdWaresAuthority.getPkMember());
|
||||||
|
} else if (bdWaresAuthority.getAuthorityType() == EWaresPermissionType.MEMBER.getValue()) {
|
||||||
|
// 指定会员可见
|
||||||
|
isShowWares = pkMemberList.contains(showWaresDTO.getLoginMember());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultMap.put(showWaresDTO.getPkWares(), isShowWares);
|
resultMap.put(showWaresDTO.getPkWares(), isShowWares);
|
||||||
|
|
|
@ -750,7 +750,7 @@ public class EnumsController extends BaseController {
|
||||||
public AjaxResult getEWaresPermissionTypeList() {
|
public AjaxResult getEWaresPermissionTypeList() {
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
for (EWaresPermissionType value : EWaresPermissionType.values()) {
|
for (EWaresPermissionType value : EWaresPermissionType.values()) {
|
||||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.ENU_WARES));
|
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
||||||
}
|
}
|
||||||
return AjaxResult.success(enumEntityList);
|
return AjaxResult.success(enumEntityList);
|
||||||
}
|
}
|
||||||
|
@ -837,7 +837,7 @@ public class EnumsController extends BaseController {
|
||||||
public AjaxResult getECycle() {
|
public AjaxResult getECycle() {
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
for (ECycle value : ECycle.values()) {
|
for (ECycle value : ECycle.values()) {
|
||||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.CYCLE));
|
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
||||||
}
|
}
|
||||||
return AjaxResult.success(enumEntityList);
|
return AjaxResult.success(enumEntityList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -580,10 +580,6 @@ public class EnumsPrefixConstants {
|
||||||
*/
|
*/
|
||||||
public static final String ENU_USER = "ENU_USER_S_";
|
public static final String ENU_USER = "ENU_USER_S_";
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品权限类型枚举
|
|
||||||
*/
|
|
||||||
public static final String ENU_WARES = "ENU_WARES_P_";
|
|
||||||
/**
|
/**
|
||||||
* 商品类型枚举
|
* 商品类型枚举
|
||||||
*/
|
*/
|
||||||
|
@ -628,11 +624,6 @@ public class EnumsPrefixConstants {
|
||||||
*/
|
*/
|
||||||
public static final String EXEMPT_TYPE = "ENU_EXE_T_";
|
public static final String EXEMPT_TYPE = "ENU_EXE_T_";
|
||||||
|
|
||||||
/**
|
|
||||||
* 提现周期
|
|
||||||
*/
|
|
||||||
public static final String CYCLE = "ENU_CYCLE_";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现状态
|
* 提现状态
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
package com.hzs.common.core.enums;
|
package com.hzs.common.core.enums;
|
||||||
|
|
||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现周期枚举类
|
* 提现周期枚举类
|
||||||
*
|
|
||||||
* @author: hzs
|
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -16,32 +13,32 @@ public enum ECycle {
|
||||||
/**
|
/**
|
||||||
* 周一
|
* 周一
|
||||||
*/
|
*/
|
||||||
MONDAY( 1, "周一", EnumsPrefixConstants.CYCLE + "1"),
|
MONDAY(1, "周一"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 周二
|
* 周二
|
||||||
*/
|
*/
|
||||||
TUESDAY( 2, "周二", EnumsPrefixConstants.CYCLE + "2"),
|
TUESDAY(2, "周二"),
|
||||||
/**
|
/**
|
||||||
* 周三
|
* 周三
|
||||||
*/
|
*/
|
||||||
WEDNESDAY( 3, "周三", EnumsPrefixConstants.CYCLE + "3"),
|
WEDNESDAY(3, "周三"),
|
||||||
/**
|
/**
|
||||||
* 周四
|
* 周四
|
||||||
*/
|
*/
|
||||||
THURSDAY( 4, "周四", EnumsPrefixConstants.CYCLE + "4"),
|
THURSDAY(4, "周四"),
|
||||||
/**
|
/**
|
||||||
* 周五
|
* 周五
|
||||||
*/
|
*/
|
||||||
FRIDAY( 5, "周五", EnumsPrefixConstants.CYCLE + "5"),
|
FRIDAY(5, "周五"),
|
||||||
/**
|
/**
|
||||||
* 周六
|
* 周六
|
||||||
*/
|
*/
|
||||||
SATURDAY( 6, "周六", EnumsPrefixConstants.CYCLE + "6"),
|
SATURDAY(6, "周六"),
|
||||||
/**
|
/**
|
||||||
* 周日
|
* 周日
|
||||||
*/
|
*/
|
||||||
SUNDAY( 7, "周日", EnumsPrefixConstants.CYCLE + "7"),
|
SUNDAY(7, "周日"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -54,11 +51,6 @@ public enum ECycle {
|
||||||
* 显示标签
|
* 显示标签
|
||||||
*/
|
*/
|
||||||
private final String label;
|
private final String label;
|
||||||
/**
|
|
||||||
* 国际化翻译key值
|
|
||||||
*/
|
|
||||||
private final String key;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,29 +11,33 @@ import lombok.Getter;
|
||||||
@Getter
|
@Getter
|
||||||
public enum EWaresPermissionType {
|
public enum EWaresPermissionType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定会员
|
||||||
|
*/
|
||||||
|
MEMBER(6, "指定会员", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1=血缘可见
|
* 1=血缘可见
|
||||||
*/
|
*/
|
||||||
BLOOD_ALLOW(1, "血缘可见", 0, EnumsPrefixConstants.ENU_WARES + "1"),
|
BLOOD_ALLOW(1, "血缘可见", 0),
|
||||||
/**
|
/**
|
||||||
* 2=血缘禁止
|
* 2=血缘禁止
|
||||||
*/
|
*/
|
||||||
BLOOD_STOP(2, "血缘禁止", 0, EnumsPrefixConstants.ENU_WARES + "2"),
|
BLOOD_STOP(2, "血缘禁止", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安置可见
|
* 安置可见
|
||||||
*/
|
*/
|
||||||
PLACE_ALLWO(3, "安置可见", 0, EnumsPrefixConstants.ENU_WARES + "3"),
|
PLACE_ALLWO(3, "安置可见", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安置禁止
|
* 安置禁止
|
||||||
*/
|
*/
|
||||||
PLACE_STOP(4, "安置禁止", 0, EnumsPrefixConstants.ENU_WARES + "4"),
|
PLACE_STOP(4, "安置禁止", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全部
|
* 全部
|
||||||
*/
|
*/
|
||||||
AUTH_ORITY_TYPE(5, "全部", 0, EnumsPrefixConstants.ENU_WARES + "5"),
|
AUTH_ORITY_TYPE(5, "全部", 0),
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,10 +52,6 @@ public enum EWaresPermissionType {
|
||||||
* 是否启用(0=是,1=否) -- 来源EYesNo
|
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||||
*/
|
*/
|
||||||
private final int enable;
|
private final int enable;
|
||||||
/**
|
|
||||||
* 国际化翻译key值
|
|
||||||
*/
|
|
||||||
private final String key;
|
|
||||||
|
|
||||||
public static String getEnumLabelByValue(Integer value) {
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
if (null == value) {
|
if (null == value) {
|
||||||
|
|
Loading…
Reference in New Issue