sns_album.model.php 683 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * 买家相册模型
  4. *
  5. */
  6. defined('InShopNC') or exit('Access Invalid!');
  7. class sns_albumModel extends Model {
  8. public function __construct(){
  9. parent::__construct('sns_albumpic');
  10. }
  11. public function getSnsAlbumClassDefault($member_id) {
  12. if(empty($member_id)) {
  13. return null;
  14. }
  15. $condition = array();
  16. $condition['member_id'] = $member_id;
  17. $condition['is_default'] = 1;
  18. $info = $this->table('sns_albumclass')->where($condition)->find();
  19. if(!empty($info)) {
  20. return $info['ac_id'];
  21. } else {
  22. return null;
  23. }
  24. }
  25. }