TASK:mixi;

This commit is contained in:
shahaibo
2025-05-09 09:56:03 +08:00
parent e74bc47810
commit 5ad1c86fcf
2 changed files with 5 additions and 4 deletions

View File

@@ -211,8 +211,9 @@ public class PythonService {
throw new BusinessException("Generate Collocation exception!");
}
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(response));
Integer code = jsonObject.getInteger("code");
if (code != null && code == 200) {
Boolean result = jsonObject.getBoolean("successful");
if (result) {
System.out.println(bodyStr.trim());
// JSONObject jsonObject1 = JSONObject.parseObject(bodyStr.trim());
List<GenerateCollocationOutVO> collocationOutList = processJson(bodyStr.trim());

View File

@@ -807,8 +807,8 @@ public class TProductService extends ServiceImpl<TProductMapper, TProduct> {
TProduct saveProduct = new TProduct();
saveProduct.setAccountId(accountId);
Random random = new Random();
double randomDouble = 500 + (1500 - 500) * random.nextDouble();
saveProduct.setPrice(BigDecimal.valueOf(randomDouble));
int randomInt = 500 + random.nextInt(1001); // 1001 是上限 - 下限 + 1
saveProduct.setPrice(BigDecimal.valueOf(randomInt));
saveProduct.setOnSaleState(1);
//上传中
saveProduct.setUploadState(0);