| | |
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/config")
|
| | |
| | | * @param config
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveModify")
|
| | | public void saveModify(String callback, Config config, Long uid, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | public void saveModify(String callback, Config config, PrintWriter out) {
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | |
| | | Long id = config.getId();
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.Utils;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/goodsclass")
|
| | |
| | | * @param request
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveAdd", method = RequestMethod.POST)
|
| | | public void saveAdd(String callback, GoodsClass goodsClass, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | public void saveAdd(String callback, GoodsClass goodsClass, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | String name = goodsClass.getName();
|
| | |
| | | * @param out
|
| | | * @param response
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadPicture")
|
| | | public void uploadPicture(Long id, @RequestParam("file") CommonsMultipartFile file, PrintWriter out, HttpServletResponse response) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | public void uploadPicture(Long id, @RequestParam("file") CommonsMultipartFile file, PrintWriter out) {
|
| | |
|
| | | try {
|
| | |
|
| | | GoodsClass goodsClass = goodsClassService.getGoodsClass(id);
|
| | |
|
| | | if (goodsClass == null) {
|
| | | if (goodsClass == null ) {
|
| | | out.print(JsonUtil.loadFalseResult("该类别不存在或已被删除"));
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | goodsClassService.uploadPicture(goodsClass, file);
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult("上传成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | |
| | | import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelClassService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/goodsSubClass")
|
| | |
| | | * @param request
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveAdd", method = RequestMethod.POST)
|
| | | public void saveAdd(String callback, Long pid, Integer type, GoodsSubClass goodsSubClass,
|
| | | HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | String name = goodsSubClass.getName();
|
| | |
| | | out.print(JsonUtil.loadFalseResult("类别名称不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
|
| | | if (pid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上级id为空"));
|
| | |
| | | * @param out
|
| | | * @param response
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadPicture")
|
| | | public void uploadPicture(Long id, @RequestParam("file") CommonsMultipartFile file, |
| | | PrintWriter out, HttpServletResponse response) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | public void uploadPicture(Long id, @RequestParam("file") CommonsMultipartFile file, PrintWriter out) {
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("图片文件不能为空"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | |
|
| | | GoodsSubClass goodsSubClass = goodsSubClassService.selectByPrimaryKey(id);
|
| | |
|
| | | if (goodsSubClass == null) {
|
| | | out.print(JsonUtil.loadFalseResult("该类别不存在或已被删除"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("图片文件不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | int result = goodsSubClassService.uploadPicture(goodsSubClass, file);
|
| | |
|
| | | if (result == 1) {
|
| | | out.print(JsonUtil.loadTrueResult("上传成功"));
|
| | | } else {
|
| | |
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/helpCenter")
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback,HelpCenter helpCenter, String acction ,String content, String html,
|
| | | HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | PrintWriter out) {
|
| | | try {
|
| | | |
| | | String title = helpCenter.getTitle();
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("标题不能为空"));
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | // TODO Auto-generated catch block
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.admin.InviteGetMoney;
|
| | | import com.yeshi.fanli.entity.bus.invite.SpreadImg;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.config.InviteGetMoneyService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.GsonUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/inviteGetMoney")
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveAdd")
|
| | | public void saveAdd(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | Long id, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | public void saveAdd(@RequestParam("file") CommonsMultipartFile file, Long id, PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/lable")
|
| | |
| | | * @param request
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveAdd")
|
| | | public void saveAdd(String callback,Long uid, Label label,
|
| | | HttpServletRequest request, PrintWriter out, HttpServletResponse response) {
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | |
| | | // // 获取当前操作用户
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户已失效,请重新登陆。"));
|
| | | } else {
|
| | | public void saveAdd(String callback, Long uid, Label label, HttpServletRequest request, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | String title = label.getTitle();
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | out.print( JsonUtil.loadFalseResult("标签名称为空"));
|
| | | } else {
|
| | | |
| | | List<Label> labels = labelService.selectByTitle(title.trim());
|
| | | |
| | | if (labels == null || labels.size() == 0) {
|
| | | |
| | | label.setTitle(label.getTitle().trim());
|
| | | |
| | | if(request instanceof MultipartHttpServletRequest){
|
| | | |
| | | List<MultipartFile> files = ((MultipartHttpServletRequest) request).getFiles("file");
|
| | | |
| | | if (files != null && files.size() > 0) {
|
| | | labelService.insertSingle(label, admin, files.get(0));
|
| | | } else {
|
| | | labelService.insertSingle(label, admin, null);
|
| | | }
|
| | | |
| | | } else {
|
| | | labelService.insertSingle(label, admin, null);
|
| | | }
|
| | | |
| | | out.print( JsonUtil.loadTrueResult("添加成功"));
|
| | | |
| | | } else {
|
| | | out.print( JsonUtil.loadTrueResult("已存在此标签"));
|
| | | }
|
| | | }
|
| | | |
| | | } catch (Exception e) {
|
| | | // TODO Auto-generated catch block
|
| | | out.print(JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | try {
|
| | | String title = label.getTitle();
|
| | | if (StringUtil.isNullOrEmpty(title)) {
|
| | | out.print(JsonUtil.loadFalseResult("标签名称为空"));
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | List<Label> labels = labelService.selectByTitle(title.trim());
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | if (labels == null || labels.size() == 0) {
|
| | |
|
| | | label.setTitle(label.getTitle().trim());
|
| | |
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | |
|
| | | List<MultipartFile> files = ((MultipartHttpServletRequest) request).getFiles("file");
|
| | |
|
| | | if (files != null && files.size() > 0) {
|
| | | labelService.insertSingle(label, admin, files.get(0));
|
| | | } else {
|
| | | labelService.insertSingle(label, admin, null);
|
| | | }
|
| | |
|
| | | } else {
|
| | | labelService.insertSingle(label, admin, null);
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult("添加成功"));
|
| | |
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult("已存在此标签"));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "addBatch")
|
| | | public void addBatch(String callback, String param,
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | | // // 获取当前操作用户
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | public void addBatch(String callback, String param, HttpServletRequest request, PrintWriter out) {
|
| | |
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadJSONP(callback,JsonUtil.loadFalseResult("当前账户已失效,请重新登陆。")));
|
| | | } else {
|
| | |
|
| | | try {
|
| | | Gson gson = new Gson();
|
| | | List<Label> labs = gson.fromJson(param, new TypeToken<ArrayList<Label>>() {}.getType());
|
| | | try {
|
| | | Gson gson = new Gson();
|
| | | List<Label> labs = gson.fromJson(param, new TypeToken<ArrayList<Label>>() {}.getType());
|
| | | |
| | | List<Label> newList = new ArrayList<Label>();
|
| | | if (labs == null || labs.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("未检索到数据")));
|
| | | return;
|
| | | } |
| | |
|
| | | List<Label> newList = new ArrayList<Label>();
|
| | | if (labs == null || labs.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("未检索到数据")));
|
| | | } else {
|
| | | for (Label label: labs) {
|
| | | String title = label.getTitle();
|
| | | if (!StringUtil.isNullOrEmpty(title)) {
|
| | | |
| | | List<Label> labels = labelService.selectByTitle(title.trim());
|
| | | if (labels == null || labels.size() == 0) {
|
| | | newList.add(label);
|
| | | }
|
| | | }
|
| | | for (Label label: labs) {
|
| | | String title = label.getTitle();
|
| | | if (!StringUtil.isNullOrEmpty(title)) {
|
| | | |
| | | List<Label> labels = labelService.selectByTitle(title.trim());
|
| | | if (labels == null || labels.size() == 0) {
|
| | | newList.add(label);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | labelService.insertList(newList, admin);
|
| | |
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("添加成功")));
|
| | | } catch (LabelException e) {
|
| | | // TODO Auto-generated catch block
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("添加异常")));
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | labelService.insertList(newList, admin);
|
| | |
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("添加成功")));
|
| | | } catch (LabelException e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("添加异常")));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveModify")
|
| | | public void saveModify(String callback, Label label, HttpServletRequest request,PrintWriter out) {
|
| | | public void saveModify(String callback, Label label, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | Long id = label.getId();
|
| | |
| | | }
|
| | |
|
| | | } catch (LabelException e) {
|
| | | // TODO Auto-generated catch block
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("删除失败")));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | * @param out
|
| | | * @param response
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadFile")
|
| | | public void uploadFile(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | HttpServletRequest request, PrintWriter out,HttpServletResponse response) {
|
| | | // 获取当前操作用户
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | |
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | |
| | | if (admin == null) {
|
| | | out.print( JsonUtil.loadFalseResult("当前账户失效,请重新登陆。"));
|
| | | } else {
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("文件不能为空!"));
|
| | | } else {
|
| | | |
| | | try {
|
| | | labelService.analysisExcel(file.getInputStream(), admin);
|
| | | out.print((JsonUtil.loadTrueResult("上传成功")));
|
| | | //response.getWriter().print(JsonUtil.loadTrueResult("上传成功"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print((JsonUtil.loadFalseResult("上传失败")));
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | public void uploadFile(@RequestParam("file") CommonsMultipartFile file, HttpServletRequest request,
|
| | | PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("文件不能为空!"));
|
| | | return;
|
| | | }
|
| | |
|
| | | try {
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | labelService.analysisExcel(file.getInputStream(), admin);
|
| | |
|
| | | out.print((JsonUtil.loadTrueResult("上传成功")));
|
| | | // response.getWriter().print(JsonUtil.loadTrueResult("上传成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print((JsonUtil.loadFalseResult("上传失败")));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | * @param out
|
| | | * @param response
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadImg")
|
| | | public void uploadImg(Long id, @RequestParam("file") CommonsMultipartFile file, |
| | | HttpServletRequest request, PrintWriter out, HttpServletResponse response) {
|
| | | public void uploadImg(Long id, @RequestParam("file") CommonsMultipartFile file, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | // 获取当前操作用户
|
| | | |
| | | try {
|
| | | Label label = labelService.selectByPrimaryKey(id);
|
| | |
|
| | |
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadFalseResult("操作失败"));
|
| | | }
|
| | |
| | | * @param response
|
| | | */
|
| | | @RequestMapping(value = "deleteImg")
|
| | | public void deleteImg(String callback, Long id, HttpServletRequest request, PrintWriter out,
|
| | | HttpServletResponse response) {
|
| | | public void deleteImg(String callback, Long id, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | Label label = labelService.selectByPrimaryKey(id);
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.push.PushGoods;
|
| | | import com.yeshi.fanli.entity.push.PushGoodsGroup;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/pushgoods")
|
| | |
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, PushGoods pushGoods, Long editorUid, String idArray, HttpServletResponse response,
|
| | | PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(editorUid);
|
| | | if (admin == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作用户验证失败"));
|
| | | return;
|
| | | }
|
| | |
|
| | | public void save(String callback, PushGoods pushGoods, Long editorUid, String idArray, PrintWriter out) {
|
| | | |
| | | try {
|
| | |
|
| | | String alertTitle = pushGoods.getAlertTitle();
|
| | |
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
|
| | |
|
| | | @Controller
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadOrderFile")
|
| | | public void uploadOrderFile(@RequestParam("file") CommonsMultipartFile file, Long uid, HttpServletRequest request,
|
| | | HttpServletResponse response, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("用户验证未通过"));
|
| | | return;
|
| | | }
|
| | | public void uploadOrderFile(@RequestParam("file") CommonsMultipartFile file, PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件不能为空"));
|
| | |
| | | * @param file
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadPicture")
|
| | | public void uploadPicture(@RequestParam("file") CommonsMultipartFile file, HttpServletResponse response,
|
| | | PrintWriter out) {
|
| | | public void uploadPicture(@RequestParam("file") CommonsMultipartFile file, PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "installPackage")
|
| | | public void installPackage(@RequestParam("file") CommonsMultipartFile file, Long uid, |
| | | HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | |
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | public void installPackage(@RequestParam("file") CommonsMultipartFile file, PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/rankings")
|
| | |
| | |
|
| | |
|
| | |
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveAdd")
|
| | | public void saveAdd(String callback, UserRankings userRankings, HttpServletRequest request, PrintWriter out, HttpServletResponse response) {
|
| | | public void saveAdd(String callback, UserRankings userRankings, HttpServletRequest request, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | try {
|
| | | |
| | | /*String showId = userRankings.getShowId();
|
| | | List<UserRankings> list = userRankingsService.selectByShowId(showId);
|
| | | if (list != null && list.size() > 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("["+ showId +"] 此ID已存在"));
|
| | | return;
|
| | | }*/
|
| | |
|
| | | String nickName = userRankings.getNickName();
|
| | |
|
| | |
| | |
|
| | |
|
| | | @RequestMapping(value = "saveModify")
|
| | | public void saveModify(String callback, UserRankings userRankings, HttpServletRequest request, |
| | | PrintWriter out) {
|
| | | public void saveModify(String callback, UserRankings userRankings, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | Long id = userRankings.getId();
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("数据不存在或已被删除"));
|
| | | return;
|
| | | }
|
| | | |
| | | |
| | | /*String showId = userRankings.getShowId();
|
| | | List<UserRankings> list = userRankingsService.selectByShowId(showId);
|
| | | if (list != null && list.size() > 0) {
|
| | | boolean proess = false;
|
| | | for (UserRankings userRanking: list) {
|
| | | Long objid = userRanking.getId();
|
| | | if (id.equals(objid)){
|
| | | proess = true;
|
| | | }
|
| | | }
|
| | | |
| | | if (!proess){
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("["+ showId +"] 此ID已存在"));
|
| | | return;
|
| | | }
|
| | | }*/
|
| | | |
| | |
|
| | | String nickName = userRankings.getNickName();
|
| | | if (!StringUtil.isNullOrEmpty(nickName)) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | if (!proess){
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("["+ nickName +"] 此昵称已存在"));
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | Integer shareState = userRankings.getShareState();
|
| | | if (shareState != null && (shareState.equals(1) || shareState == 1)){
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadPicture")
|
| | | public void uploadImg(String callback, Long id, @RequestParam("file") CommonsMultipartFile file, |
| | | HttpServletRequest request, PrintWriter out, HttpServletResponse response) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | public void uploadImg(String callback, Long id, @RequestParam("file") CommonsMultipartFile file,
|
| | | PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (file == null) {
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.customerservice.CustomerServiceCommonQuestion;
|
| | | import com.yeshi.fanli.exception.CustomerServiceCommonQuestionException;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/commonQuestion")
|
| | |
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "save")
|
| | | public void saveAdd(String callback, long uid, CustomerServiceCommonQuestion commonQuestion,
|
| | | HttpServletResponse response, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | PrintWriter out) {
|
| | |
|
| | | try {
|
| | | |
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | |
|
| | | commonQuestionService.save(commonQuestion);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("添加成功"));
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperHomeNavbar;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/navbar")
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadPic")
|
| | | public void uploadPic(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | Long id, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | public void uploadPic(@RequestParam("file") CommonsMultipartFile file, Long id, PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SpecialCard;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.SystemConfigService;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/specialcard")
|
| | |
| | | * @param record
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "modifySpecial")
|
| | | public void modifySpecial(String callback, Special record, String jumpType, PrintWriter out) {
|
| | |
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveSpecial")
|
| | | public void saveSpecial(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | Long id, Long cardId, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | |
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | public void saveSpecial(@RequestParam("file") CommonsMultipartFile file, Long id, Long cardId,
|
| | | PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperBanner;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.exception.banner.SwiperBannerException;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | /**
|
| | | * 轮播图管理
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "uploadPicture")
|
| | | public void uploadPicture(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | SwiperPicture record, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | SwiperPicture record, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | |
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | | * @param response
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "changePicture")
|
| | | public void changePicture(@RequestParam("file") CommonsMultipartFile file, Long uid,
|
| | | Long id, HttpServletRequest request, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | |
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | public void changePicture(@RequestParam("file") CommonsMultipartFile file, Long uid, Long id,
|
| | | PrintWriter out) {
|
| | |
|
| | | if (file == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上传文件为空"));
|
| | |
| | | * @param record
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "changePicInfo")
|
| | | public void changePicInfo(String callback, SwiperPicture record, String jumpType,
|
| | | PrintWriter out) {
|
| | |
| | | import java.text.MessageFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collection;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
| | | import org.springframework.orm.hibernate4.HibernateCallback;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.goods.GoodsClassDao;
|
| | | import com.yeshi.fanli.dao.mybatis.GoodsClassMapper;
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.Utils;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | @Service
|
| | | public class GoodsClassServiceImpl implements GoodsClassService {
|
| | |
| | | public void removePicture(GoodsClass record) throws Exception {
|
| | |
|
| | | String fileUrl = record.getPicture();
|
| | | |
| | | boolean deleteFile = true;
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(fileUrl)) {
|