|
|
@@ -1,6 +1,7 @@
|
|
|
package com.yhlxj.web.mirror;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
@@ -499,6 +500,20 @@ public class MidjourneyController {
|
|
|
throw BusinessRuntimeException.getInstance("参数错误");
|
|
|
}
|
|
|
settings.setId(user.getSettings().getId());
|
|
|
+ JSONObject jsonObject = new JSONObject(settings.getSettings());
|
|
|
+ Boolean raw = jsonObject.getBool("raw");
|
|
|
+ String stylize = jsonObject.getStr("stylize");
|
|
|
+ switch (stylize){
|
|
|
+ case "LOW":
|
|
|
+ settings.setPrompt(settings.getPrompt() + " --s 50");
|
|
|
+ case "HIGH":
|
|
|
+ settings.setPrompt(settings.getPrompt() + " --s 250");
|
|
|
+ case "VERY HIGH":
|
|
|
+ settings.setPrompt(settings.getPrompt() + " --s 750");
|
|
|
+ }
|
|
|
+ if(raw != null && raw){
|
|
|
+ settings.setPrompt(settings.getPrompt() + " --style raw");
|
|
|
+ }
|
|
|
midjourneyUserSettingsService.updateById(settings);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(midjourneyUserSettingsService.getById(settings.getId()));
|
|
|
}
|