|
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
|
|
+import com.fjhx.common.utils.Assert;
|
|
import com.fjhx.customer.entity.customer.po.Customer;
|
|
import com.fjhx.customer.entity.customer.po.Customer;
|
|
import com.fjhx.customer.service.customer.CustomerService;
|
|
import com.fjhx.customer.service.customer.CustomerService;
|
|
import com.fjhx.file.utils.ObsFileUtil;
|
|
import com.fjhx.file.utils.ObsFileUtil;
|
|
@@ -1065,4 +1066,25 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 批量修改产品销售状态
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ @DSTransactional
|
|
|
|
+ public void editByCodes(ProductInfoDto dto){
|
|
|
|
+ Assert.notEmpty(dto.getSalesStatus(),"销售状态不能为空");
|
|
|
|
+ Assert.notEmpty(dto.getProductCodes(),"产品编号不能为空");
|
|
|
|
+ String[] productCodes = dto.getProductCodes()
|
|
|
|
+ .replace("\r\n", "\n")
|
|
|
|
+ .replace("\n\r", "\n")
|
|
|
|
+ .replace("\r", "\n").split("\n");
|
|
|
|
+
|
|
|
|
+ this.update(q->q.set(ProductInfo::getVictoriatouristJson,"{}")
|
|
|
|
+ .isNull(ProductInfo::getVictoriatouristJson)
|
|
|
|
+ .or().eq(ProductInfo::getVictoriatouristJson,"")
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ baseMapper.editByCodes(dto.getSalesStatus(),SecurityUtils.getUserId(),IWrapper.<ProductInfo>getWrapper().in(ProductInfo::getCustomCode,productCodes));
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|