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绑定图片, 四:课程列表接口, 五:课程详情页面 
随机推荐
- The main points of capacitive screen technology
- Win10 64位系统ADO方式操作数据库失败解决方法
			VC操作Access数据库一般通过ODBC.ADO.DAO等方式,但在我的Win10 64位操作系统中,通过ADO方式操作数据库会失败,无法读取数据.解决方法:1.首先确保Win10操作系统ado目录 ... 
- U-Boot 不能识别FAT32 SD分区
			/********************************************************************* * U-Boot 不能识别FAT32 SD分区 * 说明: ... 
- 【集成学习】lightgbm调参案例
			lightgbm使用leaf_wise tree生长策略,leaf_wise_tree的优点是收敛速度快,缺点是容易过拟合. # lightgbm关键参数 # lightgbm调参方法cv 代码git ... 
- Git详解之八 Git与其他系统
			以下内容转载自:http://www.open-open.com/lib/view/open1328070454218.html Git 与其他系统 世界不是完美的.大多数时候,将所有接触到的项目全部 ... 
- postgres访问外网控制
			1. sudo apt-get install postgresql #安装psql 2. su passwd postgres #设置postgres账户的密码 3. postgresql.conf ... 
- Python IDE in Sublime
			(最近换了电脑,然后忘了把 ST 的配置搬过来,所以重新折腾了一遍 Sublime 中的 Python 环境配置) 以下插件均通过 Package Control 安装. SublimeREPL 快捷 ... 
- Java并发--volatile详情
			volatile这个关键字可能很多朋友都听说过,或许也都用过.在Java 5之前,它是一个备受争议的关键字,因为在程序中使用它往往会导致出人意料的结果.在Java 5之后,volatile关键字才得以 ... 
- List集合学习
			Java中常用的List子类主要有:ArrayList.LinkedList.Vector.有序(存储和取出的元素一致),可重复的. 三者比较 1:访问:ArrayList和Vector都实现了Ran ... 
- 【Codeforces】Round #491 (Div. 2) 总结
			[Codeforces]Round #491 (Div. 2) 总结 这次尴尬了,D题fst,E没有做出来.... 不过还好,rating只掉了30,总体来说比较不稳,下次加油 A:If at fir ... 
