feat: 更新系统商店逻辑以处理管理员密码和员工信息
This commit is contained in:
parent
e7fef4b83d
commit
3a82a0f435
@ -80,16 +80,31 @@ class SystemStoreLogic extends BaseLogic
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
SystemStore::where('id', $params['id'])->update([
|
||||
$store = SystemStore::where('id',$params['id'])->update([
|
||||
'name' => $params['name'],
|
||||
'introduction' => $params['introduction'],
|
||||
'phone' => $params['phone'],
|
||||
'detailed_address' => $params['detailed_address'],
|
||||
'image' => $params['image'],
|
||||
'latitude' => $params['latitude'],
|
||||
'is_show' => $params['is_show'],
|
||||
'longitude' => $params['longitude'],
|
||||
'is_show' => $params['is_show']
|
||||
'latitude' => $params['latitude'],
|
||||
'day_start' => $params['day_start'],
|
||||
'day_end' => $params['day_end'],
|
||||
'province' => $params['province_code'],
|
||||
'city' => $params['city_code'],
|
||||
'area' => $params['area_code'],
|
||||
'street' => $params['street_code'],
|
||||
]);
|
||||
if($params['password']!=''){
|
||||
$passwordSalt = Config::get('project.unique_identification');
|
||||
$password = create_password($params['password'], $passwordSalt);
|
||||
$taff = [
|
||||
'pwd' => $password,
|
||||
'avatar' => $params['image'],
|
||||
'staff_name' => $params['name'],
|
||||
];
|
||||
SystemStoreStaff::where('store_id', $params['id'])->where('is_admin', 1)->where('account', $params['phone'])->update($taff);
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user