分答项目_任务1:分类管理_category模型

1、微擎系统定义的常量:系统根目录IA_ROOT
2、模型创建规范
(1)表名称:inxxin_wenda_***
用户_ 项目_ 表名称
(2)微擎系统提供全局函数比如:pagination分页函数
在定义模型类时直接调用即可

public function getList($page,$where ="",$params = array(),$psize = 10){
        global $_W,$_GPC;
        if(empty($page)){
            $page = 1;
        }
        $total = 0;
        $params['uniacid'] = $_W['uniacid'];
        $where .= " AND uniacid = :uniacid";
        $sql = "SELECT * FROM ".tablename($this->table)." WHERE 1 {$where} ORDER BY id DESC limit ".(($page-1)*$psize).",".$psize;
        $result = array();
        $result['list'] = pdo_fetchall($sql,$params);
        $sql = "SELECT COUNT(*) FROM ".tablename($this->table)." WHERE 1 {$where}";
        $total = pdo_fetchcolumn($sql,$params);

        $result['pager'] = pagination($total, $page, $psize);
        if(empty($result)){
            return array();
        }else{
            return $result;
        }
    }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
帮我把以下数据变成json格式:{ "switch_Cash": "Y", "pageMark": "add", "tx_date": "20230305", "cur_no": "1", "sfk_type": "03", "lease_type": "经营租赁", "change_rate": "0", "cap_name": "20220731SYZC000271", "lease_no": "20220731SYZC000271", "contract_key": "6980120220731001", "contract_name": "测试合同20220731-01", "bef_arch_area": "300", "bef_cash_rate: 2.38, "bill_type: 3, "bef_tax_rate: 5, "sfk_term: 4, "bef_tot_pay_time: 2, "bef_eve_amt: 22500, "exe_renew: N, "bef_renew_amt: 0, "bef_renew_eve_amt: 0, "bef_tot_pay_amt: 19047.62, "bef_unset_fin_exp: 221.39, "bef_contract_amt: 45000, "sige_date: 20220731, "bef_arch_position: 广州省佛山市宝芝林, "bef_effect_date: 20220801, "bef_mtr_date: 20240730, "bef_first_fk_date: 20220731,, "bef_renew_eft_date: , bef_renew_mtr_date: , aft_arch_area: 300, aft_bill_type: 3, aft_tax_rate: 5, aft_levy_rate: 5, aft_cash_rate: 2.38, aft_sfk_type: 03, aft_exe_renew: N, is_onchange: N, aft_sfk_term: 4, aft_contract_amt: 45000.00, aft_tot_pay_time: 2, aft_eve_amt: 22500, bef_renew_tot_pay_time: 0, max_term_seqn: 0, aft_effect_date: 20220801, aft_mtr_date: 20240730, aft_first_fk_date: 20220731, aft_renew_eft_date: , aft_renew_mtr_date: , bef_levy_rate: 5, cap_code: fjr0901, lease_no1: 20220731SYZC000271, aft_tot_pay_amt: 42857.14, aft_unset_fin_exp: 184.48999999999796, apply_amt: 23809.52, remark: test0609, change_valid_date: 20230609, cap_name_zh_: 测试资产-20230731-01, cur_no_zh_: 人民币, sfk_type_zh_: 周期性, flowable_: 1, flowable_targetNodeData: {"category":"CWSYS_69","isInput":"1","menuName":"使用权资产变更","pageNo":"cwsys_05_07"}, flowable_file_dataInfo: {"flowable_file_storeType":"undefined","flowable_file_split":false,"flowable_file_canDelete":true,"flowable_file_readOnly":false,"flowable_file_id":"FL-495eabb0-069c-11ee-9b92-59e9b66c35e6"}, cashList: [{"contract_no":"20220731HTXX000001","pay_date":"20220731","no":"20230201XJL000031","pay_amt":"25000.00","term_start_date":"20220801","create_trace_no":"16","tx_date":"0","trace_no":"0","term_end_date":"20230731","pay_sts":"未支付","version":"1","tax_rate":"0.00","term_seqn":"1","tax_amt":"1190.48","pay_sts_val":"0","id":"1","create_date":"20230201","levy_rate":"0.00"},{"contract_no":"20220731HTXX000001","pay_date":"20230731","no":"20230201XJL000032","pay_amt":"20000.00","term_start_date":"20230731","create_trace_no":"16","tx_date":"0","trace_no":"0","term_end_date":"20240730","pay_sts":"未支付","version":"1","tax_rate":"0.00","term_seqn":"2","tax_amt":"952.38","pay_sts_val":"0","id":"1","create_date":"20230201","levy_rate":"0.00"}] }
最新发布
06-13
{ "switch_Cash": "Y", "pageMark": "add", "tx_date": "20230305", "cur_no": "1", "sfk_type": "03", "lease_type": "经营租赁", "change_rate": "0", "cap_name": "20220731SYZC000271", "lease_no": "20220731SYZC000271", "contract_key": "6980120220731001", "contract_name": "测试合同20220731-01", "bef_arch_area": "300", "bef_cash_rate": 2.38, "bill_type": 3, "bef_tax_rate": 5, "sfk_term": 4, "bef_tot_pay_time": 2, "bef_eve_amt": 22500, "exe_renew": "N", "bef_renew_amt": 0, "bef_renew_eve_amt": 0, "bef_tot_pay_amt": 19047.62, "bef_unset_fin_exp": 221.39, "bef_contract_amt": 45000, "sige_date": "20220731", "bef_arch_position": "广州省佛山市宝芝林", "bef_effect_date": "20220801", "bef_mtr_date": "20240730", "bef_first_fk_date": "20220731", "bef_renew_eft_date": "", "bef_renew_mtr_date": "", "aft_arch_area": 300, "aft_bill_type": 3, "aft_tax_rate": 5, "aft_levy_rate": 5, "aft_cash_rate": 2.38, "aft_sfk_type": "03", "aft_exe_renew": "N", "is_onchange": "N", "aft_sfk_term": 4, "aft_contract_amt": 45000.00, "aft_tot_pay_time": 2, "aft_eve_amt": 22500, "bef_renew_tot_pay_time": 0, "max_term_seqn": 0, "aft_effect_date": "20220801", "aft_mtr_date": "20240730", "aft_first_fk_date": "20220731", "aft_renew_eft_date": "", "aft_renew_mtr_date": "", "bef_levy_rate": 5, "cap_code": "fjr0901", "lease_no1": "20220731SYZC000271", "aft_tot_pay_amt": 42857.14, "aft_unset_fin_exp": 184.48999999999796, "apply_amt": 23809.52, "remark": "test0609", "change_valid_date": "20230609", "cap_name_zh_": "测试资产-20230731-01", "cur_no_zh_": "人民币", "sfk_type_zh_": "周期性", "flowable_": 1, "flowable_targetNodeData": { "category": "CWSYS_69", "isInput": "1", "menuName": "使用权资产变更", "pageNo": "cwsys_05_07" }, "flowable_file_dataInfo": { "flowable_file_storeType": "undefined", "flowable_file_split": false, "flowable_file_canDelete": true, "flowable_file_readOnly": false, "flowable_file_id": "FL-495eabb0-069c-11ee-9b92-59e9b66c35e6" }, "cashList": [ { "contract_no": "20220731HTXX000001", "pay_date": "20220731", "no": "20230201XJL000031", "pay_amt": "25000.00", "term_start_date": "20220801", "create_trace_no": "16", "tx_date": "0", "trace_no": "0", "term_end_date": "20230731", "pay_sts": "未支付", "version": "1", "tax_rate": "0.00", "term_seqn": "1", "tax_amt": "1190.48", "pay_sts_val": "0", "id": "1", "create_date": "20230201", "levy_rate": "0.00" }, { "contract_no": "20220731HTXX000001", "pay_date": "20230731", "no": "20230201XJL000032", "pay_amt": "20000.00", "term_start_date": "20230731", "create_trace_no": "16", "tx_date": "0", "trace_no": "0", "term_end_date": "20240730", "pay_sts": "未支付", "version": "1", "tax_rate": "0.00", "term_seqn": "2", "tax_amt": "952.38", "pay_sts_val": "0", "id": "1", "create_date": "20230201", "levy_rate": "0.00" } ] }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值