注册流程:
1)建立系统会员,更新Member表,登记会员密码,账号等基本信息
2)—建立商城卖家会员,更新MallSaler表,登记店主注册时间,会员类型,电话等
3)开通默认店铺,更新MallShopDianpu表,登记店铺,公司介绍,联系方式,店铺模板,是否开通在线支付等。
4)初始化店铺相关数据,如根据平台语言版本(中,英),设置店铺有关默认文章分类,简单介绍,相关文档及IM账号,在线支付业务等。java
java代码:文档
//店铺业务类型
public static final String ServiceType_B2B="B2B";
public static final String ServiceType_C2C="C2C";
public static final String ServiceType_B2B2C="B2B2C";
public static final String ServiceType_O2O="O2O";
public static final String ServiceType_ShopinShop="ShopinShop";get
package mall.kgmall.mydianpu.init;
import dao.MallShopDianPu;
import service.entryService.MallShopDianPuEntryService;
import mall.kgmall.config.MallConfigUtil;
/*
* 店铺初始化服务类
*/
public class DianPuInitServiceBean {
// 初始化店铺相关数据,如根据平台语言版本(中,英),设置店铺有关默认文章分类,简单介绍,相关文档及IM账号,在线支付业务等。
public void initNewShop(dao.MallShopDianPu dpSaved){
MallConfigUtil mc=new MallConfigUtil();
dao.MallShopConfig config=mc.getDefaultMallConfig();
MallShopDianPuEntryService dpService=MallShopDianPuEntryService.getInstance();
//通用商城店铺初始化
boolean isopenpayService=config.getBdianpuOpenPayService_newshop();
if(isopenpayService==true){
dpSaved.setBopenOnliePay(true);
}
//更新店铺
dpService.merge(dpSaved);
//专用商城平台业务类型初始化
dao.MallShopDianPu reloadDp=(MallShopDianPu) dpService.get(dpSaved.getDianPuId());
MallShopInitIf shopInitIf=getInitImpl();
shopInitIf.initShop(reloadDp);
}
public MallShopInitIf getInitImpl(){
MallConfigUtil mc=new MallConfigUtil();
dao.MallShopConfig config=mc.getDefaultMallConfig();
//商城平台商业类型
String serviceType=config.getServiceType();
//
MallShopInitIf shopInitIf=null;
if(serviceType!=null&&serviceType.equals(mc.ServiceType_B2B2C)){
//商城平台语言版本
String lan=config.getDefaultLanguage();
if(lan!=null&&lan.equals(mc.C_Lan_Zh_CN)){
shopInitIf=new B2B2CCnInitUtil();
}else if(lan!=null&&lan.equals(mc.C_Lan_Zh_En)){
shopInitIf=new B2B2CEnInitUtil();
}
}else if(serviceType!=null&&serviceType.equals(mc.ServiceType_B2B)){
//商城平台语言版本
String lan=config.getDefaultLanguage();
if(lan!=null&&lan.equals(mc.C_Lan_Zh_CN)){
shopInitIf=new B2BCnInitUtil();
}else if(lan!=null&&lan.equals(mc.C_Lan_Zh_En)){
shopInitIf=new B2BEnInitUtil();
}
}else if(serviceType!=null&&serviceType.equals(mc.ServiceType_C2C)){
//商城平台语言版本
String lan=config.getDefaultLanguage();
if(lan!=null&&lan.equals(mc.C_Lan_Zh_CN)){
shopInitIf=new C2CCnInitUtil();
}else if(lan!=null&&lan.equals(mc.C_Lan_Zh_En)){
shopInitIf=new C2CEnInitUtil();
}
}else if(serviceType!=null&&serviceType.equals(mc.ServiceType_ShopinShop)){
//商城平台语言版本
String lan=config.getDefaultLanguage();
if(lan!=null&&lan.equals(mc.C_Lan_Zh_CN)){
shopInitIf=new ShopinShopCnInitUtil();
}else if(lan!=null&&lan.equals(mc.C_Lan_Zh_En)){
shopInitIf=new ShopinShopEnInitUtil();
}
}else if(serviceType!=null&&serviceType.equals(mc.ServiceType_O2O)){
//商城平台语言版本
String lan=config.getDefaultLanguage();
if(lan!=null&&lan.equals(mc.C_Lan_Zh_CN)){
shopInitIf=new O2OCnInitUtil();
}else if(lan!=null&&lan.equals(mc.C_Lan_Zh_En)){
shopInitIf=new O2OEnInitUtil();
}
}
return shopInitIf;
}
}
it