SystemMemberMiniappCode.php 676 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. *
  7. * 小程序提交状态
  8. */
  9. namespace app\common\model;
  10. use think\Model;
  11. class SystemMemberMiniappCode extends Model{
  12. protected $pk = 'id';
  13. /**
  14. * 添加编辑
  15. * @param array $param 数组
  16. */
  17. public static function edit(array $where,array $data){
  18. $miniapp = self::where($where)->find();
  19. if($miniapp){
  20. return self::where($where)->update($data);
  21. }else {
  22. return self::insert($data);
  23. }
  24. }
  25. }