正在显示
1 个修改的文件
包含
14 行增加
和
12 行删除
@@ -155,16 +155,16 @@ class AdminCompanyController extends AdminBaseController | @@ -155,16 +155,16 @@ class AdminCompanyController extends AdminBaseController | ||
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | - //创建乙方登录普通管理员账号 | ||
159 | - $userModel = new UserModel(); | ||
160 | - $arr['user_login'] = $res->company_name; | ||
161 | - $arr['user_pass'] = cmf_password('123456'); | ||
162 | - $arr['company_id'] = $res->id; | ||
163 | - $res1 = $userModel->create($arr); | ||
164 | - //role_user表 | ||
165 | - $role['role_id'] = 2; | ||
166 | - $role['user_id'] = $res1->id; | ||
167 | - Db::name('RoleUser')->insert($role); | 158 | +// //创建乙方登录普通管理员账号 |
159 | +// $userModel = new UserModel(); | ||
160 | +// $arr['user_login'] = $res->company_name; | ||
161 | +// $arr['user_pass'] = cmf_password('123456'); | ||
162 | +// $arr['company_id'] = $res->id; | ||
163 | +// $res1 = $userModel->create($arr); | ||
164 | +// //role_user表 | ||
165 | +// $role['role_id'] = 2; | ||
166 | +// $role['user_id'] = $res1->id; | ||
167 | +// Db::name('RoleUser')->insert($role); | ||
168 | $this->success("添加成功!", url("AdminCompany/index")); | 168 | $this->success("添加成功!", url("AdminCompany/index")); |
169 | } | 169 | } |
170 | 170 | ||
@@ -248,7 +248,7 @@ class AdminCompanyController extends AdminBaseController | @@ -248,7 +248,7 @@ class AdminCompanyController extends AdminBaseController | ||
248 | $part_B['u_s_id'] = ','.implode(',',$data['u_s_id']).','; | 248 | $part_B['u_s_id'] = ','.implode(',',$data['u_s_id']).','; |
249 | //营业执照 | 249 | //营业执照 |
250 | $part_B['license'] = $data['license']; | 250 | $part_B['license'] = $data['license']; |
251 | - $part_B['create_time'] = time(); | 251 | + $part_B['update_time'] = time(); |
252 | //公司logo | 252 | //公司logo |
253 | $part_B['logo'] = $data['logo']; | 253 | $part_B['logo'] = $data['logo']; |
254 | $companyModel->where('id',$data['id'])->update($part_B); | 254 | $companyModel->where('id',$data['id'])->update($part_B); |
@@ -272,13 +272,15 @@ class AdminCompanyController extends AdminBaseController | @@ -272,13 +272,15 @@ class AdminCompanyController extends AdminBaseController | ||
272 | $part_A['u_s_id'] = ','.implode(',',$data['u_s_id'.$value]).','; | 272 | $part_A['u_s_id'] = ','.implode(',',$data['u_s_id'.$value]).','; |
273 | //营业执照 | 273 | //营业执照 |
274 | $part_A['license'] = $data['license'.$value]; | 274 | $part_A['license'] = $data['license'.$value]; |
275 | - $part_A['create_time'] = time(); | 275 | + |
276 | //公司logo | 276 | //公司logo |
277 | $part_A['logo'] = $data['logo'.$value]; | 277 | $part_A['logo'] = $data['logo'.$value]; |
278 | if(isset($data['id'.$value])){ | 278 | if(isset($data['id'.$value])){ |
279 | $id = $data['id'.$value]; | 279 | $id = $data['id'.$value]; |
280 | + $part_A['update_time'] = time(); | ||
280 | $companyModel->where('id',$id)->update($part_A); | 281 | $companyModel->where('id',$id)->update($part_A); |
281 | }else{ | 282 | }else{ |
283 | + $part_A['create_time'] = time(); | ||
282 | $companyModel->create($part_A); | 284 | $companyModel->create($part_A); |
283 | } | 285 | } |
284 | } | 286 | } |
-
请 注册 或 登录 后发表评论