| | |
| | | import com.yuanchu.limslaboratory.service.UserService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.limslaboratory.utils.JackSonUtil; |
| | | import com.yuanchu.limslaboratory.utils.JsonUtil; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import com.yuanchu.limslaboratory.pojo.vo.NewPersonnelVo; |
| | |
| | | |
| | | @Override |
| | | public Integer addNewPersonnel(NewPersonnelVo newPersonnelVo, String enterpriseId) { |
| | | try { |
| | | User unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(newPersonnelVo), User.class); |
| | | unmarshal.setEnterpriseId(Integer.valueOf(enterpriseId)); |
| | | return userMapper.insert(unmarshal); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | User unmarshal = JsonUtil.jsonToPojo(JsonUtil.jsonToString(newPersonnelVo), User.class); |
| | | unmarshal.setEnterpriseId(Integer.valueOf(enterpriseId)); |
| | | return userMapper.insert(unmarshal); |
| | | } |
| | | |
| | | @Override |