作者 yangfu

地理数据维护

@@ -146,8 +146,8 @@ func (userBase *UserBase) CheckAccountPassword(account, password string) error { @@ -146,8 +146,8 @@ func (userBase *UserBase) CheckAccountPassword(account, password string) error {
146 // account 账号 (手机号) 146 // account 账号 (手机号)
147 // password 密码(sha1) 147 // password 密码(sha1)
148 func (userBase *UserBase) ResetPassword(account, password string) error { 148 func (userBase *UserBase) ResetPassword(account, password string) error {
149 - if userBase.Status != int(UserStatusEnable) {  
150 - return fmt.Errorf("该用户不存在") 149 + if userBase.Status == int(UserStatusDestroy) {
  150 + return fmt.Errorf("该用户已注销")
151 } 151 }
152 if !strings.EqualFold(account, userBase.Account) { 152 if !strings.EqualFold(account, userBase.Account) {
153 return fmt.Errorf("该用户不存在") 153 return fmt.Errorf("该用户不存在")
@@ -2002,5 +2002,49 @@ @@ -2002,5 +2002,49 @@
2002 "name": "省直辖县级行政区划", 2002 "name": "省直辖县级行政区划",
2003 "province": "42", 2003 "province": "42",
2004 "city": "90" 2004 "city": "90"
  2005 + },
  2006 +
  2007 +
  2008 + {
  2009 + "code": "110000",
  2010 + "name": "北京市",
  2011 + "province": "11",
  2012 + "city": "01"
  2013 + },
  2014 + {
  2015 + "code": "120000",
  2016 + "name": "天津市",
  2017 + "province": "12",
  2018 + "city": "01"
  2019 + },
  2020 + {
  2021 + "code": "310000",
  2022 + "name": "上海市",
  2023 + "province": "31",
  2024 + "city": "01"
  2025 + },
  2026 + {
  2027 + "code": "500000",
  2028 + "name": "重庆市",
  2029 + "province": "50",
  2030 + "city": "01"
  2031 + },
  2032 + {
  2033 + "code": "810000",
  2034 + "name": "香港特别行政区",
  2035 + "province": "81",
  2036 + "city": "01"
  2037 + },
  2038 + {
  2039 + "code": "820000",
  2040 + "name": "澳门特别行政区",
  2041 + "province": "82",
  2042 + "city": "01"
  2043 + },
  2044 + {
  2045 + "code": "710000",
  2046 + "name": "中国台湾",
  2047 + "province": "71",
  2048 + "city": "01"
2005 } 2049 }
2006 ] 2050 ]
1 [ 1 [
2 { 2 {
3 "code": "110000", 3 "code": "110000",
4 - "name": "北京", 4 + "name": "北京",
5 "province": "11" 5 "province": "11"
6 }, 6 },
7 { 7 {
8 "code": "120000", 8 "code": "120000",
9 - "name": "天津", 9 + "name": "天津",
10 "province": "12" 10 "province": "12"
11 }, 11 },
12 { 12 {
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 }, 41 },
42 { 42 {
43 "code": "310000", 43 "code": "310000",
44 - "name": "上海", 44 + "name": "上海",
45 "province": "31" 45 "province": "31"
46 }, 46 },
47 { 47 {
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
106 }, 106 },
107 { 107 {
108 "code": "500000", 108 "code": "500000",
109 - "name": "重庆", 109 + "name": "重庆",
110 "province": "50" 110 "province": "50"
111 }, 111 },
112 { 112 {
@@ -156,17 +156,17 @@ @@ -156,17 +156,17 @@
156 }, 156 },
157 { 157 {
158 "code": "710000", 158 "code": "710000",
159 - "name": "台湾", 159 + "name": "台湾",
160 "province": "71" 160 "province": "71"
161 }, 161 },
162 { 162 {
163 "code": "810000", 163 "code": "810000",
164 - "name": "香港特别行政区", 164 + "name": "香港",
165 "province": "81" 165 "province": "81"
166 }, 166 },
167 { 167 {
168 "code": "820000", 168 "code": "820000",
169 - "name": "澳门特别行政区", 169 + "name": "澳门",
170 "province": "82" 170 "province": "82"
171 } 171 }
172 ] 172 ]