后台文件上传,账单错误修改
This commit is contained in:
parent
18f00dc655
commit
1260faa8bc
7
pom.xml
7
pom.xml
|
|
@ -196,6 +196,12 @@
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/fastdfs-client-java-1.25.jar</systemPath>
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/fastdfs-client-java-1.25.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<finalName>ifishSystem</finalName>
|
<finalName>ifishSystem</finalName>
|
||||||
|
|
@ -242,6 +248,7 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*.xml</include>
|
<include>**/*.xml</include>
|
||||||
<include>**/*.properties</include>
|
<include>**/*.properties</include>
|
||||||
|
<include>**/*.conf</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import com.ifish.service.AdInfoService;
|
||||||
import com.ifish.util.IfishFileDirectory;
|
import com.ifish.util.IfishFileDirectory;
|
||||||
import com.ifish.util.IfishFileUtils;
|
import com.ifish.util.IfishFileUtils;
|
||||||
import com.ifish.util.ResultUtil;
|
import com.ifish.util.ResultUtil;
|
||||||
|
import com.ifishNew.help.FastDFSClientI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告信息
|
* 广告信息
|
||||||
|
|
@ -30,7 +31,6 @@ public class AdInfoAction {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AdInfoService adInfoService;
|
private AdInfoService adInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告信息页面
|
* 广告信息页面
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import com.ifish.service.IfishShopService;
|
||||||
import com.ifish.util.IfishFileDirectory;
|
import com.ifish.util.IfishFileDirectory;
|
||||||
import com.ifish.util.IfishFileUtils;
|
import com.ifish.util.IfishFileUtils;
|
||||||
import com.ifish.util.ResultUtil;
|
import com.ifish.util.ResultUtil;
|
||||||
|
import com.ifishNew.help.FastDFSClientI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品管理action
|
* 商品管理action
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,11 @@ import com.ifish.service.InformationService;
|
||||||
import com.ifish.util.IfishFileDirectory;
|
import com.ifish.util.IfishFileDirectory;
|
||||||
import com.ifish.util.IfishFileUtils;
|
import com.ifish.util.IfishFileUtils;
|
||||||
import com.ifish.util.ResultUtil;
|
import com.ifish.util.ResultUtil;
|
||||||
|
import com.ifishNew.help.FastDFSClientI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资讯信息
|
* 资讯信息
|
||||||
|
*
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
@ -35,6 +37,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资讯信息页面
|
* 资讯信息页面
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/information.do")
|
@RequestMapping(value = "/information.do")
|
||||||
|
|
@ -45,6 +48,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资讯信息分页数据
|
* 资讯信息分页数据
|
||||||
|
*
|
||||||
* @param pageData
|
* @param pageData
|
||||||
* @param information
|
* @param information
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -58,6 +62,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app展示
|
* app展示
|
||||||
|
*
|
||||||
* @param infoId
|
* @param infoId
|
||||||
* @param appShow
|
* @param appShow
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -70,6 +75,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增资讯
|
* 新增资讯
|
||||||
|
*
|
||||||
* @param information
|
* @param information
|
||||||
* @param fileUpload
|
* @param fileUpload
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -99,6 +105,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改资讯信息
|
* 修改资讯信息
|
||||||
|
*
|
||||||
* @param information
|
* @param information
|
||||||
* @param fileUpload
|
* @param fileUpload
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -131,6 +138,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除资讯
|
* 删除资讯
|
||||||
|
*
|
||||||
* @param infoId
|
* @param infoId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -147,6 +155,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询资讯信息
|
* 根据ID查询资讯信息
|
||||||
|
*
|
||||||
* @param infoId
|
* @param infoId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -156,8 +165,7 @@ public class InformationAction {
|
||||||
Information info = infoService.getInformationById(infoId);
|
Information info = infoService.getInformationById(infoId);
|
||||||
if (info.getUeditorId() != null) {
|
if (info.getUeditorId() != null) {
|
||||||
info.setSource(InformationSourceEnum.ueditor.getKey());
|
info.setSource(InformationSourceEnum.ueditor.getKey());
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
info.setSource(InformationSourceEnum.other.getKey());
|
info.setSource(InformationSourceEnum.other.getKey());
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
|
|
@ -165,6 +173,7 @@ public class InformationAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查找编辑器信息
|
* 根据ID查找编辑器信息
|
||||||
|
*
|
||||||
* @param ueditorId
|
* @param ueditorId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -25,20 +25,29 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ifish.entity.Menu;
|
import com.ifish.entity.Menu;
|
||||||
import com.ifish.entity.Role;
|
import com.ifish.entity.Role;
|
||||||
import com.ifish.entity.SecurityUser;
|
import com.ifish.entity.SecurityUser;
|
||||||
|
import com.ifish.enums.AdTypeEnum;
|
||||||
import com.ifish.enums.RoleEnum;
|
import com.ifish.enums.RoleEnum;
|
||||||
import com.ifish.enums.SysUserEnum;
|
import com.ifish.enums.SysUserEnum;
|
||||||
|
import com.ifish.exception.IfishException;
|
||||||
import com.ifish.menu.IfishMenu;
|
import com.ifish.menu.IfishMenu;
|
||||||
import com.ifish.service.AdminService;
|
import com.ifish.service.AdminService;
|
||||||
import com.ifish.service.PublicService;
|
import com.ifish.service.PublicService;
|
||||||
import com.ifish.ueditor.ActionEnter;
|
import com.ifish.ueditor.ActionEnter;
|
||||||
|
import com.ifish.util.IfishFileDirectory;
|
||||||
|
import com.ifish.util.IfishFileUtils;
|
||||||
|
import com.ifish.util.IfishUtil;
|
||||||
import com.ifish.util.getRemoteAddress;
|
import com.ifish.util.getRemoteAddress;
|
||||||
|
import com.ifishNew.bean.CommodityInfoBean;
|
||||||
|
import com.ifishNew.help.FastDFSClientI;
|
||||||
|
import com.ifishNew.mapper.Tbl_Commodity_Info_Mapper;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: PublicAction
|
* @ClassName: PublicAction
|
||||||
* @Description: 公共页面
|
* @Description: 公共页面
|
||||||
* @author ggw
|
* @author ggw
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Controller("publicAction")
|
@Controller("publicAction")
|
||||||
@RequestMapping("/public")
|
@RequestMapping("/public")
|
||||||
public class PublicAction {
|
public class PublicAction {
|
||||||
|
|
@ -53,6 +62,7 @@ public class PublicAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登陆页面
|
* 登陆页面
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/login.do")
|
@RequestMapping("/login.do")
|
||||||
|
|
@ -62,6 +72,7 @@ public class PublicAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文本编辑器配置
|
* 文本编辑器配置
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
|
|
@ -84,6 +95,7 @@ public class PublicAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主页
|
* 主页
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/index.do")
|
@RequestMapping("/index.do")
|
||||||
|
|
@ -115,14 +127,11 @@ public class PublicAction {
|
||||||
String redirect = "";
|
String redirect = "";
|
||||||
if (role.equals(RoleEnum.admin.getKey())) {
|
if (role.equals(RoleEnum.admin.getKey())) {
|
||||||
redirect = "page/admin/home.do";
|
redirect = "page/admin/home.do";
|
||||||
}
|
} else if (role.equals(RoleEnum.vender.getKey())) {
|
||||||
else if(role.equals(RoleEnum.vender.getKey())){
|
|
||||||
redirect = "page/vender/tmpDeviceList.do";
|
redirect = "page/vender/tmpDeviceList.do";
|
||||||
}
|
} else if (role.equals(RoleEnum.user.getKey())) {
|
||||||
else if(role.equals(RoleEnum.user.getKey())){
|
|
||||||
redirect = "page/user/home.do";
|
redirect = "page/user/home.do";
|
||||||
}
|
} else if (role.equals(RoleEnum.factory.getKey())) {
|
||||||
else if(role.equals(RoleEnum.factory.getKey())){
|
|
||||||
redirect = "page/factory/tmpDeviceList.do";
|
redirect = "page/factory/tmpDeviceList.do";
|
||||||
}
|
}
|
||||||
return new ModelAndView("redirect:/" + redirect);
|
return new ModelAndView("redirect:/" + redirect);
|
||||||
|
|
@ -135,14 +144,17 @@ public class PublicAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改密码页面
|
* 修改密码页面
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/changePwd.do")
|
@RequestMapping("/changePwd.do")
|
||||||
public ModelAndView changePwd(String status) {
|
public ModelAndView changePwd(String status) {
|
||||||
return new ModelAndView("roleAll/changePwd", "status", status);
|
return new ModelAndView("roleAll/changePwd", "status", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改密码
|
* 修改密码
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/savePwd.do")
|
@RequestMapping("/savePwd.do")
|
||||||
|
|
@ -161,6 +173,7 @@ public class PublicAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户注册
|
* 用户注册
|
||||||
|
*
|
||||||
* @param securityUser
|
* @param securityUser
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -175,9 +188,12 @@ public class PublicAction {
|
||||||
return new ModelAndView("redirect:/page/public/login.do", "status", SysUserEnum.failed101.getKey());
|
return new ModelAndView("redirect:/page/public/login.do", "status", SysUserEnum.failed101.getKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************测试工具接口***************************************************/
|
/**
|
||||||
|
* *********************************************测试工具接口**************************************************
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* 获取厂家列表
|
* 获取厂家列表
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/getVenderList.do")
|
@RequestMapping("/getVenderList.do")
|
||||||
|
|
@ -192,8 +208,10 @@ public class PublicAction {
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存设备mac
|
* 保存设备mac
|
||||||
|
*
|
||||||
* @param data
|
* @param data
|
||||||
* @param subStr
|
* @param subStr
|
||||||
* @return
|
* @return
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import com.ifish.util.IfishFileUtils;
|
||||||
import com.ifish.util.ResultUtil;
|
import com.ifish.util.ResultUtil;
|
||||||
import com.ifishNew.bean.CommodityInfoBean;
|
import com.ifishNew.bean.CommodityInfoBean;
|
||||||
import com.ifishNew.help.CommodityInfoHelperI;
|
import com.ifishNew.help.CommodityInfoHelperI;
|
||||||
|
import com.ifishNew.help.FastDFSClientI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商家信息controller
|
* 商家信息controller
|
||||||
|
|
@ -37,6 +38,9 @@ public class ShopsInfoAction {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CommodityInfoHelperI commodityInfoHelperI;
|
private CommodityInfoHelperI commodityInfoHelperI;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FastDFSClientI fastDFSClientI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已审核商家信息页面
|
* 已审核商家信息页面
|
||||||
*
|
*
|
||||||
|
|
@ -130,7 +134,7 @@ public class ShopsInfoAction {
|
||||||
try {
|
try {
|
||||||
//上传文件
|
//上传文件
|
||||||
newImgName = String.valueOf(System.currentTimeMillis()) + ".png";
|
newImgName = String.valueOf(System.currentTimeMillis()) + ".png";
|
||||||
IfishFileUtils.uploadFile(IfishFileDirectory.path_picture4 + "/" + userId, newImgName, fileUpload);
|
newImgName = fastDFSClientI.uploadFile(IfishFileDirectory.path_picture4 + "/" + userId, newImgName, fileUpload);
|
||||||
} catch (IfishException e) {
|
} catch (IfishException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -2602,6 +2602,9 @@ public class AdminServiceImpl implements AdminService {
|
||||||
if (StringUtils.isNotBlank(isTax)) {
|
if (StringUtils.isNotBlank(isTax)) {
|
||||||
isTax = BooleanEnum.NO.getKey();
|
isTax = BooleanEnum.NO.getKey();
|
||||||
factoryList.setIsTax(isTax);
|
factoryList.setIsTax(isTax);
|
||||||
|
} else {
|
||||||
|
isTax = BooleanEnum.NO.getKey();
|
||||||
|
factoryList.setIsTax(isTax);
|
||||||
}
|
}
|
||||||
//支付金额为null时
|
//支付金额为null时
|
||||||
if (payMoney == null) {
|
if (payMoney == null) {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import com.ifish.exception.IfishException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件处理工具类
|
* 文件处理工具类
|
||||||
|
*
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
@ -20,6 +21,7 @@ public class IfishFileUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件并校验尺寸
|
* 上传文件并校验尺寸
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* @param fileName
|
* @param fileName
|
||||||
* @param multipartFile
|
* @param multipartFile
|
||||||
|
|
@ -44,8 +46,10 @@ public class IfishFileUtils {
|
||||||
//传输文件
|
//传输文件
|
||||||
multipartFile.transferTo(newFile);
|
multipartFile.transferTo(newFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件
|
* 上传文件
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* @param fileName
|
* @param fileName
|
||||||
* @param multipartFile
|
* @param multipartFile
|
||||||
|
|
@ -61,8 +65,10 @@ public class IfishFileUtils {
|
||||||
//传输文件
|
//传输文件
|
||||||
multipartFile.transferTo(newFile);
|
multipartFile.transferTo(newFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除文件
|
* 删除文件
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* @param fileName
|
* @param fileName
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ public class MybatisConfig {
|
||||||
|
|
||||||
// //获取当前操作系统(servers_os为服务器设置的属性JAVA_OPTS=%JAVA_OPTS% -Dservers_os=online84)
|
// //获取当前操作系统(servers_os为服务器设置的属性JAVA_OPTS=%JAVA_OPTS% -Dservers_os=online84)
|
||||||
// String servers_os = System.getProperty("servers_os") == null ? "" : System.getProperty("servers_os");
|
// String servers_os = System.getProperty("servers_os") == null ? "" : System.getProperty("servers_os");
|
||||||
|
|
||||||
dataSource.setUsername("ifish");
|
dataSource.setUsername("ifish");
|
||||||
dataSource.setPassword("ifish7pwd");
|
dataSource.setPassword("ifish7pwd");
|
||||||
dataSource.setUrl("jdbc\\:mysql\\://localhost\\:3306/myfishdb?characterEncoding\\=UTF-8");
|
dataSource.setUrl("jdbc\\:mysql\\://localhost\\:3306/myfishdb?characterEncoding\\=UTF-8");
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
package com.ifishNew.help;
|
package com.ifishNew.help;
|
||||||
|
|
||||||
|
import com.ifish.enums.SysUserEnum;
|
||||||
|
import com.ifish.exception.IfishException;
|
||||||
import com.ifish.util.IfishFileDirectory;
|
import com.ifish.util.IfishFileDirectory;
|
||||||
import com.ifish.util.ValidateUtil;
|
import com.ifish.util.ValidateUtil;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.csource.fastdfs.ClientGlobal;
|
import org.csource.fastdfs.ClientGlobal;
|
||||||
import org.csource.fastdfs.StorageClient1;
|
import org.csource.fastdfs.StorageClient1;
|
||||||
|
|
@ -136,10 +142,47 @@ public class FastDFSClient implements FastDFSClientI {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IfishFileDirectory.env.equals("product")) {
|
||||||
return IfishFileDirectory.fastDFS_url_app + url;
|
return IfishFileDirectory.fastDFS_url_app + url;
|
||||||
|
} else {
|
||||||
|
return IfishFileDirectory.fastDFS_url_local + url;
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String uploadFile(String path, String fileName, MultipartFile multipartFile, int width, int height) throws IllegalStateException, IOException {
|
||||||
|
//检验图片尺寸
|
||||||
|
BufferedImage sourceImg = ImageIO.read(multipartFile.getInputStream());
|
||||||
|
int imgWidth = sourceImg.getWidth();
|
||||||
|
int imgHeight = sourceImg.getHeight();
|
||||||
|
if (width != imgWidth || height != imgHeight) {
|
||||||
|
throw new IfishException(SysUserEnum.warn115.getKey(), SysUserEnum.warn115.getValue() + "(" + width + "x" + height + ")");
|
||||||
|
}
|
||||||
|
//文件名
|
||||||
|
File newFile = new File(path, fileName);
|
||||||
|
if (!newFile.exists()) {
|
||||||
|
newFile.mkdirs();
|
||||||
|
}
|
||||||
|
//传输文件
|
||||||
|
//multipartFile.transferTo(newFile);
|
||||||
|
String value = uploadFileToFastDFS(multipartFile);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String uploadFile(String path, String fileName, MultipartFile multipartFile) throws IllegalStateException, IOException {
|
||||||
|
//文件名
|
||||||
|
// File newFile = new File(path, fileName);
|
||||||
|
// if (!newFile.exists()) {
|
||||||
|
// newFile.mkdirs();
|
||||||
|
// }
|
||||||
|
//传输文件
|
||||||
|
//multipartFile.transferTo(newFile);
|
||||||
|
String value = uploadFileToFastDFS(multipartFile);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
package com.ifishNew.help;
|
package com.ifishNew.help;
|
||||||
|
|
||||||
import com.ifish.domain.JsonResult;
|
import com.ifish.domain.JsonResult;
|
||||||
|
import java.io.IOException;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -46,4 +47,8 @@ public interface FastDFSClientI {
|
||||||
String uploadFile(String group_name, String local_filename, String file_ext_name) throws Exception;
|
String uploadFile(String group_name, String local_filename, String file_ext_name) throws Exception;
|
||||||
|
|
||||||
String uploadFileToFastDFS(MultipartFile file);
|
String uploadFileToFastDFS(MultipartFile file);
|
||||||
|
|
||||||
|
String uploadFile(String path, String fileName, MultipartFile multipartFile, int width, int height) throws IllegalStateException, IOException;
|
||||||
|
|
||||||
|
String uploadFile(String path, String fileName, MultipartFile multipartFile) throws IllegalStateException, IOException;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<intercept-url pattern="/page/public/savePwd.do" access="isAuthenticated()"/>
|
<intercept-url pattern="/page/public/savePwd.do" access="isAuthenticated()"/>
|
||||||
<!-- 允许所有人访问 -->
|
<!-- 允许所有人访问 -->
|
||||||
<intercept-url pattern="/page/public/**" access="permitAll"/>
|
<intercept-url pattern="/page/public/**" access="permitAll"/>
|
||||||
|
<intercept-url pattern="/page/test/test" access="permitAll"/>
|
||||||
<!-- 根据角色访问 -->
|
<!-- 根据角色访问 -->
|
||||||
<intercept-url pattern="/ueditor/ueditor.jsp" access="hasAnyRole('ROLE_ADMIN')" />
|
<intercept-url pattern="/ueditor/ueditor.jsp" access="hasAnyRole('ROLE_ADMIN')" />
|
||||||
<intercept-url pattern="/page/user/**" access="hasAnyRole('ROLE_USER')" />
|
<intercept-url pattern="/page/user/**" access="hasAnyRole('ROLE_USER')" />
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ ifish_account=ifish
|
||||||
#IM\u5b98\u65b9\u624b\u673a\u53f7
|
#IM\u5b98\u65b9\u624b\u673a\u53f7
|
||||||
netease_phone=18501773036
|
netease_phone=18501773036
|
||||||
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u672c\u5730\u548c\u6d4b\u8bd5\u73af\u5883)
|
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u672c\u5730\u548c\u6d4b\u8bd5\u73af\u5883)
|
||||||
fastDFS_url_local=https://app.zhangxinyanv5.top/
|
fastDFS_url_local=http://139.196.24.156:83/
|
||||||
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u6b63\u5f0f\u73af\u5883)
|
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u6b63\u5f0f\u73af\u5883)
|
||||||
fastDFS_url_app=http://app.ifish7.com/
|
fastDFS_url_app=http://app.ifish7.com/
|
||||||
#\u73af\u5883(local:\u672c\u5730\u73af\u5883,test:\u6d4b\u8bd5\u73af\u5883,\u6b63\u5f0f\u73af\u5883:product)
|
#\u73af\u5883(local:\u672c\u5730\u73af\u5883,test:\u6d4b\u8bd5\u73af\u5883,\u6b63\u5f0f\u73af\u5883:product)
|
||||||
env=test
|
env=product
|
||||||
Binary file not shown.
|
|
@ -33,7 +33,12 @@
|
||||||
"bSortable": false
|
"bSortable": false
|
||||||
},
|
},
|
||||||
{"mData": function (adInfo) {
|
{"mData": function (adInfo) {
|
||||||
|
if (adInfo.adImage.indexOf('http') > 1) {
|
||||||
|
return '<img src="' + adInfo.adImage + '" width="50%"/>';
|
||||||
|
} else {
|
||||||
return '<img src="<%=picturePath%>Img/adInfo/' + adInfo.adImage + '" width="50%"/>';
|
return '<img src="<%=picturePath%>Img/adInfo/' + adInfo.adImage + '" width="50%"/>';
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"bSortable": false
|
"bSortable": false
|
||||||
},
|
},
|
||||||
|
|
@ -104,7 +109,10 @@
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="breadcrumbs" id="breadcrumbs">
|
<div class="breadcrumbs" id="breadcrumbs">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
|
try {
|
||||||
|
ace.settings.check('breadcrumbs', 'fixed')
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li>
|
<li>
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,12 @@ String IMPath = "";
|
||||||
if (IfishFileDirectory.env.equals("local")) {
|
if (IfishFileDirectory.env.equals("local")) {
|
||||||
basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
|
basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
|
||||||
picturePath = request.getScheme() + "://" + request.getServerName() + ":81/";
|
picturePath = request.getScheme() + "://" + request.getServerName() + ":81/";
|
||||||
}
|
} //测试环境
|
||||||
//测试环境
|
|
||||||
else if (IfishFileDirectory.env.equals("test")) {
|
else if (IfishFileDirectory.env.equals("test")) {
|
||||||
basePath = "https://"+request.getServerName()+"/";
|
basePath = "http://139.196.24.156:83/";
|
||||||
picturePath = "https://"+request.getServerName()+"/";
|
picturePath = "http://139.196.24.156:83/";
|
||||||
IMPath = "http://www.zhangxinyanv5.top/neteaseIM/im/index.html";
|
IMPath = "http://www.zhangxinyanv5.top/neteaseIM/im/index.html";
|
||||||
}
|
} //正式环境
|
||||||
//正式环境
|
|
||||||
else if (IfishFileDirectory.env.equals("product")) {
|
else if (IfishFileDirectory.env.equals("product")) {
|
||||||
basePath = "https://" + request.getServerName() + "/";
|
basePath = "https://" + request.getServerName() + "/";
|
||||||
picturePath = "https://" + request.getServerName() + "/";
|
picturePath = "https://" + request.getServerName() + "/";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<%--
|
||||||
|
Document : test
|
||||||
|
Created on : 2017-9-21, 22:38:06
|
||||||
|
Author : Administrator
|
||||||
|
--%>
|
||||||
|
|
||||||
|
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>JSP Page</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello World!</h1>
|
||||||
|
<form action="test" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="file" name="file" /> <input type="submit" value="Submit" /></form>
|
||||||
|
|
||||||
|
<h1>${status}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue