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绑定图片, 四:课程列表接口, 五:课程详情页面
随机推荐
- C++设计模式之-模板模式
模板方法模式 在GOF的<设计模式:可复用面向对象软件的基础>一书中对模板方法模式是这样说的:定义一个操作中的算法骨架,而将一些步骤延迟到子类中.TemplateMethod使得子类可以不 ...
- Linux文件在系统中传输
一.文件的传输 1.命令:scp scp file user@ip:/dir ##把当前系统目录下的文件file复制到另一个系统目录下 scp user@ip:/file dir 2.命令:rsync ...
- jfreechart 在jsp页面显示所画的图片(resin服务器的servelet配置是关键)(图片只过内存)
用的web服务器是resin服务器,在配置web.xml时需要注意,其实resin服务器的web.xml服务器配置和tomcat服务器的配置很像, 1. 我第一次按照自己的想法,想当然的在resin- ...
- jQuery 滑动选项卡SmartTab
Smart Tab Overview Smart Tab is a jQuery plugin for tabbed interface. It is flexible and very easy t ...
- vs 添加第三方库lib的两种方法
方法一1.代码: 方法二2.配置: 首先包含头文件 #include “../DuiLib/UIlib.h” 连接器->常规-->附加库目录.即是将lib所在的目录,千万要记得,还要写一处 ...
- (转) MapReduce Design Patterns(chapter 5 (part 2))(十)
Replicated Join Pattern Description 复制join是一种特殊的join,用于一个大数据和许多小数据集map端执行的情况. Intent 这种模式能够消除reduce阶 ...
- ftp上传下载记录
1,准备ftp环境 下载最新的ftp客户端:https://filezilla-project.org/ftp/001.png,选择linux下面的版本,如002.png所示: 在window10下面 ...
- Selenium+PhantomJS使用初体验
抓取使用Ajax技术完成的网页内容时可以使用Selenium+PhantomJS技术 1.pip install selenium 2.下载Phantomjs不需要用pip 武汉科技大学首页有一块 ...
- php 配置上传大文件
打开php.ini,首先找到file_uploads = on ;是否允许通过HTTP上传文件的开关.默认为ON即是开upload_tmp_dir ;文件上传至服务器上存储临时文件的地方,如果没指定就 ...
- cocos2d-x 3.17 jsb android运行报错
编译成功,运行失败,提示如下: 2018-11-15 19:09:56.343 2820-2852/net.jd85.test D/cocos2d-x debug info: cocos2d: ful ...