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绑定图片, 四:课程列表接口, 五:课程详情页面
随机推荐
- CUDA库函数module management
http://horacio9573.no-ip.org/cuda/group__CUDA__MODULE_ga52be009b0d4045811b30c965e1cb2cf.html
- 不能在具有唯一索引“IX_******”的对象“dbo.****”中插入重复键的行。重复键值为 (110, 372000, 2)。
当尝试插入数据,或者更新某个表的时候出现 不能在具有唯一索引“IX_******”的对象“dbo.****”中插入重复键的行.重复键值为 (110, 372000, 2). 遇到这个问题的时候,请找到 ...
- ES常见名词定义
集群:具有相同clusterName的节点.节点:一个ES实例,并不定是一个节点,因为一个节点上可以启动多个ES实例.索引:相当于数据库database的概念,一个集群可以包含多个索引.分片:索引可以 ...
- 2017.10.23 Arduino Atmel EFM32低功耗监测
mark:因为最近一直调试(维护)客户的EFM32,和其他系列的Atmel芯片.对atmel不熟悉,做点功课. 1. 自建Arduino 最小系统(原来树莓派都是Atmel的芯片) http://ww ...
- 虚拟机中centos7与物理主机通讯
本地物理机 WIN命令行:ipconfig 查看网络配置 在物理机的网络配置--> 配置VMnet8 打开VMware 编辑虚拟机设置,选择自定义NAT模式(VMnat8) 编辑->虚拟 ...
- js函数的伪重载
这也是今天写东西是遇到的一个问题,导致我联想起了函数重载的问题. 在javascript中是没有函数重载机制的,对于用惯了java开发的同学可能就表示吃惊了,我屮艸芔茻,函数 没有重载?那怎么搞?!! ...
- 现代前端技术解析:Web前端技术基础
最近几年,越来越多的人投入到前端大军中:时至至今,前端工程师的数量仍然不能满足企业的发展需求:与此同时,互联网应用场景的复杂化提高了对前端工程师能力的要求,一部分初期前端工程师并不能胜任企业的工作 ...
- postgresql的now()与Oracle的sysdate
postgresql的now()为当前事务开始时间, 而Oracle的sysdate是当前时间. 区别在于事务. postgresql中的now(): postgres=# begin ; BEGIN ...
- 【剑指offer】翻转单词顺序,C++实现
原创博文,转载请注明出处! 本题牛客网地址 本题代码的github地址 本系列文章的索引地址 # 题目 # 思路 两次翻转,第一次翻转整个句子,第二次翻转每个单词(单词之间用逗号隔开) # ...
- Java Web 减少网络 IO、静态资源磁盘 IO 有效的办法--响应使用 GZIP( 压缩http请求与响应gzip压缩)
(转载http://blog.csdn.net/hylclxy/article/details/7779662) 出于节约流量考虑, 客户端在向服务端发送request的时候对post数据进行gzip ...