ApacheOFBiz的相关介绍以及使用总结(一)
由于最近一段时间在给一个创业的公司做客户关系管理CRM系统,限于人力要求(其实是没有多少人力),只能看能否有稳定,开源的半成品进行改造,而且最好不需要前端(js)相关开发人员的支援就可以把事情做成,经过一段时间(其实也就是1周)的调研,最好把目标锁定在OFBiz上。
OFBiz简介,什么是OFBiz
Apache OFBiz进行环境部署
ant
ant load-demo
cd tools
./startofbiz.sh

一些重要的配置文件
component-load.xml
ofbiz-component.xml
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml" />
<service-resource type="model" loader="main" location="servicedef/services_agreement.xml" />
<webapp name="accounting" title="Accounting" server="default-server" location="webapp/accounting" base-permission="OFBTOOLS,ACCOUNTING" mount-point="/accounting" />
web.xml
controller.xml
<request-map uri="main">
<security https="true" auth="true" />
<response name="success" type="view" value="main" />
</request-map>
<view-map name="main" type="screen" page="component://accounting/widget/CommonScreens.xml#main" />
<?xml version="1.0" encoding="UTF-8"?>
<ofbiz-component name="basicconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<resource-loader name="main" type="component"/>
<classpath type="jar" location="build/lib/*"/>
<classpath type="dir" location="config"/>
<entity-resource type="data" reader-name="main" loader="main" location="data/BasicDataTypeData.xml"/>
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
<service-resource type="model" loader="main" location="servicedef/services_consultant.xml"/>
<webapp name="basicconfig"
title="BasicConfig"
description="BasicConfigDescription"
server="default-server"
base-permission="OFBTOOLS,BASICCONFIG"
location="webapp/basicconfig"
mount-point="/basicconfig"
app-bar-display="true">
</webapp> </ofbiz-component>
OFBiz中的服务
<service name="createConsultant" engine="java"
location="com.xxx.basicconfig.service.ConsultantServices" invoke="createConsultant" auth="true">
<description>Get commission receiving parties and amounts for a product. <br/>
amount input is for the entire quantity. <br/><br/>
Returns a List of Maps each containing <br/>
partyIdFrom String commission paying party <br/>
partyIdTo String commission receiving party <br/>
commission BigDecimal Commission <br/>
days Long term days <br/>
currencyUomId String Currency <br/>
productId String Product Id <br/>
Will use the virtual product if no agreement is found for a variant product. If no quantity is specified,
defaults to one (1).
</description>
<!--<permission-service service-name="acctgCommissionPermissionCheck" main-action="VIEW"/>-->
<attribute name="consultantName" type="String" mode="IN" optional="false"/>
<attribute name="consultantCode" type="String" mode="IN" optional="false"/>
<attribute name="consultantEmail" type="String" mode="IN" optional="false"/>
<attribute name="consultantGender" type="String" mode="IN" optional="false"/>
<attribute name="consultantCity" type="String" mode="IN" optional="false"/>
<!--<attribute name="commissions" type="List" mode="OUT" optional="false"/>-->
</service>
public static Map<String, Object> deleteConsultant(DispatchContext dispatchContext, Map<String, Object> context) {
String consultantId = (String) context.get("userId");
Delegator delegator = dispatchContext.getDelegator();
GenericPK dsConsultant = delegator.makePKSingle("UserLoginSecurity", consultantId); try {
delegator.removeByPrimaryKey(dsConsultant);
} catch (GenericEntityException e) {
Debug.logWarning(e.getMessage(), module);
return ServiceUtil.returnError(e.getMessageList());
}
return new HashMap<>();
}
ApacheOFBiz的相关介绍以及使用总结(一)的更多相关文章
- ApacheOFBiz的相关介绍以及使用总结(三)
Ofbiz中还提供了一些基础性服务,可以直接用来使用,下面就简单介绍说明一下. ofbiz邮件发送服务 ofbiz中提供发送邮件相关功能:sendMailFromScreen contex ...
- ApacheOFBiz的相关介绍以及使用总结(二)
OFBiz的实体配置 实体定义文件一般存放位置是在对应模块的entity文件夹下面,在该模块对应的ofbiz-component.xml配置文件中加入一行,用来声明实体定义文件路径: < ...
- ppDelegate的相关介绍
// AppDelegate的相关介绍// IOS笔记 //@interface AppDelegate : UIResponder <UIApplicationDelegate>// ...
- 【个人笔记】002-PHP基础-01-PHP快速入门-02-PHP语言相关介绍输
002-PHP基础-01-PHP快速入门 02-PHP语言相关介绍 1.PHP是什么 Hypertext Preprocessor超文本预处理器 是一种通用开源脚本语言 Personal Home P ...
- Android HttpClient HttpURLConnection相关介绍
Android HttpClient HttpURLConnection相关介绍 遇到一个问题 在android studio上用HttpClient编写网络访问代码的时候,发现该类无法导入并使用.. ...
- Android开发工程师文集-Activity生命周期,启动方式,Intent相关介绍,Activity详细讲解
前言 大家好,给大家带来Android开发工程师文集-Activity生命周期,启动方式,Intent相关介绍,Activity详细讲解的概述,希望你们喜欢 Activity是什么 作为一个Activ ...
- CSS3 Backgrounds相关介绍
CSS3 Backgrounds相关介绍 1.背景图片(background images)是在padding-box的左上角落脚安家的,我们可以使用background-position属性改变默认 ...
- 一 hadoop 相关介绍
hadoop 相关介绍 hadoop的首页有下面这样一段介绍.对hadoop是什么这个问题,做了简要的回答. The Apache™ Hadoop® project develops open-sou ...
- Django day 33 vue中使用element-ui的使用,课程的相关介绍,vue绑定图片,课程列表接口,课程详情页面
一:vue中使用element-ui的使用, 二:课程的相关介绍, 三:vue绑定图片, 四:课程列表接口, 五:课程详情页面
随机推荐
- 原生js重写《锋利的JS》之 轮播效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jmeter的三种参数化
以FTP请求(用户.密码)为例:(其他都相同) 1.文件参数化 使用配置元件中的CSV Data Set Config 配置CSV Data Set Config: 文件中存储ftp登录的用户名和密码 ...
- mybatis传入0但判断为空
当是数字类型时,传入0会判断为空,当值为空,显示在页面上的将会是0:
- Linux:修改Shell命令提示符及颜色
Linux修改Shell命令提示符及颜色 1. Linux登录过程中加载配置文件顺序: /etc/profile → /etc/profile.d/*.sh → ~/.bash_profile → ...
- MB到片组的映射
待分析 链接原文: http://blog.csdn.net/mr_phy/article/details/61638262
- win7下pyhton3.6创建django2的pycharm项目
1.进入python虚拟环境: workon workon oneenv 2. 在虚拟环境中安装django,也可以使用pycharm上的自动安装,但那个比较慢,所有还是在cmd中安装的好 pip i ...
- chrome 55 zepto tap事件出错?
刚才升级chrome后发现的,在54.0.2840.98上点击没有问题,在新升级的55.0.2883.75 上点击后会报错Cannot read property 'trigger' of undef ...
- 构造字典:DictionaryBase类和SortedList类
DictionaryBase 类 msdn对DictionaryBase的文档解释 泛型KeyValuePair类 msdnd对泛型KeyValuePair类的文档解释 SortedList类 RUN ...
- UDP:rfc768/广播和多播/IGMP
封装情况:
- python使用progressbar显示进度条
progressbar安装: pip install progressbar 用法一 # -*- coding=utf-8 -*- import time from progressbar impor ...