Skip to content

finish#185

Open
MorganXie wants to merge 1 commit into
masterfrom
MorganXie
Open

finish#185
MorganXie wants to merge 1 commit into
masterfrom
MorganXie

Conversation

@MorganXie

Copy link
Copy Markdown
  • 这个PR解答了当前仓库中的题目(机器人会自动判题并合并当前PR)
  • 这个PR修复了当前仓库中的一些代码缺陷(机器人不会判题,而是由管理员来处理当前PR)

@hcsp-bot

Copy link
Copy Markdown
Contributor

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.*;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不应使用 '.*' 形式的导入 - java.sql.* 。

// +----+--------+------+
public static List<GoodsAndGmv> getGoodsAndGmv(Connection databaseConnection) throws SQLException {
return null;
try (PreparedStatement statement = databaseConnection.prepareStatement("select GOODS.ID, NAME, (GOODS_PRICE * sum(GOODS_NUM)) as GMV\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

public static List<GoodsAndGmv> getGoodsAndGmv(Connection databaseConnection) throws SQLException {
return null;
try (PreparedStatement statement = databaseConnection.prepareStatement("select GOODS.ID, NAME, (GOODS_PRICE * sum(GOODS_NUM)) as GMV\n" +
"from GOODS,\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

return null;
try (PreparedStatement statement = databaseConnection.prepareStatement("select GOODS.ID, NAME, (GOODS_PRICE * sum(GOODS_NUM)) as GMV\n" +
"from GOODS,\n" +
" \"ORDER\"\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

try (PreparedStatement statement = databaseConnection.prepareStatement("select GOODS.ID, NAME, (GOODS_PRICE * sum(GOODS_NUM)) as GMV\n" +
"from GOODS,\n" +
" \"ORDER\"\n" +
" where \"ORDER\".GOODS_ID = GOODS.ID\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

" table_order.GOODS_PRICE * table_order.GOODS_NUM as TOTAL_PRICE\n" +
"from (\"ORDER\" table_order\n" +
" inner join GOODS table_goods on table_goods.ID = table_order.GOODS_ID)\n" +
" inner join USER table_user on table_user.id = table_order.USER_ID\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

"from (\"ORDER\" table_order\n" +
" inner join GOODS table_goods on table_goods.ID = table_order.GOODS_ID)\n" +
" inner join USER table_user on table_user.id = table_order.USER_ID\n" +
"where table_user.NAME != ''\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

// +----------+-----------+------------+-------------+
public static List<Order> getLeftJoinOrders(Connection databaseConnection) throws SQLException {
return null;
try (PreparedStatement statement = databaseConnection.prepareStatement("select \"ORDER\".id, user.NAME, GOODS.name as good_name,\"ORDER\".GOODS_NUM*\"ORDER\".GOODS_PRICE\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

public static List<Order> getLeftJoinOrders(Connection databaseConnection) throws SQLException {
return null;
try (PreparedStatement statement = databaseConnection.prepareStatement("select \"ORDER\".id, user.NAME, GOODS.name as good_name,\"ORDER\".GOODS_NUM*\"ORDER\".GOODS_PRICE\n" +
"from \"ORDER\"\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

return null;
try (PreparedStatement statement = databaseConnection.prepareStatement("select \"ORDER\".id, user.NAME, GOODS.name as good_name,\"ORDER\".GOODS_NUM*\"ORDER\".GOODS_PRICE\n" +
"from \"ORDER\"\n" +
" left join GOODS on \"ORDER\".GOODS_ID = GOODS.ID\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'+' 应另起一行。

@hcsp-bot

Copy link
Copy Markdown
Contributor

你的提交 a2692d6 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants