作者 jiawen
1 个管道 的构建 通过 耗费 0 秒

添加产品备注

... ... @@ -111,6 +111,7 @@ class ProductController extends RestBaseController
* @return policy:保单信息 1有 0无
* @return house:房产信息 1全款房 2分期房 0无
* @return car:车辆信息 1全款车 0无 3分期车
* @return remark:备注
* @return is_apply:是否申请该产品贷款(1已申请0未申请)
*/
public function getDetails() {
... ... @@ -131,7 +132,7 @@ class ProductController extends RestBaseController
->join('user u','p.user_id=u.id','left')
->join('card c','p.user_id=c.user_id','left')
->where(['p.id' => $data['id']])
->field('p.id,p.name,p.logo,p.upper_limit,p.lower_limit,p.rate,p.loan_time,p.loan_period,p.loan_flow,p.fee_explain,p.refund_explain,c.company,p.job,p.policy,p.house,p.car')
->field('p.id,p.name,p.logo,p.upper_limit,p.lower_limit,p.rate,p.loan_time,p.loan_period,p.loan_flow,p.fee_explain,p.refund_explain,c.company,p.job,p.policy,p.house,p.car,p.remark')
->find();
if ($result === false) {
$this->error(['code'=>'40000','msg'=>'获取失败']);
... ... @@ -171,6 +172,7 @@ class ProductController extends RestBaseController
* @param name:loan_flow type:int require:1 other: desc:贷款流程
* @param name:fee_explain type:int require:1 other: desc:费用说明
* @param name:refund_explain type:int require:1 other: desc:还款说明
* @param name:remark type:int require:0 other: desc:备注
*
*/
public function addProduct() {
... ... @@ -232,6 +234,7 @@ class ProductController extends RestBaseController
'fee_explain' => $data['fee_explain'],
'refund_explain' => $data['refund_explain'],
'user_id' => $this->userId,
'remark' => $data['remark'] ? : ''
];
$result = Db::name('product')->insert($arr);
if ($result === false) {
... ... @@ -265,6 +268,7 @@ class ProductController extends RestBaseController
* @param name:loan_flow type:int require:1 other: desc:贷款流程
* @param name:fee_explain type:int require:1 other: desc:费用说明
* @param name:refund_explain type:int require:1 other: desc:还款说明
* @param name:remark type:int require:0 other: desc:备注
*
*/
public function editProduct() {
... ... @@ -329,6 +333,7 @@ class ProductController extends RestBaseController
'fee_explain' => $data['fee_explain'],
'refund_explain' => $data['refund_explain'],
'user_id' => $this->userId,
'remark' => $data['remark'] ? : ''
];
$result = Db::name('product')->update($arr);
if ($result === false) {
... ...