| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | |
| | | // String dirPath = "E:"; |
| | | String dirPath = fileStoragePath; |
| | | |
| | | File saveFile = new File(dirPath + "/" + fileName); |
| | | file.transferTo(saveFile); |
| | | File saveFile =new File (new File(dirPath).getAbsolutePath() + File.separator + fileName); |
| | | if (!saveFile.exists()) |
| | | { |
| | | if (!saveFile.getParentFile().exists()) |
| | | { |
| | | saveFile.getParentFile().mkdirs(); |
| | | } |
| | | } |
| | | file.transferTo(saveFile.getAbsoluteFile()); |
| | | |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | |
| | | Object tel = objects.get(1); |
| | | if (tel != null) { |
| | | String telStr = tel.toString(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId()); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(StrUtil.trim(telStr),sysUsers.getCompanyId()); |
| | | if (vipInfo == null) { |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | vipInfo.setPhone(telStr); |
| | | vipInfo.setPhoto(defaultWoman); |
| | | vipInfo.setName(objects.get(0).toString()); |
| | | vipInfo.setIsDelete(Dictionary.DELETED_N); |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | | |
| | |
| | | Object tel = objects.get(1); |
| | | if (tel != null) { |
| | | String telStr = tel.toString(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId()); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(StrUtil.trim(telStr),sysUsers.getCompanyId()); |
| | | if (vipInfo == null) { |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | vipInfo.setPhone(telStr); |
| | | vipInfo.setPhoto(defaultWoman); |
| | | vipInfo.setName(objects.get(0).toString()); |
| | | vipInfo.setIsDelete(Dictionary.DELETED_N); |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | | String goodNo = String.valueOf(objects.get(3)); |