| | |
| | | @PostMapping("/base/pointMerchars/updateGoodsDetail") |
| | | public boolean updateGoodsDetail(@RequestBody Map<String, Object> map) { |
| | | try { |
| | | String name = (String) map.get("name"); |
| | | Integer pointMerchandiseId = (Integer) map.get("pointMerchandiseId"); |
| | | PointsMerchandise byId1 = pmdsService.getById(pointMerchandiseId); |
| | | if (Integer.valueOf(map.get("type").toString()) != 1) { |
| | | byId1.setStatus(2); |
| | | } |
| | | if(StringUtils.hasLength(name)){ |
| | | byId1.setName(name); |
| | | } |
| | | Integer quantityIssued = (Integer) map.get("quantityIssued"); |
| | | Integer pickUpQuantity = (Integer) map.get("pickUpQuantity"); |
| | | String redemptionInstructions = (String) map.get("redemptionInstructions"); |
| | |
| | | .eq("participantType", participantType).eq("participantId", participantId) |
| | | .isNotNull("matchResult").orderByDesc("startTime")); |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy.HH.dd HH:mm"); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm"); |
| | | for (WorldCupCompetitor cupCompetitor : list) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", cupCompetitor.getId().toString()); |
| | |
| | | aa.appUserId, |
| | | aa.totalSession, |
| | | aa.win, |
| | | aa.winRate |
| | | ROUND(aa.winRate, 2) as winRate |
| | | from ( |
| | | select |
| | | a.participantType, |
| | |
| | | */ |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer pointMerchandiseId,Integer quantityIssued,Integer pickUpQuantity,String redemptionInstructions,String cover,String productImages,Integer sort){ |
| | | public Object update(String name, Integer pointMerchandiseId,Integer quantityIssued,Integer pickUpQuantity, |
| | | String redemptionInstructions,String cover,String productImages,Integer sort){ |
| | | Map<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("name",name); |
| | | stringObjectHashMap.put("pointMerchandiseId",pointMerchandiseId); |
| | | stringObjectHashMap.put("quantityIssued",quantityIssued); |
| | | stringObjectHashMap.put("pickUpQuantity",pickUpQuantity); |
| | |
| | | response.setContentType("APPLICATION/OCTET-STREAM"); |
| | | response.setHeader("Content-Disposition","attachment; filename=" + URLEncoder.encode("二维码", "UTF-8") + ".zip"); |
| | | ZipOutputStream out = new ZipOutputStream(response.getOutputStream()); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | for(Map<String, Object> map : list){ |
| | | String id = map.get("id").toString(); |
| | | String isStudent = map.get("isStudent").toString(); |
| | | String name = map.get("name").toString(); |
| | | QRCodeUtils.encode("{\"id\":" + id + ",\"isStudent\":" + isStudent + "}", name, "/usr/playpai/qrcode", false); |
| | | String name = map.get("name").toString() + sdf.format(new Date()); |
| | | String content = "{\"id\":" + id + ",\"isStudent\":" + isStudent + "}"; |
| | | QRCodeUtils.encode(content, name, "/usr/playpai/qrcode", false); |
| | | File file = new File("/usr/playpai/qrcode/" + name + ".jpg"); |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | | |
| | |
| | | <div id="b1"> |
| | | <input id="goodsId" value="${id}" hidden="hidden"> |
| | | <input id="nums" value="${item.num}" hidden="hidden"> |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" readonly="true" /> |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" /> |
| | | |
| | | <#avatar id="cover" name="商品封面:" avatarImg="${item.cover}" /> |
| | | |
| | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div id="b1"> |
| | | <input id="goodsId" value="${id}" hidden="hidden"> |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" readonly="true" /> |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" /> |
| | | |
| | | <#avatar id="cover" name="商品封面:" avatarImg="${item.cover}" /> |
| | | |
| | |
| | | } |
| | | console.log("结果图片") |
| | | console.log(imgOne) |
| | | let name = $("#name").val(); |
| | | let quantityIssued = $("#quantityIssued").val(); |
| | | let pickUpQuantity = $("#pickUpQuantity").val(); |
| | | let editor = jQuery.trim(TGoodsInfoDlg.editor.getContent()); |
| | |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("name",name); |
| | | ajax.set("pointMerchandiseId",goodsId); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | |
| | | if (TGoodsInfoDlg.goodsPicArray.length > 0){ |
| | | productImages = TGoodsInfoDlg.goodsPicArray.join(','); |
| | | } |
| | | let name = $("#name").val(); |
| | | let quantityIssued = $("#quantityIssued").val(); |
| | | let pickUpQuantity = $("#pickUpQuantity").val(); |
| | | let editor = jQuery.trim(TGoodsInfoDlg.editor.getContent()); |
| | |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("name",name); |
| | | ajax.set("pointMerchandiseId",goodsId); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |