| | |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.TableMapping; |
| | |
| | | } |
| | | if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "PHONE", sysVipInfo.getPhone(), |
| | | "company_id",sysVipInfo.getCompanyId() )) { |
| | | throw new GlobleException("手机已被注册!"); |
| | | throw new GlobleException(sysVipInfo.getPhone()+"手机已被注册!"); |
| | | } |
| | | } |
| | | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(user!=null){ |
| | | sysVipInfo.setCompanyId(user.getCompanyId()); |
| | | } |
| | | sysVipInfo.setCreateTime(new Date()); |
| | | sysVipInfo.setPointAll(0); |
| | | sysVipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP); |
| | |
| | | SysVipInfo vipInfo = new SysVipInfo(); |
| | | vipInfo.setVipNo(objects.get(0).toString()); |
| | | |
| | | SysVipInfo exist = sysVipInfoDao.selectByPhone(objects.get(3).toString()); |
| | | SysVipInfo exist = sysVipInfoDao.selectByPhone(objects.get(3).toString(),sysUsers.getCompanyId()); |
| | | if (exist != null) { |
| | | continue; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<VipInfoListVo> findVipAddressBook(VipInfoListDto vipInfoListDto) { |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | vipInfoListDto.setShopId(sysUsers.getShopId()); |
| | | } |
| | | //todo 会员查询单独做控制 |
| | | // SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | // if (!DataAuthUtil.hasAllShopAuth()) { |
| | | // vipInfoListDto.setShopId(sysUsers.getShopId()); |
| | | // } |
| | | QueryUtil.setQueryLimitCom(vipInfoListDto); |
| | | return sysVipInfoDao.selectVipAddressBookByList(vipInfoListDto); |
| | | } |