lxw
2023-11-30 594a88ca5bee4d0f876e2759341db61b554a6d9a
src/main/java/com/whyc/controller/ProductLockLogController.java
@@ -3,6 +3,7 @@
import com.whyc.dto.Response;
import com.whyc.pojo.ProductLockLog;
import com.whyc.service.ProductLockLogService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +12,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
@Api(tags = "产品锁定日志")
@@ -22,10 +25,24 @@
    private ProductLockLogService service;
    @ApiOperation("查询列表-根据母料编码和定制表单号")
    @GetMapping
    @GetMapping("listByParentCodeAndCustomCode")
    public Response getListByParentCodeAndCustomCode(@RequestParam String parentCode,@RequestParam String customCode){
        List<ProductLockLog> lockLogList = service.getListByParentCodeAndCustomCode(parentCode,customCode);
        return new Response().set(1,lockLogList);
    }
    @ApiOperation("查询列表-查询用户的解锁操作")
    @GetMapping("getUnlockByOwner")
    public Response getUnlockByOwner( @RequestParam String createTime, @RequestParam String createTime1,@RequestParam int pageCurr,@RequestParam int pageSize ){
        Date testTime1= null;
        Date testTime2= null;
        try {
            testTime1 = ActionUtil.sdfwithALL.parse(createTime);
            testTime2 = ActionUtil.sdfwithALL.parse(createTime1);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return service.getUnlockByOwner(testTime1,testTime2,pageCurr,pageSize);
    }
}