|
@@ -7,17 +7,21 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.fuzamei.constant.OperationType;
|
|
|
import com.fuzamei.constant.Roles;
|
|
|
import com.fuzamei.entity.PlannerSupplier;
|
|
|
import com.fuzamei.entity.User;
|
|
|
import com.fuzamei.mapperInterface.PlannerMapper;
|
|
|
import com.fuzamei.mapperInterface.ReceivingClerkMapper;
|
|
|
+import com.fuzamei.mapperInterface.UserMapper;
|
|
|
import com.fuzamei.service.PlannerService;
|
|
|
@Service
|
|
|
public class PlannerServiceImpl implements PlannerService{
|
|
|
@Autowired
|
|
|
private PlannerMapper plannerMapper;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private UserMapper userMapper;
|
|
|
@Override
|
|
|
public List<User> queryPlanner(Map<String, Object> map) {
|
|
|
return plannerMapper.queryPlanner(map);
|
|
@@ -49,7 +53,28 @@ public class PlannerServiceImpl implements PlannerService{
|
|
|
plannerMapper.insertAgainSupplier(pp);
|
|
|
}
|
|
|
|
|
|
- //plannerMapper.insertAgainSupplier(pp);
|
|
|
+
|
|
|
+
|
|
|
+ //下面待改动 XXX
|
|
|
+ //下面往【操作记录】表插入数据
|
|
|
+ Long currentTime = System.currentTimeMillis();//得到当前系统时间
|
|
|
+ User user=new User();
|
|
|
+ String sign = user.getSign();
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ Map<String,Object> map = JSON.parseObject(sign, Map.class);
|
|
|
+ String hash = (String) map.get("sid");
|
|
|
+ user.setOperatorId(user.getUserId());//操作人id
|
|
|
+ user.setOperationTypeId(OperationType.EDIT);//操作类型 (编辑修改)
|
|
|
+ user.setBeOperatedId(user.getUserId());//被操作人账号id TODO??????????????待
|
|
|
+ user.setOperationTime(currentTime);//操作时间
|
|
|
+ user.setHash(hash);//操作hash
|
|
|
+ userMapper.insertOperationHistory(user);//插入到操作记录表去
|
|
|
+
|
|
|
+ /*boolean flag = blockChainUtil.sendBlockChain(user.getSign());//发送签名直接转发到区块链
|
|
|
+ if(!flag) {
|
|
|
+ throw new RuntimeException("区块链操作失败2");
|
|
|
+ }*/
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|