|
@@ -8,10 +8,12 @@ import com.tld.model.Container;
|
|
|
import com.tld.model.Department;
|
|
|
import com.tld.model.Scrap;
|
|
|
import com.tld.service.ContainerService;
|
|
|
+import org.apache.http.HttpRequest;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -40,9 +42,10 @@ public class ContainerServiceImpl implements ContainerService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public Map<String, Object> addContainer(Container container) {
|
|
|
+ public Map<String, Object> addContainer(Container container , HttpServletRequest request) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
try{
|
|
|
+ container.setModifyUser(request.getHeader("userId"));
|
|
|
containerMapper.addContainer(container);
|
|
|
map.put("msg", "200");
|
|
|
}catch (Exception e){
|
|
@@ -55,9 +58,10 @@ public class ContainerServiceImpl implements ContainerService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public Map<String, Object> updateContainer(Container container) {
|
|
|
+ public Map<String, Object> updateContainer(Container container , HttpServletRequest request) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
try{
|
|
|
+ container.setModifyUser(request.getHeader("userId"));
|
|
|
containerMapper.updateContainer(container);
|
|
|
map.put("msg", "200");
|
|
|
}catch (Exception e){
|