Pu Zhibing
2024-09-24 a736a3d09dd52bb81fa922861fc8938c8eb26550
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java
@@ -416,8 +416,10 @@
     */
    @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);
@@ -501,7 +503,19 @@
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        pointsMerchandise.setStartTime(format.parse(startTime.split(" - ")[0]));
        pointsMerchandise.setEndTime(format.parse(startTime.split(" - ")[1]));
        pointsMerchandise.setUseScope(useScope);
        if (UserExt.getUser().getObjectType()==3){
            if (StringUtils.hasLength(sites)){
                useScope = 4;
                storeIds="";
                pointsMerchandise.setUseScope(4);
            }else{
                useScope = 3;
                pointsMerchandise.setUseScope(3);
            }
        }else{
            pointsMerchandise.setUseScope(useScope);
        }
        if(ToolUtil.isNotEmpty(provinceCode)){
            TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, provinceCode));
            pointsMerchandise.setProvinceCode(provinceCode);