Pu Zhibing
2024-09-24 1b8ad0cc6a79f84fb32fdffae39742afa964748e
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);
@@ -481,6 +483,8 @@
            }
        }
        PointsMerchandise pointsMerchandise = new PointsMerchandise();
        pointsMerchandise.setAddUserId(UserExt.getUser().getObjectId());
        pointsMerchandise.setAddType(UserExt.getUser().getObjectType());
        pointsMerchandise.setType(typeAll);
        pointsMerchandise.setName(name);
        pointsMerchandise.setCoursePackageId(coursePackageId);
@@ -501,7 +505,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);