TASK:mixi;
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user