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绑定图片, 四:课程列表接口, 五:课程详情页面
随机推荐
- form表单序列化之后追加字段
方法是在{}中添加字段 key-value 一一对应,如下: var data = $.param({'state': state}) + '&' + $('#desProForm').ser ...
- js跨域详解
跨域概念:Cross-origin resource sharing
- 前端构建工具-fis3使用入门
FIS3 是面向前端的工程构建工具.解决前端工程中性能优化.资源加载(异步.同步.按需.预加载.依赖管理.合并.内嵌).模块化开发.自动化工具.开发规范.代码部署等问题. 官网地址是: https:/ ...
- Python中基本的读文件和简单数据处理
Python中基本的读文件和简单数据处理 暂无评论 DataQuest上面的免费课程(本文是Python基础课程部分),里面有些很基础的东西(csv文件读,字符串预处理等),发在这里做记录.涉及下面六 ...
- fedora 27
安装 U盘安装,感谢学长的U盘 配置 安装外来软件的时候,需要输入root密码 软件 软件安装是个麻烦事儿啊 详情 [新手指南: 在 Ubuntu 和 Fedora 上安装软件包] Fedora 中文 ...
- (效果四)jst如何判断对象是否为空?
前言:在实现业务逻辑的过程中,很多工程师都会遇到需要判断一个对象,数组是否为空的情景,很多时候我们在请求数据的时候都需要判断请求的对象数据是否为空,如果直接使用,在数据请求为空时,控制台就会报错.因此 ...
- 【排序】堆排序,C++实现
原创文章,转载请注明出处! 博客文章索引地址 博客文章中代码的github地址 # 预备知识 堆是一种特殊的树形数据结构,即完全二叉树.堆分为大根堆和小根堆,大根堆为根节点的值大于两个子节点的 ...
- DevExpress GridControl 显示外部图片
如果数据源中只包含图片的链接,如何在DevExpress GridControl的一列中显示外部图片? 要实现该功能,可通过非绑定列的方式来实现.具体实现方法如下: 1. 创建了一个非绑定列并设 ...
- .NET实现CORS跨域
1.NuGet:Install-Package Microsoft.AspNet.WebApi.Cors 2.Application_Start中增加(包含在#if DEBUG中):GlobalCon ...
- HDU3833 YY's new problem 卡时间第一题
Given a permutation P of 1 to N, YY wants to know whether there exists such three elements P[i 1], P ...