1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
// 获取领导注册qr信息
require_once ("../user_include.inc");
ErrorLogger::doOutput("Compass...test.php....Start.", 0);
$pinyin = new Pinyin();
echo $pinyin->getFirstChar("湖北武汉")."<br/>";
echo $pinyin->getPinyin("北上广")."<br/>";
echo $pinyin->getPinyin("火影")."<br/>";
echo $pinyin->getFirstChar("获得")."<br/>";
echo $pinyin->getFirstChar("TOM")."<br/>";
$userMst = UserMst::getById(31);
//管辖区域
$province = $userMst->province;
$city = $userMst->city;
$district = $userMst->district;
/**
$page = 0;
$rowCount = 20;
$offset = $page * $rowCount;
$param = array();
//$param['province'] = $province;
if(!empty($city)) {
//$param['city'] = $city;
}
if(!empty($district)) {
//$param['district'] = $district;
}
$param['delete_flg'] = false;
$tmpList = SchoolMst::getList($param, 'province', 'asc, city asc, district asc', $offset, $rowCount);
$index = 0;
foreach($tmpList as $tmp) {
$index++;
$tmp->province = "江苏省";
$tmp->city = "南京市";
$tmp->district = "栖霞区";
$tmp->title = "我们的学校" . $index;
$tmp->save();
}
print_r($tmpList);
$param = array();
$param['delete_flg'] = false;
$tmpList = CircleDat::getList($param, 'id', 'asc');
foreach($tmpList as $tmp) {
$tmp->province = "江苏省";
$tmp->city = "南京市";
$tmp->district = "建邺区";
$tmp->save();
}
print_r($tmpList);
$param = array();
$param['delete_flg'] = false;
$tmpList = SocialEventDat::getList($param, 'id', 'asc');
$index = 0;
foreach($tmpList as $tmp) {
$index++;
$tmp->title = "社会实践活动" . $index;
$tmp->author = "老师" . $index;
$tmp->save();
}
print_r($tmpList);
$param = array();
$param['delete_flg'] = false;
$tmpList = UserMessageDat::getList($param, 'id', 'asc');
$index = 0;
foreach($tmpList as $tmp) {
if($tmp->attach_dat_type == "CIRCLE") {
$tmp->title = "您的圈子有一条加入申请";
$tmp->comment = "嘀嘀嘀![聪明的一休]申请加入您的圈子!";
$tmp->save();
}
}
$param = array();
$param['delete_flg'] = false;
$tmpList = SocialEventDat::getList($param, 'id', 'asc');
$index = 0;
foreach($tmpList as $tmp) {
$tmp->content = "<font style='color:red'>此处富文本</font><img src='https://www.baidu.com/img/baidu_jgylogo3.gif'/>";
$tmp->save();
}
*/
ErrorLogger::doOutput("Compass...test.php....End.", 0);
?>