| | |
| | | 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.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.SysProjuseFreezeService; |
| | | import jodd.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | } |
| | | |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | String fileName = file.getOriginalFilename(); |
| | | // String dirPath = "E:"; |
| | | String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | 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); |
| | | |
| | |
| | | List<Object> objects = taocanDataList.get(j); |
| | | LogUtil.info("导入套餐第" + j + "行" + objects); |
| | | Object vipName = objects.get(0); |
| | | String vipNameStr = vipName.toString(); |
| | | String vipNameStr = vipName==null?"":vipName.toString(); |
| | | if (taocan == null |
| | | || (taocan != null && StringUtils.isNotBlank(vipNameStr))) { |
| | | //切换下一个套餐 |
| | |
| | | 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()); |
| | |
| | | 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()); |