Browse Source

Merge branch 'develop' of zhengxifeng/tyqngp into master

zhengxifeng 2 months ago
parent
commit
e95e19dd79
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      apps/home/model/SitemapModel.php

+ 10
- 2
apps/home/model/SitemapModel.php View File

31
             'a.mcode=b.mcode',
31
             'a.mcode=b.mcode',
32
             'LEFT'
32
             'LEFT'
33
         );
33
         );
34
+        $where = [
35
+            'a.scode NOT IN(13,19,26)',
36
+            'a.pcode NOT IN(13,19,26)',
37
+        ];
34
         $result = parent::table('ay_content_sort a')->field($fields)
38
         $result = parent::table('ay_content_sort a')->field($fields)
35
             ->where('a.status=1')
39
             ->where('a.status=1')
36
             ->where("a.acode='" . get_lg() . "'")
40
             ->where("a.acode='" . get_lg() . "'")
41
+            ->where($where)
37
             ->join($join)
42
             ->join($join)
38
             ->order('a.pcode,a.sorting,a.id')
43
             ->order('a.pcode,a.sorting,a.id')
39
             ->select();
44
             ->select();
50
             'c.type',
55
             'c.type',
51
             'c.urlname',
56
             'c.urlname',
52
             'b.scode',
57
             'b.scode',
58
+            'b.scode as bscode',
59
+            'b.pcode as bpcode',
53
             'b.filename as sortfilename'
60
             'b.filename as sortfilename'
54
         );
61
         );
55
         $join = array(
62
         $join = array(
64
                 'LEFT'
71
                 'LEFT'
65
             )
72
             )
66
         );
73
         );
67
-        
74
+
68
         $where = array(
75
         $where = array(
76
+            'b.scode NOT IN(13,19,26)',
77
+            'b.pcode NOT IN(13,19,26)',
69
             'a.status=1',
78
             'a.status=1',
70
             'c.type=2',
79
             'c.type=2',
71
             "a.date<'" . date('Y-m-d H:i:s') . "'"
80
             "a.date<'" . date('Y-m-d H:i:s') . "'"
72
         );
81
         );
73
-        
74
         return parent::table('ay_content a')->field($fields)
82
         return parent::table('ay_content a')->field($fields)
75
             ->where("a.scode='$scode'")
83
             ->where("a.scode='$scode'")
76
             ->where($where)
84
             ->where($where)

Loading…
Cancel
Save