对项目 0220240611 进行修改

This commit is contained in:
JRNitre 2024-06-22 23:29:53 +08:00
parent 341989695b
commit b105299885
5 changed files with 21 additions and 15 deletions

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -20,13 +20,13 @@ public class ElmAdminEntry {
Display dis = new Display('+', '-', 30);
AdminView adv = new AdminView();
// Admin admin = new Admin();
// admin.setAdminName("jrnitre");
// admin.setAdminId(1);
// admin.setAdminPassword("1234");
Admin admin = new Admin();
admin.setAdminName("jrnitre");
admin.setAdminId(1);
admin.setAdminPassword("1234");
// 实例化管理员对象, 调用登录方法对其初始化
Admin admin = new AdminView().login();
// Admin admin = new AdminView().login();
if (admin != null){
int key;

View File

@ -21,16 +21,16 @@ public class ElmBusinessEntry {
BusinessView buv = new BusinessView();
// Login 方法登录系统
Business business = new BusinessView().login();
// Business business = new BusinessView().login();
// Business business = new Business();
// business.setBusinessPassword("1234");
// business.setBusinessName("business");
// business.setBusinessId(1);
// business.setBusinessAddress("null");
// business.setBusinessExplain("null");
// business.setBusinessStarPrice(5);
// business.setBusinessDeliveryPrice(1.5);
Business business = new Business();
business.setBusinessPassword("1234");
business.setBusinessName("business");
business.setBusinessId(1);
business.setBusinessAddress("null");
business.setBusinessExplain("null");
business.setBusinessStarPrice(5);
business.setBusinessDeliveryPrice(1.5);
if (business != null){
int key;

View File

@ -419,6 +419,7 @@ public class BusinessView {
}
// ͬ²½ ID
food.setBusinessId(business.getBusinessId());
while ( true ) {

View File

@ -334,7 +334,7 @@ public class BusinessDaoImpl implements BusinessDao{
pstmt.setString(2, food.getFoodName());
pstmt.setString(3, food.getFoodExplain());
pstmt.setDouble(4, food.getFoodPrice());
pstmt.setDouble(5, food.getFoodId());
pstmt.setInt(5, food.getBusinessId());
pstmt.executeUpdate();
pstmt.close();