对项目 0220240611 进行修改
This commit is contained in:
parent
341989695b
commit
b105299885
5
02_Intellij_Java_CourseExperiment_20240611/CourseExperiment/.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
02_Intellij_Java_CourseExperiment_20240611/CourseExperiment/.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -419,6 +419,7 @@ public class BusinessView {
|
||||
}
|
||||
|
||||
// ͬ²½ ID
|
||||
|
||||
food.setBusinessId(business.getBusinessId());
|
||||
|
||||
while ( true ) {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user