Commit 1a62a92f by 宋毅

tj

parent 7003165e
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class TmOrderAPI extends APIBase {
class ProductAPI extends APIBase {
constructor() {
super();
this.utilsProductSve = system.getObject("service.utilsSve.utilsProductSve");
......@@ -25,15 +25,15 @@ class TmOrderAPI extends APIBase {
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "getCAProductDetail"://根据渠道产品码获取产品详情 ---应用中心
opResult = await this.utilsProductSve.getProductDetailByCode(pobj, pobj.actionBody);
break;
case "getCAProductListByTypeOneCode"://获取产品列表(根据产品一类编码获取) ---应用中心
opResult = await this.utilsProductSve.findByTypeOneCode(pobj, pobj.actionBody);
break;
case "getCAProductListByTypeCode"://获取产品列表(根据父类产品编码获取) ---应用中心
opResult = await this.utilsProductSve.findByTypeCode(pobj, pobj.actionBody);
break;
case "getCAProductDetail"://根据渠道产品码获取产品详情 ---应用中心
opResult = await this.utilsProductSve.getProductDetailByCode(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......@@ -42,4 +42,4 @@ class TmOrderAPI extends APIBase {
}
}
module.exports = TmOrderAPI;
\ No newline at end of file
module.exports = ProductAPI;
\ No newline at end of file
......@@ -3,7 +3,6 @@ var system = require("../../../system");
class TmTransactionAPI extends APIBase {
constructor() {
super();
this.orderinfoSve = system.getObject("service.dbcorder.orderinfoSve");
}
/**
* 接口跳转-POST请求
......@@ -28,9 +27,6 @@ class TmTransactionAPI extends APIBase {
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "addOrder"://添加订单
opResult = await this.orderinfoSve.createOrder(action_body, req);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
......
......@@ -8,14 +8,14 @@ class TradetransferAPI extends APIBase {
this.aliclient = system.getObject("util.aliyunClient");
this.execlient = system.getObject("util.execClient");
this.transferurl = settings.reqTransferurl();
this.corderSve = system.getObject("service.dbcorder.orderinfoSve");
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
}
//订单创建
async createtransfer(p, obj, req) {
console.log(p.actionBody, "actionBody...............................");
var orderinfo = await this.corderSve.createOrder(p.actionBody, req);
var orderinfo = await this.utilsOrderSve.addOrder(p.actionBody, req);
console.log(orderinfo, "orderinfo............................");
if (orderinfo) {
if (orderinfo.status == "0") {
......
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class ProductAPI extends APIBase {
constructor() {
super();
this.utilsOrderSve = system.getObject("service.utilsSve.utilsOrderSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "addOrder"://创建订单
opResult = await this.utilsOrderSve.addOrder(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = ProductAPI;
\ No newline at end of file
const system=require("../../../system");
const Dao=require("../../dao.base");
class BusinesschanceDao extends Dao{
constructor(){
super(Dao.getModelName(BusinesschanceDao));
}
extraWhere(obj,w){
if(obj.codepath && obj.codepath!=""){
if(obj.codepath.indexOf("calculateprice")>0){
w["user_id"]=obj.uid;
}
}
return w;
}
}
module.exports=BusinesschanceDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class FlowLogDao extends Dao {
constructor() {
super(Dao.getModelName(FlowLogDao));
}
}
module.exports = FlowLogDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderContactsDao extends Dao {
constructor() {
super(Dao.getModelName(OrderContactsDao));
}
}
module.exports = OrderContactsDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderInfoDao extends Dao {
constructor() {
super(Dao.getModelName(OrderInfoDao));
}
buildAttributes(){
return [
"orderNo",
"channelServiceNo",
"needNo",
"payTime",
"channelUserId",
"quantity",
"serviceQuantity",
"orderPayStatusName",
"orderPayStatus",
"totalSum",
"payTotalSum",
"refundSum",
"channelProfitSum",
"pfSettleProfit",
"notes",
"opNotes"
];
}
}
module.exports = OrderInfoDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderProductDao extends Dao {
constructor() {
super(Dao.getModelName(OrderProductDao));
}
}
module.exports = OrderProductDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class ExpenseVoucherDao extends Dao{
constructor(){
super(Dao.getModelName(ExpenseVoucherDao));
}
}
module.exports=ExpenseVoucherDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class MoneyJourneyDao extends Dao{
constructor(){
super(Dao.getModelName(MoneyJourneyDao));
}
}
module.exports=MoneyJourneyDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderReceiptVoucherDao extends Dao {
constructor() {
super(Dao.getModelName(OrderReceiptVoucherDao));
}
}
module.exports = OrderReceiptVoucherDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderRefundVoucherDao extends Dao {
constructor() {
super(Dao.getModelName(OrderRefundVoucherDao));
}
}
module.exports = OrderRefundVoucherDao;
......@@ -21,53 +21,6 @@ module.exports = {
},
"pdict": {
"logLevel": { "debug": 0, "info": 1, "warn": 2, "error": 3, "fatal": 4 },
//应用数据操作类型
"app_data_op_type": { "00": "独立", "10": "全委托", "20": "部分委托" },
//支付类型
"app_pay_type": { "00": "第三方支付", "10": "平台代收款" },
//订单类型
"order_type": { "zzdd": "自主订单", "dkxd": "代客下单" },
//订单付款状态
"order_pay_status": { "dfk": "待付款", "zfpz": "已上传支付凭证", "yfk": "已付款", "bfyfk": "部分已付款", "ddqx": "订单取消", "tkclz": "退款处理中", "bfytk": "部分已退款", "ytk": "已退款", "zfshbtg": "支付审核不通过" },
//帐户类型( 支付类型)
"pay_account_type": { "cash": "现金", "bank": "银行", "wx": "微信", "alipay": "支付宝", "other": "其它" },
//订单服务付款状态
"order_service_pay_status": { "dfk": "待付款", "yfk": "已付款" },
//商标交付状态
"delivery_status": { "dqrfa": "待确认方案", "fabtg": "方案不通过", "dfwsfw": "待服务", "dsccl": "待上传材料", "dsh": "待审核", "ddj": "待递交", "ydj": "已递交", "ywc": "已完成" },
//商标类型
"tm_type": { "p": "普通商标", "j": "集体商标", "z": "证明商标", "t": "特殊商标" },
//商标类型形式
"tm_form_type": { "1": "立体", "3": "字", "4": "图", "5": "字图", "6": "颜色", "7": "彩色" },
//商标官文回执类型
"official_receipt_type": {
"1": "商标注册申请书", "2": "商标注册申请补正通知书", "3": "商标注册申请受理通知书", "4": "商标注册申请不予受理通知书", "5": "商标注册同日申请补送使用证据通知书",
"6": "商标注册同日申请协商通知书商标注册同日申请抽签通知书", "7": "商标驳回通知书", "8": "商标部分驳回通知书", "9": "商标注册申请初步审定公告通知书",
"10": "商标异议答辩通知书", "11": "异议裁定书", "12": "纸质版商标注册证", "13": "电子版商标注册证"
},
//商标状态
"official_type": {
"1": "商标注册申请书", "2": "商标注册申请补正通知书", "3": "商标注册申请受理通知书", "4": "商标注册申请不予受理通知书", "5": "商标注册同日申请补送使用证据通知书",
"6": "商标注册同日申请协商通知书商标注册同日申请抽签通知书", "7": "商标驳回通知书", "8": "商标部分驳回通知书", "9": "商标注册申请初步审定公告通知书",
"10": "商标异议答辩通知书", "11": "异议裁定书", "12": "纸质版商标注册证", "13": "电子版商标注册证",
"dsccl": "待上传材料", "dqrfa": "待确认方案", "fabtg": "方案不通过", "dsh": "待审核", "shbtg": "审核不通过", "ddj": "待递交", "ydj": "已递交", "djyc": "递交异常"
},
//申请企业类型
"customer_type": { "ent": "企业", "person": "个人" },
//附件类型
"stuff_type": { "csty": "彩色图样", "wts": "委托书", "gzwts": "盖章委托书", "ty": "图样", "sywj": "声音文件", "smwj": "说明文件" },
//来源类型
"source_type": { "childorders": "子订单", "expensevoucher": "费用单" },
//审核状态
"audit_status": { "dsh": "待审核", "btg": "不通过", "tg": "通过" },
//收款类型
"receipt_type": { "sk": "收款", "csrz": "初始入账", "ptdsk": "平台代收款" },
//退款类型
"refund_type": { "tk": "退款", "ptdtk": "平台代退款" },
//费用类型
"expense_type": { "gf": "官费", "tax": "税金", "channelSettleProfit": "订单渠道分润结算" },
//凭单类型
"direction_type": { "sr": "收", "zc": "支" },
"push_return_type": { "0": "推送失败", "1": "推送成功" },
},
}
......
module.exports={
"bizName":"oplogs",
"list":{
columnMetaData:[
{"width":"200","label":"应用","prop":"appname","isShowTip":true,"isTmpl":false},
{"width":"200","label":"时间","prop":"created_at","isShowTip":true,"isTmpl":false},
{"width":"100","label":"用户名","prop":"username","isShowTip":true,"isTmpl":false},
{"width":"100","label":"性别","prop":"sex","isShowTip":true,"isTmpl":false},
{"width":"200","label":"行为","prop":"op","isShowTip":true,"isTmpl":false},
{"width":"200","label":"内容","prop":"content","isShowTip":true,"isTmpl":false},
{"width":"200","label":"客户端IP","prop":"clientIp","isShowTip":true,"isTmpl":false},
{"width":"200","label":"客户端环境","prop":"agent","isShowTip":true,"isTmpl":false},
]
},
"form":[
{
"title":"应用名称",
"validProp":"name",
"rule": [
{ "required": true, "message": '请输入应用名称', "trigger": 'blur' },
],
ctls:[
{"type":"input","label":"应用名称","prop":"name","placeHolder":"应用名称","style":""},
]
},
{
"title":"应用ID",
"ctls":[
{"type":"input","label":"应用ID","prop":"appid","disabled":true,"placeHolder":"","style":""},
]
},
],
"search":[
{
"title":"应用名称",
ctls:[
{"type":"input","label":"操作用户","prop":"username","placeHolder":"请模糊输入应用名称","style":""},
]
},
{
"title":"客户环境",
ctls:[
{"type":"input","label":"客户环境","prop":"agent","placeHolder":"请模糊输入客户环境","style":""},
]
},
// {
// "title":"",
// "min":1,
// "max":1,
// ctls:[
// {"type":"check","dicKey":"sex","label":"客户环境","prop":"sex","style":""},
// ]
// },
// <gsb-select v-model="formModel[item.prop]"
// :dicKey="item.dicKey"
// :autoComplete="item.autoComplete"
// :isMulti="item.isMulti"
// :modelName="item.modelName"
// :isFilter="item.isFilter"
// :labelField="item.labelField"
// :valueField="item.valueField"></gsb-select>
{
"title":"性别",
ctls:[
{"type":"select","dicKey":"sex","label":"性别","prop":"sex","labelField":"label","valueField":"value","style":""},
]
},
],
"auth":{
"add":[
],
"edit":[
],
"delete":[
{"icon":"el-icon-remove","title":"删除","type":"default","key":"delete","isOnGrid":true},
],
"common":[
],
}
}
......@@ -30,7 +30,7 @@ module.exports = (db, DataTypes) => {
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_op_log',
tableName: 'center_channel_log',
validate: {
},
......
......@@ -40,7 +40,7 @@ module.exports = (db, DataTypes) => {
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_push_log',
tableName: 'center_channel_pushlog',
validate: {
},
......
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("businesschance", {
app_id:DataTypes.INTEGER,
publisherId:DataTypes.INTEGER,//发布者id
publisherName:DataTypes.STRING,//发布者姓名
publisherMobile:DataTypes.STRING,//发布者手机号
publisherOnlyCode:DataTypes.STRING(50),//发布者唯一码
publishContent:DataTypes.STRING,//发布内容
followManId:DataTypes.INTEGER,//跟进人id(合伙人)
followManName:DataTypes.STRING,//跟进人姓名(合伙人)
followManMobile:DataTypes.STRING,//跟进人手机号(合伙人)
followManOnlyCode:DataTypes.STRING(50),//跟进者唯一码
followContent:DataTypes.STRING,//跟进内容
chanceEvaluation:{
//评论类型:"0":"差评","5":"一般","10":"好评"
type:DataTypes.ENUM,
defaultValue:"10",
values: Object.keys(uiconfig.config.pdict.service_evaluation),
set:function(val){
this.setDataValue("chanceEvaluation",val);
}
},
followTime:DataTypes.DATE,//跟进时间
chanceTypeName:DataTypes.STRING,
chanceType:{
//商机类型:"ip": "商标", "ic": "版权", "pa": "专利", "common": "增值", "icbc": "工商" “iso":"海外服务”
type:DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.chanceType),
set:function(val){
this.setDataValue("chanceType",val);
this.setDataValue("chanceTypeName",uiconfig.config.pdict.chanceType[val]);
}
},
name:DataTypes.STRING,//暂时没有用
chanceStatusName:DataTypes.STRING,
chanceStatus:{
// 商机:"1":"待服务","2":"跟进中","4":"成功","8":"失败"
type:DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.chance_status),
set:function(val){
this.setDataValue("chanceStatus",val);
this.setDataValue("chanceStatusName",uiconfig.config.pdict.chance_status[val]);
}
},
platformChanceType:{
//平台商机类型:"common":"普通"
type:DataTypes.ENUM,
defaultValue:"common",
values: Object.keys(uiconfig.config.pdict.platform_chance_type),
set:function(val){
this.setDataValue("platformChanceType",val);
}
},
notes:DataTypes.STRING,//备注
//------------------------------------------渠道相关
channelCode:{
//渠道编码:p_channel表中的channelCode
type:DataTypes.STRING(20),
defaultValue:"hhr",
},
serviceItem_code:DataTypes.STRING(20),
serviceItem_name:DataTypes.STRING,
orderNum:DataTypes.STRING(50),//自己订单号,目前与订单表无关
channelUserName:DataTypes.STRING(50),//渠道用户名
channelOrderNum:DataTypes.STRING(50),//渠道方订单号
totalSum:DataTypes.DECIMAL(12,2),//总额
channelProfitRatio:{
type:DataTypes.DECIMAL(12,2),//渠道分成比率(如:总额100,字段值30,则渠道的利润为30/100,剩下的则为平台利润)
defaultValue:0.00,
},
channelProfit:DataTypes.DECIMAL(12,2),//渠道利润
platformProfit:DataTypes.DECIMAL(12,2),//平台利润
disposeNotes:DataTypes.STRING,//处理的备注
profitTypeName:DataTypes.STRING(50),//渠道利润类型名称
profitType:{
//渠道利润类型:1: "比例分成", 2: "每单分成"
type:DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.channelProfitType),
defaultValue: "1",
set:function(val){
this.setDataValue("profitType",val);
this.setDataValue("profitTypeName",uiconfig.config.pdict.channelProfitType[val]);
},
},
isAllocationName:{
// 是否分配名称
type:DataTypes.STRING,
defaultValue:"否",
},
isAllocation:{
//是否分配:"0": "否", "1": "是"
type:DataTypes.ENUM,
defaultValue:"0",
values: Object.keys(uiconfig.config.pdict.isRecommend),
set:function(val){
this.setDataValue("isAllocation",val);
this.setDataValue("isAllocationName",uiconfig.config.pdict.isRecommend[val]);
},
defaultValue:"0",
},
allocationTime:DataTypes.DATE,//分配时间
city:DataTypes.STRING(50), // 城市
province:DataTypes.STRING(50), // 省份
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'h_business_chance',
validate: {
},
indexes:[
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("flowlog", {
uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号
opContent: DataTypes.STRING(1024), // 操作描述
notes: DataTypes.STRING, // 备注
isShow: {//是否显示
type: DataTypes.BOOLEAN,
defaultValue: false,
},
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_flow_log',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("ordercontacts", {
uapp_id :DataTypes.INTEGER, //
sourceOrderNo :DataTypes.STRING(64),//来源单号
contactName :DataTypes.STRING(1000), // 联系人
mobile :DataTypes.STRING(20), //
email :DataTypes.STRING(50), //
tel :DataTypes.STRING(20), //
fax :DataTypes.STRING(50), //
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_order_contacts',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("orderinfo", {
uapp_id :DataTypes.INTEGER,//
orderNo :DataTypes.STRING(64),// 订单号
channelServiceNo :DataTypes.STRING(64),// 渠道服务单号
channelOrderNo :DataTypes.STRING(1024),// 渠道订单号列表,多个以,隔开
channelUserId :DataTypes.STRING(64), // 渠道用户ID
ownerUserId :DataTypes.STRING(20),// 拥有渠道用户ID
needNo :DataTypes.STRING(64), // 需求单号
needNoOrderNo :DataTypes.STRING(64), // 需求订单号
payTime :DataTypes.DATE,// 渠道有支付时间则用渠道的支付时间
quantity :DataTypes.INTEGER,// 订单数量(即产品的倍数,默认值为1)
serviceQuantity :DataTypes.INTEGER,// 订单服务数量(即与订单数量相对应)
orderPayStatusName :DataTypes.STRING(50),//
orderPayStatus :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_pay_status),
set: function (val) {
this.setDataValue("orderPayStatus", val);
this.setDataValue("orderPayStatusName", uiconfig.config.pdict.order_pay_status[val]);
}
},// 订单付款状态dfk: 待付款, zfpz: 已上传支付凭证, yfk: 已付款, bfyfk: 部分已付款, ddqx: 订单取消, tkclz: 退款处理中, bfytk: 部分已退款, ytk: 已退款,zfshbtg:支付审核不通过
totalSum :DataTypes.DECIMAL(12, 2),// 订单总额(产品价格×优惠费率×订单件数)
payTotalSum :DataTypes.DECIMAL(12, 2),// 订单付款总额
refundSum :DataTypes.DECIMAL(12, 2),// 退款金额
totalServiceCharge :DataTypes.DECIMAL(12, 2),// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense :DataTypes.DECIMAL(12, 2),// 官费总额(产品配置的官费*订单件数)
totalProfitSum :DataTypes.DECIMAL(12, 2),// 订单毛利润总额(订单总额-官费总额)
totalDiscounts :DataTypes.DECIMAL(12, 2),// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
pfProfitSum :DataTypes.DECIMAL(12, 2),// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum :DataTypes.DECIMAL(12, 2),// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfSettleProfit :DataTypes.INTEGER,// 平台结算渠道利润,0否,1是
invoiceApplyStatus :DataTypes.STRING(10),// 发票状态:00: 未申请, 10: 已申请,20:已开票
opNotes :DataTypes.STRING,// 备注
notes :DataTypes.STRING,// 备注
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_order_info',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("orderproduct", {
uapp_id: DataTypes.INTEGER,//
sourceOrderNo :DataTypes.STRING(64),//来源单号
productType_id :DataTypes.INTEGER,//产品类型Id
productOneType_id :DataTypes.INTEGER,//产品大类Id
itemCode :DataTypes.STRING(64),//产品编码
itemName :DataTypes.STRING(100),//产品名称
channelItemCode :DataTypes.STRING(100),// 渠道产品编码
channelItemName :DataTypes.STRING(100),// 渠道产品名称
serviceItemCode :DataTypes.STRING(100),// 服务商产品编码
picUrl :DataTypes.STRING(500),// 产品图片地址
proPrice :DataTypes.DOUBLE, // 产品价格
quantity :DataTypes.INTEGER,// 订单数量(即产品的倍数,默认值为1)
opPayType :DataTypes.STRING(10),// 操作付款类型:00: 创建订单, 10: 补单
serviceItemSnapshot :DataTypes.TEXT('long'), //产品快照
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_order_product',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {//费用单:
return db.define("expensevoucher", {
uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号
expenseTypeName: DataTypes.STRING,
expenseType: {//收款类型,gf: 官费, tax: 税金, channelSettleProfit: 订单渠道分润结算
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.expense_type),
set: function (val) {
this.setDataValue("expenseType", val);
this.setDataValue("expenseTypeName", uiconfig.config.pdict.expense_type[val]);
}
},
totalSum: DataTypes.DECIMAL(12, 3),//总额
notes: DataTypes.STRING,//备注
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'c_expensevoucher',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("moneyjourney", {
uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号
channelUserId: DataTypes.STRING(64), // 渠道用户ID
ownerUserId: DataTypes.STRING(20),// 拥有渠道用户ID
accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}
},
accountTypeName: {//帐户类型名称
type: DataTypes.STRING,
},
directionTypeName: DataTypes.STRING,
directionType: {//凭单类型,"sr": "收","zc": "支"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.direction_type),
set: function (val) {
this.setDataValue("directionType", val);
this.setDataValue("directionTypeName", uiconfig.config.pdict.direction_type[val]);
}
},
voucherDate: DataTypes.DATE,//凭单时间
recvAmount: DataTypes.DECIMAL(12, 3),//收总额
payAmount: DataTypes.DECIMAL(12, 3),//支总额
sourceTypeName: DataTypes.STRING,
sourceType: {//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.source_type),
set: function (val) {
this.setDataValue("sourceType", val);
this.setDataValue("sourceTypeName", uiconfig.config.pdict.source_type[val]);
}
},
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
},
notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'c_moneyjourney',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("orderreceiptvoucher", {//收款单:
uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号
accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}
},
accountTypeName: {//帐户类型名称
type: DataTypes.STRING,
},
payDate: DataTypes.DATE,//支付时间
totalSum: DataTypes.DECIMAL(12, 3),//订单总额
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
buyerOpenId: DataTypes.STRING,//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
certifyFileUrl: DataTypes.STRING(500), //支付证明文件Url
wxPayOrderCode: DataTypes.STRING(64),//业务微信支付订单号
aliPayOrderCode: DataTypes.STRING(50),//业务支付宝支付订单号
busPayOrderCode: DataTypes.STRING(50),//业务支付订单号
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
},
notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'c_order_receiptvoucher',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("orderrefundvoucher", {//退款单:
uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}
},
accountTypeName: {//帐户类型名称
type: DataTypes.STRING,
},
payDate: DataTypes.DATE,//支付时间
totalSum: DataTypes.DECIMAL(12, 3),//总额
certifyFileUrl: DataTypes.STRING(500), //证明文件Url
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
buyerOpenId: DataTypes.STRING,//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
},
notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'c_order_refundvoucher',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("customercontacts", {
app_id :DataTypes.INTEGER, //
customerinfo_id :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), // 交付订单号
mobile :DataTypes.STRING(20), //
email :DataTypes.STRING(50), //
tel :DataTypes.STRING(20), //
fax :DataTypes.STRING(50), //
name :DataTypes.STRING(1000), // 联系人
code :DataTypes.STRING(100), // 暂时没有用
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_customercontacts',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("customerinfo", {
customerTypeName :DataTypes.STRING(50), //
customerType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.customer_type),
set: function (val) {
this.setDataValue("customerType", val);
this.setDataValue("customerTypeName", uiconfig.config.pdict.customer_type[val]);
},
defaultValue: "0",
}, //申请企业类型: ent:企业,person:个人
identityCardPic :DataTypes.STRING(500), // 身份证图片
identityCardPdf :DataTypes.STRING(500), // 身份证pdf
businessLicensePic :DataTypes.STRING(500), // 营业执照图片
businessLicensePdf :DataTypes.STRING(500), // 营业执照pdf
name :DataTypes.STRING(1000), // 公司名称或个人名称
code :DataTypes.STRING(100), // 公司统一社会代码
app_id :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), // 交付订单号
applyAddr :DataTypes.STRING, // 申请地址
applyArea :DataTypes.STRING(50), // 存储省市编码
province :DataTypes.STRING(50), // 省
city :DataTypes.STRING(50), // 市
identityCardNo :DataTypes.STRING(50), // 身份证号
notes :DataTypes.STRING, // 备注
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
owner_id :DataTypes.INTEGER, // 拥有者
zipCode :DataTypes.STRING(20), //
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_customerinfo',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("order", {
app_id :DataTypes.INTEGER,//
orderNo :DataTypes.STRING(64),// 订单号
channelServiceNo :DataTypes.STRING(64),// 渠道服务单号
channelOrderNo :DataTypes.STRING(1024),// 渠道订单号列表,多个以,隔开
itemCode :DataTypes.STRING(64),//
itemName :DataTypes.STRING(100),//
channelItemCode :DataTypes.STRING(64),// 渠道产品编码
channelItemName :DataTypes.STRING,// 渠道产品名称
payTime :DataTypes.DATE,// 渠道有支付时间则用渠道的支付时间
salesNum :DataTypes.INTEGER,// 项目订单数量(即服务项目的倍数,默认值为1)
salesDiliverNum :DataTypes.INTEGER,// 项目订单交付数量(即与项目订单数量相对应)
minitermNum :DataTypes.INTEGER,// 订单小项数量
minitermDiliverNum :DataTypes.INTEGER,// 订单小项交付数量
orderType :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_type),
},// 订单类型,zzdd: 自主订单,dkxd: 代客下单
orderPayStatusName: DataTypes.STRING(50),//
orderPayStatus :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_pay_status),
set: function (val) {
this.setDataValue("orderPayStatus", val);
this.setDataValue("orderPayStatusName", uiconfig.config.pdict.order_pay_status[val]);
}
},// 订单付款状态dfk: 待付款, zfpz: 已上传支付凭证, yfk: 已付款, ddqx: 订单取消, tkclz: 退款处理中, bfytk: 部分已退款, ytk: 已退款,zfshbtg:支付审核不通过
totalServiceCharge :DataTypes.DECIMAL(12, 2),// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense :DataTypes.DECIMAL(12, 2),// 官费总额(产品配置的官费*订单件数)
totalDiscounts :DataTypes.DECIMAL(12, 2),// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
totalTaxes :DataTypes.DECIMAL(12, 2),// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalSum :DataTypes.DECIMAL(12, 2),// 订单总额(产品价格×优惠费率×订单件数)
refundSum :DataTypes.DECIMAL(12, 2),// 退款金额
totalProfitSum :DataTypes.DECIMAL(12, 2),// 订单毛利润总额(订单总额-官费总额)
pfProfitSum :DataTypes.DECIMAL(12, 2),// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum :DataTypes.DECIMAL(12, 2),// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfSettleProfit :DataTypes.DECIMAL(12, 2),// 平台结算渠道利润,0否,1是
opNotes :DataTypes.STRING,// 备注
notes :DataTypes.STRING,// 备注
appPayType :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_pay_type),
},// 支付类型:00第三方支付,10平台代收款
createuser_id :DataTypes.INTEGER,//
updateuser_id :DataTypes.INTEGER,//
owner_id :DataTypes.INTEGER,//
creator :DataTypes.STRING(100),//
updator :DataTypes.STRING(100),//
owner :DataTypes.STRING(100),//
ownerMoblie :DataTypes.STRING(20),//
invoiceApplyStatus :DataTypes.STRING(10),// 发票状态:00: 未申请, 10: 已申请,20:已开票
channelUserId :DataTypes.STRING(64), // 渠道用户ID
needNo :DataTypes.STRING(64), // 需求单号
needNoOrderNo :DataTypes.STRING(64), // 需求订单号
sourceType: DataTypes.STRING(10),//来源类型:00订单,10需求需要用户确认方案
picUrl :DataTypes.STRING(500),// 产品图片地址
productType_id :DataTypes.INTEGER, //产品类型Id
productOneType_id :DataTypes.INTEGER, //产品大类Id
serviceItemSnapshot :DataTypes.TEXT, //产品快照
buyerMoblie :DataTypes.STRING(64), // 买家手机号
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_order',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("orderflow", {
sourceOrderNo: DataTypes.STRING(64), // 来源单号
opContent: DataTypes.STRING(1024), // 操作描述
app_id: DataTypes.INTEGER, //
notes: DataTypes.STRING, // 备注
createuser_id: DataTypes.INTEGER, //
isShow: {//是否显示
type: DataTypes.BOOLEAN,
defaultValue: false,
},
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_orderflow',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("ordertmproduct", {
app_id: DataTypes.INTEGER,//
productType_id: DataTypes.INTEGER,//产品类型Id
productOneType_id: DataTypes.INTEGER,//产品大类Id
itemCode: DataTypes.STRING(64),//产品编码
itemName: DataTypes.STRING(100),//产品名称
tmName: DataTypes.STRING(1000),//商标名称
tmType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.tm_type),
},//p:普通商标,j:集体商标,z:证明商标,t:特殊商标
tmFormTypeName: DataTypes.STRING(50),//
tmFormType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.tm_form_type),
set: function (val) {
this.setDataValue("tmFormType", val);
this.setDataValue("tmFormTypeName", uiconfig.config.pdict.tm_form_type[val]);
}
},//商标类型形式:1:立体,3:字,4:图,5:字图,6:颜色,7:彩色
nclOneCodes: DataTypes.STRING,//尼斯大类列表:格式以,隔开
payStatusName: DataTypes.STRING(50),//
payStatus: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_service_pay_status),
set: function (val) {
this.setDataValue("payStatus", val);
this.setDataValue("payStatusName", uiconfig.config.pdict.order_service_pay_status[val]);
}
},//支付状态:dfk:待付款,yzf:已支付
deliveryStatusName: DataTypes.STRING(50),//
deliveryStatus: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.delivery_status),
set: function (val) {
this.setDataValue("deliveryStatus", val);
this.setDataValue("deliveryStatusName", uiconfig.config.pdict.delivery_status[val]);
}
},//商标交付状态:dsccl:待上传材料,dsh:待审核,ddj:待递交, ydj: 已递交,ywc:已完成
appDataOpType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_data_op_type),
},//应用数据操作类型:00独立,10全委托,20部分委托
sourceOrderNo: DataTypes.STRING(64),//来源单号
deliveryOrderNo: DataTypes.STRING(64),//交付订单号
channelServiceNo: DataTypes.STRING(64),//渠道服务单号
channelOrderNo: DataTypes.STRING(1024),//渠道订单号列表,多个以,隔开
needNo: DataTypes.STRING(64),//需求单号
needNoOrderNo :DataTypes.STRING(64), // 需求订单号
sourceType: DataTypes.STRING(10),//来源类型:00订单,10需求需要用户确认方案
picUrl: DataTypes.STRING(500), //商标图样
colorizedPicUrl: DataTypes.STRING(500),//商标彩色图样
gzwtsUrl: DataTypes.STRING(500), //盖章委托书
sywjUrl: DataTypes.STRING(500), //声音文件
smwjUrl: DataTypes.STRING(500), //说明文件
channelUserId: DataTypes.STRING(64),//渠道用户ID
notes: DataTypes.STRING(255),//备注
createuser_id: DataTypes.INTEGER,//
updateuser_id: DataTypes.INTEGER,//
auditor_id: DataTypes.INTEGER,//
createuser: DataTypes.STRING(100),//
updateuser: DataTypes.STRING(100),//
auditor: DataTypes.STRING(100),//
nclOneCount: DataTypes.INTEGER, // 尼斯大类数量
nclCount: DataTypes.INTEGER, // 尼斯数量
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_order_tm_product',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
var base = require("../../basemodel/voucherbase")(db, DataTypes);
return db.define("receiptvoucher", Object.assign({//收款单:
//基类 code: 收款单号(自动生成)
//基类 creator: 创建者
//基类 updator:/更新者
//基类 auditor: 审核者
//基类 opNotes: 操作备注
//基类 auditStatusName: //审核状态名称
//基类 auditStatus: //审核状态:ENUM=audit_status,"dsh": "待审核", "btg": "不通过", "tg": "通过"
//基类 sourceTypeName: //来源类型名称
//基类 sourceType: //来源类型:ENUM=source_type,"order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单","refundvoucher": "退款单", "trademark": "商标单"
//基类 sourceOrderNo: DataTypes.STRING,//来源单号(如:订单号等)
//基类 channelServiceNo //渠道服务单号
createapp_id: DataTypes.INTEGER,//
payuser_id: DataTypes.INTEGER,//
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
receiptTypeName: DataTypes.STRING,
receiptType: {//收款类型,"sk": "收款","csrz": "初始入账" ,"ptdsk": "平台代收款"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.receipt_type),
set: function (val) {
this.setDataValue("receiptType", val);
this.setDataValue("receiptTypeName", uiconfig.config.pdict.receipt_type[val]);
}
},
accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
},
defaultValue: "other",
},
accountTypeName: {//帐户类型名称
type: DataTypes.STRING,
defaultValue: "其它",
},
payDate: DataTypes.DATE,//支付时间
totalSum: DataTypes.DECIMAL(12, 3),//订单总额(平台费用+服务费+官费+发票税费+个人利润+平台利润)
certifyFileUrl: DataTypes.STRING(500), //证明文件Url
notes: DataTypes.STRING,//备注
itemCode: DataTypes.STRING(100),//项目操作码
itemName: DataTypes.STRING(100),//项目名称
buyerOpenId: DataTypes.STRING,//用户在商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
}, base), {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'b_receiptvoucher',
validate: {
}
});
}
const uuidv4 = require('uuid/v4');
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class BusinesschanceService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(BusinesschanceService));
}
}
module.exports = BusinesschanceService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class FlowLogService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(FlowLogService));
}
}
module.exports = FlowLogService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderContactsService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(OrderContactsService));
}
}
module.exports = OrderContactsService;
const system = require("../../../system");
// const Dao = require("../../dao.base");
const ServiceBase = require("../../sve.base");
const uuidv4 = require('uuid/v4');
class OrderInfoService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(OrderInfoService));
this.appproductDao = system.getObject("db.dbapp.appproductDao");
this.orderProductDao = system.getObject("db.dbcorder.orderproductDao");
this.orderReceiptVoucherDao = system.getObject("db.dbcpay.orderreceiptvoucherDao");
this.orderRefundVoucherDao = system.getObject("db.dbcpay.orderrefundvoucherDao");
this.moneyJourneyDao = system.getObject("db.dbcpay.moneyjourneyDao");
this.pushlogSve = system.getObject("service.common.pushlogSve");
}
getUUID() {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
/*
* 订单验证
*/
async isOrderVerify(serviceitem,buyProductCount,buyPrice) {
var sveItemRateConfig = serviceitem.rateConfig ? Number(serviceitem.rateConfig) : 0;//产品费率
var fwf = serviceitem.serviceCharge ? Number(serviceitem.serviceCharge) : 0;//服务费
var yhfl = serviceitem.discountsRateConfig ? Number(serviceitem.discountsRateConfig) : 0;//最大优惠费率
var gf = serviceitem.publicExpense ? Number(serviceitem.publicExpense) : 0;//产品官费
var productCount = 1;//产品数量
var gfze = 0;//官费总额
var qdfcbl = serviceitem.channelProfitRate?Number(serviceitem.channelProfitRate) : 0;//渠道利润分成比率
productCount = Number(buyProductCount);//购买产品数量
buyPrice = Number(buyPrice);//购买价格
gfze = gf * Number(productCount);
var fwfze = Number(fwf) * Number(productCount);//服务费总额
var sfze = Number(buyPrice) / (sveItemRateConfig + 100) * sveItemRateConfig; //totalTaxes 税费总额
sfze = sfze.toFixed(2);
sfze = Number(sfze);
var zdyhe = (gfze + fwfze) * yhfl / 100;//最大优惠额
zdyhe = zdyhe.toFixed(2);
zdyhe = Number(zdyhe);
//毛利总额=应付总额-官费总额
var mlze = Number(buyPrice) - gfze;//totalProfitSum 毛利总额
mlze = mlze.toFixed(2);
mlze = Number(mlze);
//优惠金额=服务费+官费总额-应付总额(服务费、官费之和小于等于应付总额时,优惠金额为零)
var yhje = fwfze + gfze - Number(buyPrice);
if (yhje < 0) {
yhje = 0;
}
yhje = yhje.toFixed(2);
yhje = Number(yhje);
if (yhje > zdyhe) {
return { code: -205, msg: "优惠总额有误" };
}
var fcmlze_channel = mlze*qdfcbl ;//订单渠道分成毛利润总额
var fcmlze_platform = mlze-fcmlze_channel ;//订单平台毛利润总额
return {code:1,data:{
totalServiceCharge :fwfze,// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense :gfze,// 官费总额(产品配置的官费*订单件数)
totalTaxes :sfze,// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalSum :buyPrice,// 订单总额(产品价格×优惠费率×订单件数)
totalProfitSum :mlze,// 订单毛利润总额(订单总额-官费总额)
totalDiscounts :yhje,// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
pfProfitSum :fcmlze_platform,// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum :fcmlze_channel,// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
}};
}
/**
* 创建订单
*/
async createOrder(obj,req){
var self = this;
var app = req.app;
var user = req.user;
if(!app || !app.uAppId){
return system.getResult(null, "渠道信息有误");
}
if(!user){
return system.getResult(null, "用户信息有误");
}
var channelItemCode = obj.itemCode;
if(!channelItemCode){
return system.getResult(null, "未知的产品码");
}
var productItem = await this.appproductDao.findOneByChannelItemCode(channelItemCode, app.id);//通过ChannelItemCode获取产品
// if (!productItem) {
// return system.getResult(null, "未知的产品");
// }
var verifyResult=null;
if (productItem) {
if(productItem.status != 1){
return system.getResult(null, "产品已禁用");
}
}
var channelUser = obj.channelUser;
if(!channelUser || !channelUser.channelUserId){
return system.getResult(null, "渠道用户信息有误");
}
var channelOrder = obj.channelOrder;
if(!channelOrder || !channelOrder.channelServiceNo){
return system.getResult(null, "渠道订单信息有误");
}
if(!channelOrder.quantity){
return system.getResult(null, "渠道订单产品数量不能为空");
}
if(!channelOrder.totalSum){
return system.getResult(null, "渠道订单支付金额不能为空");
}
if (productItem) {
verifyResult = await self.isOrderVerify(productItem,channelOrder.quantity,channelOrder.totalSum);
if (verifyResult && verifyResult.code!=1) {
return system.getResult(null, verifyResult.msg);
}
}
var beforeOrder = await this.dao.model.findOne({
where:{channelServiceNo:channelOrder.channelServiceNo,uapp_id:app.uAppId},
raw:true
});
if(beforeOrder){//订单已存在
return system.getResultFail(2, "订单已存在",beforeOrder.orderNo);
}
return await self.db.transaction(async function (t) {
var orderNo = await self.getBusUid("o");
//创建订单
var orderObj={
uapp_id:app.uAppId,orderNo:orderNo,channelServiceNo:channelOrder.channelServiceNo,
channelUserId:channelUser.channelUserId,channelOrderNo:channelOrder.channelOrderNo,
ownerUserId:channelUser.channelUserId,
quantity:channelOrder.quantity,
needNo:channelOrder.needNo,payTime:channelOrder.payTime,orderPayStatus:channelOrder.payStatus,
totalSum:channelOrder.totalSum,
payTotalSum:channelOrder.payTotalSum,
totalServiceCharge :0,// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense :0,// 官费总额(产品配置的官费*订单件数)
totalTaxes :0,// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalProfitSum :0,// 订单毛利润总额(订单总额-官费总额)
totalDiscounts :0,// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
pfProfitSum :0,// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum :0,// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
// pfSettleProfit :DataTypes.INTEGER,// 平台结算渠道利润,0否,1是
invoiceApplyStatus :"00",// 发票状态:00: 未申请, 10: 已申请,20:已开票
};
if(verifyResult && verifyResult.code==1 && verifyResult.data){
var orderCostObj=verifyResult.data;
orderObj.totalServiceCharge=orderCostObj.totalServiceCharge || 0;
orderObj.totalPublicExpense=orderCostObj.totalPublicExpense || 0;
orderObj.totalTaxes=orderCostObj.totalTaxes || 0;
orderObj.totalProfitSum=orderCostObj.totalProfitSum || 0;
orderObj.totalDiscounts=orderCostObj.totalDiscounts || 0;
orderObj.pfProfitSum=orderCostObj.pfProfitSum || 0;
orderObj.channelProfitSum=orderCostObj.channelProfitSum || 0;
}
var order = await self.dao.create(orderObj,t);//创建订单
//var orderProductNo = await self.getBusUid("op");
if(productItem){
var orderProductObj = {
uapp_id:app.uAppId,
sourceOrderNo:order.orderNo, // 来源单号
productType_id :productItem.productType_id,//产品类型Id
productOneType_id :productItem.productOneType_id,//产品大类Id
itemCode :productItem.itemCode,//产品编码
itemName :productItem.itemName,//产品名称
channelItemCode :productItem.channelItemCode,// 渠道产品编码
channelItemName :productItem.channelItemName,// 渠道产品名称
serviceItemCode :productItem.serviceItemCode,// 服务商产品编码
picUrl :productItem.picUrl,// 产品图片地址
proPrice :productItem.proPrice, // 产品价格
quantity :channelOrder.quantity,// 订单数量(即产品的倍数,默认值为1)
opPayType :"00",// 操作付款类型:00: 创建订单, 10: 补单
serviceItemSnapshot :JSON.stringify(productItem), //产品快照
};
var orderProduct = await self.orderProductDao.create(orderProductObj,t);//订单产品
}
if(order.totalSum>0){//支付成功
var moneyObj={
uapp_id:app.uAppId,
sourceOrderNo:order.orderNo, // 来源单号
channelUserId:channelUser.channelUserId,
ownerUserId:channelUser.channelUserId,
accountType: "other",//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
directionType: "sr",//凭单类型,"sr": "收","zc": "支"
voucherDate: channelOrder.payTime,//凭单时间
recvAmount: channelOrder.totalSum,//收总额
sourceType: "orderinfo",//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
auditStatus: "dsh",//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
};
if(channelOrder.payStatus=='yfk' || channelOrder.payStatus=='bfyfk'){
moneyObj.auditStatus="tg";
}
var moneyJourney = await self.moneyJourneyDao.create(moneyObj,t);
var orderReceiptVoucherObj={
uapp_id:app.uAppId,
sourceOrderNo:order.orderNo, // 来源单号
accountType: "other",
payDate: channelOrder.payTime,//支付时间
totalSum: channelOrder.totalSum,//订单总额
// payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
// buyerOpenId: DataTypes.STRING,//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
// passTradeNo: DataTypes.STRING,//通道的统一订单号
// buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
// certifyFileUrl: order.orderNo, //支付证明文件Url
wxPayOrderCode: order.orderNo,//业务微信支付订单号
aliPayOrderCode:order.orderNo,//业务支付宝支付订单号
busPayOrderCode: order.orderNo,//业务支付订单号
auditStatus:"dsh"
};
if(channelOrder.payStatus=='yfk' || channelOrder.payStatus=='bfyfk'){
orderReceiptVoucherObj.auditStatus="tg";
}
var orderReceiptVoucher = await self.orderReceiptVoucherDao.create(orderReceiptVoucherObj,t);
}
var requestid=self.getUUID();
if(productItem && productItem.deliveryUrl){
obj["orderNo"]=order.orderNo;
self.pushData(requestid,obj,productItem.deliveryUrl,req);
}
return system.getResultSuccess({
orderNo:order.orderNo,
channelServiceNo:order.channelServiceNo,
channelParams:obj.channelParams,
requestid:requestid
});
});
}
/**
* 数据推送
*/
async pushData(requestid,params,url,req){
var rc = system.getObject("util.execClient");
var obj = params;
var rtn = null;
try {
rtn = await rc.execPushDataPost(obj, url, req.headers["token"], req.headers["request-id"]);
var returnType = "0";
if (rtn.stdout) {
var j = JSON.parse(rtn.stdout);
if (j && j.status == 0) {
returnType = "1";
}
}
this.pushlogSve.createDb({
appid: req.app.id,
requestId: requestid,
op: url,
content: JSON.stringify(obj),
resultInfo: JSON.stringify(rtn),
clientIp: req.clientIp,
returnType: returnType,
agent: req.uagent,
opTitle: "数据推送-创建订单",
});
} catch (e) {
this.pushlogSve.createDb({
appid: req.app.id,
requestId: requestid,
op: url,
content: JSON.stringify(obj),
resultInfo: JSON.stringify(e.stack),
clientIp: req.clientIp,
returnType: '0',
agent: req.uagent,
opTitle: "数据推送-创建订单",
});
}
}
async findAndCountAll(obj,req) {
var app = req.app;
if(!app || !app.uAppId){
return system.getResult(null, "渠道信息有误");
}
obj["search"]["uapp_id"]=app.uAppId;
const result = await this.dao.findAndCountAll(obj);
return system.getResultSuccess(result);
}
async getOrderDetailByOrderNo(obj,req){
var orderNo = obj.orderNo;
if(!orderNo){
return system.getResult(null, "订单编号不能为空");
}
var app = req.app;
if(!app || !app.uAppId){
return system.getResult(null, "渠道信息有误");
}
var order = await this.dao.model.findOne({
where:{orderNo:orderNo,uapp_id:app.uAppId},
attributes:["orderNo","channelServiceNo","channelOrderNo","channelUserId","ownerUserId","needNo",
"payTime","quantity","serviceQuantity","orderPayStatus","orderPayStatusName","totalSum","payTotalSum",
"refundSum","created_at","opNotes","notes"
],
raw:true
});
if(order && order.orderNo){
var orderproducts = await this.orderProductDao.model.findAll({
where:{sourceOrderNo:order.orderNo},
attributes:["sourceOrderNo","itemCode","itemName","channelItemCode","channelItemName",
"serviceItemCode","picUrl","proPrice","quantity","opPayType","serviceItemSnapshot",
"created_at"
],
raw:true
});
order["orderproducts"]=orderproducts;
var receptvouchers = await this.orderReceiptVoucherDao.model.findAll({
where:{sourceOrderNo:order.orderNo},
attributes:[
"sourceOrderNo","accountType","accountTypeName","payDate","totalSum","payOrderNo","buyerOpenId",
"passTradeNo","buyerAliLogonId","certifyFileUrl","wxPayOrderCode","aliPayOrderCode","busPayOrderCode",
"auditStatusName","auditStatus"
],
raw:true
});
order["receptvouchers"]=receptvouchers;
var refundvouchers = await this.orderRefundVoucherDao.model.findAll({
where:{sourceOrderNo:order.orderNo},
attributes:[
"busPayOrderCode",
"sourceOrderNo","accountType","accountTypeName","payDate","totalSum","payOrderNo","buyerOpenId",
"passTradeNo","certifyFileUrl","auditStatusName","auditStatus"
],
raw:true
});
order["refundvouchers"]=refundvouchers;
}
return system.getResultSuccess(order);
}
}
module.exports = OrderInfoService;
// var task = new OrderInfoService();
// var obj={
// "itemCode": "1406046",
// "channelParams": {},
// "channelUser": {
// "channelUserId": "z120315554031547444",
// "channelUserName": "testUser",
// "channelUserMoblie": "15010929368",
// "nickname": "",
// "orgName": "",
// "orgPath": ""
// },
// "channelOrder": {
// "channelServiceNo": "z1203155540315474427",
// "channelOrderNo": "z12031,z1203d12",
// "needNo": "z1203155540315474427",
// "quantity": 1,
// "totalSum":699,
// "payTotalSum":699,
// "payStatus": "yfk",
// "payTime": "2019-09-11 10:23:21"
// }
// };
// var req={
// app:{ id: 2,uAppId:123},
// user:{ id: 6, app_id: 2, nickname: "测试用户",channelUserId:"testUserId01" }
// };
// task.createOrder(obj,req).then(d=>{
// console.log("d");
// console.log(d);
// })
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderProductService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(OrderProductService));
}
}
module.exports = OrderProductService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class ExpenseVoucherService extends ServiceBase {
constructor() {
super("dbcpay", ServiceBase.getDaoName(ExpenseVoucherService));
}
}
module.exports = ExpenseVoucherService;
const system=require("../../../system");
const Dao=require("../../dao.base");
class MoneyJourneyService extends ServiceBase {
constructor() {
super("dbcpay", ServiceBase.getDaoName(MoneyJourneyService));
}
}
module.exports=MoneyJourneyService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderReceiptVoucherService extends ServiceBase {
constructor() {
super("dbcpay", ServiceBase.getDaoName(OrderReceiptVoucherService));
}
}
module.exports = OrderReceiptVoucherService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderRefundVoucherService extends ServiceBase {
constructor() {
super("dbcpay", ServiceBase.getDaoName(OrderRefundVoucherService));
}
}
module.exports = OrderRefundVoucherService;
const System = require("../../../system");
var settings = require("../../../../config/settings");
const querystring = require('querystring');
const AppServiceBase = require("../../app.base");
class UtilsOrderService extends AppServiceBase {
constructor() {
super();
this.centerOrderUrl = settings.centerOrderUrl();
};
async addOrder(pobj, req) {
var url = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, url);
return result;
}
}
module.exports = UtilsOrderService;
......@@ -6,12 +6,12 @@ var settings={
db:8,
},
database:{
dbname : "center_channel",
dbname : "igirl_api",
user: "write",
password: "write",
config: {
host: '192.168.18.237',
port: 3306,
host: '43.247.184.35',
port: 8899,
dialect: 'mysql',
operatorsAliases: false,
pool: {
......
......@@ -4,11 +4,11 @@ var ENVINPUT = {
DB_PORT: process.env.DB_PORT,
DB_USER: process.env.DB_USER,
DB_PWD: process.env.DB_PWD,
DB_NAME: process.env.CENTER_CHANNEL_DB_NAME,
REDIS_HOST: process.env.REDIS_HOST,
REDIS_PORT: process.env.REDIS_PORT,
REDIS_PWD: process.env.REDIS_PWD,
REDIS_DB: process.env.CENTER_CHANNEL_REDIS_DB,
DB_NAME: process.env.ZC_API_DB_NAME,
REDIS_DB: process.env.ZC_API_REDIS_DB,
APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "dev"
};
var settings = {
......@@ -19,7 +19,7 @@ var settings = {
cacheprefix: "centerChannel",
usertimeout: 3600,//单位秒
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 4011,
port: process.env.NODE_PORT || 4012,
paasUrl: function () {
if (this.env == "dev") {
return "http://p.apps.com:4001/";
......@@ -34,6 +34,13 @@ var settings = {
return "http://center-app-service/";
}
},
centerOrderUrl: function () {
if (this.env == "dev") {
return "http://centerorder.apps.com:4011/";
} else {
return "http://center-order-service/";
}
},
reqTransferurl: function () {
if (this.env == "dev") {
return "http://192.168.18.61:3003/";
......@@ -103,7 +110,7 @@ var settings = {
user: ENVINPUT.DB_USER,
password: ENVINPUT.DB_PWD,
config: {
host: ENVINPUT.DB_HOST,
host: ENVINPUT.DB_HOST,
dialect: 'mysql',
operatorsAliases: false,
pool: {
......
......@@ -19,11 +19,17 @@
## 3. 支付相关接口
  1 [支付中心](doc/api/paymentDesc/payment.md)
## 4. 用户中心相关接口
  1 [用户中心](doc/api/user/user.md)
## 5. 专利检索接口
## 4. 专利检索接口
  1 [专利检索](doc/api/patentDesc/patent.md)
## 6. 证照相关接口
  1 [证照相关推荐](doc/api/licensesDesc/license.md)
\ No newline at end of file
## 5. 证照相关接口
  1 [证照相关推荐](doc/api/licensesDesc/license.md)
## 6. 用户中心相关接口
  1 [用户中心](doc/api/platform/user.md)
## 7. 产品中心相关接口
  1 [产品中心接口](doc/api/platform/product.md)
## 8. 订单中心相关接口
  1 [订单中心接口](doc/api/platform/order.md)
\ No newline at end of file
......@@ -1168,7 +1168,7 @@
## **<a name="getCAProductDetail"> 产品详情-应用中心</a>**
[返回到目录](#menu)
##### URL
[/action/tmOrder/springBoard]
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductDetail
......@@ -1249,7 +1249,7 @@
## **<a name="getCAProductListByTypeOneCode"> 产品列表-根据产品大类获取-应用中心</a>**
[返回到目录](#menu)
##### URL
[/action/tmOrder/springBoard]
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductListByTypeOneCode
......@@ -1392,7 +1392,7 @@
## **<a name="getCAProductListByTypeCode"> 产品列表-根据产品二类获取-应用中心</a>**
[返回到目录](#menu)
##### URL
[/action/tmOrder/springBoard]
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductListByTypeCode
......
<a name="menu" href="/doc">返回主目录</a>
1. [产品列表-根据产品大类获取](#getCAProductListByTypeOneCode)
1. [产品列表-根据产品二类获取](#getCAProductListByTypeCode)
1. [产品详情](#getCAProductDetail)
## **<a name="getCAProductListByTypeOneCode"> 产品列表-根据产品大类获取</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductListByTypeOneCode
``` javascript
{
"typeOneCode":"sbfu"
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"id":1,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"zzsbzc",
"item_name":"商标注册【自助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["自己检索商标,准备官方所需注册材料","提交迅速,及时反馈","全流程跟踪,掌握申请进度"]}",
"channel_item_code":"FW_GOODS-581976-1",
"channel_item_name":"商标注册【自助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:29:57.000Z",
"product_id":1,
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":2,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"fzsbzc",
"item_name":"商标注册【专家辅助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["由专业代理人帮您检索分析,成功率高","为您优化注册方案,全方位保护","代理人全流程服务,24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-580010-1",
"channel_item_name":"商标注册【专家辅助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":2,
"price":699,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":3,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"dbsbzc",
"item_name":"商标注册【担保申请】",
"pic_url":"",
"product_desc":"{"logo":"","desc":["专业代理人精准评估,风险共担","注册不成功,全额退款","24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-581978-1",
"channel_item_name":"商标注册【担保申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":3,
"price":1380,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":"",
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
}
],
"requestId":"cb12e4a2f91440ab8f0d79b6845298e8"
}
```
## **<a name="getCAProductListByTypeCode"> 产品列表-根据产品二类获取</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductListByTypeCode
``` javascript
{
"typeCode":"sbzc"
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"id":1,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"zzsbzc",
"item_name":"商标注册【自助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["自己检索商标,准备官方所需注册材料","提交迅速,及时反馈","全流程跟踪,掌握申请进度"]}",
"channel_item_code":"FW_GOODS-581976-1",
"channel_item_name":"商标注册【自助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:29:57.000Z",
"product_id":1,
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":2,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"fzsbzc",
"item_name":"商标注册【专家辅助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["由专业代理人帮您检索分析,成功率高","为您优化注册方案,全方位保护","代理人全流程服务,24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-580010-1",
"channel_item_name":"商标注册【专家辅助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":2,
"price":699,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":3,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"dbsbzc",
"item_name":"商标注册【担保申请】",
"pic_url":"",
"product_desc":"{"logo":"","desc":["专业代理人精准评估,风险共担","注册不成功,全额退款","24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-581978-1",
"channel_item_name":"商标注册【担保申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":3,
"price":1380,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":"",
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
}
],
"requestId":"3708d266442a45edbfedaf87d26f6400"
}
```
## **<a name="getCAProductDetail"> 产品详情</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductDetail
``` javascript
{
"channelItemCode":"FW_GOODS-581976-1"
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"id":1,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"zzsbzc",
"item_name":"商标注册【自助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["自己检索商标,准备官方所需注册材料","提交迅速,及时反馈","全流程跟踪,掌握申请进度"]}",
"channel_item_code":"FW_GOODS-581976-1",
"channel_item_name":"商标注册【自助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:29:57.000Z",
"product_id":1,
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null,
"productPriceList":[
{
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"is_default":1,
"price_type":"mj",
"price_type_name":"每件",
"sort":1,
"price_desc":null,
"min_qty":1,
"max_qty":100
}
]
}
],
"requestId":"0f2cad6ead8f4788b61bdd619f45732e"
}
```
\ No newline at end of file
<a name="menu" href="/doc">返回主目录</a>
1. [产品列表-根据产品大类获取](#getCAProductListByTypeOneCode)
1. [产品列表-根据产品二类获取](#getCAProductListByTypeCode)
1. [产品详情](#getCAProductDetail)
## **<a name="getCAProductListByTypeOneCode"> 产品列表-根据产品大类获取</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductListByTypeOneCode
``` javascript
{
"typeOneCode":"sbfu"
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"id":1,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"zzsbzc",
"item_name":"商标注册【自助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["自己检索商标,准备官方所需注册材料","提交迅速,及时反馈","全流程跟踪,掌握申请进度"]}",
"channel_item_code":"FW_GOODS-581976-1",
"channel_item_name":"商标注册【自助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:29:57.000Z",
"product_id":1,
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":2,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"fzsbzc",
"item_name":"商标注册【专家辅助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["由专业代理人帮您检索分析,成功率高","为您优化注册方案,全方位保护","代理人全流程服务,24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-580010-1",
"channel_item_name":"商标注册【专家辅助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":2,
"price":699,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":3,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"dbsbzc",
"item_name":"商标注册【担保申请】",
"pic_url":"",
"product_desc":"{"logo":"","desc":["专业代理人精准评估,风险共担","注册不成功,全额退款","24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-581978-1",
"channel_item_name":"商标注册【担保申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":3,
"price":1380,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":"",
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
}
],
"requestId":"cb12e4a2f91440ab8f0d79b6845298e8"
}
```
## **<a name="getCAProductListByTypeCode"> 产品列表-根据产品二类获取</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductListByTypeCode
``` javascript
{
"typeCode":"sbzc"
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"id":1,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"zzsbzc",
"item_name":"商标注册【自助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["自己检索商标,准备官方所需注册材料","提交迅速,及时反馈","全流程跟踪,掌握申请进度"]}",
"channel_item_code":"FW_GOODS-581976-1",
"channel_item_name":"商标注册【自助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:29:57.000Z",
"product_id":1,
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":2,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"fzsbzc",
"item_name":"商标注册【专家辅助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["由专业代理人帮您检索分析,成功率高","为您优化注册方案,全方位保护","代理人全流程服务,24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-580010-1",
"channel_item_name":"商标注册【专家辅助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":2,
"price":699,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
},
{
"id":3,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"dbsbzc",
"item_name":"商标注册【担保申请】",
"pic_url":"",
"product_desc":"{"logo":"","desc":["专业代理人精准评估,风险共担","注册不成功,全额退款","24小时拿到官方申请号"]}",
"channel_item_code":"FW_GOODS-581978-1",
"channel_item_name":"商标注册【担保申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:30:34.000Z",
"product_id":3,
"price":1380,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":"",
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null
}
],
"requestId":"3708d266442a45edbfedaf87d26f6400"
}
```
## **<a name="getCAProductDetail"> 产品详情</a>**
[返回到目录](#menu)
##### URL
[/action/product/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getCAProductDetail
``` javascript
{
"channelItemCode":"FW_GOODS-581976-1"
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"id":1,
"uapp_id":16,
"path_code":"sbfu/sbzc",
"path_name":"商标服务/商标注册",
"item_code":"zzsbzc",
"item_name":"商标注册【自助申请】",
"pic_url":null,
"product_desc":"{"logo":"","desc":["自己检索商标,准备官方所需注册材料","提交迅速,及时反馈","全流程跟踪,掌握申请进度"]}",
"channel_item_code":"FW_GOODS-581976-1",
"channel_item_name":"商标注册【自助申请】",
"sort":0,
"productType_id":2,
"created_at":"2020-01-07T15:29:57.000Z",
"product_id":1,
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"channel_profit_rate":0,
"price_type":"mj",
"price_type_name":"每件",
"price_desc":null,
"min_qty":1,
"max_qty":100,
"type_id":2,
"p_id":1,
"type_code":"sbzc",
"type_name":"商标注册",
"type_pic":null,
"type_desc":null,
"type_icon":null,
"p_type_id":1,
"p_type_code":"sbfu",
"p_type_name":"商标服务",
"p_type_pic":null,
"p_type_desc":null,
"p_type_icon":null,
"productPriceList":[
{
"price":300,
"supply_price":0,
"service_charge":0,
"public_expense":0,
"is_default":1,
"price_type":"mj",
"price_type_name":"每件",
"sort":1,
"price_desc":null,
"min_qty":1,
"max_qty":100
}
]
}
],
"requestId":"0f2cad6ead8f4788b61bdd619f45732e"
}
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment