后端需要接收前端的两个实现类的参数,可以在后端封装一个工具类
SignVo:
package com.hundsun.bontal.demo.VO;
import com.hundsun.bontal.demo.model.TbSignInfo;
import com.hundsun.bontal.demo.model.TbUser;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
public class SignVO {
private TbSignInfo tbSignInfo;
private TbUser tbUser;
}
@RequestMapping(value = "/insert",method = RequestMethod.POST)
@Transactional
public Map saveSignInfo(@RequestBody SignVO signVO){
}
handle12() {
var data1 = sessionStorage.getItem("data");
var testStorageData = JSON.parse(sessionStorage.getItem('username'));
console.log(testStorageData);
//发送请求
axios({
url: '/demo-service/tb_sign_info/insert',
method: 'post',
data: {
tbSigninfo :this.editForm,
tbUser:testStorageData
},
}).then(data => {
//当执行完成后的操作
// Message.success("会签保存成功!你的会签id是:"+data.data.sid);
console.log(this.editForm);
}