门店号管理

master
LegnaYet 6 years ago
parent 93ec40fd43
commit 4977a87b8a

@ -106,6 +106,9 @@ public class LoginServiceImpl implements LoginService {
loginBean.setLogin(login); loginBean.setLogin(login);
loginInfoMap.put("code", LoginEnum.LOGIN_SUCCEED.getCode()); loginInfoMap.put("code", LoginEnum.LOGIN_SUCCEED.getCode());
loginBean.setLoginInfo(loginInfoMap); loginBean.setLoginInfo(loginInfoMap);
if (StringUtils.isNotBlank(roleDO.getCode()) && MINI_ROLE_CODE.contains(roleDO.getCode())){
return new LoginBean(Constants.ERROR_ROLE_NO_PERMISSION);
}
}else { }else {
return new LoginBean(Constants.LOGIN_NO_PERMISSIONS); return new LoginBean(Constants.LOGIN_NO_PERMISSIONS);
} }

@ -120,7 +120,6 @@ public class PoiStoreStaffService {
QueryWrapper<OpSellerCustomerRelation> wrapper2 = new QueryWrapper<>(); QueryWrapper<OpSellerCustomerRelation> wrapper2 = new QueryWrapper<>();
wrapper2.eq("store_id",shopId); wrapper2.eq("store_id",shopId);
wrapper2.eq("user_id",poiStoreStaff.getUserId()); wrapper2.eq("user_id",poiStoreStaff.getUserId());
wrapper2.eq("type",1);
List<OpSellerCustomerRelation> opRelations = opSellerCustomerRelationDOMapper.selectList(wrapper2); List<OpSellerCustomerRelation> opRelations = opSellerCustomerRelationDOMapper.selectList(wrapper2);
long count = opRelations.stream().map(OpSellerCustomerRelation::getCustomerId).distinct().count(); long count = opRelations.stream().map(OpSellerCustomerRelation::getCustomerId).distinct().count();
poiStoreStaffVO.setCustomerNum((int)count); poiStoreStaffVO.setCustomerNum((int)count);
@ -261,7 +260,7 @@ public class PoiStoreStaffService {
String cpUserId = privilageCpUserStoreDOMapper.selectCpUserIdByStoreId(poiStoreStaffVO.getStoreId()); String cpUserId = privilageCpUserStoreDOMapper.selectCpUserIdByStoreId(poiStoreStaffVO.getStoreId());
PoiStore poiStore = poiStoreDOMapper.selectById(poiStoreStaffVO.getStoreId()); PoiStore poiStore = poiStoreDOMapper.selectById(poiStoreStaffVO.getStoreId());
poiStoreStaffVO.setStoreCode(poiStore.getCode());
String[] data = new String[1]; String[] data = new String[1];
//选择店铺对应店长的编码 //选择店铺对应店长的编码

@ -146,7 +146,6 @@ public class StoreEmployeeService {
//客户数 //客户数
QueryWrapper<OpSellerCustomerRelation> wrapper2 = new QueryWrapper<>(); QueryWrapper<OpSellerCustomerRelation> wrapper2 = new QueryWrapper<>();
wrapper2.eq("store_id",cpUserStore.getId()); wrapper2.eq("store_id",cpUserStore.getId());
wrapper2.eq("type",1);
List<OpSellerCustomerRelation> opRelations = opSellerCustomerRelationDOMapper.selectList(wrapper2); List<OpSellerCustomerRelation> opRelations = opSellerCustomerRelationDOMapper.selectList(wrapper2);
long count = opRelations.stream().map(OpSellerCustomerRelation::getCustomerId).distinct().count(); long count = opRelations.stream().map(OpSellerCustomerRelation::getCustomerId).distinct().count();
cpUserStore.setCustomerNum((int)count); cpUserStore.setCustomerNum((int)count);

@ -157,7 +157,7 @@ public class PrivilageAccountServiceImpl extends ServiceImpl<PrivilageAccountDOM
PrivilageRoleDO privilageRoleDO = privilageRoleDOMapper.selectById(saveAccountInput.getRoleId()); PrivilageRoleDO privilageRoleDO = privilageRoleDOMapper.selectById(saveAccountInput.getRoleId());
//店长维护用户店铺关系1.店长。4.导购 //店长维护用户店铺关系1.店长。4.导购
if (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode()) || privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DG.getRoleCode())) { if (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode()) || privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DG.getRoleCode())) {
privilageDomainService.saveOneShop(userId, saveAccountInput.getStaffCode(), shopId, saveAccountInput.getType()); privilageDomainService.saveOneShop(userId, saveAccountInput.getAccount(), shopId, saveAccountInput.getType());
return true; return true;
} }
//运营人员维护全店铺域实体关系 //运营人员维护全店铺域实体关系

@ -461,6 +461,7 @@ public class WxResponseService {
ocew.setState(state); ocew.setState(state);
CustomerDTO customerDTO = new CustomerDTO(); CustomerDTO customerDTO = new CustomerDTO();
customerDTO.setUniId(ocew.getUnionid()); customerDTO.setUniId(ocew.getUnionid());
customerDTO.setName(ocew.getName());
customerDTO.setExternalUserid(ocew.getExternalUserid()); customerDTO.setExternalUserid(ocew.getExternalUserid());
if (StringUtils.isNotBlank(ocew.getState())){ if (StringUtils.isNotBlank(ocew.getState())){
//解析state 店铺code-导购 //解析state 店铺code-导购

Loading…
Cancel
Save