Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0#基础项目中,GoodPage中的query方法,这一部分是不是还有没有重构…… #32

Open
LiYing0 opened this issue Jan 14, 2020 · 0 comments

Comments

@LiYing0
Copy link

LiYing0 commented Jan 14, 2020

if (info.matches(regex))
{
int choice = Integer.parseInt(info);
switch (choice)
{
case 0:
MainPage.MaintenancePage();
break;
case 1:
case 2:
case 3:
if (choice == 3)//当用户使用3(即关键字查询)时,需要打印此项目。
{
System.out.println("\t\t正在执行商品 关键字 查询操作\n");
System.out.println("\n请输入商品关键字");
}
//调用查询功能
ArrayList goodsList = new GoodsDao().queryGoods(choice);
if (goodsList == null || goodsList.size() <= 0)
{
System.err.println("\n\t!!您查询的商品不存在!!\n");
queryGoodsPage();
} else
{
if (choice == 1) //打印目录,不要放在功能函数中,会影响其他方法调用

@LiYing0 LiYing0 changed the title GoodPage中的query方法,这一部分是不是还有没有重构…… 0#基础项目中,GoodPage中的query方法,这一部分是不是还有没有重构…… Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant