|
@@ -13,6 +13,7 @@ import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.plus.entity.*;
|
|
|
import com.gree.mall.manager.plus.service.*;
|
|
|
+import com.gree.mall.manager.utils.StringUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -117,6 +118,13 @@ public class WorkerManagerLogic {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void update(WorkerManagerBean workerManagerBean) {
|
|
|
|
|
|
+ User user = userService.getById(workerManagerBean.getUserId());
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(user.getWorkerNumber())){
|
|
|
+ if (!workerManagerBean.getWorkerNumber().equals(user.getWorkerNumber())) {
|
|
|
+ throw new RemoteServiceException("师傅编号已经录入不允许更改");
|
|
|
+ }
|
|
|
+ }
|
|
|
workerManagerBean.updateById();
|
|
|
|
|
|
|