|
@@ -13,6 +13,7 @@ import com.github.pagehelper.PageInfo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -52,9 +53,12 @@ public class FormController extends BaseController {
|
|
entity = new FormEntity();
|
|
entity = new FormEntity();
|
|
BeanUtils.copyProperties(param, entity);
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
|
|
|
- // 处理二维码
|
|
|
|
- String qrCodeUrl = QrCodeUtils.generateQrCode(param.getSampleUrl(), FILE_PATH, OSS_PATH, OSS_DOMAIN);
|
|
|
|
- entity.setQrCodeUrl(qrCodeUrl);
|
|
|
|
|
|
+ // 处理二维码, 没有示例表单不生成二维码
|
|
|
|
+ if (StringUtils.isNotBlank(param.getSampleUrl())) {
|
|
|
|
+ String qrCodeUrl = QrCodeUtils.generateQrCode(param.getSampleUrl(), FILE_PATH, OSS_PATH, OSS_DOMAIN);
|
|
|
|
+ entity.setQrCodeUrl(qrCodeUrl);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
formService.save(entity);
|
|
formService.save(entity);
|
|
} else {
|
|
} else {
|