打印尝试 2
This commit is contained in:
@@ -16,6 +16,7 @@ import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -29,7 +30,7 @@ import java.util.List;
|
||||
* @author Administrator
|
||||
* @since 2025-02-10
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff> implements ShopStaffService {
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@@ -116,6 +116,22 @@ public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable
|
||||
return queryChain().eq(ShopTable::getShopId, shopId).eq(ShopTable::getTableCode, tableCode).one();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableAreaAndName(Long shopId, String tableCode, String tableName) {
|
||||
ShopTable shopTable = getOneByTableCode(shopId, tableCode);
|
||||
if (shopTable == null) {
|
||||
return tableName;
|
||||
} else {
|
||||
ShopTableArea shopArea = shopAreaService.getOne(new QueryWrapper().eq(ShopTableArea::getShopId, shopId)
|
||||
.eq(ShopTableArea::getId, shopTable.getAreaId()));
|
||||
if (shopArea == null) {
|
||||
return tableName;
|
||||
} else {
|
||||
return shopArea.getName() + "-" + shopTable.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit) {
|
||||
response.setCharacterEncoding(request.getCharacterEncoding());
|
||||
response.setContentType("application/octet-stream");
|
||||
|
||||
Reference in New Issue
Block a user