TASK:mixi;
This commit is contained in:
@@ -211,8 +211,9 @@ public class PythonService {
|
|||||||
throw new BusinessException("Generate Collocation exception!");
|
throw new BusinessException("Generate Collocation exception!");
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(response));
|
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(response));
|
||||||
Integer code = jsonObject.getInteger("code");
|
Boolean result = jsonObject.getBoolean("successful");
|
||||||
if (code != null && code == 200) {
|
|
||||||
|
if (result) {
|
||||||
System.out.println(bodyStr.trim());
|
System.out.println(bodyStr.trim());
|
||||||
// JSONObject jsonObject1 = JSONObject.parseObject(bodyStr.trim());
|
// JSONObject jsonObject1 = JSONObject.parseObject(bodyStr.trim());
|
||||||
List<GenerateCollocationOutVO> collocationOutList = processJson(bodyStr.trim());
|
List<GenerateCollocationOutVO> collocationOutList = processJson(bodyStr.trim());
|
||||||
|
|||||||
@@ -807,8 +807,8 @@ public class TProductService extends ServiceImpl<TProductMapper, TProduct> {
|
|||||||
TProduct saveProduct = new TProduct();
|
TProduct saveProduct = new TProduct();
|
||||||
saveProduct.setAccountId(accountId);
|
saveProduct.setAccountId(accountId);
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
double randomDouble = 500 + (1500 - 500) * random.nextDouble();
|
int randomInt = 500 + random.nextInt(1001); // 1001 是上限 - 下限 + 1
|
||||||
saveProduct.setPrice(BigDecimal.valueOf(randomDouble));
|
saveProduct.setPrice(BigDecimal.valueOf(randomInt));
|
||||||
saveProduct.setOnSaleState(1);
|
saveProduct.setOnSaleState(1);
|
||||||
//上传中
|
//上传中
|
||||||
saveProduct.setUploadState(0);
|
saveProduct.setUploadState(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user