📄 usersellshop.java
字号:
package com.jc.taobao.gjj.logic;
import java.util.ArrayList;
import com.jc.taobao.gjj.entity.ShopInfo;
import com.jc.taobao.gjj.entity.ShopNuminfo;
import com.jc.taobao.gjj.entity.TypeInfo;
import com.jc.taobao.gjj.entity.UserInfo;
public class UserSellShop {
public synchronized int UserSellShopissucessorfail(ShopInfo shop, UserInfo user,
int number, String shoppic, String servicepath) {
try {
ShopInfoBean shopbean = new ShopInfoBean();
AscendingPhoto ap = new AscendingPhoto();
ap.IOImage(shoppic, servicepath);
/* 查询出对应的用户编号 */
UserInfoBean ubean = new UserInfoBean();
ArrayList al2 = (ArrayList) ubean.getquerybyuserusename(user);
UserInfo user2 = (UserInfo) al2.get(0);
int userid = user2.getUserid();
int shopid=shopbean.save2(shop);
if (shopid > 0) {
/* 为库存表添加数据 */
ShopNuminfoBean sb = new ShopNuminfoBean();
ShopNuminfo shn=new ShopNuminfo();
shn.setSid(shopid);
shn.setShopnumber(number);
if (sb.save(shn) > 0) {
return shopid;
} else {
return 0;
}
} else {
return 0;
}
} catch (RuntimeException e) {
// TODO Auto-generated catch block
return 0;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -