You've already forked FrameTour-BE
打印
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.ycwl.basic.service.printer;
|
||||
|
||||
import com.ycwl.basic.model.pc.printer.entity.PrinterEntity;
|
||||
import com.ycwl.basic.model.pc.printer.resp.MemberPrintResp;
|
||||
import com.ycwl.basic.model.pc.printer.resp.PrinterResp;
|
||||
import com.ycwl.basic.model.printer.req.PrinterSyncReq;
|
||||
import com.ycwl.basic.model.printer.resp.PrintTaskResp;
|
||||
import com.ycwl.basic.model.printer.req.WorkerAuthReqVo;
|
||||
@@ -9,6 +11,8 @@ import com.ycwl.basic.utils.ApiResponse;
|
||||
import java.util.List;
|
||||
|
||||
public interface PrinterService {
|
||||
List<PrinterResp> listByScenicId(Long scenicId);
|
||||
|
||||
ApiResponse<List<PrinterEntity>> list(PrinterEntity condition);
|
||||
|
||||
ApiResponse<PrinterEntity> get(Integer id);
|
||||
@@ -24,4 +28,14 @@ public interface PrinterService {
|
||||
void taskSuccess(Integer taskId, WorkerAuthReqVo req);
|
||||
|
||||
void taskFail(Integer taskId, WorkerAuthReqVo req);
|
||||
|
||||
List<MemberPrintResp> getUserPhotoList(Long userId, Long scenicId);
|
||||
|
||||
boolean deleteUserPhoto(Long memberId, Long scenicId, Long relationId);
|
||||
|
||||
boolean addUserPhoto(Long memberId, Long scenicId, String url);
|
||||
|
||||
MemberPrintResp getUserPhoto(Long memberId, Long scenicId, Long id);
|
||||
|
||||
int setPhotoCropped(Long memberId, Long scenicId, Long id, String url);
|
||||
}
|
@@ -3,6 +3,8 @@ package com.ycwl.basic.service.printer.impl;
|
||||
import com.ycwl.basic.mapper.PrinterMapper;
|
||||
import com.ycwl.basic.model.pc.printer.entity.PrintTaskEntity;
|
||||
import com.ycwl.basic.model.pc.printer.entity.PrinterEntity;
|
||||
import com.ycwl.basic.model.pc.printer.resp.MemberPrintResp;
|
||||
import com.ycwl.basic.model.pc.printer.resp.PrinterResp;
|
||||
import com.ycwl.basic.model.printer.req.PrinterSyncReq;
|
||||
import com.ycwl.basic.model.printer.req.WorkerAuthReqVo;
|
||||
import com.ycwl.basic.model.printer.resp.PrintTaskResp;
|
||||
@@ -20,6 +22,11 @@ public class PrinterServiceImpl implements PrinterService {
|
||||
@Autowired
|
||||
private PrinterMapper printerMapper;
|
||||
|
||||
@Override
|
||||
public List<PrinterResp> listByScenicId(Long scenicId) {
|
||||
return printerMapper.listByScenicId(scenicId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<List<PrinterEntity>> list(PrinterEntity condition) {
|
||||
return ApiResponse.success(printerMapper.list(condition));
|
||||
@@ -108,4 +115,35 @@ public class PrinterServiceImpl implements PrinterService {
|
||||
printerMapper.updateTaskStatus(taskId, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberPrintResp> getUserPhotoList(Long userId, Long scenicId) {
|
||||
List<MemberPrintResp> list = printerMapper.listRelation(userId, scenicId);
|
||||
if (list.isEmpty()) {
|
||||
// 额外逻辑
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteUserPhoto(Long memberId, Long scenicId, Long relationId) {
|
||||
int record = printerMapper.deleteUserPhoto(memberId, scenicId, relationId);
|
||||
return record > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addUserPhoto(Long memberId, Long scenicId, String url) {
|
||||
printerMapper.addUserPhoto(memberId, scenicId, url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemberPrintResp getUserPhoto(Long userId, Long scenicId, Long id) {
|
||||
return printerMapper.getUserPhoto(userId, scenicId, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int setPhotoCropped(Long memberId, Long scenicId, Long id, String url) {
|
||||
return printerMapper.setPhotoCropped(memberId, scenicId, id, url);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user