package cn.autoform.web.controller.formLock;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import cn.autoform.bean.FormLockEntity;
|
import cn.autoform.fw.exception.RestResult;
|
import cn.autoform.fw.utility.RestResultGenerator;
|
import cn.autoform.web.controller.resumable.redis.FormLock;
|
|
@RestController
|
public class FormLockController {
|
|
@Autowired
|
private FormLock formLock;
|
|
|
@PostMapping("${request.formlock01}")
|
public RestResult<String> getLock(@RequestBody FormLockEntity lock){
|
return RestResultGenerator.genSuccessResult(formLock.getLock(lock.getFormId(), lock.getDataRowNum(), lock.getTenantId(), lock.getCompanyId()));
|
}
|
@PostMapping("${request.formlock02}")
|
public RestResult<String> getKey(@RequestBody FormLockEntity lock){
|
return RestResultGenerator.genSuccessResult(formLock.getKey(lock.getFormId(), lock.getDataRowNum(), lock.getTenantId(), lock.getCompanyId(), lock.getLock()));
|
}
|
@PostMapping("${request.formlock03}")
|
public RestResult<String> unLock(@RequestBody FormLockEntity lock){
|
formLock.unLock(lock.getFormId(), lock.getDataRowNum(), lock.getTenantId(), lock.getCompanyId(), lock.getLock(), lock.getLockInfo());
|
return RestResultGenerator.genSuccessResult(null);
|
}
|
|
}
|